I have a problem when I encode a image in png.
I use a OpenFileDialog and call this method after :
public static byte EncodeToPng(BitmapSource bitmap)
using (MemoryStream stream = new MemoryStream())
var encoder = new PngBitmapEncoder();
retval = stream.ToBytes();
I need a byte to send it to my server with RIA services ... but that's not the problem
So when I bind my <Image> control to my byte array, I use an IValueConverter
which call this method :
public static BitmapImage ToBitmapImage(this byte buffer)
BitmapImage imageMateriel = new BitmapImage();
And it working :) BUT
when I take a PNG file with opacity ... image rendenring is gray !
You can get my test file here : http://www.alfileo.fr/images/logo.png
And my result file in the attached file on this post
Can you try it please ?