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.
> 
> _______________________________________________
> Help-gnustep mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/help-gnustep
> 
> 
-- 
View this message in context: 
http://old.nabble.com/NSImage-problem-tp33513960p33545001.html
Sent from the GNUstep - Help mailing list archive at Nabble.com.


_______________________________________________
Help-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-gnustep

Reply via email to