convert -units PixelsPerCentimeter -density 37.8 MSVG:wizard.svg tmp1.png
Image: tmp1.png
Format: PNG (Portable Network Graphics)
Mime type: image/png
Class: DirectClass
Geometry: 370x492+0+0
Resolution: 37.8x37.8
Print size: 9.78836x13.0159
Units: PixelsPerCentimeter
convert -units PixelsPerCentimeter -density 37.8 MSVG:wizard.svg tmp1.jpg
Image: tmp1.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Mime type: image/jpeg
Class: DirectClass
Geometry: 370x492+0+0
Resolution: 37x37
Print size: 10x13.2973
Units: PixelsPerCentimeter
Looks like for JPG, the Resolution is being truncated and this affects the print size.
[RESOLVED]discrepancy in verbose information converting SVG to PNG and JPG IM 6.9.10.17 Q16 Mac OSX
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: discrepancy in verbose information converting SVG to PNG and JPG IM 6.9.10.17 Q16 Mac OSX
This is still an issue in IM 6.9.10.20 and IM 7.0.8.20
Re: discrepancy in verbose information converting SVG to PNG and JPG IM 6.9.10.17 Q16 Mac OSX
The JFIF resolution marker is integer. To get a fractional resolution you must include an EXIF profile that includes the resolution field. ImageMagick detects this and updates the resolution field with the fractional resolution.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: discrepancy in verbose information converting SVG to PNG and JPG IM 6.9.10.17 Q16 Mac OSX
Sorry, I do not understand. When I set the resolution to a fractional value, why does it not adjust the JFIF marker to permit the fractional value?
Re: discrepancy in verbose information converting SVG to PNG and JPG IM 6.9.10.17 Q16 Mac OSX
The JFIF marker only supports 2-byte integer values. EXIF uses 4-byte integers (its divided by 65536) permitting fractional values. See the JFIF format specification.