Page 1 of 1

Retaining original DPI in convert command.

Posted: 2013-06-25T02:59:04-07:00
by rethna2
I am converting my image to grayscale using :

Code: Select all

convert test.jpg -recolor '0.2225 0.7169 0.0606 0.2225 0.7169 0.0606 0.2225 0.7169 0.0606' grayscale.jpg
Though my image is 96dpi or 300dpi, my converted image is always 72dpi. How to retain the original dpi.

I don't know beforehand the dpi of the incoming image. (it varies from 72 to 300dpi).

Somebody pls help. :)

Re: Retaining original DPI in convert command.

Posted: 2013-06-25T06:23:30-07:00
by snibgo
What version IM are you using, and what platform?

For v6.8.6-0 on Windows, your command retains the resolution.

Re: Retaining original DPI in convert command.

Posted: 2013-06-25T09:54:33-07:00
by fmw42
Though my image is 96dpi or 300dpi, my converted image is always 72dpi. How to retain the original dpi.
What tool is saying your density is 72dpi? Is it IM identify -verbose yourimage? Or something else? Also how do you know your input image density is 96dpi or 300dpi?