MCPcopy Create free account
hub / github.com/Exiv2/exiv2 / write

Method write

src/cr2header_int.cpp:31–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31DataBuf Cr2Header::write() const {
32 DataBuf buf(16);
33 switch (byteOrder()) {
34 case littleEndian:
35 buf.write_uint8(0, 'I');
36 break;
37 case bigEndian:
38 buf.write_uint8(0, 'M');
39 break;
40 default:
41 break;
42 }
43 buf.write_uint8(1, buf.read_uint8(0));
44
45 buf.write_uint16(2, tag(), byteOrder());
46 buf.write_uint32(4, 0x00000010, byteOrder());
47 std::copy_n(cr2sig_, 4, buf.begin() + 8);
48 // Write a dummy value for the RAW IFD offset. The offset-writer is used to set this offset in a second pass.
49 buf.write_uint32(12, 0x00000000, byteOrder());
50 return buf;
51} // Cr2Header::write
52
53bool Cr2Header::isImageTag(uint16_t tag, IfdId group, const PrimaryGroups* /*pPrimaryGroups*/) const {
54 // CR2 image tags are all IFD2 and IFD3 tags

Callers

nothing calls this directly

Calls 5

write_uint8Method · 0.80
read_uint8Method · 0.80
write_uint16Method · 0.80
write_uint32Method · 0.80
beginMethod · 0.45

Tested by

no test coverage detected