SharpZLib Error

Jan 26, 2011 at 12:41 AM
Edited Jan 26, 2011 at 12:42 AM

 

 

I'm getting the following error when I try to encode a PNG:

Could not load file or assembly 'ICSharpCode.SharpZLib.Silverlight, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5d294010d9f292b5' or one of its dependencies. The system cannot find the file specified.

Here is the code: 

ExtendedImage image = writeableBitmap.ToImage();  

using (Stream stream = new MemoryStream())

{

PngEncoder encoder = new PngEncoder ();

encoder.Encode(image, stream);

} 

 

 

 

Jan 26, 2011 at 4:24 AM

I figured out that I needed to copy ICSharpCode.SharpZLib.Silverlight.dll into the project.