ploadlib - Finished

User contributed sources that have become inactive, deprecated, or generally unusable. But ... we don't really want to throw them away either.
Thrawn89
Posts: 477
Joined: Oct 08, 2005 13:12

ploadlib - Finished

Post by Thrawn89 »

Hey guys,

Ok, the final version of ploadlib is done, there has been a lot of bugs fixed, it is quick and reliable now

Consult the docs, it has all the syntax explained

In case if you dont know, ploadlib is a one function, PNG loader for FB thats small and easy to use

Changes:
Get Error function
tRNS support
Bugs fixed
Optimized more

ploadlib Download Here

Enjoy
Thrawn
D.J.Peters
Posts: 8641
Joined: May 28, 2005 3:28
Contact:

Post by D.J.Peters »

Thrawn89 realy good job i like it.

Joshy
relsoft
Posts: 1767
Joined: May 27, 2005 10:34
Location: Philippines
Contact:

Post by relsoft »

Nice!!! This is great!!!
BTW, the clicky linky in the DBF forums does not work.
Thrawn89
Posts: 477
Joined: Oct 08, 2005 13:12

Post by Thrawn89 »

Thanks rel,

Didnt realize that...all set now,
Thrawn
Antoni
Posts: 1393
Joined: May 27, 2005 15:40
Location: Barcelona, Spain

Post by Antoni »

Great job!
Clyde
Posts: 235
Joined: Jan 21, 2006 14:03
Contact:

Post by Clyde »

Thrawn dude, that is absolutely wonderfull.

I have a question: How do you load pngs as a resource, rather then as a filename please?

Cheers and many thanks,
Clyde.
1000101
Posts: 2556
Joined: Jun 13, 2005 23:14
Location: SK, Canada

Post by 1000101 »

Just looked at your code and I have to point this out:

You have a horrible memory leak in the code and in the examples in the document.

The memory leak in the library source is in the PLoad function. You allocate and read the file into a memory buffer, but you don't deallocate said buffer after passing it off the the MPLoad function.

The leak in the examples in the document are that you never destroy/deallocate the image buffers (you do however in the example file).

Also, it's spelled license.

Just thought you should be made aware of these things.
Nodtveidt
Posts: 484
Joined: Aug 24, 2005 0:32
Location: Camuy, PR
Contact:

Post by Nodtveidt »

Now if someone could write up an example of how to use this with a dc, everything would be snazzy. :D
Clyde
Posts: 235
Joined: Jan 21, 2006 14:03
Contact:

Post by Clyde »

Any joys with this please dudes?
Clyde wrote: I have a question: How do you load pngs as a resource, rather then as a filename please with Pload?
Cheers and many thanks,
Clyde.
Thrawn89
Posts: 477
Joined: Oct 08, 2005 13:12

Post by Thrawn89 »

At 1000101:
Thank you, its all fixed now...I think, you might want to double check on that

At Nodtveidt:
Whats a dc?

At Clyde:
http://www.freebasic.net/forum/viewtopic.php?t=4978 ;-)

Thrawn
1000101
Posts: 2556
Joined: Jun 13, 2005 23:14
Location: SK, Canada

Post by 1000101 »

A DC is a Device Context. It's a windows thing.
counting_pine
Site Admin
Posts: 6323
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Post by counting_pine »

Hi. Been away for a while :)
Sorry, the memory leak in the library is my fault, when I worked on PLoad I set it to use pointers and Allocate instead of arrays, but forgot to add a Deallocate. Thanks very much for finding it and pointing it out.
counting_pine
Site Admin
Posts: 6323
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Post by counting_pine »

Here's the latest version of PLoad.
Apart from minor fixes and corrections, PLoad is now fully compatible with the latest versions of FreeBASIC. It also now features some support for paletted screen modes. See the readme for more information.
ikkejw
Posts: 258
Joined: Jan 15, 2006 15:51
Location: Fryslân, the Netherlands
Contact:

Post by ikkejw »

Great! It still doesn't work for me because of that damn LOF bug, but at least it now gives me PLOAD_FILE_LOAD_ERROR instead of PLOAD_MISCERROR :)
E.K.Virtanen
Posts: 785
Joined: May 28, 2005 9:19
Location: Finland

Post by E.K.Virtanen »

Nice, cool and simple. Works fine on ubuntu.
This is a great one *thumbs up* and thanks.
Post Reply