Resizing Different Size Images to the SAME Size

5 views (last 30 days)
Hi all,
I would like to change several different size images to make them the same exact size. However, when I simply resize them, some of them look distorted, as they get stretched or compressed to fit into that size.
How do I resize multiple pictures and make them the same exact specified size while maintaining each picture's proportion?
Thanks so much!
  6 Comments
Walter Roberson
Walter Roberson on 13 Oct 2012
Not if any of them are different aspect ratios from the other, not unless you are willing to lose part of the picture.
For example, suppose one image was 800 x 400, and another image was 400 x 250. You can expand the second image to 800 high with no distortion by doubling in both dimensions, but that would get you 800 x 500 rather than 800 x 400 like the first image is. You could throw away 100 after the expansion to 800 x 500, but that would lose information. If you were to resize the 800 x 500 to be 800 x 400 without cutting out any information and without adding padding, then objects would end up scaled to 4/5 of their original width, which would (for example) squash circles into ellipses.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!