public void Identify_VerifyRepeatCount(string imagePath, uint repeatCount)
        {
            var testFile = TestFile.Create(imagePath);

            using (var stream = new MemoryStream(testFile.Bytes, false))
            {
                var         decoder = new GifDecoder();
                IImageInfo  image   = decoder.Identify(Configuration.Default, stream);
                GifMetadata meta    = image.Metadata.GetGifMetadata();
                Assert.Equal(repeatCount, meta.RepeatCount);
            }
        }
Beispiel #2
0
        public void Identify_VerifyRatio(string imagePath, int xResolution, int yResolution, PixelResolutionUnit resolutionUnit)
        {
            var testFile = TestFile.Create(imagePath);

            using (var stream = new MemoryStream(testFile.Bytes, false))
            {
                var           decoder = new GifDecoder();
                IImageInfo    image   = decoder.Identify(Configuration.Default, stream);
                ImageMetaData meta    = image.MetaData;
                Assert.Equal(xResolution, meta.HorizontalResolution);
                Assert.Equal(yResolution, meta.VerticalResolution);
                Assert.Equal(resolutionUnit, meta.ResolutionUnits);
            }
        }