Forum Moderators: not2easy

Message Too Old, No Replies

Photoshop and resizing

How to resize the largest dimension

         

Nutter

2:00 am on Apr 14, 2005 (gmt 0)

10+ Year Member



Is there a way in Photoshop CS to resize so that the largest dimension is 400px and have the short side resized down to match? I know I can go in to the resize dialog and enter 400 in one of the fields, but I'm trying to set up an action to do it for me. And I'd like to run it on a directory full of files without needing to worry about some being landscape and some being portrait.

Thanks,
- Ryan

lZakl

4:38 pm on Apr 14, 2005 (gmt 0)

10+ Year Member



If you have a Mac you could possibly write an AppleScript for it? I don't think PS can differentiate within the same action, an external script will probably need to be used to accomplish this.

Just me, but I would separate my landscape and portraits manually into two different folders, and then run one of two separate actions, one each for landscape and portrait. Action1 would batch the "Landscape"folder, and Action2 would batch the "Portrait" folder.

In addition:
I have a script that uses the GD library with PHP to accomplish the same task, because I can tell it:

if ($width > $height)
{
$var = "landscape";
}

if ($width <= $height)
{
$var = "portrait";
}

So this may also be an option, or like I said, you could write a plugin for photoshop that does the same thing with AppleScript if you use Mac. I wouldn't know how to do this on a PC, sorry :0P

-- Zak

Nutter

4:45 pm on Apr 14, 2005 (gmt 0)

10+ Year Member



I've actually got a PHP / ImageMagick script that does the same thing, but I'm trying to stay in one program as much as possible :-)

benihana

12:45 pm on Apr 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



you can actually script in photoshop to run powerful actions using logic.

its not something ive actually used myself, but this search [google.com] should get you started.

Nutter

4:06 pm on May 2, 2005 (gmt 0)

10+ Year Member



Turns out I was making this way too difficult. After setting up actions for both portrait and landscape and almost getting the JS to work to call the correct action I found the "Fit" command. It's under File->Automate. Punch in the max dimensions you want (my case - 400x400) and it'll resize the image to fit.

juhlster1021

7:07 pm on May 2, 2005 (gmt 0)

10+ Year Member



Thanks for posting, Nutter. This will come in very handy for me!