Using ImagePluginPNG to (un)compress a memorybuffer

Share your advanced PureBasic knowledge/code with the community.
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Re: Using ImagePluginPNG to (un)compress a memorybuffer

Post by Rescator »

Have to give thumbs up to the last two posts here. zlib.lib is the best solution and I really wish PureBasic had that as it's default compression. (4.5+ maybe?)

Btw! Do you really need to go into usr/lib/ ? I kinda assumed that zlib.lib was distributed with all PureBasic versions on all platforms?
javabean
User
User
Posts: 60
Joined: Sat Nov 08, 2003 10:29 am
Location: Austria

Re: Using ImagePluginPNG to (un)compress a memorybuffer

Post by javabean »

PureBasic uses the deflate and inflate functions (according to the PNG specification) for its PNG ImagePlugin. So the zlib library is most probably part of each distribution.
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: Using ImagePluginPNG to (un)compress a memorybuffer

Post by c4s »

The solution from ts-soft doesn't work anymore for PB 4.50 Beta 4?! Can anyone confirm this and hopefully say what I can do to fix it?

And by the way:
For decompression I alway get -3 as a result but the compression worked fine.


Edit:
Sorry, I'm not fully sure but I think it was an error on my side.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Post Reply