help-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImage problem


From: Fred Kiefer
Subject: Re: NSImage problem
Date: Mon, 02 Apr 2012 22:32:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120312 Thunderbird/11.0

Did you install the dev-package for that library as well? You need the header files plus the .lib file for GNUstep to detect the presence of libpng and of course you need to rerun ./configure for GNUstep gui (followed by make and make install.

On 02.04.2012 18:54, gusborsa wrote:

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]