Page 1 of 1

Reduce page size without "losing quality" (increase dpi)

Posted: 2016-07-06T11:38:09-07:00
by DreamFlasher
Hi,
I tried to read the manual and search the forum first to achieve what I am aiming at, I have the impression it should be trivial but I don't get it. I'd appreciate your help and sorry for the trivial question.

Input image: 3672 x 4869 px, 72 dpi
Desired output: height 297.302 mm (a4), and the corresponding dpi value so that I don't lose more information that what is necessary (which is approximately 420 dpi)

Bonus question: I also would like to rotate left in the same step, do I do this better before or after the resize?

Thank you,
Marcel

Re: Reduce page size without "losing quality" (increase dpi)

Posted: 2016-07-06T11:48:09-07:00
by fmw42
Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images,

See viewtopic.php?f=1&t=9620

Note that IM works with pixels and not mm. So you need to resize to the pixel dimensions that you want and then set the density you want. You can rotate afterwards, since by then the image will be smaller.

Re: Reduce page size without "losing quality" (increase dpi)

Posted: 2016-07-06T12:01:45-07:00
by snibgo
The basic answer is to use "-density 416 units PixelsPerInch" or whatever value you want.

Re: Reduce page size without "losing quality" (increase dpi)

Posted: 2016-07-07T16:11:56-07:00
by DreamFlasher
Thank you fmw42 and snibgo! With your hint fmw42 I came up with what snibgo wrote, so thank you both of you :)
My final code:

Code: Select all

mogrify -rotate "-90" -density "420" *.jpg