开发者

Does Exif metadata always get stored just after the JFIF header?

In JPEG files, Does the exif metadata always gets stored as the first marker? Or it can be in between other markers?

The following has a comment that "After the APP1 Marker area, the other JPEG Markers follows." http://www.media.mit开发者_Python百科.edu/pia/Research/deepview/exif.html Is it confirmed?

Thanks


Specs (http://www.exif.org/Exif2-2.PDF) say that - yes - APP1 must come first, right after SOI (ffd8), but sometimes APP0 (JFIF) comes first, right before APP1. It cannot be considered as proper usage, since both specs - JFIF and EXIF state that corresponding markers should immediately follow SOI. But on practice it turns out that such cases happen pretty often, and image editors and viewers interpret such "non-proper" hybrid files correctly.


There are two common types of JPEG files: JPEG/JFIF and JPEG/Exif.

Both specs (JFIF and Exif) require that their corresponding header appears directly after the SOI (Start of Image) marker.

In the case of JFIF it is an APP0 marker, in the case of Exif it is an APP1 marker.

It is possible to have a JPEG/JFIF file with an Exif block somewhere later in the file. I've noticed that this happens when exporting a JPEG/Exif file from iPhoto. iPhoto ends up converting it into a JPEG/JFIF file, but retains the Exif metadata somewhere later in the file.

However, beyond the requirement that the header for the corresponding file format must come first, there is no restriction on ordering of other APP# marker blocks in the file. Therefore the Exif block can happen at an arbitrary position in a JPEG/JFIF file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜