~adj/JImageReader#6: 
GMARBLES.PCX is suspicious, end of file reached

One of the test images from the Internet is GMARBLES.PCX. I'd noted years ago that it failed the test suite. Lately I investigated in more detail. All rows are fine until row 997, which suggests that the processing occurred as expected, or some pixels would not have matched the PNG (likely generated with IrfanView). But then it deviates, and investigation found:

  • The colors it spews out seem to match the palettte
  • Adding debugging info for where in the files the row starts, and then examining row 997 in the hex editor, shows a pattern of FF 00 thirteen times, indicating 819 pixels of black, followed by 0xC0 (192, ambiguous), and then the palette, verified by calculating the offset of 768 from the end of the file. Thus, it is spewing out the palette.
  • Image (the image viewer) and GIMP do the same thing as JImageReader. Only IrfanView prints out black pixels to the end, as indeed might be expected based on the rest of the image.

So, with 2/3 of the available test programs agreeing with the old behavior, I'm wondering if IrfanView is the odd one out in this case? I'm also wondering how this image was generated. What did it look like in its original program?

I think my next test program will be Paintbrush for Windows 3.11, which derives from the original ZSoft Paintbrush, and should provide an informative answer. I just have to figure out a good way to transfer the files to 3.11, and alas my floppy disks are MIA currently.

Status
REPORTED
Submitter
~adj
Assigned to
No-one
Submitted
3 years ago
Updated
1 year, 2 months ago
Labels
No labels applied.