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?