Help! Action for image to fit to canvas size?

LS
Posted By
Lizz_Shaw
Jan 21, 2004
Views
2259
Replies
13
Status
Closed
I have over 10000 jpegs which need to be resized and scaled to 650×650 pixels at 72 dpi. They need to keep their original proportions, thus some will have tram lines of the background colour.

Now these 10000 images are all different resolutions and more importantly different orientations. I’m using Photoshop 7 (Win)

I was wondering whether there is a series of actions that I can apply to the directory of images, that would automatically do this for me?

The only way I can think of is to separate the images into portrait and landscape directories and then e.g. set an action for the landscape images to make the ‘image size’ width = 650 pixels and then the ‘canvas size’ height = 650 pixels.

Is there an action I can apply to the whole directory though? portrait and landscape alike? I need something like – ‘canvas size’ width = 650 pixels x height = 650 pixels, and then transform – fit to canvas! Something like that – but is there a function that will do it?
If you could give me any advice at all I’d much apreciate it!

Kind regards,

Lizz Shaw

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

MV
Mathias_Vejerslev
Jan 21, 2004
Lizz,

First make an action that uses File>Automate>Fit Image to fit all the images to within 650×650, then an action step that makes the canvas size 650×650 exactly.

Piece of cake when you know how 😉

Mathias
Y
YrbkMgr
Jan 21, 2004
Lizz,

The only way I can think of is to separate the images into portrait and landscape directories

You are correct. If you are familiar with scripting, and use the scripting plug-in, you can create a script that determines if width is longer than height and "If then" rotate it. You may get more help with this in the scripting forum at the top.

In lieu of scripting, then you will need to rotate some images first, and others will not be rotated.

One way to do this in v7 of Photoshop is to use the file browser. You can use the file browser to first select files that need to be rotated, then right click and choose your rotation.

Then select ALL of the files. You can then tell the Batch Dialog to use the Browser selected files instead of telling it to use a directory as a source for the images. All of those images flagged with a rotation from your previous step will first be rotated before your action is applied.

So…. using Mathais’ suggestion…

Open an image and create an action that does File|Automate|Fit Image, and then perform whatever else needs to be done, then save the file.

When you do File|Automate}Batch, you call that Fit and Save action action, using the browser as the source.

That will rotate your landscape images appropriately, not rotate the ones that don’t need to be rotated, and scale them all to fit within a 650 x 650 size, then save.

Peace,
Tony
LS
Lizz_Shaw
Jan 21, 2004
You are both angels!! Thank you so much – my weekends are saved!!

Best Wishes

Lizz
MV
Mathias_Vejerslev
Jan 21, 2004
You dont need to rotate any images, or separate them, or anything like that with Fit Image. Or, I´m not understanding why.
L
larry
Jan 22, 2004
Mathias is correct. Using the File>Automate>Fit Image command will resize all your images regardless of orientation and keep the proportions correct. One operation will do your entire folder of images.

Larry Berman
Y
YrbkMgr
Jan 22, 2004
Mathias,

Or, I´m not understanding why.

Rotate your digital camera side-ways and snap a photo. When you bring it into the computer, it’s orientation is landscape, when it’s supposed to be portrait.

Fit Image will only adjust the dimensions, not it’s orientation. It will only make sure that the aspect ratio is preserved upon resizing. So if you have a sideways picture of your mom that is 600 x 800, using fit image with a setting of 340 x 340 will reduce the longest dimension to 340 (in this example the 800), and adjust the other dimension accordingly to maintain aspect ratio. It’s still sideways though.

Peace,
Tony
MV
Mathias_Vejerslev
Jan 22, 2004
Tony,

Did OP mention that she has pics turned on their side? I dont see it, but its getting late. I interpret her ‘different orientations’ to mean both portrait and landscape. If I´m wrong, then you are, ofcourse correct, and vice-versa 🙂

My 10D tags its images according to orientation (small sensor in the camera), so the image will appear correct when opened in Photoshop.
MV
Mathias_Vejerslev
Jan 22, 2004
Lizz,

One minor point:

If you build an action for batch (as is recommended), make it look something like this:

File>Automate>Fit Image, 650×650
Sharpen
Define background color
Image>Canvas Size>650×650
Save

The position of sharpen is important here. You´ll have to sharpen after any resampling, and doing so prior to enlarging the canvas is important in order to not get halos around the image.

Mathias
Y
YrbkMgr
Jan 22, 2004
Mathias,

You could be right. I interpreted

Now these 10000 images are all different resolutions and more importantly different orientations

To mean some images are oriented correctly and others are not. I could be wrong in that interpretation.

Frankly it’s simply unclear, but if they’re all oriented the way that they are supposed to be, then you’re right. <shrug>.
JS
John_Slate
Jan 22, 2004
Whether or not the images are sideways, the prescribed action will do what she wants.
Y
YrbkMgr
Jan 22, 2004
John,

Do you mean to say that if some images are oriented incorrectly, and she wishes for them to be oriented correctly, that Fit Image will do that?
LS
Lizz_Shaw
Jan 22, 2004
Sorry Gent to have caused confusion!

Apologies if my use of english has caused this misunderstanding, when I refered to different orientations – I meant that some images were portrait and some landscape – thus Mathias’s fit image works a treat!

Thank you all for your prompt responses!

Kind regards

Lizz
Y
YrbkMgr
Jan 22, 2004
Not your fault at all Lizz. Glad you got it sorted.

Mathias, Larry, John,

Sorry. Too much coffee I guess.

Dyslexics of the world… UNTIE!

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

Related Discussion Topics

Nice and short text about related topics in discussion sections