background

Eclipsis

An astronomic framework

Camera file formats

Cameras and phones save photos in some thirty formats. This tab lists them all: who makes them, which container they live in, how they are recognised, and which ones the Camera clock page accepts. The list follows ExifTool's table of formats and is the same as the registry the site uses to check uploaded files (wsgi-scripts/lib/verifica_immagini.py), tested on one real file per format from the public raw.pixls.us archive.

How a format is recognised

Not from the extension, which whoever saves the file chooses and which proves nothing, but from the content. Formats belong to a few container families: each family has a signature in the first bytes and a structure of its own, and within the family the format is told apart by a detail — the maker written in the file, a marker, the brand of the ISO container. Most RAW files, for instance, are TIFFs: a NEF, an ARW and a PEF have the same signature and differ only in the Make tag (Nikon, Sony, Pentax).

The site checks every uploaded file in two steps, before handing it to any program. The extension must be among those the page allows and the first bytes must carry the signature of the format's family; then the structure of the family is walked — the markers of a JPEG, the IFDs of a TIFF, the boxes of an ISO container, the headers of RAF, X3F, CRW and MRW — with every length and every offset checked against the size of the file, and the rule of the format is checked. Only then does the file reach whoever really reads it. The security reasons are explained in the In depth tab of the clock page.

The formats

In the time.php column, yes means that the clock page accepts the format; for the others the reason is given. Historical means that no camera on sale writes it any more.

FormatExtensionsMakersRecognised byStatustime.php
JPEG — signature FF D8 FF
JPEG.jpg .jpeg .jpeall cameras and phonesthe signaturecurrentyes
MPO.mpostereoscopic cameras (Fujifilm W3, Nintendo 3DS)the signaturehistoricalno: historical format
PNG — signature 89 50 4E 47 0D 0A 1A 0A
PNG.pngphone and computer screenshots (cameras do not write it)the signaturecurrentyes
TIFF and TIFF-based RAW — signature II*\0 or MM\0*
GoPro GPR.gprGoPro (DNG with VC-5 compression)DNGVersion tag and maker GoProcurrentno: no JPEG preview in the files
Adobe DNG.dngLeica, Pentax and Ricoh, Sigma fp, DJI, phones (Apple ProRAW, Android)DNGVersion tagcurrentyes
Canon CR2.cr2Canon, models from 2004 to 2018“CR” 2 marker at byte 8currentyes
Nikon NEF.nefNikon, DSLRs and Z mirrorlessmaker in IFD0: Nikoncurrentyes
Nikon NRW.nrwNikon Coolpixmaker in IFD0: Nikoncurrentyes
Sony ARW.arwSony Alpha, RX and ZVmaker in IFD0: Sonycurrentyes
Sony SR2.sr2Sony DSC-R1, 2005maker in IFD0: Sonyhistoricalno: historical format
Sony SRF.srfSony DSC-F828, 2003maker in IFD0: Sonyhistoricalno: historical format
Pentax PEF.pefPentax and Ricohmaker in IFD0: Pentax or Ricohcurrentyes
Hasselblad 3FR.3frHasselblad, medium formatmaker in IFD0: Hasselbladcurrentno: no JPEG preview in the files
Phase One IIQ.iiqPhase One and Leaf, digital backsmaker in IFD0: Phase One or Leafcurrentno: no JPEG preview in the files
Samsung SRW.srwSamsung NX, 2010-2015maker in IFD0: Samsunghistoricalno: historical format
Epson ERF.erfEpson R-D1, 2004-2009maker in IFD0: Epsonhistoricalno: historical format
Leaf MOS.mosLeaf, digital backs until about 2012tag 0x8606 (Leaf data), no Makehistoricalno: historical format
Mamiya MEF.mefMamiya ZDmaker in IFD0: Mamiyahistoricalno: historical format
Kodak DCR.dcrKodak DCS, until 2005maker in IFD0: Kodakhistoricalno: historical format
Kodak KDC.kdcKodak EasyShare, until 2012maker in IFD0: Kodakhistoricalno: historical format
TIFF.tif .tiffin-camera conversion (Fujifilm) and historical camerasnone of the RAW markscurrentno: a TIFF decoder would be needed
TIFF with the Olympus signature — signature IIRO, IIRS, MMOR
Olympus ORF.orfOlympus and OM Systemthe signaturecurrentyes
Olympus ORI.oriOM System, base frame of high-resolution shotsthe signaturecurrentyes
TIFF with the Panasonic signature — signature IIU\0
Panasonic RW2.rw2Panasonic Lumixmaker in IFD0: Panasoniccurrentyes
Leica RWL.rwlLeica compacts made with Panasonic (D-Lux, C)maker in IFD0: Leicacurrentyes
ISO box container — signature ftyp at byte 4
Canon CR3.cr3Canon, since 2018ISO brand crxcurrentyes
AVIF.avifweb format, rare in photographic devicesISO brand avif, aviscurrentno: an HEVC or AV1 decoder would be needed
HEIF.heic .heif .hifCanon, Sony, Nikon, Fujifilm (.hif); iPhone and Android (.heic)ISO brand heic, heix, hevc…currentno: an HEVC or AV1 decoder would be needed
Fujifilm — signature FUJIFILMCCD-RAW
Fujifilm RAF.rafFujifilmthe signaturecurrentyes
Sigma — signature FOVb
Sigma X3F.x3fSigma with Foveon sensor (SD and DP series)the signaturehistoricalno: historical format
Canon CIFF — signature HEAPCCDR at byte 6
Canon CRW.crwCanon, until 2004the signaturehistoricalno: historical format
Minolta — signature \0MRM
Minolta MRW.mrwMinolta and Konica Minolta, until 2006the signaturehistoricalno: historical format

Formats that cameras do not write

  • PNG: these are phone and computer screenshots, not camera photos; the clock page accepts it like JPEG.
  • WebP, GIF, BMP: formats of the web and of programs.
  • JPEG XL: no camera writes it as a file of its own; since DNG 1.7 (2023) it is one of the possible compressions inside a DNG.
  • Video (MP4, MOV, CRM, BRAW): outside this registry.

What the real files taught

  • The makers' quirks. Panasonic cameras write in the RW2 a data offset of 0xFFFFFFFF with zero length (the real data sit in a tag of their own); the Hasselblad H3D declares in the 3FR, for compressed data, the uncompressed length (79 MB in a 53 MB file); the Kodak P712 points the interoperability IFD into the middle of the data; Leaf MOS files have no Make tag. The registry tolerates these quirks, one by one and documented in the code, without giving up the other checks.
  • A real wrong extension. The "DNG" sample of the Samsung SM-G973U in the raw.pixls.us archive is a JPEG: the registry rejects it as a DNG and accepts it as a JPEG.
  • ExifTool is not an oracle. The Ubuntu 24.04 version (12.76) also calls NRW the NEF files of the Nikon Z5 II and Z6 III; the site's cross-check accepts both names for Nikon files.
  • The previews. From RAW files the clock page reads the embedded JPEG preview, nearly always at full resolution (from 1920 pixels on the long side in RW2 files to 5088 in the CR3 of the R5 Mark II); in some DNGs it is small (852 pixels in the iPhone XS, 640 in the Pentax K-r), and the Sigma fp DNG, the 3FR, the IIQ and the GPR of the samples have none.
  • Robustness. The registry tests alter at random the first 64 kB of every sample and truncate it: 416 variants, no validator error and at most a few thousandths of a second per file.

Sources

  • ExifTool, Supported File Types: exiftool.org.
  • raw.pixls.us, public archive of RAW files under the CC0 licence: raw.pixls.us (the 32 test samples, one per format, with their SHA-256 hashes in work/campioni_fotocamere/FONTI.md).
  • Adobe, TIFF Revision 6.0, 1992; ISO 12234-2:2001, TIFF/EP.
  • Adobe, Digital Negative (DNG) Specification, version 1.7.1.0, September 2023.
  • ITU-T T.81 | ISO/IEC 10918-1, JPEG, 1992; ITU-T T.871, JPEG File Interchange Format, 2011; CIPA DC-008, Exif; CIPA DC-007, Multi-Picture Format.
  • ISO/IEC 14496-12, ISO base media file format; ISO/IEC 23008-12, HEIF; Alliance for Open Media, AV1 Image File Format (AVIF).
  • W3C, Portable Network Graphics (PNG) Specification (Third Edition), Recommendation of 24 June 2025: w3.org.
  • L. Clévy, Describing the Canon Raw v3 (CR3) file format: github.com/lclevy/canon_cr3.

This tab tells where the formats in the table come from, what is inside a RAW file, what the signatures say, how each format is built and why the clock page accepts only some of them. Upload security and the time the camera writes in its files are covered in the In depth tab of the Camera clock page.

Thirty years of formats

Today's formats are layers of decisions taken at different times. First came the container, TIFF; then the way to compress, JPEG, and the way to annotate the shot, Exif. With the first digital SLRs each maker chose a format of its own for the raw sensor data, nearly always built on TIFF; Adobe's DNG tried to give everyone an open format, and phones adopted it. In recent years photos have moved into the container of videos.

YearWhat
1986Aldus and Microsoft publish TIFF: a container made of labels (the tags) gathered in directories (the IFDs), from which most RAW formats descend.
1991Kodak DCS, a Nikon F3 body with a 1.3-megapixel sensor: the first digital SLR on sale.
1992The JPEG standard (ITU-T T.81) and the JFIF file format; revision 6.0 of TIFF, still current.
1995Exif 1.0: date, time, exposure, maker and model written inside the file.
1998DCF: the DCIM folder and names such as IMG_1234.JPG, so that a memory card can be read by any device.
1999–2002The RAW formats of the first DSLRs: NEF of the Nikon D1 (1999), CRW of the Canon D30 (2000), X3F of the Sigma SD9 (2002).
2001TIFF/EP (ISO 12234-2), a TIFF profile for electronic photography that many RAW formats follow loosely.
2004Adobe's DNG, a RAW format with a public specification; Canon moves from CRW to CR2.
2014–2020Phones: DNG in Android 5 (2014), HEIF in iOS 11 (2017), Apple ProRAW, a DNG, in 2020.
2018–2020The ISO container of videos reaches photos: Canon's CR3 (2018) and HEIF in cameras, starting with the Canon EOS-1D X Mark III (2020).
2023DNG 1.7: sensor data can be compressed with JPEG XL (ISO/IEC 18181, 2022).

What is inside a RAW file

A RAW file is not a finished image but the reading of the sensor before any processing. Each photosite measures a single colour, that of the filter in front of it. In the arrangement invented by Bryce Bayer at Kodak (patented in 1976) the filters repeat in 2×2 squares, with two greens, one red and one blue, because the eye is most sensitive to green; Fujifilm has used a 6×6 pattern (X-Trans) since 2012, and Sigma cameras with a Foveon sensor measure the three colours in three stacked layers. The program that "develops" the RAW file rebuilds the two missing colours of each pixel, the demosaicing, and then applies white balance, colour and tone curve.

Besides the sensor values, from 12 to 14 bits per photosite in most cameras and up to 16 in medium format, the file carries what is needed to develop them: the black and saturation levels, the matrices that take the sensor's colours to a standard colour space, the coefficients of the white balance chosen in the camera, recorded but not applied. And it carries at least one JPEG preview, which the camera uses to show the photo on its screen: this is what the clock page reads, because it is more than enough to read the time on the photo of a clock.

The rest is in the MakerNote, an Exif tag (0x927C) that each maker fills as it sees fit: the lens fitted, the focus points, the shutter count, the serial number. It is not documented; it is known because someone decoded it, above all Phil Harvey with ExifTool. Sometimes it is encrypted: in 2005 Nikon encrypted the white balance in the NEF files of some DSLRs, and a public dispute with Adobe followed.

Simplified structure of a TIFF-based RAW file headerII*\0 or MM\0* + offset IFD0maker, model, thumbnail SubIFDsensor data, JPEG preview Exif IFDdate and time, exposure MakerNotethe maker's own data
Figure 1. How a TIFF-based RAW file is built, in short: the header leads to the first tag directory (IFD0), which points to the others. How many IFDs there are and what each holds differs from maker to maker; the Exif inside a JPEG has the same structure.

What the signatures say

Recognising a file from its content is an idea as old as Unix: the file command has done it since the 1970s, looking for a "magic number" in the first bytes. The signatures in the table are of this kind, and each tells something about its format.

  • TIFF. II or MM give the byte order of numbers: Intel, least significant byte first, or Motorola, most significant first. The number that follows, 42, is called by the specification "arbitrary but carefully chosen". Olympus and Panasonic replaced it with a value of their own (RO, U): the structure is still TIFF, but an ordinary TIFF program no longer opens their files. After the signature, an offset leads to the first IFD.
  • JPEG. The file is a sequence of segments that start with FF and a type byte; the signature is the start marker, FF D8, followed by the FF of the next segment. Exif lives in the APP1 segment and is itself a small TIFF: this is why the same IFDs are found in JPEGs and in RAW files.
  • PNG. The eight bytes 89 50 4E 47 0D 0A 1A 0A are there to detect transfers that damage files. The first is not ASCII and changes if a channel strips the eighth bit; then come "PNG", a DOS line ending (0D 0A), the character that ends a text file for DOS (1A) and a Unix line ending (0A), which change if someone converts line endings.
  • ISO container. The file is a series of boxes, each with its length and a four-letter type; the first, ftyp, declares the "brand" of the content. It is the legacy of Apple's QuickTime (1991), which became the ISO/IEC 14496-12 standard: the same container serves MP4 videos, HEIF photos and CR3.
  • Proprietary headers. FUJIFILMCCD-RAW, FOVb (Foveon), HEAPCCDR (the "heap" of Canon's CIFF format), \0MRM (Minolta): formats born outside TIFF, each with a structure of its own.

This is why the site's registry reasons by container families rather than by format: eight validators cover the ten families of the table and their 32 formats, because ORF and RW2 use the TIFF one, from which they differ only in the signature. A new format of a known family is one line of the registry, not a new program.

The formats one by one

The descriptions follow the order of the table in the File types tab. Sizes, offsets and the number of IFDs come from the sample files of the raw.pixls.us archive on which the registry is tested, read with a structure analyser and with ExifTool: other models in the same format may have more or fewer IFDs, but the layout is the same. JPEG, PNG, HEIF, AVIF, MPO and MEF have no sample in that archive and are described from their specifications.

JPEG and MPO

JPEG (.jpg, .jpeg, .jpe). The file is a sequence of segments, each opened by FF and a byte giving its type, nearly always followed by its length. It starts with SOI (FF D8) and ends with EOI (FF D9); in between are the application segments (APP0 for JFIF, APP1 for Exif and XMP, APP2 for the ICC colour profile), the quantisation (DQT) and Huffman (DHT) tables, the frame header (SOF, with size, number of components and coding type: sequential, progressive or lossless) and one or more scans (SOS) with the compressed data. The Exif in the APP1 segment is a complete TIFF, with its IFD0, the Exif IFD and an IFD1 that usually carries a 160×120 JPEG thumbnail: a JPEG inside the JPEG. After EOI there may be more data, which the registry does not read: the secondary images of an MPO, the gain map of Ultra HDR photos, the video of Motion Photos.

MPO (.mpo, Multi-Picture Object, CIPA DC-007). Several complete JPEGs one after the other: the first carries in an APP2 segment the MPF index, with the position, size and role of each image (for instance the left and right views of a stereoscopic pair). A program that does not know the format sees only the first JPEG; for the registry an MPO is a JPEG with another extension.

PNG

PNG (.png). After the eight-byte signature come the chunks, each with a length, a four-letter type, data and a CRC-32 check: IHDR (size, bit depth, colour type), then possibly the palette (PLTE), the colour profile and the metadata — Exif has a chunk of its own, eXIf, since 2017 —, one or more IDAT with the pixels compressed with the Deflate algorithm after a row-by-row filter, and finally IEND. Upper and lower case in the type have a meaning: a lower-case first letter says that the chunk can be ignored without harm.

TIFF and TIFF-based RAW

They all start with II*\0 or MM\0* and the offset of the first IFD. An IFD is a list of twelve-byte entries (tag, type, number of values, value or offset of the value) followed by the offset of the next IFD; the SubIFDs (0x014A) and ExifIFD (0x8769) tags open side branches. Each image — the thumbnail, the preview, the sensor data — lives in an IFD of its own, with width, height, compression and position of the data, in strips or tiles; the NewSubfileType tag says whether it is the main image (0) or a reduced version (1). From one format to the next, what changes is which image sits in which IFD, how the sensor data are compressed and what is in the MakerNote.

GoPro GPR (.gpr). It is a DNG (version 1.3 in the HERO7 Black sample) in which the sensor data, 4000×3000 at 16 bits, are compressed with the VC-5 codec, standardised as SMPTE ST 2073 and released by GoPro as free software. The compression code, 9, means something else in generic TIFF, and ExifTool indeed calls it "JBIG". The only IFD holds the sensor data directly: there is no preview, which is why the clock page does not accept the format.

Adobe DNG (.dng). A TIFF/EP with a public tag vocabulary: DNGVersion, the colour matrices for two illuminants (ColorMatrix1 and 2), the black and white levels (BlackLevel, WhiteLevel), the as-shot white balance (AsShotNeutral), the active area of the sensor. Usually IFD0 holds a thumbnail or a preview and a SubIFD the sensor data, compressed as lossless JPEG; other SubIFDs may carry larger previews. In the samples the Pentax K-r writes an uncompressed 160×120 thumbnail in IFD0, the sensor data (4352×2868, 12 bits) in the first SubIFD and a 4288×2848 JPEG preview in the second; the iPhone XS puts an 852×640 preview in IFD0 and the 16-bit sensor data in 64 tiles, and writes the word APPLEDNG between the header and the first IFD; the Sigma fp puts the sensor data directly in IFD0, with no preview. The maker can keep its MakerNote in the DNGPrivateData tag, as Pentax does (100 kB). In "linear" DNGs, such as Apple ProRAW, the sensor data are already demosaiced.

Canon CR2 (.cr2, 2004–2018). A TIFF with an addition to the header: at byte 8 the letters "CR", the format version (2.0) and the offset of the IFD with the sensor data. There are four IFDs, in a chain: IFD0 with a JPEG preview (1936×1288 in the EOS 40D sample, half the full resolution) and the Exif with Canon's MakerNote; IFD1 with a JPEG thumbnail; IFD2 with a small uncompressed 16-bit RGB image (486×324), to show the photo quickly; IFD3 with the sensor data as lossless JPEG (ITU-T T.81, process 14), split into vertical slices. The sample is an sRAW, a reduced RAW that Canon records in YCbCr instead of as the sensor mosaic.

Nikon NEF (.nef). IFD0 holds a JPEG thumbnail and the main metadata, XMP included; the previews and the sensor data are in the SubIFDs. In the Z6 III sample there are six SubIFDs: a 1.3 MB JPEG preview, the sensor data (14 bits, Nikon compression, code 34713), another JPEG, a reduced uncompressed image and two empty IFDs. The MakerNote starts with "Nikon" and contains a whole TIFF, with its own header: offsets inside it are counted from there, not from the start of the file. Some of its parts are encrypted, with a key derived from the serial number and the shutter count.

Nikon NRW (.nrw). The same layout as NEF, for Coolpix compacts: in the P1000 sample IFD0 with the thumbnail, a SubIFD with a 1.7 MB JPEG preview, one with the uncompressed 12-bit sensor data (24 MB) and one with a second JPEG. It is so similar to NEF that ExifTool mixes them up too: the Ubuntu 24.04 version calls the NEF files of the Z6 III and Z5 II NRW.

Sony ARW (.arw). In the ILCE-7M5 sample IFD0 holds a JPEG preview (433 kB), IFD1 a thumbnail and IFD2 a full-resolution preview (4608×3072, 2.3 MB); the sensor data (4640×3088, 14 bits) are in a SubIFD, compressed with a Sony algorithm that ExifTool names only with the generic label of the code. The DNGPrivateData tag points to SR2Private, a Sony structure with encrypted parts, among them the white balance and the black levels.

Sony SR2 (.sr2, only the 2005 DSC-R1). The ancestor of ARW: a JPEG preview in IFD0, a thumbnail in IFD1, the uncompressed 14-bit sensor data (3984×2608) in a SubIFD, and here too the DNGPrivateData tag pointing to the SR2Private structure.

Sony SRF (.srf, only the 2003 DSC-F828). The F828 had a four-colour filter, with emerald beside red, green and blue, and its RAW is the oddest of the family: the sensor data (3360×2460) are in IFD0, but encrypted, and the key to read them is in a Sony structure inside the MakerNote; IFD1 holds a JPEG preview.

Pentax PEF (.pef). Big-endian, unlike the RAW files of Canon, Nikon and Sony. In the K-r sample the sensor data are directly in IFD0 (4352×2868, 12 bits, Pentax compression), the 160×120 thumbnail in IFD1 and the 4288×2848 JPEG preview in IFD2. The MakerNote starts with "AOC", the initials of Asahi Optical Co., Pentax's old name.

Hasselblad 3FR (.3fr). In the H3D sample IFD0 carries an uncompressed 320×240 RGB thumbnail and a SubIFD the sensor data (7262×5456, 16 bits) as lossless JPEG; no JPEG preview. The SubIFD declares a data length of 79 MB, which is the uncompressed length, in a 53 MB file: one of the quirks the registry tolerates.

Phase One IIQ (.iiq). The header is TIFF, but the offset of the first IFD leads to the end of the file; right after the header begins instead a Phase One block, recognisable from IIII, holding the sensor data and the camera settings. For TIFF that block is the MakerNote of the Exif: in the P40+ back sample it is 11 MB long out of 11.2. IFD0 and IFD1 hold two 304×220 thumbnails; there are no JPEG previews.

Samsung SRW (.srw, 2010–2015). Big-endian; in the NX500 sample IFD0 has just six tags and points to two SubIFDs, one with a JPEG preview (3.8 MB) and one with the sensor data (6496×4336, 12 bits), compressed with a Samsung algorithm that ExifTool names with the generic label of the code; IFD1 points to a JPEG thumbnail.

Epson ERF (.erf, only the R-D1, 2004–2009). The R-D1 was the first digital rangefinder camera, with the Leica M mount. Its RAW is a big-endian TIFF with a 160×120 thumbnail in IFD0 and the sensor data (3040×2024, 12 bits) packed without compression in a SubIFD; the MakerNote starts with "EPSON".

Leaf MOS (.mos). Leaf digital backs write a big-endian TIFF without the Make tag: in the Aptus 22 sample IFD0 holds the sensor data directly (4008×5344, 16 bits) in a single lossless JPEG tile, and the private tag 0x8606 carries half a megabyte of Leaf data, with the camera settings. The registry recognises the format from that tag, since the maker is missing.

Mamiya MEF (.mef). The RAW of the Mamiya ZD, a medium-format camera with the digital back built into the body: a TIFF with the Mamiya maker in IFD0, which is how the registry recognises it.

Kodak DCR (.dcr, until 2005). The format of Kodak's professional DCS SLRs, built on Nikon and Canon bodies. In the DCS760C sample, on a Nikon F5 body (2001), the TIFF is big-endian and the first IFD sits 12982 bytes from the start; IFD0 and a SubIFD hold two 16-bit RGB thumbnails (380×252), a second SubIFD the sensor data (3040×2016, 12 bits, Kodak compression) and a third a reduced version (760×504) compressed the same way.

Kodak KDC (.kdc, until 2012). The RAW of Kodak EasyShare compacts. In the P712 sample IFD0 is a 1.5 MB JPEG preview and a SubIFD gathers 28 Kodak tags of its own; the interoperability IFD of this model points into the middle of the data, another quirk documented in the registry.

TIFF (.tif, .tiff). A TIFF with none of the RAW marks: some cameras write it when converting in the camera (Fujifilm), and the first digital SLRs wrote it. The sample comes from the 1995 Kodak EOS DCS 3, built on a Canon body: a 1280×1024 8-bit image, that is the sensor mosaic recorded as a greyscale photo, plus two 160×128 thumbnails.

TIFF with the Olympus signature

Olympus ORF (.orf). The signature IIRO, or the variants IIRS and MMOR, replaces the 42; otherwise it is a TIFF. In the TG-7 sample IFD0 holds the sensor data directly, uncompressed (4040×3016, 16 bits per photosite). Everything else is in the MakerNote, which starts with "OM SYSTEM" and is 1.5 MB long: inside are its sections (lens, settings, development, focus) and also the JPEG preview, which the clock page fetches from there.

Olympus ORI (.ori). In high-resolution shots, where the camera combines several frames while shifting the sensor, OM System saves next to the combined file the first frame, at native resolution, with the ORI extension. The structure is that of an ORF: in the OM-5 Mark II sample, 5240×3912 at 16 bits and a 1.5 MB MakerNote.

TIFF with the Panasonic signature

Panasonic RW2 (.rw2). Signature IIU\0, first IFD 24 bytes from the start. A single main IFD, with some sixty tags mostly of Panasonic's own (sensor size, black levels, white balance) and the link to the Exif. The sensor data are not where TIFF would say: the strips declare the offset 0xFFFFFFFF and zero length, and the real position is in tag 0x0118. The preview is a complete JPEG, with its own Exif, inside tag 0x002E: 942 kB in the GH5S sample.

Leica RWL (.rwl). Leica compacts made with Panasonic (D-Lux, C) write the same format with another extension and the LEICA maker: in the D-LUX 6 sample the IFD has 40 tags and the preview in tag 0x002E weighs 526 kB.

ISO box container

Canon CR3 (.cr3, since 2018). An ISO container with the crx brand. In the moov box, a Canon uuid box holds the metadata in four small TIFFs (CMT1 with IFD0, CMT2 with the Exif, CMT3 with the MakerNote, CMT4 with GPS) and a 160×120 thumbnail (THMB); then come four tracks, as in a video: the first with a full-resolution JPEG, the second with a reduced RAW (1620×1080 in the samples), the third with the sensor data, compressed with Canon's CRX codec, the fourth with shooting metadata (CTMD). Outside moov are a uuid box with the XMP, one with the 1620×1080 PRVW preview and the mdat box with the actual data.

AVIF (.avif). The same container as HEIF, with the avif brand, with images compressed in AV1, the open video codec of the Alliance for Open Media; born for the web in 2019, it is rare in photographic devices.

HEIF (.heic, .heif, .hif). An ISO container in which images are "items" described in the meta box: iinf lists them, iloc says where their bytes are, iprp gathers their properties (size, colour profile, codec configuration) and iref the relations between them (this is the thumbnail of that one, this is the Exif of that one). Phones split the photo into tiles compressed in HEVC, 512×512 in the iPhone, and put it back together with an item of type grid; Canon, Sony, Nikon and Fujifilm cameras use it for 10-bit photos, HDR included, with the HIF extension.

Fujifilm

Fujifilm RAF (.raf). A header of its own: the signature FUJIFILMCCD-RAW, the format versions, the model name and a table of offsets. In the X-S10 sample a complete JPEG preview (2.8 MB, with its own Exif) begins 148 bytes from the start; then a table of 12 records with the development data (sizes, mosaic layout, white balance) and finally the sensor data, 15.8 MB, which in turn begin with a small TIFF-style IFD giving their size and position. The X-Trans mosaic is 6×6, not Bayer's 2×2.

Sigma

Sigma X3F (.x3f). A FOVb header with version, serial number and size; at the end of the file a directory (SECd, whose offset is in the last four bytes) lists the sections. In the DP1 sample there are three images (SECi) — a 2640×1760 JPEG preview, a 221×147 thumbnail and the sensor data, 2688×1792 in three layers, compressed —, a properties section (SECp, name and value pairs such as the model and the lens) and a calibration one (CAMF), whose data are obfuscated.

Canon CIFF

Canon CRW (.crw, until 2004). The CIFF format (Camera Image File Format) is not a TIFF: after the byte order and the length of the header (26 bytes) comes the HEAPCCDR signature, and the rest of the file is a "heap" of records whose directory is at the end. Each record has a tag, a length and an offset; the high bits of the tag give its type, and some types open another heap, so that the structure is a tree. In the PowerShot G1 sample (2000) the main heap has three records: the sensor data (2.3 MB, right after the header), a 38 kB JPEG preview and a heap with the image properties, itself split into heaps for the Exif, the description and the model.

Minolta

Minolta MRW (.mrw, until 2006). A header made of blocks, each with a four-character name and a length: \0MRM holds them all; \0PRD gives the sensor and image size and the bits per photosite; \0TTW is a complete TIFF, with the Exif and the MakerNote; \0WBG carries the white balance coefficients and \0RIF the shooting settings. Right after the header begin the sensor data: in the DiMAGE 5 sample (2001), 2056×1544 photosites at 12 bits.

Formats that age

A proprietary RAW format can be read as long as someone knows how to read it. Makers distribute their programs, not their specifications: nearly all that independent programs know about RAW files comes from the patient decoding work of Dave Coffin, who wrote dcraw in 1997, a single C program able to read the files of hundreds of cameras, and kept it up to date for twenty years, and from the libraries born from it, such as LibRaw (2008). Thanks to them the formats marked as historical in the table, Kodak DCR, Minolta MRW, the first Sony ones, can still be opened.

Adobe proposed DNG in 2004 partly for this reason: a RAW format with a public specification, in which whoever converts can even embed the original file. Leica, Pentax and Ricoh, the Sigma fp, DJI drones and above all phones have adopted it; the large camera makers have kept their own formats. Archives such as raw.pixls.us, which collects sample files of a great many models under the CC0 licence, let those who write decoders test them: the site's registry was tested on their files.

Why the clock page accepts only some of them

Accepting a format means running on the server the code that reads it: fewer formats, less code exposed to anyone's files. The clock page does not develop RAW files, it reads their JPEG preview, so it accepts 14 formats: the RAW formats that have a preview, JPEG and PNG. Left out are 3FR, IIQ and GPR, which have no preview in the test files; HEIF and AVIF, which would need an HEVC decoder, covered by patents, or an AV1 one; TIFF, which would need its own; and the historical formats, which no camera on sale writes any more. The defences against crafted files are described in the In depth tab of the clock page.

Bibliography

  • Aldus Corporation, TIFF Revision 6.0, 3 June 1992 (now distributed by Adobe).
  • ISO 12234-2:2001, Electronic still-picture imaging — Removable memory — Part 2: TIFF/EP image data format.
  • Adobe, Digital Negative (DNG) Specification, version 1.7.1.0, 2023: helpx.adobe.com.
  • CIPA DC-008-2023, Exif Version 3.0; CIPA DC-009-2010, Design rule for Camera File system (DCF) Version 2.0.
  • ITU-T T.81 | ISO/IEC 10918-1, JPEG, 1992; ITU-T T.871, JPEG File Interchange Format, 2011.
  • ISO/IEC 14496-12, ISO base media file format; ISO/IEC 23008-12, Image File Format (HEIF); ISO/IEC 18181-1:2022, JPEG XL image coding system.
  • W3C, Portable Network Graphics (PNG) Specification (Third Edition), 2025, the section on the signature and the notes on design choices: w3.org.
  • B. E. Bayer, Color imaging array, US Patent 3,971,065, 20 July 1976.
  • D. Coffin, dcraw, since 1997; LibRaw: libraw.org.
  • P. Harvey, ExifTool Tag Names, with the makers' MakerNotes: exiftool.org.
  • L. Clévy, Describing the Canon Raw v3 (CR3) file format: github.com/lclevy/canon_cr3.
  • raw.pixls.us, archive of sample RAW files under the CC0 licence: raw.pixls.us.

Keywords: formats, cameras, RAW, JPEG, HEIF, DNG, CR3, CR2, NEF, ARW, RAF, ORF, RW2, PEF, TIFF, signature, magic bytes, ExifTool, file checks, security, upload