I found a memory leak in my PNG_Load.
Fixed, the new version is here.
http://www.streetcds.co.uk/PNG_Load_1_4.zip
there is also a newer version now, read here:
http://www.freebasic.net/forum/viewtopi ... 8175#68175
PNG_Load - Important fix.
PNG_Load - Important fix.
Last edited by yetifoot on Apr 17, 2007 3:01, edited 3 times in total.
-
- Posts: 5494
- Joined: Sep 12, 2005 20:06
- Location: California
I had to change a couple of lines to compile it:
at line 1555: There are 3 lines that read:
that needed to be changed to
After that: Wow! Very easy to load PNG's. Great work.
at line 1555: There are 3 lines that read:
Code: Select all
PNG_Header->Palette ....
that needed to be changed to
Code: Select all
PNG_Header.Palette ....
After that: Wow! Very easy to load PNG's. Great work.
Thanks Jeff, i'll have to check that out, i guess it's a change in 0.17, which I haven't switched to yet.
EDIT. It was a slight syntax error that would not have caused any negative effects. I have updated my original post with the new version, that remains compatible with 0.16, and now compiles with 0.17.
EDIT. It was a slight syntax error that would not have caused any negative effects. I have updated my original post with the new version, that remains compatible with 0.16, and now compiles with 0.17.
-
- Posts: 5494
- Joined: Sep 12, 2005 20:06
- Location: California
People should really look at the error messages returned -_-;; Besides that, I really wanna use this in Linux now. Having troubles :D I get this undefined reference to "uncompress", which I think I used to get when the library wasn't in my lib\win32 folder.cha0s wrote:Take off "Option Explicit". That's it.
Well now it's in there and I still get undefined reference. Any help? :D
-
- Posts: 5494
- Joined: Sep 12, 2005 20:06
- Location: California
I just did a test on linux and it seemed to work ok.
I did
fbc -lib png_load.bas
then copied the libpng_load.a and png_load.bi into the test program directory, and compiled the test app with
fbc view.bas
and then did
./view snapshot1.png
I'm not too sure what to suggest if this doesn't work for you.
I did
fbc -lib png_load.bas
then copied the libpng_load.a and png_load.bi into the test program directory, and compiled the test app with
fbc view.bas
and then did
./view snapshot1.png
I'm not too sure what to suggest if this doesn't work for you.
Who is online
Users browsing this forum: No registered users and 12 guests