Commit f7e6f21d authored by bp's avatar bp

PNG 1.4 works

git-svn-id: https://forth-ev.de/repos/bigforth@2525 3b8d8251-53f3-0310-8f3b-fd1cb8370982
parent 325db6d2
......@@ -58,16 +58,17 @@ library: libpng12.so.0
[THEN]
: init-png-lib ( -- )
& libpng cell+ @ ?EXIT
\ true to png3 s" libpng14.so.14" getlib 0<> to png14
\ png14 IF
\ s" libpng14.so.14" true to newpng
\ ELSE
& libpng cell+ @ ?EXIT true to png3
s" libpng14.so.14" getlib 0<> to png14
png14 IF
s" libpng14.so.14" true to newpng
ELSE
true to png3 s" libpng12.so.0" getlib 0<> to newpng
newpng IF s" libpng12.so.0"
ELSE s" libpng.so.3" getlib 0<> to png3
png3 IF s" libpng.so.3" ELSE s" libpng.so.2" THEN THEN
\ THEN
png3 IF s" libpng.so.3" ELSE s" libpng.so.2" THEN
THEN
THEN
2dup getlib 0= IF display ." Failed to load PNGlib " type cr bye THEN
& libpng 4 cells + place ;
[THEN]
......@@ -100,7 +101,10 @@ Variable user_error_ptr
: init-png ( -- infostruc readstruc )
init-png-lib
png3 IF 0" 1.2.0" ELSE 0" 1.0.5" THEN
png14 IF 0" 1.4.0" ELSE
png3 IF 0" 1.2.0"
ELSE 0" 1.0.5" THEN
THEN
user_error_ptr ['] noop dup png_create_read_struct
dup 0= abort" PNG: no read structure"
info-struct dup setjmp IF
......@@ -125,6 +129,7 @@ byte channels
byte pixel_depth
byte spare_byte
8 string signature
8 string gamma
} png_info_struct
Variable color_type
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment