Ejemplo n.º 1
0
        public virtual void OpenBmp2()
        {
            // Test this a more specific entry point
            ImageData img = ImageDataFactory.CreateBmp(UrlUtil.ToURL(sourceFolder + "WP_20140410_001_gray.bmp"), false
                                                       );

            NUnit.Framework.Assert.AreEqual(2592, img.GetWidth(), 0);
            NUnit.Framework.Assert.AreEqual(1456, img.GetHeight(), 0);
            NUnit.Framework.Assert.AreEqual(8, img.GetBpc());
        }
Ejemplo n.º 2
0
        public virtual void OpenBmp3()
        {
            String imageFileName = sourceFolder + "WP_20140410_001_monochrome.bmp";

            using (FileStream fis = new FileStream(imageFileName, FileMode.Open, FileAccess.Read)) {
                byte[] imageBytes = StreamUtil.InputStreamToArray(fis);
                // Test this a more specific entry point
                ImageData img = ImageDataFactory.CreateBmp(imageBytes, false);
                NUnit.Framework.Assert.AreEqual(2592, img.GetWidth(), 0);
                NUnit.Framework.Assert.AreEqual(1456, img.GetHeight(), 0);
                NUnit.Framework.Assert.AreEqual(1, img.GetBpc());
            }
        }