http://www.mediafire.com/download.php?avx5a8d5lec9kcb
For most users, you can just carry on using it as normal, but now, thanks to 1000101, there are some new goodies for advanced users:
The changes for this version are as follows:
1) Added memory save function to save to a memory image (png_save_mem creates and returns a memory pointer).
2) Added pixel format functions to return the color type and bit depth of a png.
3) Added "version 2" load, save functions which are more low-level and can be used by any graphics library
via the use of callbacks.
4) Updated conversion code to make conversion from any png to (almost) any image format possible. Total
output pixel formats include PALETTE_8, RGB_16, RGB_32, ARGB_32, ABGR_32. "Version 1" functions
only support ARGB_32 and ABGR_32.
5) Internal function tables are used to streamline the decode sequence resulting in a 20% speed increase.
---------------------------------------
OLD MESSAGE:
OK, I upped a new version:
http://www.mediafire.com/download.php?3v0lvg14ws7gq0g
If you are using v1.9.3 you should upgrade to this if you intend to use the static zlib version on windows (The build of that was broken in that version).
If you are using v1.9.2 you should upgrade if you use the dimensions functions (A bug in those was fixed in v1.9.3).
Anyone else might just want to upgrade to this version because I reworked some of the code and it's now about 40% faster in my tests.
Quote:
The changes for this version are as follows:
1) The prebuilt windows static zlib version was bugged in v1.9.3 due to a misbuild. That is now rectified.
2) Static versions of the library are now built under a new name, 'libfbpngs.a'. This will mean you can keep
both in your FreeBASIC lib/ directory without having any clashes as it takes precedence. Hopefully this
will help stop a lot of the problems people had using the static version.
3) A lot of code has been changed in png_image_convert.bas in order to improve it's efficiency. I am seeing
around 40% faster times on my machine.
---------------------------------------
OLD MESSAGE:
http://www.streetcds.co.uk/fbpng_v1_9_3.tar.gz
The changes for this version are as follows:
1) A bug was found, and fixed in the PNG dimensions code thanks to user dreamerman. This bug affected
users who called png_dimensions many times.
2) Some new logic has been added to set the default image type based on the FB version has been added
thanks to 1000101. It now detects if you are using <= 0.17, and will use the old image format,
otherwise it will use the new image format. This means that for most users who will be using 0.20 FBC
the default has changed. It won't effect many people though I hope, as most of those will be using
the new image format anyway, and it's only people who do more low level stuff with the buffer who will
be negatively affected. If you find your program misbehaves with the new version of FBPNG, then try
specifying PNG_TARGET_FBOLD in your png_load calls.
---------------------------------------
OLD MESSAGE:
http://www.streetcds.co.uk/fbpng_v1_9_2.tar.gz
fbpng has now been modified, so that it will work with the version of ImageDestroy that
that comes with FB 0.21. However, YOU SHOULD NOT USE IMAGEDESTROY. This addition is
partly a compatibility patch to help people out, you should be using png_destroy instead
in order to be as future-proof as possible. This change means that you cannot use ImageDestroy
anymore if you are using FB 0.20. You should either update your code to use png_destroy, or
just carry on using your old version of fbpng. Also, if you plan to use the STATICZ version
you should do;
Code: Select all
#define PNG_STATICZ 1
#include "fbpng.bi"
in your program, as otherwise it will still try to link to a dynamic version of zlib. Thank
you to Z!re for making me aware of this.
The major change for this version of fbpng, is that buffers created by fbpng will now be
aligned in memory to a multiple of 16 bytes, this is to match the change in the FB 0.21
ImageCreate/Destroy functions, which now also do the same, and allows users who know SSE to
be able to use it more effectively. Thanks to {1000101} for helping me out with the method
that this uses, and to counting_pine, whose patch I modified and incorperated.
---------------------------------------
OLD MESSAGE:
http://www.streetcds.co.uk/fbpng_v1_9_1.tar.gz
Changes:
You MUST now use the png_destroy() sub to free up the memory that gets allocated by png_load/png_load_mem
---------------------------------------
OLD MESSAGE:
Now another new version:
http://www.streetcds.co.uk/fbpng_v1_9_0.tar.gz
Changes:
Added the changes recommended in the thread:
added #inclib "fbpng" to the fbpng.bi
added default target
remade the BMPs so no more false positives on the test1
made readme.txt use CRLF for ease for windows users
Found some places where if things went horribly wrong, memory or file handles could potentially leak (this was actually very unlikely in practise, but best to be safe)
Now included prebuilt versions with zlib compiled in (STATICZ=1), so you can use that version if you don't want to rely on zlib1.dll or similar.
A couple of other minor changes I forget
Thanks everyone who made suggestions, and used the library
---------------------------------------
OLD MESSAGE:
I have done a bit of work on my PNG image library, the new version is available here:
http://www.streetcds.co.uk/fbpng_v1_8_4.tar.gz
New features:
Can now save PNG images.
No need to recompile to use OpenGL output anymore.
Improved codebase
Other changes.
Hopefully it's all covered in the readme.txt, but feel free to ask questions if you've got some.