Example #1
0
        public void RawImageDumpData()
        {
            using (var fileStream = File.Open(FileName, FileMode.Open, FileAccess.Read))
                using (var binaryReader = new BinaryReader(fileStream))
                {
                    var rawImage = new RawImage(binaryReader);
                    CollectionAssert.AreEqual(new byte[] { 0x49, 0x49 }, rawImage.Header.ByteOrder);
                    Assert.AreEqual(0x002A, rawImage.Header.TiffMagic);
                    Assert.AreEqual(0x5243, rawImage.Header.CR2Magic);
                    CollectionAssert.AreEqual(new byte[] { 0x02, 0x00 }, rawImage.Header.CR2Version);

                    rawImage.DumpHeader(binaryReader);
                }
        }