Cannot load PNG in C# on Mac OSX running Mono

Posted by milkplus on Stack Overflow See other posts from Stack Overflow or by milkplus
Published on 2011-01-12T21:53:47Z Indexed on 2011/01/14 3:54 UTC
Read the original article Hit count: 207

Filed under:
|
|
|
|

In C#, I'm trying to load a png file on Mac OSX using the latest Mono

using System.Drawing;
Bitmap bmp = new Bitmap("test.png");

I get the following error

Either the image format is unknown or you don't have the required libraries to decode this format [GDI+ status: UnknownImageFormat]

It doesn't happen with all png files; just this one.
alt text

Resaving in photo shop doesn't fix it unless I switch to 8bpp. Is there something I need to install to support this "special" png file? Works fine on windows.

© Stack Overflow or respective owner

Related posts about c#

Related posts about osx