On Wed, 19 Sep 2018 21:44:56 +0200 Andrea Bogazzi <andreabogazzi79@...400...> wrote:
Just wanted to add the maybe non usefull information, but nice to know, that pngs are weirdly in DOT per METER. I think they are the only graphic format to do so.
Being the conversion between meter and inch not an integer, you cannot have either 96 or 300 or 600dpi, but some float number in the nearby.
Here's the relevant part of the actual PNG specification, in case somebody wants to quote it to the fool with 30 years experience ("Dunning-Kruger effect", haha).
https://www.w3.org/TR/PNG/#11pHYs
The pHYs chunk specifies the intended pixel size or aspect ratio for display of the image. It contains:
Pixels per unit, X axis 4 bytes (PNG unsigned integer) Pixels per unit, Y axis 4 bytes (PNG unsigned integer) Unit specifier 1 byte
The following values are defined for the unit specifier:
0 unit is unknown 1 unit is the metre
When the unit specifier is 0, the pHYs chunk defines pixel aspect ratio only; the actual size of the pixels remains unspecified.
If the pHYs chunk is not present, pixels are assumed to be square, and the physical size of each pixel is unspecified.
There's obviously nothing that stops you from assuming that the "unknown" unit is actually inches, or anything else, and setting the pixels/unit values accordingly.
Maybe the Inkscape interface could be adjusted to allow the PNG output resolution to be specified in dots/cm as well as dots/inch, and set the unit specifier to 1 or 0, accordingly.