This project is read-only.

bmp and jpeg encoder demand diferent image type than png encoder

May 18, 2011 at 11:01 AM


Im using image tools to save content of a canvas to a file.

It works fine with .png but it gives poor image quality.

Like this

 var img = writableBitmap.ToImage();
                var encoder = new PngEncoder();
                encoder.Encode(img, stream);

Now I tried to use same method but with different encoder and it doesnt works.

if i put 

var img = writableBitmap.ToImage(); 
var encoder = new BmpEncoder();
 encoder.Encode(img, stream); 
encoder.Encode() now demands ImageTools.ExtendedImage instead of ImageTools.Image so whole thing does not works.
How do i make ExtendedImage? I cant even find it in ImageTools!?
May 23, 2011 at 8:24 AM

I think you are using different versions. I renamed Image to ExtendedImage in the latest version because of the naming conflicts.