01

A JPEG is more than one compressed block

The SOI marker starts the image, frame markers describe dimensions and coding mode, tables support decoding, SOS begins entropy-coded scan data and EOI ends the image. Application markers sit among those structures and let formats such as JFIF, EXIF, XMP, ICC, IPTC and JUMBF coexist with JPEG pixels.

02

APP1 needs a payload-level label

APP1 is a numbered application slot, not a synonym for EXIF. An Exif payload begins with its own identifier and TIFF structure; standard and extended XMP use Adobe namespace identifiers. A reliable inspector reads those identifiers and leaves an unfamiliar APP1 payload unknown instead of guessing.

Key points
  • Exif identifier
  • Standard XMP identifier
  • Extended XMP identifier
  • Unknown APP1 remains unknown
03

Follow the marker sequence before reading metadata

JPEG markers begin with FF followed by a marker code. Most marker segments then declare a two-byte big-endian length that includes the length field itself. Standalone markers such as SOI, EOI and restart markers do not use that segment-length shape.

A safe mapper validates the declared boundary before reading a payload. After SOS, compressed scan bytes can contain escaped FF values and restart markers, so the parser must distinguish entropy-coded data from the next real marker rather than searching for text blindly.

Key points
  • SOI starts the image
  • SOF describes the frame
  • SOS starts a scan
  • EOI closes the image
04

APP0, APP1 and APP2 answer different questions

APP0 commonly begins with a JFIF or JFXX identifier and can include density or thumbnail information. APP1 is used by EXIF and XMP conventions. APP2 can carry an ICC profile split into numbered pieces when the profile does not fit one segment.

The APP number provides a storage slot, not a complete semantic label. Payload identifiers, ordering and continuation rules identify the convention. Unknown data should remain application-specific instead of being renamed as EXIF merely because it occupies APP1.

05

EXIF APP1 is a TIFF structure inside JPEG

An EXIF APP1 payload begins with the Exif identifier and then a TIFF header whose byte order controls later integers and offsets. Image file directories point to camera, capture, GPS, interoperability and thumbnail values that may be located elsewhere inside the same payload.

Offsets are attack and corruption boundaries as well as metadata mechanics. A valid APP1 segment length does not guarantee every TIFF pointer is safe, so the metadata parser applies its own bounds and field limits after the structure inspector has mapped the outer JPEG segment.

Key points
  • Exif identifier
  • TIFF byte order
  • Image file directories
  • Bounded value offsets
06

Standard and extended XMP need separate handling

Standard XMP uses a namespace identifier followed by an XML packet. Large packets can use an extended-XMP convention with a different identifier and multiple pieces. A structure map can label those outer variants without executing markup or assuming every packet is complete.

XMP can describe rights, edits, creator tools, locations or workflow history, but ordinary XMP is editable. Treat it as useful context, compare it with EXIF and file history, and use signed provenance when a stronger integrity claim is required.

07

Where IPTC, ICC and C2PA-related data can appear

APP13 can contain Photoshop image resources, including IPTC data used by editorial workflows. APP2 may contain ICC color profile sequences. APP11 can contain JUMBF structures, which C2PA uses for embedded JPEG manifest stores.

Finding APP11 is only a compatibility clue. The file still needs a C2PA verifier to evaluate claims, hashes, signatures and trust. Likewise, finding APP13 or APP2 does not validate the meanings or completeness of the resources inside them.

Key points
  • APP13: possible IPTC resources
  • APP2: possible ICC sequence
  • APP11: possible JUMBF/C2PA
  • Verifier required for cryptographic status
08

Diagnose incomplete and unusual JPEG files carefully

A segment crossing the file boundary, missing frame header, absent scan or missing EOI can explain an application failure. A tolerant decoder may still display some pixels, but that does not turn an incomplete marker sequence into a clean container.

Preserve the original, record the error offset and test a copy in a trusted decoder. If you re-export, compare dimensions, orientation, color and metadata before using the derivative. Never repair an evidentiary original in place or claim the new file restores its former byte history.

What this does not prove

A metadata result describes the fields and structures that the supported parser could read. It does not, by itself, prove authenticity, intent, authorship or the truth of the visible scene.

Sources