maphix Posted April 15, 2011 Share Posted April 15, 2011 Hi, I'm writing a piece of code to read physical pixel size from PNG header and I use images created by Paint.NET to test it. What I noticed is that Paint.NET never sets unit specifier to 1 in pHYs chunk which according to specification (1) means the resulting PNG does not specify physical pixel dimensions, only pixel aspect ratio. When opening PNG on the other hand, Paint.NET seems to treat the information stored in pHYs chunk as physical pixel dimensions even though unit specifier is set to 0. I wanted to ask whether this behavior is intentional for some reason (e.g. because most apps do it that way etc.), or it is something that should be considered as a bug. In other words I'm trying to assess whether it will be safe for us to use information in pHYs chunk no matter what value unit specifier has. Thanks guys for your opinions - I have minimal experience in this field and your opinion will help me very much. M. (1) http://www.w3.org/TR/PNG/#11pHYs PS: Out of curiosity I just tried to save JPEG using Paint.NET and the unit specifier for DPI in JFIF header is set properly. One more reason to think that the way DPI in PNG is saved is intentional? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.