Page 1 of 1

Downsample JPEG to 72x72

Posted: 2013-04-10T15:06:19-07:00
by wingo
Hello Everyone,

I am hoping someone might be able to help me out. I am trying to use ImageMagick to convert an image that is 1400x900 with a resolution of 254x254. i am trying to get it to a size of 1100x600 with a resolution of 72x72. I have tried to use -resize -resample with the quality arg. I don't seem to be able to get it done. I have tried my suggestions from the web, but none so far have worked out. Anyone have an command line that might work for this. Running on Mountain Lion.

Thanks Bob.

Re: Downsample JPEG to 72x72

Posted: 2013-04-10T15:24:26-07:00
by snibgo
This should do the job:

Code: Select all

convert in.jpg -resize 1100x600! -density 72 out.jpg

Re: Downsample JPEG to 72x72

Posted: 2013-04-10T16:11:34-07:00
by wingo
Thanks, that did the trick for the resolution! Not sure how I missed that one.

Re: Downsample JPEG to 72x72

Posted: 2013-04-10T19:52:27-07:00
by henrywho
Depending on the image content, you may also want to refer to the resize algorithms and the gamma issues mentioned in:

http://www.imagemagick.org/Usage/filter ... downsample

For example:

Code: Select all

convert in.jpg -colorspace RGB -filter LanczosRadius           -distort Resize 1100x600! -density 72 -colorspace sRGB out.jpg
convert in.jpg -colorspace RGB -filter LanczosSharp            -distort Resize 1100x600! -density 72 -colorspace sRGB out.jpg
convert in.jpg -colorspace RGB -define filter:window=Quadratic -distort Resize 1100x600! -density 72 -colorspace sRGB out.jpg