Esempio n. 1
0
        public void EncodeImage()
        {
            // Crop a slightly different interior region of the same size and verify that the data is different (as a sanity check)
            EncodedImage encImg = new EncodedImage();

            encImg.EncodeFrom(this.testImage, new PngBitmapEncoder());
            Image target = new Image(this.testImage.Width, this.testImage.Height, this.testImage.Stride, this.testImage.PixelFormat);

            encImg.DecodeTo(target);
            this.AssertAreImagesEqual(this.testImage, target);
        }