Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JPEG EOF vs EOI marker

The JPEG file signature states that the JPEG EOI (End of Image) marker is given by the final FF D9. However I very occasionally come across JPEGs that also have a small amount of data following this EOI (in this example 02 24 ...):

FF D8 FF E1
...
...
FF D9
02 24 02 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48 00 00 00 00 00 00 00 00 00 00 00 00 27 10 00 00 00 00 00 00 00 00 27 10 00 00 00 00 27 10 00 00 27 10 00 00 00 00 00 00 00 00 27 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 41 58 53 21 00 1E 5D 32 00 00 00 00

Does the JPEG standard allow for data following the EOI marker or is this additional binary data corruption?

If this is not corruption what information is encoded in these final bytes?

like image 271
MarcF Avatar asked Oct 06 '15 13:10

MarcF


People also ask

What is an EOI marker?

For example, files using the Joint Photographic Experts Group (JPEG) compression standard begin with the header 0xFF 0xD8 and end with the footer 0xFF 0xD9 . These are also known as Start-of-Image (SOI) and End-of-Image (EOI) markers respectively.

Which is better JPEG or JFIF?

JPEG/JFIF is the currently most popular format for storing and transmitting photographic images on the internet, while JPEG/Exif is that for digital cameras and other image capture devices. Most folks don't distinguish the difference between these variations and simply refer to them both as just JPEG.

What is JPG format signature?

JPEG (Joint Photographic Experts Group) is a commonly used method of lossy compression for digital images, mostly for those images produced by digital photography.

What is the difference between JPEG and JFIF?

JPEG (Joint Photographic Experts Group) is a lossy compression method standardised by ISO. JPEG JFIF, which is what people generally mean when they refer to "JPEG", is a file format created by the Independent JPEG Group (IJG) for the transport of single JPEG-compressed images.


1 Answers

The JPEG standard only defines a JPEG data stream. That is what goes between the SOI and EOI markets. Anything outside that is outside JPEG.

JPEG does not define a file format so technically there is nothing wrong with having extra data at the begin or the end. However, most decoders will puke if you have extra data before the SOI marker.

like image 103
user3344003 Avatar answered Oct 30 '22 02:10

user3344003