[RESOLVED]possible bug with density/units IM 6.9.10.16 Q16
Posted: 2018-12-14T13:50:08-07:00
Testing with IM 6.9.10.16 Q16 Mac OSX, I find that providing density and units for output to PNG is not working correctly. These issues go back at least as far as 6.9.8.10, which was as far back as I could go easily.
Input:
In the following, the result shows no density and units are undefined even though I supplied both.
convert 1.png -verbose -strip -resize 350x350 -quality 35 -units pixelsperinch -density 35x35 output-THDPI.png
If I remove the strip, then I get Resolution and Units, but the density is not converted from pixelsperinch to pixelspercentimeter.
convert 1.png -verbose -resize 350x350 -quality 35 -units pixelsperinch -density 35x35 output-THDPI.png
Input:
Code: Select all
Image: 1.png
Format: PNG (Portable Network Graphics)
Mime type: image/png
Class: DirectClass
Geometry: 1000x1000+0+0
Resolution: 39.37x39.37 <--- OK
Print size: 25.4001x25.4001
Units: PixelsPerCentimeter <--- OK
Colorspace: sRGB
Type: PaletteAlpha
Base type: Undefined
Endianess: Undefined
Depth: 8-bit
In the following, the result shows no density and units are undefined even though I supplied both.
convert 1.png -verbose -strip -resize 350x350 -quality 35 -units pixelsperinch -density 35x35 output-THDPI.png
Code: Select all
Image: output-THDPI.png
Format: PNG (Portable Network Graphics)
Mime type: image/png
Class: DirectClass
Geometry: 350x350+0+0
Units: Undefined <--- should be pixelsperinch and Resolution should be converted to those units, but no resolution shows.
Colorspace: sRGB
Type: PaletteAlpha
Base type: Undefined
Endianess: Undefined
Depth: 8-bit
If I remove the strip, then I get Resolution and Units, but the density is not converted from pixelsperinch to pixelspercentimeter.
convert 1.png -verbose -resize 350x350 -quality 35 -units pixelsperinch -density 35x35 output-THDPI.png
Code: Select all
Image: output-THDPI.png
Format: PNG (Portable Network Graphics)
Mime type: image/png
Class: DirectClass
Geometry: 350x350+0+0
Resolution: 35x35 <--- this density is wrong as it should be converted from pixelsperinch to pixelspercentimeter.
Print size: 10x10
Units: PixelsPerCentimeter <---- correct units