OT: scaling images

Jay Ashworth jra at baylink.com
Mon Aug 22 14:36:08 PDT 2011


----- Original Message -----
> From: "Enrique Arredondo" <henry at vegena.net>

> I need to rescale lots of images keeping the same ratio, the output has to
> be 1500x1500 and the problem I'm having is that if the image is 1500x634 ,
> I don't know how to make that 1500-634 pixel difference white. Any Ideas ?

Your problem is insufficiently clearly defined.  Are you scaling up, down,
or both?  When you say "keeping the same ratio", do you mean "preserving the 
aspect ratio of the original" or "each image must be scaled by the same 
amount"?

If you mean "preserving the aspect ratio of the original", then yes,
ImageMagick's convert and mogrify programs will do that.

I believe that you then mean "and I need the final image to be centered in
a white panel 1500x1500px -- that is, that it needs to be either letterboxed,
or pillarboxed, depending on the original image's orientation".

If that's what you mean, then you should also be able to do that with 
ImageMagick using [ ... ] IM's composite program, and a fixed initial 
1500x1500 white image.

I cannot guarantee that you'll get clean edges; I don't know how 1500 fits 
into JPGs DCT blocks.

Cheers,
-- jra
-- 
Jay R. Ashworth                  Baylink                       jra at baylink.com
Designer                     The Things I Think                       RFC 2100
Ashworth & Associates     http://baylink.pitas.com         2000 Land Rover DII
St Petersburg FL USA      http://photo.imageinc.us             +1 727 647 1274


More information about the Filepro-list mailing list