Ejemplo n.º 1
0
        public void File1()
        {
            var directory = ExifReaderTest.ProcessSegmentBytes <SonyType1MakernoteDirectory>("Data/sonyType1.jpg.app1", JpegSegmentType.App1);

            Assert.NotNull(directory);
            Assert.False(directory.HasError);
            var descriptor = new SonyType1MakernoteDescriptor(directory);

            Assert.Null(directory.GetObject(SonyType1MakernoteDirectory.TagColorTemperature));
            Assert.Null(descriptor.GetColorTemperatureDescription());
            Assert.Null(directory.GetObject(SonyType1MakernoteDirectory.TagSceneMode));
            Assert.Null(descriptor.GetSceneModeDescription());
            Assert.Null(directory.GetObject(SonyType1MakernoteDirectory.TagZoneMatching));
            Assert.Null(descriptor.GetZoneMatchingDescription());
            Assert.Null(directory.GetObject(SonyType1MakernoteDirectory.TagDynamicRangeOptimiser));
            Assert.Null(descriptor.GetDynamicRangeOptimizerDescription());
            Assert.Null(directory.GetObject(SonyType1MakernoteDirectory.TagImageStabilisation));
            Assert.Null(descriptor.GetImageStabilizationDescription());
            Assert.Null(directory.GetObject(SonyType1MakernoteDirectory.TagColorMode));
            Assert.Null(descriptor.GetColorModeDescription());
            Assert.Equal("On (Shooting)", descriptor.GetAntiBlurDescription());
            Assert.Equal("Program", descriptor.GetExposureModeDescription());
            Assert.Equal("Off", descriptor.GetLongExposureNoiseReductionDescription());
            Assert.Equal("Off", descriptor.GetMacroDescription());
            Assert.Equal("Normal", descriptor.GetJpegQualityDescription());
        }
Ejemplo n.º 2
0
        public virtual void TestSonyType1Makernote()
        {
            SonyType1MakernoteDirectory directory = ExifReaderTest.ProcessBytes <SonyType1MakernoteDirectory>("Tests/Data/sonyType1.jpg.app1");

            NUnit.Framework.Assert.IsNotNull(directory);
            Sharpen.Tests.IsFalse(directory.HasErrors());
            SonyType1MakernoteDescriptor descriptor = new SonyType1MakernoteDescriptor(directory);

            NUnit.Framework.Assert.IsNull(directory.GetObject(SonyType1MakernoteDirectory.TagColorTemperature));
            NUnit.Framework.Assert.IsNull(descriptor.GetColorTemperatureDescription());
            NUnit.Framework.Assert.IsNull(directory.GetObject(SonyType1MakernoteDirectory.TagSceneMode));
            NUnit.Framework.Assert.IsNull(descriptor.GetSceneModeDescription());
            NUnit.Framework.Assert.IsNull(directory.GetObject(SonyType1MakernoteDirectory.TagZoneMatching));
            NUnit.Framework.Assert.IsNull(descriptor.GetZoneMatchingDescription());
            NUnit.Framework.Assert.IsNull(directory.GetObject(SonyType1MakernoteDirectory.TagDynamicRangeOptimiser));
            NUnit.Framework.Assert.IsNull(descriptor.GetDynamicRangeOptimizerDescription());
            NUnit.Framework.Assert.IsNull(directory.GetObject(SonyType1MakernoteDirectory.TagImageStabilisation));
            NUnit.Framework.Assert.IsNull(descriptor.GetImageStabilizationDescription());
            NUnit.Framework.Assert.IsNull(directory.GetObject(SonyType1MakernoteDirectory.TagColorMode));
            NUnit.Framework.Assert.IsNull(descriptor.GetColorModeDescription());
            Sharpen.Tests.AreEqual("On (Shooting)", descriptor.GetAntiBlurDescription());
            Sharpen.Tests.AreEqual("Program", descriptor.GetExposureModeDescription());
            Sharpen.Tests.AreEqual("Off", descriptor.GetLongExposureNoiseReductionDescription());
            Sharpen.Tests.AreEqual("Off", descriptor.GetMacroDescription());
            Sharpen.Tests.AreEqual("Normal", descriptor.GetJpegQualityDescription());
        }
 public void TestSonyType1Makernote()
 {
     var directory = ExifReaderTest.ProcessSegmentBytes<SonyType1MakernoteDirectory>("Tests/Data/sonyType1.jpg.app1");
     Assert.NotNull(directory);
     Assert.False(directory.HasError);
     var descriptor = new SonyType1MakernoteDescriptor(directory);
     Assert.Null(directory.GetObject(SonyType1MakernoteDirectory.TagColorTemperature));
     Assert.Null(descriptor.GetColorTemperatureDescription());
     Assert.Null(directory.GetObject(SonyType1MakernoteDirectory.TagSceneMode));
     Assert.Null(descriptor.GetSceneModeDescription());
     Assert.Null(directory.GetObject(SonyType1MakernoteDirectory.TagZoneMatching));
     Assert.Null(descriptor.GetZoneMatchingDescription());
     Assert.Null(directory.GetObject(SonyType1MakernoteDirectory.TagDynamicRangeOptimiser));
     Assert.Null(descriptor.GetDynamicRangeOptimizerDescription());
     Assert.Null(directory.GetObject(SonyType1MakernoteDirectory.TagImageStabilisation));
     Assert.Null(descriptor.GetImageStabilizationDescription());
     Assert.Null(directory.GetObject(SonyType1MakernoteDirectory.TagColorMode));
     Assert.Null(descriptor.GetColorModeDescription());
     Assert.Equal("On (Shooting)", descriptor.GetAntiBlurDescription());
     Assert.Equal("Program", descriptor.GetExposureModeDescription());
     Assert.Equal("Off", descriptor.GetLongExposureNoiseReductionDescription());
     Assert.Equal("Off", descriptor.GetMacroDescription());
     Assert.Equal("Normal", descriptor.GetJpegQualityDescription());
 }