Then the next two bytes should make the hexa number 0x0002 ( a short = 2 bytes). Which indicates that the start of CR2 file header (offset = 0), you should read either the two characters II, either the two characters MM. "MM" or 0x4d4d means Motorola byte order (big endian) "II" or 0x4949 means Intel byte order (little endian) Įxample (taken from the reference) : 2.3 TIFF and CR2 file header The given reference uses "string" in what we would call a "character". Note that an unsigned short integers is two bytes ( octets),Ī long unsigned integer is 4 bytes ( octets ). The value you have to read there is not necessay a single byte (octet). In some occasions, the litterature will supply both values like: 0x011c / 284 as you can verify that 0x011c = 284.Īn offset value is like saying where from the start of (the file, of of a block of data) you should read some value. To 0 to 9, you also have the "digits" A (=10) to F (=15). Note that base 16 requires 16 digits, so, in addition When a number is an unsigned (positive only) integer in base 16, the syntax is to use 0x followed by the number. You have to read the file as hexadecimal values, and many of the values are to be converted into UNSIGNED integers, something VBA does not handle natively. If you don't have any experience with hexa numbers, that would be horrible.