Fujifilm has not published RAF. This page follows the libopenraw documentation, dcraw and ExifTool. The header and the metadata block are big-endian.
Header
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 16 | Signature | FUJIFILMCCD-RAW (with a final space) |
| 16 | 4 | Format version | ASCII digits, such as 0201 |
| 20 | 8 | Camera ID | An identifier of the model, such as FF389501 |
| 28 | 32 | Camera name | The model name, ended by a zero byte |
| 60 | 4 | Version | ASCII digits such as 0100; ExifTool reads it as the firmware version |
| 64 | 20 | – | Unknown |
| 84 | 4 | JPEG offset | Where the embedded JPEG starts |
| 88 | 4 | JPEG length | Its length |
| 92 | 4 | Metadata offset | Where the metadata block starts (see tags) |
| 96 | 4 | Metadata length | Its length |
| 100 | 4 | Raw offset | Where the raw section starts |
| 104 | 4 | Raw length | Its length |
| 108 | 4 | Compression | 0 uncompressed, 2 lossless compressed, 3 lossy compressed (newer cameras; ExifTool’s RAFCompression) |
| 112 | 8 | – | Unknown |
| 120 | 4 | Second metadata offset | In files with a second image (below); otherwise unused |
| 128 | 4 | Second raw offset | The raw section of the second image |
The JPEG offset is always past this table, so a reader can tell how long the header is from it. Offsets at 120 and beyond are only read when the JPEG starts after them.
Sections
| Section | Content |
|---|---|
| JPEG | An Exif JPEG with the preview and thumbnail. Its Exif data holds the Fujifilm maker note, and it may hold an XMP packet (cameras use it for the star rating). |
| Metadata | A count and a list of tagged records with the sensor size, crop, colour filter layout and white balance (see tags). |
| Raw | On most cameras a small TIFF structure whose IFD has a sub-IFD (tag 0xF000) with Fujifilm’s own tags pointing to the sensor data. Some older cameras lay this section out differently. |
Some Super CCD SR cameras recorded two images per shot, from the two kinds of photodiode on the sensor; the second set of offsets at 120 and 128 points to the second image.
The first bytes
00000000 46 55 4A 49 46 49 4C 4D 43 43 44 2D 52 41 57 20
00000010 30 32 30 31 46 46 33 38 39 35 30 31 …
FUJIFILMCCD-RAW , then version 0201 and camera ID FF389501