Exemple #1
0
        public virtual void TestComponentData1()
        {
            JpegComponent component = (JpegComponent)_directory.GetObject(JpegDirectory.TagComponentData1);

            NUnit.Framework.Assert.IsNotNull(component);
            Sharpen.Tests.AreEqual("Y", component.GetComponentName());
            Sharpen.Tests.AreEqual(1, component.GetComponentId());
            Sharpen.Tests.AreEqual(0, component.GetQuantizationTableNumber());
            Sharpen.Tests.AreEqual(2, component.GetHorizontalSamplingFactor());
            Sharpen.Tests.AreEqual(2, component.GetVerticalSamplingFactor());
        }
Exemple #2
0
        public virtual void TestComponentData2()
        {
            JpegComponent component = (JpegComponent)_directory.GetObject(JpegDirectory.TagComponentData2);

            NUnit.Framework.Assert.IsNotNull(component);
            Sharpen.Tests.AreEqual("Cb", component.GetComponentName());
            Sharpen.Tests.AreEqual(2, component.GetComponentId());
            Sharpen.Tests.AreEqual(1, component.GetQuantizationTableNumber());
            Sharpen.Tests.AreEqual(1, component.GetHorizontalSamplingFactor());
            Sharpen.Tests.AreEqual(1, component.GetVerticalSamplingFactor());
            Sharpen.Tests.AreEqual("Cb component: Quantization table 1, Sampling factors 1 horiz/1 vert", _directory.GetDescription(JpegDirectory.TagComponentData2));
        }