|
![](/i/fill.gif) |
While digging through the image reading code for PGM and PPM files, I
noticed something strange regarding the handling of the "maxvalue"
header field:
(A) In PPM files, the value appears to be consistently interpreted as
the value that would represent 1.0. The same applies to PGM files with a
"maxvalue" of 255 or less.
(B) For PGM files with a "maxvalue" of 256 or higher however, maxvalue
appears to be effectively ignored, and the values interpreted as if
65535 would represent 1.0.
Can someone confirm this in practice?
Any suggestions how to handle this? I would consider (B) a bug and
change it - even at the cost of potentially breaking existing scenes,
speculating that most files with a "maxvalue" > 255 do have a value of
65535 anyway.
Post a reply to this message
|
![](/i/fill.gif) |