public virtual void TestYResolutionDescription()
 {
     ExifIFD0Directory directory = new ExifIFD0Directory();
     directory.SetRational(ExifIFD0Directory.TagYResolution, new Rational(50, 1));
     // 3 is for 'cm'
     directory.SetInt(ExifIFD0Directory.TagResolutionUnit, 3);
     ExifIFD0Descriptor descriptor = new ExifIFD0Descriptor(directory);
     Sharpen.Tests.AreEqual("50 dots per cm", descriptor.GetDescription(ExifIFD0Directory.TagYResolution));
 }
 public virtual void TestXResolutionDescription()
 {
     ExifIFD0Directory directory = new ExifIFD0Directory();
     directory.SetRational(ExifIFD0Directory.TagXResolution, new Rational(72, 1));
     // 2 is for 'Inch'
     directory.SetInt(ExifIFD0Directory.TagResolutionUnit, 2);
     ExifIFD0Descriptor descriptor = new ExifIFD0Descriptor(directory);
     Sharpen.Tests.AreEqual("72 dots per inch", descriptor.GetDescription(ExifIFD0Directory.TagXResolution));
 }
示例#3
0
        public virtual void TestYResolutionDescription()
        {
            ExifIFD0Directory directory = new ExifIFD0Directory();

            directory.SetRational(ExifIFD0Directory.TagYResolution, new Rational(50, 1));
            // 3 is for 'cm'
            directory.SetInt(ExifIFD0Directory.TagResolutionUnit, 3);
            ExifIFD0Descriptor descriptor = new ExifIFD0Descriptor(directory);

            Sharpen.Tests.AreEqual("50 dots per cm", descriptor.GetDescription(ExifIFD0Directory.TagYResolution));
        }
示例#4
0
        public virtual void TestXResolutionDescription()
        {
            ExifIFD0Directory directory = new ExifIFD0Directory();

            directory.SetRational(ExifIFD0Directory.TagXResolution, new Rational(72, 1));
            // 2 is for 'Inch'
            directory.SetInt(ExifIFD0Directory.TagResolutionUnit, 2);
            ExifIFD0Descriptor descriptor = new ExifIFD0Descriptor(directory);

            Sharpen.Tests.AreEqual("72 dots per inch", descriptor.GetDescription(ExifIFD0Directory.TagXResolution));
        }