Page 1 of 1

Resolution set to 170 dpi, but Windows Explorer insits on 72 dpi

Posted: 2015-02-04T08:39:30-07:00
by whugemann
I often rescale photos in order to embed them in a Microsoft Word document and print them. My batch code is basically

Code: Select all

convert %1 -resize 1024x1024">" -quality 80%% -units PixelsPerInch -density 170 "%~dpn1_small.jpg"
This works fine with most JPEGs, i.e. photos and JPEGs exported by Gimp, but fails on JPEGs written with Photoshop, see
http://www.unfallrekonstruktion.de/dacngised/test.jpg.

IM's Identify responds

Code: Select all

Resolution: 170x170
Print size: 6.02353x4.51765
Units: PixelsPerInch
but the Windows Explorer still insists on a horizontal and vertical resolution of 72 dpi, and Word seems to do the same, as the photo will be much too large when inserted into a documented via Drag 'n Drop.

What exactly is the problem?

Re: Resolution set to 170 dpi, but Windows Explorer insits on 72 dpi

Posted: 2015-02-04T08:43:18-07:00
by snibgo
The problem may be Photoshop metadata. Try "-strip" before the output filename.

Re: Resolution set to 170 dpi, but Windows Explorer insits on 72 dpi

Posted: 2015-02-10T09:04:50-07:00
by whugemann
The problem seems to be solved in current versions of IM. I have just installed the current version, and now even the JPEGs exported by Photoshop are recognised with the correct resolution -- both by the Windows Explorer and Microsoft Word.

Up to now I still ran IM 6.8.0-1, dating from 2012: This was the version all of my scripts where tested with, and new versions can also mean new bugs. And yes, one should update from time to time, even at the risk of new bugs. But up to now I thought that there was something missing in my command line ...