How to resize images so that they fit into a given frame?

MP
Posted By
Malte_Persike
Jun 4, 2004
Views
1279
Replies
14
Status
Closed
Hello everybody!

I´ve got a problem in Photoshop 7. I have a bunch of about a thousand pictures and they all have different, unsystematic aspect ratios (not the standard 4:3 size).
My goal is to reduce their size so that they fit into a frame of 640 x 480 pixels. The dilemma is that when i tell Photoshop to reduce the height to 480 pixels, every picture with an aspect ratio above 4:3 (e.g. 1000×500 pixels) will exceed the frame’s width. The opposite with very high but thin pictures. If I told Photoshop to reduce their width to 640 pixels the picture will remain too high for the frame.

Is there a (batch-able) way in Photoshop to fit pictures with arbitrary aspect ratios to a given picture size while retaining the original aspect ratio?

Kind regards,
Malte

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

MM
Mac_McDougald
Jun 4, 2004
You can use an action to do what you want, play it back on folder of files for automation, but you going to have to do a crop somewhere looks like.

IF you could live with 640 pixels wide and let the other dimension fall where it may, just record an action for a resize to 640 and play back on entire directory.

If you MUST have exactly 640 by 480, and have origs that don’t fit that, you can still be done as batch, IF you crop each image the same. Action would:
– Use Rectangular marquee, Fixed Aspect Ratio, 4:3
– Set the marquee
– Crop
– Resize long side to 640 pixels.

If you have images that are both horiz and vertical, you’ll probably need to make two actions, and separate your files into horiz and vert and play the appropriate action back on those folders.

If you must decide the crop on each image, you could still do an action, and have it pause for your input, I suppose.

M
MP
Malte_Persike
Jun 4, 2004
IF you could live with 640 pixels wide and let the other dimension fall where it may, just record an action for a resize to 640 and play back on entire directory.

If you MUST have exactly 640 by 480, and have origs that don’t fit that, you can still be done as batch

Hi Mac,

thank you very much for your reply.

The pictures MUST not have exactly 640 x 480, in fact they better should not. The first alternative you suggested is straight on the point. I indeed want a picture to be 640 pixels wide and the other dimension can fall where it – unless it is not higher than 480 pixels.

The problem is that because of the arbitrary aspect ratios I do not know if I have to resize on the vertical or on the horizontal.

Say, one picture was 1280×500. When I tell photoshop to resize the image to a width of 640 and keep the aspect ratio, the resulting picture will be 640×250 pixels. That would be fine.
But, if I have a picture with a size of 1280×1000, things go wrong. Thre resized picture would be 640×500 pixels, and therefore wider than what I want.

So, whether I need photoshop to resize a picture to the width of 640 and keep the aspect ratio or to the height of 480 and keep the a.r. depends on the size of the orginal picture.

What I am searching for is a little bit like a thumbnail tool where the original picture gets fitted into the thumbnail size, maintaining the original aspect ratio. However, I need to keep the layers and psd format so I cannot go for a classic thumbnailer.

Any ideas?
Malte
MM
Mac_McDougald
Jun 5, 2004
It’s a simple fact of math, that if your 640 wide image gives more than 480 on the other, you can only crop to get what you want.

You can resize with Constrain Proportions: Off, to get ANY final size you want, on either dimension, but of course this will "warp" the image if the aspect ratio is different to begin with.

Mac
MP
Malte_Persike
Jun 5, 2004
It’s a simple fact of math, that if your 640 wide image gives more than 480 on the other, you can only crop to get what you want.

I already worried my English would not suffice to get my point across. I’ very sorry for the incovenience, Mac.

What I want to achieve is to resize a picture of arbitrary aspect ratio so that it fits into a frame. I may well happen that the resized picture fully fills the height of the frame but not the width.

Like, for example, a photo that was taken *not* in landscape mode but with the short side up. If the picture had a size of 1080×1440 pixels, it is clear that it cannot be perfectly fitted into the 640×480 frame. But I can tell photoshop to reduce the width of the photo by 1/3 and maintain the aspect ratio. The resized picture would be 360×480 pixels – and fit into my 640×480 frame.

On the other hand, a stiched photo might be 1280×480 pixels in size. Here I would have Photoshop reduce the width proportionally by 1/2 which would give a picture of 640×240.

These two would be perfectly fine. The width or height of the frame would not be filled by the photo but that’s how it is supposed to be. Just like the thumbnail images you see in Windows Explorer. Regardless of the aspect ratio, they all get resized to fit into the thumbnail area. That’s similar to what I want to do to my collection of Photoshop pictures.

Is there a way to do it in Photoshop?

Kind regards,
Malte
MV
Mathias_Vejerslev
Jun 5, 2004
File>Automate>Fit Image does what you want. You can record an action with it, and batch a directory.
MM
Mac_McDougald
Jun 5, 2004
Never mind… Mathias has it nailed, methinks.
MM
Mac_McDougald
Jun 5, 2004
Duh, there’s your solution!

I forgot about Fit Image….perfect!

M
MP
Malte_Persike
Jun 5, 2004
Thank you so much!
That’s what I was searching for. You two have helped me a lot.

Kind regards,
Malte
MM
Mac_McDougald
Jun 5, 2004
I didn’t do anything but add complications to a simple matter.

M
MV
Mathias_Vejerslev
Jun 5, 2004
Sorry to spoil your fun, Mac.. No need to reinvent the wheel. Fit Image is yet another handy little photoshop feature.
MM
Mac_McDougald
Jun 5, 2004
I spend time on Elements forum also (have clients I support who use it)…and sometimes I still forget about a full Photoshop feature.

M
TL
Thomas L Barnett
Jun 6, 2004
Can you tell me why my "fit image" is grayed out? I run PS CS. Please help!

Janice Barnett, Texas
MV
Mathias_Vejerslev
Jun 6, 2004
Janice,

Do you have an image open? (Necessary).
MM
Mick_Murphy
Jun 6, 2004
Have you got a file open?

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!

Related Discussion Topics

Nice and short text about related topics in discussion sections