Пример #1
0
        private static void DumpXmpInfo(string fileName)
        {
            using (var fileStream = File.Open(fileName, FileMode.Open, FileAccess.Read))
                using (var binaryReader = new BinaryReader(fileStream))
                {
                    var rawImage = new RawImage(binaryReader);
                    var image    = rawImage.Directories.First();

                    var imageFileEntry02BC = image.Entries.Single(e => e.TagId == 0x02BC && e.TagType == 1);
                    // Assert.AreEqual(8192u, imageFileEntry02BC.NumberOfValue);
                    // Assert.AreEqual(72132u, imageFileEntry02BC.ValuePointer);
                    var xmpData = RawImage.ReadBytes(binaryReader, imageFileEntry02BC);
                    var xmp     = System.Text.Encoding.UTF8.GetString(xmpData);

                    DumpXmp(xmp);
                }
        }
Пример #2
0
        private static void DumpImage0(string fileName)
        {
            using (var fileStream = File.Open(fileName, FileMode.Open, FileAccess.Read))
                using (var binaryReader = new BinaryReader(fileStream))
                {
                    var rawImage = new RawImage(binaryReader);

                    // Images #0 and #1 are compressed in lossy (classic) JPEG
                    var image = rawImage.Directories.First();

                    Assert.AreEqual(18, image.Entries.Length);
                    CollectionAssert.AreEqual(
                        new ushort[]
                    {
                        0x0100, 0x0101, 0x0102, 0x0103, 0x010F, 0x0110, 0x0111, 0x0112, 0x0117, 0x011A, 0x011B,
                        0x128, 0x0132, 0x013B, 0x02BC, 0x8298, 0x8769, 0x8825
                    },
                        image.Entries.Select(e => e.TagId).ToArray());

                    var imageWidth = image.Entries.Single(e => e.TagId == 0x0100 && e.TagType == 3).ValuePointer;
                    Assert.AreEqual(5760u, imageWidth);

                    var imageLength = image.Entries.Single(e => e.TagId == 0x0101 && e.TagType == 3).ValuePointer;
                    Assert.AreEqual(3840u, imageLength);

                    var imageFileEntry0102 = image.Entries.Single(e => e.TagId == 0x0102 && e.TagType == 3);
                    // Assert.AreEqual(3u, imageFileEntry0102.NumberOfValue);
                    // Assert.AreEqual(238u, imageFileEntry0102.ValuePointer);
                    var bitsPerSample = RawImage.ReadUInts16(binaryReader, imageFileEntry0102);
                    CollectionAssert.AreEqual(new[] { (ushort)8, (ushort)8, (ushort)8 }, bitsPerSample);

                    var compression = image.Entries.Single(e => e.TagId == 0x0103 && e.TagType == 3).ValuePointer;
                    Assert.AreEqual(6u, compression);

                    var imageFileEntry010F = image.Entries.Single(e => e.TagId == 0x010F && e.TagType == 2);
                    // Assert.AreEqual(6u, imageFileEntry010F.NumberOfValue);
                    // Assert.AreEqual(244u, imageFileEntry010F.ValuePointer);
                    var make = RawImage.ReadChars(binaryReader, imageFileEntry010F);
                    Assert.AreEqual("Canon", make);

                    var imageFileEntry0110 = image.Entries.Single(e => e.TagId == 0x0110 && e.TagType == 2);
                    // Assert.AreEqual(22u, imageFileEntry0110.NumberOfValue);
                    // Assert.AreEqual(250u, imageFileEntry0110.ValuePointer);
                    var model = RawImage.ReadChars(binaryReader, imageFileEntry0110);
                    Assert.AreEqual("Canon EOS 5D Mark III", model);

                    var stripOffset = image.Entries.Single(e => e.TagId == 0x0111 && e.TagType == 4).ValuePointer;
                    // Assert.AreEqual(99812u, stripOffset);

                    var orientation = image.Entries.Single(e => e.TagId == 0x0112 && e.TagType == 3).ValuePointer;
                    // Assert.AreEqual(1u, orientation);    // 1 = 0,0 is top left

                    var stripByteCounts = image.Entries.Single(e => e.TagId == 0x0117 && e.TagType == 4).ValuePointer;
                    // Assert.AreEqual(2823352u, stripByteCounts);

                    var imageFileEntry011A = image.Entries.Single(e => e.TagId == 0x011A && e.TagType == 5);
                    // Assert.AreEqual(1u, imageFileEntry011A.NumberOfValue);
                    // Assert.AreEqual(282u, imageFileEntry011A.ValuePointer);
                    var xResolution = RawImage.ReadRational(binaryReader, imageFileEntry011A);
                    CollectionAssert.AreEqual(new[] { 72u, 1u }, xResolution);

                    var imageFileEntry011B = image.Entries.Single(e => e.TagId == 0x011B && e.TagType == 5);
                    // Assert.AreEqual(1u, imageFileEntry011B.NumberOfValue);
                    // Assert.AreEqual(290u, imageFileEntry011B.ValuePointer);
                    var yResolution = RawImage.ReadRational(binaryReader, imageFileEntry011B);
                    CollectionAssert.AreEqual(new[] { 72u, 1u }, yResolution);

                    var resolutionUnit = image.Entries.Single(e => e.TagId == 0x0128 && e.TagType == 3).ValuePointer;
                    Assert.AreEqual(2u, resolutionUnit); // 1 == none, 2 == pixels per inch, 3 == pixels per centimeter

                    var imageFileEntry0132 = image.Entries.Single(e => e.TagId == 0x0132 && e.TagType == 2);
                    // Assert.AreEqual(20u, imageFileEntry0132.NumberOfValue);
                    // Assert.AreEqual(298u, imageFileEntry0132.ValuePointer);
                    var dateTime = RawImage.ReadChars(binaryReader, imageFileEntry0132);
                    // Assert.AreEqual("2016:02:21 14:04:17", dateTime);

                    var imageFileEntry013B = image.Entries.Single(e => e.TagId == 0x013B && e.TagType == 2);
                    // Assert.AreEqual(11u, imageFileEntry013B.NumberOfValue);
                    // Assert.AreEqual(318u, imageFileEntry013B.ValuePointer);
                    var item13 = RawImage.ReadChars(binaryReader, imageFileEntry013B);
                    Assert.AreEqual("Greg Eakin", item13);

                    var imageFileEntry02BC = image.Entries.Single(e => e.TagId == 0x02BC && e.TagType == 1);
                    // Assert.AreEqual(8192u, imageFileEntry02BC.NumberOfValue);
                    // Assert.AreEqual(72132u, imageFileEntry02BC.ValuePointer);
                    var xmpData = RawImage.ReadBytes(binaryReader, imageFileEntry02BC);
                    var xmp     = System.Text.Encoding.UTF8.GetString(xmpData);

                    var imageFileEntry8298 = image.Entries.Single(e => e.TagId == 0x8298 && e.TagType == 2);
                    // Assert.AreEqual(53u, imageFileEntry8298.NumberOfValue);
                    // Assert.AreEqual(382u, imageFileEntry8298.ValuePointer);
                    var item15 = RawImage.ReadChars(binaryReader, imageFileEntry8298);
                    // Assert.AreEqual("Copyright (c) 2015, Greg Eakin. All rights reserved.", item15);

                    var exif = image.Entries.Single(e => e.TagId == 0x8769 && e.TagType == 4).ValuePointer;
                    // Assert.AreEqual(446u, exif);

                    var gps = image.Entries.Single(e => e.TagId == 0x8825 && e.TagType == 4).ValuePointer;
                    // Assert.AreEqual(70028u, gps);
                }
        }
Пример #3
0
        public void DumpExifData2()
        {
            const string fileName = @"C:..\..\Photos\7DSraw.CR2";

            using (var fileStream = File.Open(fileName, FileMode.Open, FileAccess.Read))
                using (var binaryReader = new BinaryReader(fileStream))
                {
                    var rawImage = new RawImage(binaryReader);
                    var image    = rawImage.Directories.First();

                    var imageFileEntry = image.Entries.Single(e => e.TagId == 0x8769 && e.TagType == 4);
                    binaryReader.BaseStream.Seek(imageFileEntry.ValuePointer, SeekOrigin.Begin);
                    var exif = new ImageFileDirectory(binaryReader);
                    exif.DumpDirectory(binaryReader);

                    Assert.AreEqual(37, exif.Entries.Length);

                    var data1B = RawImage.ReadBytes(binaryReader, exif.Entries.Single(e => e.TagId == 0x9286 && e.TagType == 7));
                    Assert.AreEqual(264, data1B.Length);
                    foreach (var b in data1B)
                    {
                        Assert.AreEqual(0x00, b);
                    }

                    // 0)  0x829A URational 2x32-bit: [0x00000380] (1): 1/200 = 0.005
                    // 1)  0x829D URational 2x32-bit: [0x00000388] (1): 5/1 = 5
                    // 2)  0x8822 UShort 16-bit: 2
                    // 3)  0x8827 UShort 16-bit: 100
                    // 4)  0x8830 UShort 16-bit: 2
                    // 5)  0x8832 ULong 32-bit: 100
                    // 6)  0x9000 UByte[]: 48, 50, 51, 48
                    // 7)  0x9003 Ascii 8-bit, null terminated: [0x00000390] (20): "2016:02:26 14:03:33"
                    // 8)  0x9004 Ascii 8-bit, null terminated: [0x000003A4] (20): "2016:02:26 14:03:33"
                    // 9)  0x9101 UByte[]: 1, 2, 3, 0
                    //10)  0x9201 SRational 2x32-bit: [0x000003B8] (1): 499712/65536 = 7.625
                    //11)  0x9202 URational 2x32-bit: [0x000003C0] (1): 303104/65536 = 4.625
                    //12)  0x9204 SRational 2x32-bit: [0x000003C8] (1): 0/1 = 0
                    //13)  0x9207 UShort 16-bit: 5
                    //14)  0x9209 UShort 16-bit: 16
                    //15)  0x920A URational 2x32-bit: [0x000003D0] (1): 50/1 = 50
                    //16)  0x927C Maker note: [0x000003D8] (45494):
                    //17)  0x9286 UByte[]: [0x0000B58E] (264):
                    //18)  0x9290 Ascii 8-bit, null terminated: [0x00003137] (3): "71"
                    //19)  0x9291 Ascii 8-bit, null terminated: [0x00003137] (3): "71"
                    //20)  0x9292 Ascii 8-bit, null terminated: [0x00003137] (3): "71"
                    //21)  0xA000 UByte[]: 48, 49, 48, 48
                    //22)  0xA001 UShort 16-bit: 1
                    //23)  0xA002 UShort 16-bit: 2592
                    //24)  0xA003 UShort 16-bit: 1728
                    //25)  0xA005 ULong 32-bit: 46742
                    //26)  0xA20E URational 2x32-bit: [0x0000B6B4] (1): 2592000/907 = 2857.77287761852
                    //27)  0xA20F URational 2x32-bit: [0x0000B6BC] (1): 1728000/595 = 2904.20168067227
                    //28)  0xA210 UShort 16-bit: 2
                    //29)  0xA401 UShort 16-bit: 0
                    //30)  0xA402 UShort 16-bit: 0
                    //31)  0xA403 UShort 16-bit: 1
                    //32)  0xA406 UShort 16-bit: 0
                    //33)  0xA430 Ascii 8-bit, null terminated: [0x0000B6C4] (11): "Greg Eakin"
                    //34)  0xA431 Ascii 8-bit, null terminated: [0x0000B6E4] (11): "3071201378"
                    //35)  0xA432 URational 2x32-bit: [0x0000B704] (4): 50/1 = 50
                    //36)  0xA434 Ascii 8-bit, null terminated: [0x0000B724] (17): "EF50mm f/1.4 USM"
                }
        }
Пример #4
0
        private static void DumpGpsInfo(BinaryReader binaryReader, uint offset)
        {
            binaryReader.BaseStream.Seek(offset, SeekOrigin.Begin);

            var tags = new ImageFileDirectory(binaryReader);

            Assert.AreEqual(0x00000302u, tags.Entries.Single(e => e.TagId == 0x0000 && e.TagType == 1).ValuePointer);    // version number
            // tags.DumpDirectory(binaryReader);

            if (tags.Entries.Length == 1)
            {
                Console.WriteLine("GPS info not found....");
                return;
            }

            Assert.AreEqual(31, tags.Entries.Length);
            var expected = new List <ushort>();

            for (ushort i = 0; i < 0x001F; i++)
            {
                expected.Add(i);
            }
            CollectionAssert.AreEqual(expected.ToArray(), tags.Entries.Select(e => e.TagId).ToArray());

            // "A" active, "V" void
            Console.WriteLine("Satellite signal status {0}", RawImage.ReadChars(binaryReader, tags.Entries.Single(e => e.TagId == 0x0009 && e.TagType == 2)));

            var date     = RawImage.ReadChars(binaryReader, tags.Entries.Single(e => e.TagId == 0x001D && e.TagType == 2));
            var timeData = RawImage.ReadRational(binaryReader, tags.Entries.Single(e => e.TagId == 0x0007 && e.TagType == 5));

            Assert.AreEqual(6, timeData.Length);
            var time1    = (double)timeData[0] / timeData[1];
            var time2    = (double)timeData[2] / timeData[3];
            var time3    = (double)timeData[4] / timeData[5];
            var dateTime = GpsData2.ConvertDateTime(date, time1, time2, time3);

            Console.WriteLine("Timestamp {0:M\'/\'d\'/\'yyyy\' \'h\':\'mm\':\'ss\' \'tt}", dateTime.ToLocalTime());

            var latitudeData = RawImage.ReadRational(binaryReader, tags.Entries.Single(e => e.TagId == 0x0002 && e.TagType == 5));

            Assert.AreEqual(6, latitudeData.Length);
            var latitude1         = (double)latitudeData[0] / latitudeData[1];
            var latitude2         = (double)latitudeData[2] / latitudeData[3];
            var latitude3         = (double)latitudeData[4] / latitudeData[5];
            var latitudeDirection = RawImage.ReadChars(binaryReader, tags.Entries.Single(e => e.TagId == 0x0001 && e.TagType == 2));

            Console.WriteLine("Latitude {0}° {1}\' {2}\" {3}", latitude1, latitude2, latitude3, latitudeDirection);

            var longitudeData = RawImage.ReadRational(binaryReader, tags.Entries.Single(e => e.TagId == 0x0004 && e.TagType == 5));

            Assert.AreEqual(6, longitudeData.Length);
            var longitude1         = (double)longitudeData[0] / longitudeData[1];
            var longitude2         = (double)longitudeData[2] / longitudeData[3];
            var longitude3         = (double)longitudeData[4] / longitudeData[5];
            var longitudeDirection = RawImage.ReadChars(binaryReader, tags.Entries.Single(e => e.TagId == 0x0003 && e.TagType == 2));

            Console.WriteLine("Longitude {0}° {1}\' {2}\" {3}", longitude1, longitude2, longitude3, longitudeDirection);

            var altitudeData = RawImage.ReadRational(binaryReader, tags.Entries.Single(e => e.TagId == 0x0006 && e.TagType == 5));

            Assert.AreEqual(2, altitudeData.Length);
            var altitude = (double)altitudeData[0] / altitudeData[1];

            Console.WriteLine("Altitude {0:0.00} m", altitude);
            Assert.AreEqual(0x00000000u, tags.Entries.Single(e => e.TagId == 0x0005 && e.TagType == 1).ValuePointer);

            Console.WriteLine("Geographic coordinate system {0}", RawImage.ReadChars(binaryReader, tags.Entries.Single(e => e.TagId == 0x0012 && e.TagType == 2)));

            Assert.AreEqual("M", RawImage.ReadChars(binaryReader, tags.Entries.Single(e => e.TagId == 0x0010 && e.TagType == 2)));     // Magnetic Direction
            var directionData = RawImage.ReadRational(binaryReader, tags.Entries.Single(e => e.TagId == 0x0011 && e.TagType == 5));

            Assert.AreEqual(2, directionData.Length);
            var direction = (double)directionData[0] / directionData[1];

            Console.WriteLine("Direction {0}°", direction);

            var dopData = RawImage.ReadRational(binaryReader, tags.Entries.Single(e => e.TagId == 0x000B && e.TagType == 5));

            Assert.AreEqual(2, dopData.Length);
            var dop = (double)dopData[0] / dopData[1];

            Console.WriteLine("Dilution of Position {0}", dop);

            var quality = RawImage.ReadChars(binaryReader, tags.Entries.Single(e => e.TagId == 0x000A && e.TagType == 2));

            Console.WriteLine("Fix quality = {0}", GpsData2.DumpFixQuality(quality));
            Console.WriteLine("Number of satellites = {0}", RawImage.ReadChars(binaryReader, tags.Entries.Single(e => e.TagId == 0x0008 && e.TagType == 2)));

            // Speed
            Assert.AreEqual("", RawImage.ReadChars(binaryReader, tags.Entries.Single(e => e.TagId == 0x000C && e.TagType == 2)));
            var data0D = RawImage.ReadRational(binaryReader, tags.Entries.Single(e => e.TagId == 0x000D && e.TagType == 5));

            CollectionAssert.AreEqual(new uint[] { 0, 1 }, data0D);

            // Track
            Assert.AreEqual("", RawImage.ReadChars(binaryReader, tags.Entries.Single(e => e.TagId == 0x000E && e.TagType == 2)));
            var data0F = RawImage.ReadRational(binaryReader, tags.Entries.Single(e => e.TagId == 0x000F && e.TagType == 5));

            CollectionAssert.AreEqual(new uint[] { 0, 1 }, data0F);

            // Destination
            Assert.AreEqual("", RawImage.ReadChars(binaryReader, tags.Entries.Single(e => e.TagId == 0x0013 && e.TagType == 2)));
            var data14 = RawImage.ReadRational(binaryReader, tags.Entries.Single(e => e.TagId == 0x0014 && e.TagType == 5));

            CollectionAssert.AreEqual(new uint[] { 0, 1, 0, 1, 0, 1 }, data14);
            Assert.AreEqual("", RawImage.ReadChars(binaryReader, tags.Entries.Single(e => e.TagId == 0x0015 && e.TagType == 2)));
            var data16 = RawImage.ReadRational(binaryReader, tags.Entries.Single(e => e.TagId == 0x0016 && e.TagType == 5));

            CollectionAssert.AreEqual(new uint[] { 0, 1, 0, 1, 0, 1 }, data16);
            Assert.AreEqual("", RawImage.ReadChars(binaryReader, tags.Entries.Single(e => e.TagId == 0x0017 && e.TagType == 2)));
            var data18 = RawImage.ReadRational(binaryReader, tags.Entries.Single(e => e.TagId == 0x0018 && e.TagType == 5));

            CollectionAssert.AreEqual(new uint[] { 0, 1 }, data18);
            Assert.AreEqual("", RawImage.ReadChars(binaryReader, tags.Entries.Single(e => e.TagId == 0x0019 && e.TagType == 2)));
            var data1A = RawImage.ReadRational(binaryReader, tags.Entries.Single(e => e.TagId == 0x001A && e.TagType == 5));

            CollectionAssert.AreEqual(new uint[] { 0, 1 }, data1A);

            // Processing Method
            var data1B = RawImage.ReadBytes(binaryReader, tags.Entries.Single(e => e.TagId == 0x001B && e.TagType == 7));

            Assert.AreEqual(256, data1B.Length);
            foreach (var b in data1B)
            {
                Assert.AreEqual(0x00, b);
            }

            // Area Information
            var data1C = RawImage.ReadBytes(binaryReader, tags.Entries.Single(e => e.TagId == 0x001C && e.TagType == 7));

            Assert.AreEqual(256, data1C.Length);
            foreach (var b in data1C)
            {
                Assert.AreEqual(0x00, b);
            }

            // Differential
            Assert.AreEqual(0x0000u, tags.Entries.Single(e => e.TagId == 0x001E && e.TagType == 3).ValuePointer);

            // Model GP-E2
            // firmware 2.0.0
            // serial number 3410400095
        }
Пример #5
0
        public void DumpMakerNotes1()
        {
            const string fileName = @"C:..\..\Photos\5DIIIhigh.CR2";

            using (var fileStream = File.Open(fileName, FileMode.Open, FileAccess.Read))
                using (var binaryReader = new BinaryReader(fileStream))
                {
                    var rawImage = new RawImage(binaryReader);
                    var image    = rawImage.Directories.First();

                    var exifEntry = image.Entries.Single(e => e.TagId == 0x8769 && e.TagType == 4);
                    binaryReader.BaseStream.Seek(exifEntry.ValuePointer, SeekOrigin.Begin);
                    var exif = new ImageFileDirectory(binaryReader);

                    var notesEntry = exif.Entries.Single(e => e.TagId == 0x927C && e.TagType == 7);
                    binaryReader.BaseStream.Seek(notesEntry.ValuePointer, SeekOrigin.Begin);
                    var notes = new ImageFileDirectory(binaryReader);
                    Assert.AreEqual(42, notes.Entries.Length);

                    notes.DumpDirectory(binaryReader);

                    // camera settings notes[0x0001]
                    // focus info notes[0x0002]
                    // image type notes[0x0006]
                    // dust delete notes[0x0097]
                    // color balance notes[0x4001]
                    // AF Micro adjust notes[0x4013]
                    // Vignetting correction notes[0x40015]

                    var model = RawImage.ReadChars(binaryReader, notes[0x0006]);
                    Assert.AreEqual("Canon EOS 5D Mark III", model);

                    var firmware = RawImage.ReadChars(binaryReader, notes[0x0007]);
                    Assert.AreEqual("Firmware Version 1.2.3\0", firmware);

                    // 0x0010 ULong 32 - bit: 2147484293
                    var id = notes.Entries.Single(e => e.TagId == 0x0010 && e.TagType == 4);
                    Assert.AreEqual(0x80000285, id.ValuePointer);

                    // 0)  0x0001 UShort 16-bit: [0x000005E2] (49): 98, 2, 0, 4, 0, 0, 0, 3, 0, 6, 65535, 1, 0, 0, 0, 32767, 32767, 1, 2, 0, 3, 65535, 230, 70, 24, 1, 96, 288, 0, 0, 0, 0, 65535, 65535, 65535, 0, 0, 0, 0, 65535, 65535, 0, 0, 32767, 65535, 65535, 0, 0, 65535,
                    //              00: length, bytes
                    //              01: Macro mode, 2 == Normal
                    //              03: RAW
                    //              05: drive single
                    //              07: Focus one shot
                    //              09: Record mode, 6 == CR2
                    //              0a: image size, -1 == N/A
                    //              0b: Program manual
                    //              10: ISO 16383
                    //              17: Lens 24-70
                    // 1)  0x0002 UShort 16-bit: [0x00000644] (4): 0, 32, 53893, 12236,
                    // 2)  0x0003 UShort 16-bit: [0x0000064C] (4): 0, 0, 0, 0,
                    // 3)  0x0004 UShort 16-bit: [0x00000654] (34): 68, 0, 160, 65324, 108, 65376, 0, 0, 3, 0, 8, 8, 148, 0, 0, 0, 0, 0, 1, 0, 0, 108, 65376, 45, 0, 0, 248, 65535, 65535, 65535, 65535, 0, 0, 0,
                    //              07: white balance auto
                    //              09: Sequence number
                    //              0f: flash bias
                    // 4)  0x0006 Ascii 8-bit, null terminated: [0x00000698] (22): "Canon EOS 5D Mark III"
                    // 5)  0x0007 Ascii 8-bit, null terminated: [0x000006B8] (24): "Firmware Version 1.2.3"
                    // 6)  0x0009 Ascii 8-bit, null terminated: [0x000006D0] (32): "Greg Eakin"
                    // 7)  0x000D UByte[]: [0x000006F0] (1536):                     // camera info
                    // 8)  0x0010 ULong 32-bit: 2147484293                          // camera id
                    // 9)  0x0013 UShort 16-bit: [0x00000CF0] (4): 0, 159, 7, 112,  // thumbnail image valid area
                    //10)  0x0019 UShort 16-bit: 1
                    //11)  0x0026 UShort 16-bit: [0x00000CF8] (265): 530, 0, 61, 61, 5760, 3840, 5760, 3840, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 288, 0, 65248, 1520, 1232, 944, 639, 288, 0, 64016, 64304, 64592, 64897, 65248, 1520, 1232, 944, 639, 288, 0, 64016, 64304, 64592, 64897, 65248, 1520, 1232, 944, 639, 288, 0, 64016, 64304, 64592, 64897, 65248, 1520, 1232, 944, 639, 288, 0, 64016, 64304, 64592, 64897, 65248, 1520, 1232, 944, 639, 288, 0, 64016, 64304, 64592, 64897, 65248, 288, 0, 65248, 64888, 64888, 64888, 65103, 65103, 65103, 65103, 65103, 65103, 65103, 65103, 65103, 65103, 65103, 65321, 65321, 65321, 65321, 65321, 65321, 65321, 65321, 65321, 65321, 65321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 648, 648, 648, 0, 0, 0, 0, 0, 0, 16384, 0, 0, 0, 0, 0, 65535,
                    //12)  0x0035 ULong 32-bit: [0x00000F0A] (4): 0010 FFFFFE5C 001E 003C    // time info
                    //13)  0x0093 UShort 16-bit: [0x00000F1A] (30): 60, 0, 0, 0, 0, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 65535, 65535, 90, 65535, 0, 0, 1191, 781, 0, 0, 0, 0, 65535, 0, 0, 0,
                    //14)  0x0095 Ascii 8-bit, null terminated: [0x00000F56] (74): "EF24-70mm f/2.8L USM"
                    //15)  0x0096 Ascii 8-bit, null terminated: [0x00000FA0] (16): "AD0144782"
                    //16)  0x0097 UByte[]: [0x00000FB0] (1024):                     // dust removal info
                    //17)  0x0098 UShort 16-bit: [0x000013B0] (4): 0, 0, 0, 0,      // crop info
                    //18)  0x0099 ULong 32-bit: [0x000013B8] (83): 014C 0003 0001 0054 0006 0101 0001 0000 0102 0001 0001 0104 0001 0000 0105 0001 0000 0106 0002 0003 0000 0108 0001 0000 0002 0020 0002 040A 0001 0007 040B 0001 0001 0004 00C4 0005 070C 0020 0000 0000 0000 0000 0001 0000 0001 0003 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0007 0003 0706 0001 0000 070F 0002 0000 0002 080E 0001 0000 0813 0001 0000
                    //19)  0x009A ULong 32-bit: [0x00001504] (5): 0000 1680 0F00 0000 0000  // aspect info
                    //20)  0x00A0 UShort 16-bit: [0x00001518] (14): 28, 0, 0, 0, 0, 0, 0, 0, 65535, 5200, 133, 0, 0, 0,     //processing info
                    //21)  0x00AA UShort 16-bit: [0x00001534] (6): 12, 1057, 1024, 1024, 386, 0,            // measured color
                    //22)  0x00B4 UShort 16-bit: 1                                  // color space, 1 == sRGB
                    //23)  0x00D0 ULong 32-bit: 0                                   // VRD recipe
                    //24)  0x00E0 UShort 16-bit: [0x00001540] (17): 34, 5920, 3950, 1, 1, 140, 96, 5899, 3935, 0, 0, 0, 0, 0, 0, 0, 0,      // sensor info
                    //25)  0x4001 UShort 16-bit: [0x00001562] (1312): 10, 819, 1024, 1024, 350, 570, 1024, 1024, 479, 398, 1024, 1024, 671, 1459, 1787, 1787, 609, 1557, 2724, 2725, 1263, 739, 1838, 1837, 1192, 3, 0, 263, 262, 265, 0, 1439, 3054, 3051, 1706, 665, 208, 207, 30, 75, 588, 589, 1011, 1365, 2358, 2358, 441, 1255, 2540, 2539, 1379, 577, 185, 185, 26, 67, 478, 478, 803, 1191, 1965, 1966, 367, 2032, 1024, 1024, 1702, 4997, 2032, 1024, 1024, 1702, 4997, 2032, 1024, 1024, 1702, 4997, 2032, 1024, 1024, 1702, 4997, 1024, 1024, 1024, 1024, 4378, 1024, 1024, 1024, 1024, 4378, 2032, 1024, 1024, 1702, 4997, 2032, 1024, 1024, 1702, 4997, 2032, 1024, 1024, 1702, 4997, 2032, 1024, 1024, 1702, 4997, 2032, 1024, 1024, 1702, 4997, 1370, 1028, 1018, 1952, 3415, 777, 1170, 1170, 529, 3415, 2076, 1024, 1024, 1657, 5200, 2383, 1024, 1024, 1411, 7000, 2231, 1024, 1024, 1524, 6000, 1494, 1024, 1024, 2473, 3200, 1824, 1024, 1024, 2378, 3714, 2076, 1024, 1024, 1657, 5189, 2315, 1024, 1024, 1500, 6320, 2068, 1024, 1024, 1446, 5940, 2076, 1024, 1024, 1657, 5189, 2076, 1024, 1024, 1657, 5189, 2076, 1024, 1024, 1657, 5189, 2076, 1024, 1024, 1657, 5189, 1010, 1024, 1024, 1022, 4325, 1010, 1024, 1024, 1022, 4325, 1010, 1024, 1024, 1022, 4325, 1010, 1024, 1024, 1022, 4325, 1010, 1024, 1024, 1022, 4325, 65228, 383, 881, 10900, 65246, 391, 858, 10000, 65292, 413, 800, 8300, 65343, 440, 743, 7000, 65396, 470, 688, 6000, 65423, 486, 662, 5600, 65453, 505, 633, 5200, 65500, 531, 586, 4700, 20, 570, 539, 4200, 74, 612, 498, 3800, 123, 652, 463, 3500, 180, 702, 424, 3200, 226, 741, 390, 3000, 267, 790, 371, 2800, 372, 920, 322, 2400, 500, 2065, 2081, 2048, 2048, 2048, 2048, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 409, 494, 708, 3748, 1676, 1764, 1587, 932, 5697, 4163, 4172, 2546, 1182, 935, 2342, 200, 64, 17, 18, 669, 49, 20, 37, 10, 399, 469, 1094, 1564, 593, 474, 2860, 597, 0, 1, 2, 8, 1, 2, 4, 0, 8, 6, 8, 4, 6, 1, 40, 31, 5, 7, 11, 46, 8, 7, 11, 3, 14, 8, 15, 16, 9, 5, 114, 47, 0, 0, 0, 32768, 0, 1024, 1024, 1024, 2639, 3807, 6471, 4116, 65511, 51, 4099, 4076, 24, 65485, 4093, 0, 256, 1, 37283, 1, 33091, 1, 31641, 0, 37046, 1024, 1024, 1024, 0, 0, 0, 65533, 0, 8191, 256, 0, 0, 1024, 686, 427, 491, 638, 406, 792, 0, 0, 0, 0, 0, 15, 240, 256, 256, 256, 256, 256, 256, 0, 15, 240, 256, 256, 256, 256, 256, 256, 0, 0, 131, 0, 16, 32, 64, 96, 128, 192, 0, 0, 0, 0, 0, 0, 0, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1160, 0, 2048, 2048, 2048, 2048, 14708, 15220, 10087, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 240, 256, 256, 256, 256, 256, 256, 0, 15, 240, 256, 256, 256, 256, 256, 256, 125, 125, 126, 1, 1, 244, 244, 8, 24, 60, 92, 111, 130, 166, 218, 235, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 81, 98, 118, 133, 216, 219, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1391, 1024, 859, 0, 0, 0, 0, 75, 80, 32344, 525, 0, 0, 0, 0, 782, 225, 0, 575, 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 516, 1024, 1024, 617, 100, 0, 79, 79, 32331, 598, 0, 0, 0, 0, 100, 44, 72, 16, 33, 230, 255, 21305, 2068, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 63, 95, 127, 159, 191, 223, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 126, 1, 244, 0, 0, 0, 0, 0, 0, 0, 31, 63, 95, 127, 159, 191, 223, 255, 48, 51, 55, 56, 54, 49, 46, 48, 54, 60, 68, 74, 82, 87, 90, 92, 94, 94, 91, 89, 86, 85, 88, 92, 94, 93, 94, 99, 104, 112, 113, 112, 111, 113, 118, 121, 124, 129, 132, 144, 154, 164, 189, 217, 240, 238, 235, 226, 212, 197, 168, 138, 97, 73, 64, 53, 47, 45, 46, 48, 47, 90, 85, 0, 255, 4, 44, 72, 21305, 2068, 0, 0, 0, 0, 0, 230, 255, 33, 823, 191, 0, 510, 136, 0, 352, 0, 0, 16, 0, 0, 0, 0, 0, 0, 65535, 0, 65535, 65535, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 100, 100, 100, 100, 100, 100, 100, 100, 0, 100, 100, 0, 40, 0, 0, 0, 0, 0, 44, 72, 21305, 2068, 0, 0, 0, 0, 0, 230, 255, 33, 32331, 598, 0, 0, 0, 0, 21305, 2068, 4, 44, 0, 0, 0, 0, 0, 0, 0, 0, 31, 63, 95, 127, 159, 191, 223, 255, 0, 0, 516, 1024, 1024, 617,
                    //26)  0x4002 UByte[]: [0x00001FA2] (43572):
                    //27)  0x4005 UByte[]: [0x0000C9D6] (16792):
                    //28)  0x4008 UShort 16-bit: [0x00010B6E] (3): 129, 129, 129,       // black level
                    //29)  0x4009 UShort 16-bit: [0x00010B74] (3): 0, 0, 0,
                    //30)  0x4010 Ascii 8-bit, null terminated: [0x00010B7A] (32): ""
                    //31)  0x4011 UByte[]: [0x00010B9A] (252):
                    //32)  0x4012 Ascii 8-bit, null terminated: [0x00010C96] (32): ""
                    //33)  0x4013 ULong 32-bit: [0x00010CB6] (11): 002C 0000 0000 000A FFFFFFFF 0000 000A 0000 000A 0000 000A       // AF micro adjust
                    //34)  0x4015 UByte[]: [0x00010CE2] (456):                          // Vignetting Correction
                    //35)  0x4016 ULong 32-bit: [0x00010EAA] (7): 001C 0000 0001 0000 0000 0001 0001    // Vignetting Correction 2
                    //36)  0x4018 ULong 32-bit: [0x00010EC6] (7): 001C 0000 0003 0000 0000 0003 0001    // Lighting Option
                    //37)  0x4019 UByte[]: [0x00010EE2] (30):                                           // Lens info
                    //38)  0x4021 ULong 32-bit: [0x00010F00] (5): 0014 0000 0000 0000 0001              // multi exposure
                    //39)  0x4025 ULong 32-bit: [0x00010F14] (9): 0024 0000 0000 0000 0000 0000 0000 0000 0000      // HDR info
                    //40)  0x4027 ULong 32-bit: [0x00010F38] (5): 0014 90001 A6A30034 73C0600 D0D0D0
                    //41)  0x4028 ULong 32-bit: [0x00010F4C] (19): 004C 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0001 003F 0000 0001 0001 0002 0000 0000   // AF Coding

                    // Color Balance
                    //var data1B = RawImage.ReadBytes(binaryReader, notes.Entries.Single(e => e.TagId == 0x4001 && e.TagType == 3));

                    // Vignetting Correction
                    //var data1B = RawImage.ReadBytes(binaryReader, notes.Entries.Single(e => e.TagId == 0x4015 && e.TagType == 7));

                    // CRW Parm
                    var data01 = RawImage.ReadBytes(binaryReader, notes.Entries.Single(e => e.TagId == 0x4002 && e.TagType == 7));

                    // Flavor
                    var data02 = RawImage.ReadBytes(binaryReader, notes.Entries.Single(e => e.TagId == 0x4005 && e.TagType == 7));

                    var data03 = RawImage.ReadBytes(binaryReader, notes.Entries.Single(e => e.TagId == 0x4011 && e.TagType == 7));

                    // Vignetting Correction
                    var data04 = RawImage.ReadBytes(binaryReader, notes.Entries.Single(e => e.TagId == 0x4015 && e.TagType == 7));

                    // Lens info
                    var data05 = RawImage.ReadBytes(binaryReader, notes.Entries.Single(e => e.TagId == 0x4019 && e.TagType == 7));
                }
        }