How it works
The file is read as raw bytes and never decoded as an image. Its container is identified from its first bytes, not its name, and walked one structure at a time — JPEG marker segments, including those between the scans of a progressive JPEG; PNG chunks; WebP RIFF chunks; the boxes of a HEIC, AVIF or CR3 file, where the Exif and XMP data are items located through the iloc table; every directory and SubIFD of a TIFF, BigTIFF or TIFF-based RAW file — and each kind of metadata goes to its own parser. EXIF is a miniature TIFF file inside the image: a byte-order mark (II or MM) and directories of twelve-byte entries, followed from IFD0 into the Exif, GPS and Interoperability directories and on to the thumbnail. IPTC is read from the Photoshop resource blocks in APP13, honouring the character set it declares. XMP packets — including extended XMP split across several JPEG segments — are parsed as XML and flattened into prefix:name = value. A multi-segment ICC profile is put back together and its header and description read, and compressed PNG text and profiles are inflated with the browser’s own DecompressionStream. Every length and offset is checked against the bytes that are really there, and a directory that points back to one already read is refused, so a damaged or crafted file ends in a note, not a frozen tab.
Values are then turned into what a camera display would show, and the ones a camera implies but does not store are worked out. Fractions such as 10/2500 become 1/250 s; every enumerated tag becomes words; APEX shutter and aperture values stand in when the plain ones are missing; the 35 mm equivalent comes from its own tag or, failing that, from the sensor size the focal-plane resolution implies, and is labelled estimated; the field of view, crop factor, megapixels and aspect ratio follow from those. Capture time is shown with its sub-seconds and offset and converted to UTC. The camera maker’s private maker note is located the way each vendor frames it (Canon, Nikon, Sony, Fujifilm, Olympus/OM System, Panasonic, Pentax, Apple, Samsung — each with its own header and offset base) and its documented fields named, Canon’s settings arrays included. Where a vendor hides the useful fields, the ciphers ExifTool documents are applied: Nikon’s LensData and ShotInfo are decrypted with a key made from the camera’s serial number and shutter count, and the lens bytes are matched against ExifTool’s LensID table; Sony’s 0x9050 and 0x9400 blocks are deciphered (each byte b was stored as b³ mod 249) and read with the layout the model uses; Pentax’s shutter count is unscrambled against its date and time. Canon model and lens IDs become names, and when one LensType number is shared by several lenses the recorded focal range and aperture narrow the list. These name tables are loaded only when a file from that maker is opened. Text that is not UTF-8 is scored as Shift_JIS, EUC-JP, JIS, GB18030, Big5 and EUC-KR by which decoders read it cleanly and how much of it falls in each standard’s common characters; when two readings are close the winner is marked as a guess and the others are shown beside it. The file’s own structure is described too — JPEG encoding and a quality estimate, PNG chunks, WebP features, HEIF items and codec, TIFF directories, RAW format details — and fields that name a person, place or serial number are flagged, wherever they were found. The OpenStreetMap link is built from the coordinates, but nothing is loaded from it.
Removal — for JPEG, PNG and WebP only — reuses the same walk. Metadata parts are left out and every other byte is copied in order, so the compressed image data is untouched and the cleaned file decodes to exactly the same pixels. A JPEG keeps its JFIF header, its Adobe segment (which tells decoders how to convert the colours) and, unless you untick it, its ICC colour profile. Because dropping EXIF also drops Orientation, a photo that relied on it gets a new 36-byte EXIF block holding only that tag. A WebP has its VP8X feature flags and RIFF size rewritten to match, and anything stored after the end of the image — where some phones append a preview or a video clip — is removed as well.