Page 1 of 1

Bug in JPEG processing (reading no markers after SOS)?

Posted: Mon Apr 03, 2006 9:30 pm
by MaierMan
The "issue" is the following:
After the SOS marker is encountered in a JFIF complicant file no further markers are read.

In not quite sure if it is actually allowed to have markers after SOS section, but I did not find anything (JFIF spec, JPEG spec) thats says no. But I just had a quick glance.

And it seems no problem to read stuff after SOS...
as each 0xFF is considered a new marker except it is escaped with a trailing 0x00. Hence you know when a new section starts even after SOS.

I created a small testfile which is available from:
http://celebnamer.celebworld.ws/stuff/x ... st.SOS.jpg
It has a COM and APP13 (IPTC) section after the SOS section.

This is either a bug or maybe I'm wrong and violate the specs by adding sections after SOS?
Can you clarify this?