Skip to content

Commit 982a8a7

Browse files
committed
document raf metadata structure
1 parent 1e869f6 commit 982a8a7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/rafimage.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,13 @@ namespace Exiv2 {
309309

310310
enforce(jpg_img_len >= 12, kerCorruptedMetadata);
311311

312-
// look for the height and width of the raw image in the raf metadata header
312+
/* Look for the height and width of the raw image in the raf metadata header.
313+
* Raf metadata starts with 4 bytes giving the number of available tags,
314+
* followed by the tags. Each tag starts with two bytes with the tag id and
315+
* two bytes with the tag size, followed by the actual tag data.
316+
* The image width and height have the tag id of 0x0100.
317+
* For more tag ids have a look at e.g. exiftool.
318+
*/
313319
byte cfa_header_offset [4];
314320
if (io_->read(cfa_header_offset, 4) != 4) throw Error(kerFailedToReadImageData);
315321
byte cfa_header_length [4];

0 commit comments

Comments
 (0)