Hi Fred, your are right, the imageUnfilteredFileTypes method returns the
following types: tiff, tif, pnm, ppm, jpeg, jpg, icns, w32vsr. The code
works OK with a jpeg image but I need the image in png format. I'm a c++
programmer and i'm not sure what steps should I follow. Remember i work on
WinXP. I downloaded the libpng setup (libpng 1.2.37) from sourceforge and I
installed it (In the default installation directory) but the problem
continues.
Thanks,
Fred Kiefer wrote:
On 15.03.2012 23:58, gusborsa wrote:
Hello, I´m trying to create a NSImage object from a png type image. My
code:
NSImage *myImage = [[NSImage alloc] initWithContentsOfFile:
@"c:/MiProyect/Resources/imagen.png"];
but this method returns "nil", the description message from the myImage
object returns (NULL).
I Verified the path with the fileExistsAtPath (NSFileManager) method and
it's OK. I'm working on WinXP.
Most likely your version of gui was build without png support. Could you
please print out the value of:
[NSImage imageUnfilteredFileTypes]
If this array doesn't include "png", then you need to install libpng and
rebuild gui.