New version of PNG library (now v3.2.q)

User projects written in or related to FreeBASIC.
robotop
Posts: 2
Joined: Jul 09, 2014 17:43

Re: New version of PNG library (now v3.2.q)

Postby robotop » Jul 09, 2014 17:54

Hello, last download link (and previous one) seems to point to a cancelled file. Can someone supply a working one ? Many thanks...
St_W
Posts: 1287
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: New version of PNG library (now v3.2.q)

Postby St_W » Jul 12, 2014 2:01

The lastest version can be found at https://bitbucket.org/yetifoot2/fbpng

The link to a (little bit older) pre-release of 3.2.q, version 1.9.4, is still valid:
http://jafile.com/uploads/1000101/fbpng_v3_2_q.zip

@yetifoot: would be nice if you'd update your first post in this thread with the new link.
robotop
Posts: 2
Joined: Jul 09, 2014 17:43

Re: New version of PNG library (now v3.2.q)

Postby robotop » Jul 13, 2014 9:28

Thank you very much. For the moment, I'll try the version you linked here... :)
RoboCop
Posts: 1
Joined: Oct 04, 2014 13:03

Re: New version of PNG library (now v3.2.q)

Postby RoboCop » Oct 04, 2014 13:19

What does
ld: cannot find -lfbpng
mean?
I think that its a linker issue, but what can't it link to exactly?
And what version of FB does this PNG library work best with?

Need a straight to the point reply, no nonsense please.
counting_pine
Site Admin
Posts: 5918
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: New version of PNG library (now v3.2.q)

Postby counting_pine » Oct 07, 2014 17:51

The problem is that you need to link to the libfbpng[s].a library file, but the linker can't find it.
I don't know what exactly you're trying, or on what platform, but one thing you could try is using 'fbc -l [fbpng path]/build/prebuilt/[platform]/libfbpng.a', or 'fbc -p [fbpng path]/build/prebuilt/[platform]'.

I would expect the library to work with any fairly recent 32-bit version of FB. For best results, use the Makefile/bwin32.bat to make a version of your own against whatever version of FB you want to use.
counting_pine
Site Admin
Posts: 5918
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: New version of PNG library (now v3.2.q)

Postby counting_pine » Oct 07, 2014 18:31

Sorry, I edited my last post several times - I'm not good with linking.
I made some changes to the bwin32.bat file:

Code: Select all

@echo off

fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/file_to_buffer.bas -c -o src/o/file_to_buffer.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/IDAT.bas -c -o src/o/IDAT.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/IHDR.bas -c -o src/o/IHDR.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/PLTE.bas -c -o src/o/PLTE.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/plte_conv.bas -c -o src/o/plte_conv.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/png_destroy.bas -c -o src/o/png_destroy.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/png_dimensions.bas -c -o src/o/png_dimensions.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/png_gfxlib2.bas -c -o src/o/png_gfxlib2.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/png_image.bas -c -o src/o/png_image.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/png_image_convert.bas -c -o src/o/png_image_convert.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/png_image_deinit.bas -c -o src/o/png_image_deinit.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/png_image_init.bas -c -o src/o/png_image_init.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/png_image_prepare.bas -c -o src/o/png_image_prepare.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/png_image_store.bas -c -o src/o/png_image_store.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/png_load.bas -c -o src/o/png_load.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/png_load2.bas -c -o src/o/png_load2.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/png_memory.bas -c -o src/o/png_memory.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/png_opengl.bas -c -o src/o/png_opengl.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/png_pixelformat.bas -c -o src/o/png_pixelformat.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/png_save.bas -c -o src/o/png_save.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/png_save2.bas -c -o src/o/png_save2.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/png_tables.bas -c -o src/o/png_tables.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/row_conv_abgr32.bas -c -o src/o/row_conv_abgr32.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/row_conv_argb32.bas -c -o src/o/row_conv_argb32.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/row_conv_p8.bas -c -o src/o/row_conv_p8.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/row_conv_rgb16.bas -c -o src/o/row_conv_rgb16.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/row_conv_rgb32.bas -c -o src/o/row_conv_rgb32.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc src/tRNS.bas -c -o src/o/tRNS.o || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc -lib -x build/libfbpng.a src/o/file_to_buffer.o src/o/IDAT.o src/o/IHDR.o src/o/PLTE.o src/o/plte_conv.o src/o/png_destroy.o src/o/png_dimensions.o src/o/png_gfxlib2.o src/o/png_image.o src/o/png_image_convert.o src/o/png_image_deinit.o src/o/png_image_init.o src/o/png_image_prepare.o src/o/png_image_store.o src/o/png_load.o src/o/png_load2.o src/o/png_memory.o src/o/png_opengl.o src/o/png_pixelformat.o src/o/png_save.o src/o/png_save2.o src/o/png_tables.o src/o/row_conv_abgr32.o src/o/row_conv_argb32.o src/o/row_conv_p8.o src/o/row_conv_rgb16.o src/o/row_conv_rgb32.o src/o/tRNS.o || goto :EOF
rem fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc -lib -x build/fbpng src/o/file_to_buffer.o src/o/IDAT.o src/o/IHDR.o src/o/PLTE.o src/o/plte_conv.o src/o/png_dimensions.o src/o/png_image.o src/o/png_image_convert.o src/o/png_image_deinit.o src/o/png_image_init.o src/o/png_image_prepare.o src/o/png_image_store.o src/o/png_load2.o src/o/png_memory.o src/o/png_pixelformat.o src/o/png_save2.o src/o/png_tables.osrc/o/row_conv_argb32.o src/o/row_conv_p8.o src/o/tRNS.o || goto :EOF

fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc tests/test1.bas -x tests/test1.exe -p build/ || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc tests/test2.bas -x tests/test2.exe -p build/ || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc tests/test3.bas -x tests/test3.exe -p build/ || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc tests/test4.bas -x tests/test4.exe -p build/ || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc tests/test5.bas -x tests/test5.exe -p build/ || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc tests/test6.bas -x tests/test6.exe -p build/ || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc tests/test7.bas -x tests/test7.exe -p build/ || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc tests/test8.bas -x tests/test8.exe -p build/ || goto :EOF
fbc %1 %2 %3 %4 %5 %6 %7 %8 %9  -i inc tests/test9.bas -x tests/test9.exe -p build/ || goto :EOF
Now it aborts on the first error, and it outputs the library in a form accepted by the test building lines - i.e. '-x build/libfbpng.a' instead of '-x build/fbpng'. I haven't run the tests, but I've at least got them to fail with "cannot find -lz" instead of "cannot find -lfbpng".
Thraka
Posts: 3
Joined: Nov 28, 2007 20:49
Location: Duvall, WA

Re: New version of PNG library (now v3.2.q)

Postby Thraka » Oct 21, 2014 19:03

Is there a build for DOS? I cannot find one :(
counting_pine
Site Admin
Posts: 5918
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: New version of PNG library (now v3.2.q)

Postby counting_pine » Oct 21, 2014 22:29

It shouldn't be too hard to build from scratch.. The batch file should work in a recent Windows, given fbc for DOS, but you'd need a DOS version of zlib.
Landeel
Posts: 624
Joined: Jan 25, 2007 10:32
Location: Brazil
Contact:

Re: New version of PNG library (now v3.2.q)

Postby Landeel » Feb 07, 2018 18:25

Did anyone get this working in 64-bit?

[EDIT]
Got it loading my pngs after changing all uintegers to uinteger<32>.
Not sure if that's the right solution though.
https://www.dropbox.com/s/l9n84cks8szxwzb/fbpng_v3_2_q_x64.zip?dl=0
[/EDIT]
topaazy
Posts: 2
Joined: Feb 10, 2018 13:23
Location: https://bestazy.com

Re: New version of PNG library (now v3.2.q)

Postby topaazy » Feb 11, 2018 13:08

Landeel wrote:Did anyone get this working in 64-bit?

[EDIT]
Got it loading my pngs after changing all uintegers to uinteger<32>.
Not sure if that's the right solution though.
https://www.dropbox.com/s/l9n84cks8szxwzb/fbpng_v3_2_q_x64.zip?dl=0
[/EDIT]

Oh nice.
That's what I was looking for.
Its work perfectly,just tested!More feedback later.
Thank you for update!
MrSwiss
Posts: 2532
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: New version of PNG library (now v3.2.q)

Postby MrSwiss » Feb 11, 2018 18:01

It is really simple, if the different data-types are known, by programmers:

depending on compilers bitness (aka: pointer-size):
UInteger (FBC-32) = 32bit; UInteger (FBC-64) = 64bit (Integer = same behaviour)
versus ...
fixed size integer types (U/Byte, U/Short, U/Long, U/LongInt):
therefore: e.g. color32 = ULong, fixed 32bit data-type (instead of: integer<nn>, whatever ...)

That's the reason, I personally discourage the indiscriminate use of U/Integer, nowadays.

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest