This project is read-only.

PngDecoder - Windows Form Application C#

Apr 2, 2011 at 5: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
MS.Close();

Could not load file or assembly 'System.Windows, Version=2.0.5.0, 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.

Coordinator
Apr 6, 2011 at 10:00 PM
Hi,

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