Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Script : resize images depending on orientation ?

0 views
Skip to first unread message

Dworkin

unread,
Jun 30, 2003, 3:35:53 AM6/30/03
to
Hello to all,
I'd like to resize a big number of images, and a friend of mine can do
that with a script. Problem : he doesn't seem to be able to calculate
the size depending on the picture's orientation.

eg the final size of a "landscape" should be 640x480, while a
"portrait" should be 480x640. Yet, with the script he has, I get a
picture that's about 640x850 !

Any idea / hint / link ?

Thank in advance !
Dworkin

edjh

unread,
Jun 30, 2003, 4:01:11 AM6/30/03
to

In other words, you want the longest dimension always to be 640? Try
File>Automate>Fit Image.

--
Comic book sketches and artwork:
http://www.sover.net/~hannigan/edjh.html


Xalinai

unread,
Jun 30, 2003, 11:27:19 AM6/30/03
to

use irfanview's (->google) standard batches.

It is free and it is a relatively small download.

Michael

Warren Sarle

unread,
Jun 30, 2003, 3:25:56 PM6/30/03
to

In article <3effe745...@news.free.fr>,
tr...@bidule.net (Dworkin) writes:
> ...

> I'd like to resize a big number of images, and a friend of mine can do
> that with a script. Problem : he doesn't seem to be able to calculate
> the size depending on the picture's orientation.
>
> eg the final size of a "landscape" should be 640x480, while a
> "portrait" should be 480x640. Yet, with the script he has, I get a
> picture that's about 640x850 !

It's simple to write a Javascript, VBScript, or Applescript
to resize an image if you know *exactly* what you want it to do.
Do you want a portrait image always to be 480x640 and a landscape
image always to be 640x480? What if the original is square? Or
Do you want to maintain the proportions of the image? If so, do
you want an upper bound on the height or width or both? Are you
running on Windows or a Mac? Do you want the script to process
one image, and then use the Photoshop Batch facility to process
entire directories of images, or do you want the script itself
to process all the images in a directory? Or do you want to be
able to provide a list of directories or file names to be processed,
or do you want to be able to use wild cards or regular expressions
to specify which files to process?

Since this sort of question comes up rather often, I might post
a script to do batch resizing. I have one in VBScript that I've
been experimenting with to process multiple directories. I might
do one in Javascript to process a single image; it could then
be run on multiple images using Photoshop's Batch command.


--

Warren S. Sarle SAS Institute Inc. The opinions expressed here
sas...@unx.sas.com SAS Campus Drive are mine and not necessarily
(919) 677-8000 Cary, NC 27513, USA those of SAS Institute.

Dworkin

unread,
Jul 2, 2003, 5:16:19 AM7/2/03
to
On 30 Jun 2003 19:25:56 GMT, sas...@unx.sas.com (Warren Sarle) wrote:
>
>It's simple to write a Javascript, VBScript, or Applescript
>to resize an image if you know *exactly* what you want it to do.
>Do you want a portrait image always to be 480x640 and a landscape
>image always to be 640x480? What if the original is square? Or
>Do you want to maintain the proportions of the image? If so, do
>you want an upper bound on the height or width or both? Are you
>running on Windows or a Mac? Do you want the script to process
>one image, and then use the Photoshop Batch facility to process
>entire directories of images, or do you want the script itself
>to process all the images in a directory? Or do you want to be
>able to provide a list of directories or file names to be processed,
>or do you want to be able to use wild cards or regular expressions
>to specify which files to process?

Thanks for the analysis...
That's a lot of questions, that I had kept at the back of my head.

Indeed, original size, orientation and proportion vary...

Any idea on how to handle this ?

BR,
Dworkin

Andrew Morton

unread,
Jul 2, 2003, 7:37:28 AM7/2/03
to
You could use ImageReady and choose the fit by width and height option when
resizing the image.

Andrew

Xalinai

unread,
Jul 2, 2003, 2:26:10 PM7/2/03
to

I already mentioned irfanview.

Set maximum target size for width and height, tell it to keep the
height:width aspect, select the files and GO.

So why re-invent the wheel?

Michael

Dworkin

unread,
Jul 3, 2003, 7:20:26 AM7/3/03
to
On Wed, 02 Jul 2003 18:26:10 GMT, xal...@xalinai.de (Xalinai) wrote:
>I already mentioned irfanview.
>
>Set maximum target size for width and height, tell it to keep the
>height:width aspect, select the files and GO.
>
>So why re-invent the wheel?
>
>Michael

D/Led it, indeed, recently. Can't recall wheter there was a Mac port ?


Dworkin

Xalinai

unread,
Jul 3, 2003, 12:47:20 PM7/3/03
to

Ah - I always forget that many Photoshop users an on a Mac
platform....

No, I dont think so.

Michael

0 new messages