コード例 #1
0
 public virtual void TestGetImageWidthDescription()
 {
     _directory.SetInt(JpegDirectory.TagImageWidth, 123);
     Sharpen.Tests.AreEqual("123 pixels", _descriptor.GetImageWidthDescription());
     Sharpen.Tests.AreEqual("123 pixels", _directory.GetDescription(JpegDirectory.TagImageWidth));
 }
コード例 #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));
        }
コード例 #3
0
 public virtual void TestGetNumberOfComponents()
 {
     _directory.SetInt(JpegDirectory.TagNumberOfComponents, 3);
     Sharpen.Tests.AreEqual(3, _directory.GetNumberOfComponents());
     Sharpen.Tests.AreEqual("3", _directory.GetDescription(JpegDirectory.TagNumberOfComponents));
 }