Comment 26 for bug 165952

Revision history for this message
Alvin Penner (apenner) wrote :

with respect to image resolution, and the difficulty of maintaining a consistent resolution, the problem appears to be the rather unusual units used by PNG files. The PNG file stores resolution in units of dots/meter, in the pHYs chunk in the header. This means that 90 dpi will get converted to 3543.3 dots per meter, which will get rounded off to 3543, and when you re-import this file, then the dpi will be less than 90 consistently.
    One possible workaround would be to force the dpi to be in units of 0.1 dpi when importing a png file, I mean round it off to the nearest 0.1 dpi. This would be consistent with the resolution used in the spinboxes on the png export dialog. The resolution of 0.1 dpi is less precise than the PNG resolution because 0.1 dpi is roughly 4 pixels/meter. So there would be little danger of generating random garbage caused by round off error.