1
Vote

'ImageTools.ImageExtensions.ToImage()' is not supported by the language?

description

Hello,
 
Why would I be getting said compile error?
 
Failing on this line: var image = canvas.ToImage();
 
All references are correct.
All "using" statements are correct.
I followed everything as-is in this post:
 
http://blogs.msdn.com/b/kirillosenkov/archive/2009/10/12/saving-images-bmp-png-etc-in-wpf-silverlight.aspx
 
Thanks

comments

Jithil wrote Nov 29, 2012 at 12:02 PM

Use these codes before you calling "var image = canvas.ToImage();".
         ImageTools.IO.Encoders.AddEncoder<ImageTools.IO.Jpeg.JpegEncoder>();
        ImageTools.IO.Encoders.AddEncoder<ImageTools.IO.Bmp.BmpEncoder>();
And add
       ImageTools.IO.Jpeg.dll and  ImageTools.IO.Bmp.dll.

Try and respond.

wrote Feb 22, 2013 at 12:53 AM