Esempio n. 1
0
            public void ShouldReturnTheCorrectWidthAndHeight()
            {
                var metadata = HeifImage.GetMetadata(TestFiles.Camel);

                Assert.Equal(1596, metadata.Width);
                Assert.Equal(1064, metadata.Height);
            }
Esempio n. 2
0
            public void ShouldThrowExceptionWhenFileIsInvalid()
            {
                var data = new byte[] { 42 };

                var exception = Assert.Throws <HeifException>(() => HeifImage.GetMetadata(data));

                Assert.Equal("Unable to create heif context.", exception.Message);
            }