Quantcast
Channel: WriteableBitmapEx
Viewing all articles
Browse latest Browse all 360

New Post: WritableBitmap with wrong colors

$
0
0
Hi,

I am using BitmapFactory to load a PNG from a file:
WriteableBitmap image = await BitmapFactory.New(1, 1).FromContent(new Uri("ms-appx:///Assets/image.png"));
When I display this image the colors are not correct. I have tried using different BitmapPixelFormat values but I always get the same result.

On the other hand, if I load the image into a BitmapImage object like this:
BitmapImage bitmapImage = new BitmapImage(new Uri("ms-appx:///Assets/image.png"));
the image is displayed correctly. Am I doing something wrong with WriteableBitmap?

Thanks!
Carlos.

Viewing all articles
Browse latest Browse all 360

Trending Articles