Ejemplo n.º 1
0
                public void ShouldSupportMultipleSegments()
                {
                    using (var image = new MagickImage())
                    {
                        var bytes = File.ReadAllBytes(Files.SnakewarePNG);
                        var sequence = TestReadOnlySequence.Create(bytes, 5);

                        image.Read(sequence);

                        Assert.Equal(286, image.Width);
                        Assert.Equal(67, image.Height);
                    }
                }
Ejemplo n.º 2
0
                public void ShouldSupportMultipleSegments()
                {
                    using (var image = new MagickImage())
                    {
                        var bytes    = File.ReadAllBytes(Files.SnakewarePNG);
                        var sequence = TestReadOnlySequence.Create(bytes, 5);

                        image.Ping(sequence);

                        Assert.Equal(286, image.Width);
                        Assert.Equal(67, image.Height);
                        Assert.Throws <InvalidOperationException>(() => image.GetPixelsUnsafe());
                    }
                }