Moritz Barsnick
2018-12-10 16:26:38 UTC
units (1 byte) Units for the X and Y densities.
units = 0: no units, X and Y specify the pixel aspect ratio
units = 1: X and Y are dots per inch
units = 2: X and Y are dots per cm
Xdensity (2 bytes) Horizontal pixel density
Ydensity (2 bytes) Vertical pixel density
The "density" (unless they intentionally reversed the meaning of theunits = 0: no units, X and Y specify the pixel aspect ratio
units = 1: X and Y are dots per inch
units = 2: X and Y are dots per cm
Xdensity (2 bytes) Horizontal pixel density
Ydensity (2 bytes) Vertical pixel density
word) is always the inverse of the aspect ratio.
Did they reverse the meaning in your opinion?
Does it make sense to argue that if the unit is "0", the meaning of the
density changes?
That was my interpretation. It's a density, if units != 0, otherwiseDoes it make sense to argue that if the unit is "0", the meaning of the
density changes?
the aspect ratio. (Would a density not correspond to the SAR? I.e. not
make sense with square pixels?)
I was wondering what other implementations do? jpglib, *Magick.
Reference images? I didn't find anything quickly, but one may need to
check closer.
Cheers,
Moritz