Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Problem with libpng?

This thread is locked; no one can reply to it. rss feed Print
Problem with libpng?
Don Freeman
Member #5,110
October 2004
avatar

Ok, I've got a working copy of Allegro 4.9.5 static build on windows. I am working on the "Monday" project and everything compiles fine...but when I run the program, I get this error:

libpng error: 0

This is NOT the error you get if it is loading a file that is not there, because this is that error:

libpng error: Invalid image color type specified

I had to fix the animation file, because of the line endings (something we need to look into for cross-platformness of "Monday")

1start
2up
3Gryphon_fly_u1.png
4Gryphon_fly_u2.png
5end
6 
7start
8down
9Gryphon_fly_d1.png
10Gryphon_fly_d2.png
11end
12 
13start
14right
15Gryphon_fly_r1.png
16Gryphon_fly_r2.png
17end
18 
19start
20upright
21Gryphon_fly_ur1.png
22Gryphon_fly_ur2.png
23end
24 
25start
26downright
27Gryphon_fly_dr1.png
28Gryphon_fly_dr2.png
29end

This is the offending code:

if(loading)
{
  ALLEGRO_BITMAP *bitmap;
  std::string loadName = folder+line;
  printf("loading: %s\n",loadName.c_str()); // gives me this: loading: media/Gryphon_fly_u1.png
  bitmap = al_iio_load((folder+line).c_str());
  // dies during the al_iio_load(...) function

If I do a debug session I get:

Call Stack:
->ntdll.dll!77af3b6b()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
msvcr90.dll
msvcrt.dll

This is on Vista with Visual Studio 9 2008.
Any suggestions, known problems, fixes, etc?!?::)

Edit:
Ok...I figured out what the problem was...(besides the text files needed to be using the windows style end of line markers). I had a jacked up version of libpng12.dll The solution was to go to the gimp ftp and grab a copy of libpng13.dll. You can rename it to libpng12.dll and it works beautifully! :) Hope that helps anyone else...8-)

--
"Everyone tells me I should forget about you, you don’t deserve me. They’re right, you don’t deserve me, but I deserve you."
"It’s so simple to be wise. Just think of something stupid to say and then don’t say it."

Go to: