Problems blitting pngs with sdl_image

Hi,

I’m new to SDL and I’m going through Lazy Foo’s tutorials and I’ve hit a snag on
the tutorial covering SDL_image.

My problem is that when I try to load a png IMG_Load() returns NULL. It works
correctly for gif files, which should indicate the libraries are set up
correctly since they are required to load gifs.

Any suggestions?

Thanks,
Todd

Todd wrote:

Hi,

I’m new to SDL and I’m going through Lazy Foo’s tutorials and I’ve hit a snag on
the tutorial covering SDL_image.

My problem is that when I try to load a png IMG_Load() returns NULL. It works
correctly for gif files, which should indicate the libraries are set up
correctly since they are required to load gifs.

Any suggestions?

Thanks,
Todd


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

check to make sure you’ve got libpng12-0.dll where it can be found.

That fixed it, thanks.

But it also brings up another question. For some reason none of the DLL’s I
throw into System32 are found by Visual Studio Express and I have to put
them into the debug folder to run anything. Is there a way to change that?

Thanks again for the help,
Todd

Todd wrote:

That fixed it, thanks.

But it also brings up another question. For some reason none of the DLL’s I
throw into System32 are found by Visual Studio Express and I have to put
them into the debug folder to run anything. Is there a way to change that?

Sorry, don’t know anything about VSE, I’m a Borland guy.

Good Luck
CWC

With newer versions of Visual Studio MS decided that they best way to deal
with DLL hell is to use manifests that specify what (and where) the DLL’s
will be located. You can find a great article on the subject and how to
determine what needs to be installed here:

http://www.itwriting.com/blog/?postid=261

Note, if you are distributing the release version of an app you can use the
MS provided redist files. However, if you are debugging (for instance on a
remote system) you will need the appropriate debug DLL’s. Here is a great
article that deals with all of these issues:

http://qualapps.blogspot.com/2007/03/making-vc2005-remote-debugging-work.htm
l

Hope that helps.

Ken Rogoway
Homebrew Software
http://www.homebrewsoftware.com/> ----- Original Message -----

From: sdl-bounces@lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] On
Behalf Of CWC
Sent: Monday, March 31, 2008 8:04 PM
To: A list for developers using the SDL library. (includes SDL-announce)
Subject: Re: [SDL] Problems blitting pngs with sdl_image

Todd wrote:

That fixed it, thanks.

But it also brings up another question. For some reason none of the
DLL’s I throw into System32 are found by Visual Studio Express and I
have to put them into the debug folder to run anything. Is there a way to
change that?

Sorry, don’t know anything about VSE, I’m a Borland guy.

Good Luck
CWC


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

No virus found in this incoming message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.22.1/1352 - Release Date: 3/31/2008
10:13 AM

No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.22.1/1352 - Release Date: 3/31/2008
10:13 AM

Sounds like a path related problem. Make sure that the PATH environment
variable points to the system32 directory. You can check this by entering
’path’ (without the quotes) at a command prompt. You can change the PATH
variable by right-clicking on My Computer and selecting ‘properties’. From
there choose the ‘Advanced’ tab and finally click the ‘Environment
Variables’ button. The PATH variable that you want is located in the
’System Variables’ section. After you update the PATH variable you may have
to restart VS for the changes to take effect.

  • Joe ForteOn Mon, Mar 31, 2008 at 1:01 AM, Todd wrote:

That fixed it, thanks.

But it also brings up another question. For some reason none of the DLL’s
I
throw into System32 are found by Visual Studio Express and I have to put
them into the debug folder to run anything. Is there a way to change that?

Thanks again for the help,
Todd


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org