Esempio n. 1
0
        private ImageSource GetThumbnail()
        {
            RasterImage image       = Image.CreateThumbnail(200, 200, 24, RasterViewPerspective.BottomLeft, RasterSizeFlags.None);
            var         imageSource = RasterImageConverter.ConvertToSource(image, ConvertToSourceOptions.None);

            return(imageSource);
        }
Esempio n. 2
0
        public static IImage ToImage(this RasterImage rasterImage)
        {
            var convertToSource = (BitmapSource)RasterImageConverter.ConvertToSource(rasterImage, ConvertToSourceOptions.None);

            return(convertToSource.ToArray <Bgr <byte> >().Lock());
        }