/*
        [Interoperability] Interoperability Index = Recommended Exif Interoperability Rules (ExifR98)
        [Interoperability] Interoperability Version = 1.00
        [Jpeg] Data Precision = 8 bits
        [Jpeg] Image Width = 600 pixels
        [Jpeg] Image Height = 800 pixels
        [Jpeg] Number of Components = 3
        [Jpeg] Component 1 = Y component: Quantization table 0, Sampling factors 1 horiz/1 vert
        [Jpeg] Component 2 = Cb component: Quantization table 1, Sampling factors 1 horiz/1 vert
        [Jpeg] Component 3 = Cr component: Quantization table 1, Sampling factors 1 horiz/1 vert
    */

        public NikonType1MakernoteTest()
        {
            var metadata = ExifReaderTest.ProcessSegmentBytes("Tests/Data/nikonMakernoteType1.jpg.app1").ToList();

            _nikonDirectory = metadata.OfType<NikonType1MakernoteDirectory>().SingleOrDefault();
            _exifSubIfdDirectory = metadata.OfType<ExifSubIfdDirectory>().SingleOrDefault();
            _exifIfd0Directory = metadata.OfType<ExifIfd0Directory>().SingleOrDefault();
            _thumbDirectory = metadata.OfType<ExifThumbnailDirectory>().SingleOrDefault();
        }
 public void TestGetYCbCrSubsamplingDescription()
 {
     var directory = new ExifThumbnailDirectory();
     directory.Set(ExifDirectoryBase.TagYcbcrSubsampling, new[] { 2, 1 });
     var descriptor = new ExifThumbnailDescriptor(directory);
     Assert.Equal("YCbCr4:2:2", descriptor.GetDescription(ExifDirectoryBase.TagYcbcrSubsampling));
     Assert.Equal("YCbCr4:2:2", descriptor.GetYCbCrSubsamplingDescription());
     directory.Set(ExifDirectoryBase.TagYcbcrSubsampling, new[] { 2, 2 });
     Assert.Equal("YCbCr4:2:0", descriptor.GetDescription(ExifDirectoryBase.TagYcbcrSubsampling));
     Assert.Equal("YCbCr4:2:0", descriptor.GetYCbCrSubsamplingDescription());
 }
 public void TestGetDirectoryName()
 {
     Directory subIfdDirectory = new ExifSubIfdDirectory();
     Directory ifd0Directory = new ExifIfd0Directory();
     Directory thumbDirectory = new ExifThumbnailDirectory();
     Assert.False(subIfdDirectory.HasError);
     Assert.False(ifd0Directory.HasError);
     Assert.False(thumbDirectory.HasError);
     Assert.Equal("Exif IFD0", ifd0Directory.Name);
     Assert.Equal("Exif SubIFD", subIfdDirectory.Name);
     Assert.Equal("Exif Thumbnail", thumbDirectory.Name);
 }