0

I have parsed the bitstream to extract each block. I have counted the correct number of blocks based on the size of my image (3440) and it brings me nicely to the EOI marker ([255, 217]), so I am confident I have done this much correctly.

However there are ~1000 more bytes of data after this EOI marker, followed by another EOI. My image is greyscale and consists only of a Luminance component, as confirmed by the header. What is this mystery data??

It seems to be important in some way, because the image is an unintelligible mess if it is removed...

Mike H
  • 21
  • 3

1 Answers1

0

The only way I can think of having more than one EOI marker would be a second one within a thumbnail. If you are scanning for markers, you need to skip over those with lengths. It it possible to have something that looks like an EOI within a marker with a length.

That said, I don't know how you can calculate the location of the EOI marker because scans have no length indicator.

user3344003
  • 20,574
  • 3
  • 26
  • 62