PngDecoder - Windows Form Application C#

Apr 2, 2011 at 4:17 PM

PngDecoder can be used only for SilverLight Application or can be used for Windows Form Application too ?

this part of code raise exception on line 4:

ExtendedImage EI = new ExtendedImage();
PngDecoder PDec = new PngDecoder();
MemoryStream MS = new MemoryStream( Data, 0, Data.Length );
PDec.Decode( EI, MS );   // Exception

Could not load file or assembly 'System.Windows, Version=, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.

Data is byte[] type and contains PNG image read from file.

If i save Data back to file to disk by FileStream - it is ok - it is PNG and can be viewed.

Apr 6, 2011 at 9:00 PM

ImageTools is only designed for Silverlight, because you can use GDI+
(System.Drawing) for this task in your Windows Forms application.