Exemplo n.º 1
0
        public override void ChangeFormat(Core.DomainObjects.ImageFormat.ImageFormatType imageFormat)
        {
            ImageFormat bitmapImageFormat = null;

            if (imageFormat == Core.DomainObjects.ImageFormat.ImageFormatType.gif)
            {
                bitmapImageFormat = ImageFormat.Gif;
            }
            else if (imageFormat == Core.DomainObjects.ImageFormat.ImageFormatType.jpg)
            {
                bitmapImageFormat = ImageFormat.Jpeg;
            }
            else if (imageFormat == Core.DomainObjects.ImageFormat.ImageFormatType.png)
            {
                bitmapImageFormat = ImageFormat.Png;
            }

            platformBitmap = ChangeFormat(bitmapImageFormat);
        }
Exemplo n.º 2
0
 public override void Set(Stream stream)
 {
     platformBitmap = new Drawing.Bitmap(stream);
     platformBitmap.GetPixel(0, 0); // TODO: this is magic line that prevents calls to GetPixel from crashing when doing the encode
 }