PNG_Load - Important fix.

User projects written in or related to FreeBASIC.
yetifoot
Posts: 1710
Joined: Sep 11, 2005 7:08
Location: England
Contact:

PNG_Load - Important fix.

Postby yetifoot » Jul 09, 2006 16:50

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
Last edited by yetifoot on Apr 17, 2007 3:01, edited 3 times in total.
anonymous1337
Posts: 5494
Joined: Sep 12, 2005 20:06
Location: California

Postby anonymous1337 » Jul 09, 2006 20:56

Thanks :D
coderJeff
Site Admin
Posts: 3393
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Postby coderJeff » Jul 18, 2006 4:47

I had to change a couple of lines to compile it:

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.
yetifoot
Posts: 1710
Joined: Sep 11, 2005 7:08
Location: England
Contact:

Postby yetifoot » Jul 18, 2006 8:18

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.
TheMG
Posts: 376
Joined: Feb 08, 2006 16:58

Postby TheMG » Feb 21, 2007 16:58

It doesnt compile anymore...
cha0s
Site Admin
Posts: 5317
Joined: May 27, 2005 6:42
Location: Illinois
Contact:

Postby cha0s » Feb 22, 2007 1:41

Take off "Option Explicit". That's it.
anonymous1337
Posts: 5494
Joined: Sep 12, 2005 20:06
Location: California

Postby anonymous1337 » Feb 22, 2007 2:29

cha0s wrote:Take off "Option Explicit". That's it.
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.

Well now it's in there and I still get undefined reference. Any help? :D
DrV
Site Admin
Posts: 2116
Joined: May 27, 2005 18:39
Location: Midwestern USA
Contact:

Postby DrV » Feb 22, 2007 4:05

Are you sure you are linking with zlib? -l z should do it.
anonymous1337
Posts: 5494
Joined: Sep 12, 2005 20:06
Location: California

Postby anonymous1337 » Feb 22, 2007 4:06

DrV wrote:Are you sure you are linking with zlib? -l z should do it.
Ah, okay. ^_^;; I'll try that out.
yetifoot
Posts: 1710
Joined: Sep 11, 2005 7:08
Location: England
Contact:

Postby yetifoot » Feb 22, 2007 22:10

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.
Stormy
Posts: 198
Joined: May 28, 2005 17:57
Location: Germany
Contact:

Postby Stormy » Mar 25, 2007 22:03

Thanks yetifoot ! :) Included this into my ogl2d library.

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 12 guests