Technical Specifications 5 of 7
File Structure
A JPEG file is encoded with markers and compressed image data. JFIF and Exif are common interchange or metadata conventions layered around JPEG image data; .jpg versus .jpeg does not identify which convention is present.
JPEG coding uses markers and compressed scan data. A file can be valid yet contain metadata that a recipient ignores. A file called .jpg may be JFIF-oriented, Exif-oriented, or otherwise arranged. Conversely, a renamed PNG does not become a JPEG. Validate content and metadata, not only the extension.
