Photoshop: Doesn't load pgm files correctly.

  • 2
  • Problem
  • Updated 5 years ago
  • In Progress
The following PGM file doesn't load correctly:

P2
4 4
511
0 0 511 511
0 0 511 511
0 0 511 511
0 0 511 511

It seems to have something to do with the fact that the maximum gray value (Maxval) is greater than 255. But maximum gray values between 1 and 65535 are allowable according to the spec. It is correctly determined that a 16 bits-per-channel format is needed, but the pixels are in the wrong place.
Photo of Chad Faragher

Chad Faragher

  • 1 Post
  • 0 Reply Likes
  • disappointed.

Posted 5 years ago

  • 2
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 812 Reply Likes
Hmm, I think that when that code was written (early 90s), PGM was limited to a maximum of 255. I'll take a look and see if that can be fixed/updated.