Is there a theoretical maximum to the amount of metadata (EXIF, etc) that can be incorporated in a JPEG file? I'd like to allocate a buffer that is assured to be sufficient to hold the metadata for any JPEG image without having to parse it myself.
相关问题
- I want to read exif info in image in android. I ca
- Is it possible to use the TestCafe .meta object to
- Convert transparent PNG image into transparent JPE
- Downloading YouTube to mp3 and writing metadata (a
- Hibernate 5.2 get natural id properties from metam
相关文章
- How to write CUSTOM metadata into JPEG with Python
- How do I append metadata to an image in Matlab?
- What file sytems support Java UserDefinedFileAttri
- c# saving very large bitmaps as jpegs (or any othe
- What share of Android devices benefits from Libjpe
- Does using image sprites make sense in HTTP/2?
- Restlet can't get the data with Android
- add GPS metadata dictionary to image taken with AV
Each APPN data area has a length field that is 2 bytes, so 65536 would hold the biggest one. If you are just worried about the EXIF data, it would be a bit less.
http://www.fileformat.info/format/jpeg/egff.htm There are at most 16 different APPN markers in a single file. I don't think they can be repeated, so 16*65K should be the theoretical max.
There is no theoretical maximum, since certain APP markers can be used multiple times (e.g. APP1 is used for both the EXIF header and also the XMP block). Also, there is nothing to prevent multiple comment blocks.
In practice the one that is much more common to result in a large header is specifically the APP2 marker being used to store the ICC color profile for the image. Since some complicated color profiles can be several megabytes, it will actually get split into many APP2 blocks (since each APP block one has a 16bit addressing limit).
Wikipedia states: