├── png-sys ├── lib.rs ├── libpng-1.6.16 │ ├── tests │ │ ├── pngstest-0g01 │ │ ├── pngstest-0g02 │ │ ├── pngstest-0g04 │ │ ├── pngstest-0g08 │ │ ├── pngstest-0g16 │ │ ├── pngstest-2c08 │ │ ├── pngstest-2c16 │ │ ├── pngstest-3p01 │ │ ├── pngstest-3p02 │ │ ├── pngstest-3p04 │ │ ├── pngstest-3p08 │ │ ├── pngstest-4a08 │ │ ├── pngstest-4a16 │ │ ├── pngstest-6a08 │ │ ├── pngstest-6a16 │ │ ├── pngvalid-gamma-sbit │ │ ├── pngtest │ │ ├── pngvalid-gamma-16-to-8 │ │ ├── pngvalid-gamma-alpha-mode │ │ ├── pngvalid-gamma-background │ │ ├── pngvalid-gamma-threshold │ │ ├── pngvalid-gamma-transform │ │ ├── pngvalid-standard │ │ ├── pngimage-quick │ │ ├── pngunknown-sTER │ │ ├── pngunknown-save │ │ ├── pngunknown-vpAg │ │ ├── pngvalid-progressive-interlace-transform │ │ ├── pngunknown-discard │ │ ├── pngunknown-if-safe │ │ ├── pngvalid-progressive-interlace-size │ │ ├── pngvalid-progressive-standard │ │ ├── pngvalid-gamma-expand16-alpha-mode │ │ ├── pngvalid-gamma-expand16-background │ │ ├── pngvalid-gamma-expand16-transform │ │ ├── pngimage-full │ │ ├── pngunknown-IDAT │ │ ├── pngvalid-progressive-interlace-standard │ │ ├── pngunknown-sAPI │ │ ├── pngstest │ │ └── pngstest-error │ ├── scripts │ │ ├── macro.lst │ │ ├── SCOPTIONS.ppc │ │ ├── libpng.pc.in │ │ ├── sym.c │ │ ├── libpng-config-head.in │ │ ├── vers.c │ │ ├── prefix.c │ │ ├── intprefix.c │ │ ├── ltversion.m4 │ │ ├── def.c │ │ ├── smakefile.ppc │ │ ├── makefile.amiga │ │ ├── makefile.netbsd │ │ ├── makefile.ne12bsd │ │ ├── makefile.freebsd │ │ ├── libpng-config-body.in │ │ ├── makefile.acorn │ │ ├── symbols.c │ │ ├── descrip.mms │ │ ├── pnglibconf.mak │ │ ├── makefile.atari │ │ ├── makefile.dj2 │ │ ├── makefile.openbsd │ │ ├── makefile.ibmc │ │ ├── makefile.gcc │ │ ├── makefile.tc3 │ │ ├── makefile.cegcc │ │ ├── makefile.msc │ │ ├── makefile.mips │ │ └── makefile.vcwin32 │ ├── pngbar.jpg │ ├── pngbar.png │ ├── pngnow.png │ ├── pngtest.png │ ├── contrib │ │ ├── pngminus │ │ │ ├── pngminus.bat │ │ │ ├── pngminus.sh │ │ │ ├── makefile.tc3 │ │ │ ├── pnm2png.sh │ │ │ ├── makefile.std │ │ │ ├── pnm2png.bat │ │ │ ├── png2pnm.sh │ │ │ ├── png2pnm.bat │ │ │ └── makevms.com │ │ ├── gregbook │ │ │ ├── rpng-x.c │ │ │ ├── rpng2-x.c │ │ │ ├── toucan.png │ │ │ ├── LICENSE │ │ │ ├── Makefile.sgi │ │ │ ├── readpng.h │ │ │ ├── Makefile.w32 │ │ │ └── makevms.com │ │ ├── pngsuite │ │ │ ├── basn0g01.png │ │ │ ├── basn0g02.png │ │ │ ├── basn0g04.png │ │ │ ├── basn0g08.png │ │ │ ├── basn0g16.png │ │ │ ├── basn2c08.png │ │ │ ├── basn2c16.png │ │ │ ├── basn3p01.png │ │ │ ├── basn3p02.png │ │ │ ├── basn3p04.png │ │ │ ├── basn3p08.png │ │ │ ├── basn4a08.png │ │ │ ├── basn4a16.png │ │ │ ├── basn6a08.png │ │ │ ├── basn6a16.png │ │ │ ├── ftbbn0g01.png │ │ │ ├── ftbbn0g02.png │ │ │ ├── ftbbn0g04.png │ │ │ ├── ftbbn2c16.png │ │ │ ├── ftbbn3p08.png │ │ │ ├── ftbgn2c16.png │ │ │ ├── ftbgn3p08.png │ │ │ ├── ftbrn2c08.png │ │ │ ├── ftbwn0g16.png │ │ │ ├── ftbwn3p08.png │ │ │ ├── ftbyn3p08.png │ │ │ ├── ftp0n0g08.png │ │ │ ├── ftp0n2c08.png │ │ │ ├── ftp0n3p08.png │ │ │ ├── ftp1n3p08.png │ │ │ └── README │ │ ├── visupng │ │ │ ├── VisualPng.ico │ │ │ ├── VisualPng.png │ │ │ ├── VisualPng.dsw │ │ │ ├── resource.h │ │ │ ├── PngFile.h │ │ │ └── README.txt │ │ ├── README.txt │ │ ├── pngminim │ │ │ ├── README │ │ │ ├── encoder │ │ │ │ ├── README │ │ │ │ ├── pngusr.h │ │ │ │ └── pngusr.dfa │ │ │ ├── decoder │ │ │ │ ├── README │ │ │ │ ├── pngusr.h │ │ │ │ └── pngusr.dfa │ │ │ └── preader │ │ │ │ ├── README │ │ │ │ ├── pngusr.h │ │ │ │ └── pngusr.dfa │ │ ├── examples │ │ │ ├── README.txt │ │ │ └── pngtopng.c │ │ ├── tools │ │ │ ├── README.txt │ │ │ ├── sRGB.h │ │ │ ├── checksum-icc.c │ │ │ └── intgamma.sh │ │ ├── libtests │ │ │ ├── fakepng.c │ │ │ ├── gentests.sh │ │ │ └── readpng.c │ │ ├── conftest │ │ │ ├── s_write.dfa │ │ │ ├── simple.dfa │ │ │ ├── s_read.dfa │ │ │ ├── write.dfa │ │ │ ├── README │ │ │ └── read.dfa │ │ └── arm-neon │ │ │ ├── android-ndk.c │ │ │ ├── README │ │ │ └── linux-auxv.c │ ├── libpng.pc.in │ ├── pngusr.dfa │ ├── projects │ │ ├── visualc71 │ │ │ ├── PRJ0041.mak │ │ │ ├── README_zlib.txt │ │ │ ├── README.txt │ │ │ └── libpng.sln │ │ ├── vstudio │ │ │ ├── WARNING │ │ │ ├── zlib.props │ │ │ ├── pnglibconf │ │ │ │ └── pnglibconf.vcxproj │ │ │ └── readme.txt │ │ └── owatcom │ │ │ ├── libpng.wpj │ │ │ ├── pngtest.tgt │ │ │ ├── pngvalid.tgt │ │ │ └── pngstest.tgt │ ├── libpngpf.3 │ ├── TODO │ ├── ANNOUNCE │ ├── png.5 │ ├── libpng-config.in │ └── config.h.in ├── Cargo.toml └── build.rs ├── README.md ├── test ├── gray.png ├── rust-huge-logo.png ├── servo-screenshot.png └── mozilla-dinosaur-head-logo.png ├── .gitignore ├── src └── shim.c ├── .travis.yml └── Cargo.toml /png-sys/lib.rs: -------------------------------------------------------------------------------- 1 | extern crate libz_sys; 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rust-png 2 | 3 | [Documentation](http://doc.servo.org/png/) 4 | -------------------------------------------------------------------------------- /test/gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/test/gray.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngstest-0g01: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec "${srcdir}/tests/pngstest" 0g01 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngstest-0g02: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec "${srcdir}/tests/pngstest" 0g02 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngstest-0g04: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec "${srcdir}/tests/pngstest" 0g04 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngstest-0g08: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec "${srcdir}/tests/pngstest" 0g08 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngstest-0g16: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec "${srcdir}/tests/pngstest" 0g16 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngstest-2c08: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec "${srcdir}/tests/pngstest" 2c08 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngstest-2c16: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec "${srcdir}/tests/pngstest" 2c16 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngstest-3p01: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec "${srcdir}/tests/pngstest" 3p01 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngstest-3p02: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec "${srcdir}/tests/pngstest" 3p02 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngstest-3p04: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec "${srcdir}/tests/pngstest" 3p04 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngstest-3p08: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec "${srcdir}/tests/pngstest" 3p08 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngstest-4a08: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec "${srcdir}/tests/pngstest" 4a08 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngstest-4a16: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec "${srcdir}/tests/pngstest" 4a16 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngstest-6a08: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec "${srcdir}/tests/pngstest" 6a08 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngstest-6a16: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec "${srcdir}/tests/pngstest" 6a16 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngvalid-gamma-sbit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngvalid --gamma-sbit 3 | -------------------------------------------------------------------------------- /test/rust-huge-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/test/rust-huge-logo.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/macro.lst: -------------------------------------------------------------------------------- 1 | get_uint_32(buf) 2 | get_uint_16(buf) 3 | get_int_32(buf) 4 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngtest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngtest --strict ${srcdir}/pngtest.png 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngvalid-gamma-16-to-8: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngvalid --gamma-16-to-8 3 | -------------------------------------------------------------------------------- /test/servo-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/test/servo-screenshot.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngvalid-gamma-alpha-mode: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngvalid --gamma-alpha-mode 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngvalid-gamma-background: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngvalid --gamma-background 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngvalid-gamma-threshold: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngvalid --gamma-threshold 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngvalid-gamma-transform: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngvalid --gamma-transform 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngvalid-standard: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngvalid --standard --progressive-read 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/pngbar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/pngbar.jpg -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/pngbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/pngbar.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/pngnow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/pngnow.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/pngtest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/pngtest.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngimage-quick: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngimage --log "${srcdir}/contrib/pngsuite/"*.png 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngunknown-sTER: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngunknown sTER=if-safe "${srcdir}/pngtest.png" 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngunknown-save: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngunknown default=save "${srcdir}/pngtest.png" 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngunknown-vpAg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngunknown vpAg=if-safe "${srcdir}/pngtest.png" 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngvalid-progressive-interlace-transform: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngvalid --transform 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngminus/pngminus.bat: -------------------------------------------------------------------------------- 1 | make -f makefile.tc3 2 | call png2pnm.bat 3 | call pnm2png.bat 4 | 5 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngunknown-discard: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngunknown default=discard "${srcdir}/pngtest.png" 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngunknown-if-safe: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngunknown default=if-safe "${srcdir}/pngtest.png" 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngvalid-progressive-interlace-size: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngvalid --size --progressive-read 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngvalid-progressive-standard: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngvalid --standard --progressive-read 3 | -------------------------------------------------------------------------------- /test/mozilla-dinosaur-head-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/test/mozilla-dinosaur-head-logo.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngvalid-gamma-expand16-alpha-mode: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngvalid --gamma-alpha-mode --expand16 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngvalid-gamma-expand16-background: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngvalid --gamma-background --expand16 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngvalid-gamma-expand16-transform: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngvalid --gamma-transform --expand16 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngminus/pngminus.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | make -f makefile.std 3 | sh png2pnm.sh 4 | sh pnm2png.sh 5 | 6 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngimage-full: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngimage --exhaustive --log "${srcdir}/contrib/pngsuite/"*.png 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngunknown-IDAT: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngunknown default=discard IDAT=save "${srcdir}/pngtest.png" 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngvalid-progressive-interlace-standard: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngvalid --standard --progressive-read --interlace 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/gregbook/rpng-x.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/gregbook/rpng-x.c -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/gregbook/rpng2-x.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/gregbook/rpng2-x.c -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/gregbook/toucan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/gregbook/toucan.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/basn0g01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/basn0g01.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/basn0g02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/basn0g02.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/basn0g04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/basn0g04.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/basn0g08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/basn0g08.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/basn0g16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/basn0g16.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/basn2c08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/basn2c08.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/basn2c16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/basn2c16.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/basn3p01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/basn3p01.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/basn3p02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/basn3p02.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/basn3p04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/basn3p04.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/basn3p08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/basn3p08.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/basn4a08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/basn4a08.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/basn4a16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/basn4a16.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/basn6a08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/basn6a08.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/basn6a16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/basn6a16.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/visupng/VisualPng.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/visupng/VisualPng.ico -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/visupng/VisualPng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/visupng/VisualPng.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/ftbbn0g01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/ftbbn0g01.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/ftbbn0g02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/ftbbn0g02.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/ftbbn0g04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/ftbbn0g04.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/ftbbn2c16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/ftbbn2c16.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/ftbbn3p08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/ftbbn3p08.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/ftbgn2c16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/ftbgn2c16.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/ftbgn3p08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/ftbgn3p08.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/ftbrn2c08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/ftbrn2c08.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/ftbwn0g16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/ftbwn0g16.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/ftbwn3p08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/ftbwn3p08.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/ftbyn3p08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/ftbyn3p08.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/ftp0n0g08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/ftp0n0g08.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/ftp0n2c08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/ftp0n2c08.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/ftp0n3p08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/ftp0n3p08.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/ftp1n3p08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/servo/rust-png/HEAD/png-sys/libpng-1.6.16/contrib/pngsuite/ftp1n3p08.png -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/SCOPTIONS.ppc: -------------------------------------------------------------------------------- 1 | OPTIMIZE 2 | OPTPEEP 3 | OPTTIME 4 | OPTSCHED 5 | AUTOREGISTER 6 | PARMS=REGISTERS 7 | INCLUDEDIR=hlp:ppc/include 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.a 2 | *.o 3 | *.so 4 | *.dylib 5 | *.rlib 6 | *.dSYM 7 | *-test 8 | /Makefile 9 | /test_store.png 10 | /doc 11 | /target 12 | /Cargo.lock 13 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngunknown-sAPI: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./pngunknown bKGD=save cHRM=save gAMA=save all=discard iCCP=save sBIT=save sRGB=save "${srcdir}/pngtest.png" 3 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/README.txt: -------------------------------------------------------------------------------- 1 | 2 | This "contrib" directory contains contributions which are not necessarily under 3 | the libpng license, although all are open source. They are not part of 4 | libpng proper and are not used for building the library. 5 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngminim/README: -------------------------------------------------------------------------------- 1 | 2 | This demonstrates the use of PNG_USER_CONFIG, pngusr.h and pngusr.dfa 3 | to build minimal decoder, encoder, and progressive reader applications. 4 | 5 | See the individual README and pngusr.dfa files for more explanation. 6 | -------------------------------------------------------------------------------- /png-sys/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | 3 | name = "png-sys" 4 | version = "1.6.16" 5 | authors = ["The Servo Project Developers"] 6 | 7 | links = "png" 8 | build = "build.rs" 9 | 10 | [lib] 11 | name = "png_sys" 12 | path = "lib.rs" 13 | 14 | [dependencies] 15 | libz-sys = "0.1" 16 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/libpng.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@/libpng16 5 | 6 | Name: libpng 7 | Description: Loads and saves PNG files 8 | Version: 1.6.16 9 | Libs: -L${libdir} -lpng16 10 | Cflags: -I${includedir} 11 | -------------------------------------------------------------------------------- /src/shim.c: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 | 5 | #include 6 | 7 | jmp_buf *pngshim_jmpbuf(png_struct *png_ptr) { 8 | return &png_jmpbuf(png_ptr); 9 | } 10 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/libpng.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ 5 | 6 | Name: libpng 7 | Description: Loads and saves PNG files 8 | Version: @PNGLIB_VERSION@ 9 | Libs: -L${libdir} -lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ 10 | Libs.private: @LIBS@ 11 | Cflags: -I${includedir} 12 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngstest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Usage: 4 | # 5 | # tests/pngstest pattern 6 | # 7 | # Runs pngstest on all the contrib/pngsuite/[^x]*${pattern}.png files 8 | # NOTE: pattern is used to name the temporary files pngstest generates 9 | # 10 | pattern="$1" 11 | shift 12 | exec ./pngstest --strict --tmpfile "${pattern}" --log ${1+"$@"}\ 13 | "${srcdir}/contrib/pngsuite/"[a-wyz]*${pattern}".png" 14 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/tests/pngstest-error: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | code=77 # skipped 3 | for t in "${srcdir}/contrib/pngsuite/"x*".png" 4 | do 5 | if test "$t" != "${srcdir}/contrib/pngsuite/x*.png" 6 | then 7 | # not skipped, test it 8 | if ./pngstest --strict --tmpfile "error" --log "$@" "$t" 9 | then 10 | code=0 # oops, success: should not happen! 11 | fi 12 | fi 13 | done 14 | exit $code 15 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngminim/encoder/README: -------------------------------------------------------------------------------- 1 | This demonstrates the use of PNG_USER_CONFIG and pngusr.h 2 | 3 | The makefile builds a minimal write-only encoder with embedded libpng 4 | and zlib. 5 | 6 | Specify the location of the zlib source (1.2.1 or later) as ZLIBSRC 7 | on the make command line. 8 | 9 | If you prefer to use the shared libraries, go to contrib/pngminus 10 | and build the pnm2png application there. 11 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngminim/decoder/README: -------------------------------------------------------------------------------- 1 | This demonstrates the use of PNG_USER_CONFIG, pngusr.h and pngusr.dfa 2 | 3 | The makefile builds a minimal read-only decoder with embedded libpng 4 | and zlib. 5 | 6 | Specify the location of the zlib source (1.2.1 or later) as ZLIBSRC 7 | on the make command line. 8 | 9 | If you prefer to use the shared libraries, go to contrib/pngminus 10 | and build the png2pnm application there. 11 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/sym.c: -------------------------------------------------------------------------------- 1 | 2 | /* sym.c - define format of libpng.sym 3 | * 4 | * Last changed in libpng version 1.6.16 [December 22, 2014] 5 | * Copyright (c) 2011-2014 Glenn Randers-Pehrson 6 | * 7 | * This code is released under the libpng license. 8 | * For conditions of distribution and use, see the disclaimer 9 | * and license in png.h 10 | */ 11 | 12 | #define PNG_EXPORTA(ordinal, type, name, args, attributes)\ 13 | PNG_DFN "@" SYMBOL_PREFIX "@@" name "@" 14 | 15 | #include "../png.h" 16 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/libpng-config-head.in: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # libpng-config 4 | # provides configuration info for libpng. 5 | 6 | # Copyright (C) 2002 Glenn Randers-Pehrson 7 | 8 | # This code is released under the libpng license. 9 | # For conditions of distribution and use, see the disclaimer 10 | # and license in png.h 11 | 12 | # Modeled after libxml-config. 13 | 14 | version=1.6.16 15 | prefix="" 16 | libdir="" 17 | libs="" 18 | I_opts="" 19 | L_opts="" 20 | R_opts="" 21 | cppflags="" 22 | ccopts="" 23 | ldopts="" 24 | 25 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: rust 2 | sudo: false 3 | 4 | env: 5 | global: 6 | - secure: OE4AHXii7aT5oT8ruKUucrdF28rO81Y2Kl+ZRTzcT8sXs8PwpEXkle2KBCNp6lQjtP/PiuiawdDDmW9EGOoazdL4dbgx9V3wKljn+GE7s9PgGhAayKOueamFjJ3FtTOiCa9fLBlR76SsKKuqeSAcdTGS9btJGhbM71pKVqkAEZM= 7 | 8 | script: 9 | - cargo build 10 | - cargo test 11 | - cargo bench 12 | 13 | after_script: 14 | - curl http://www.rust-ci.org/artifacts/put?t=$RUSTCI_TOKEN | sh 15 | 16 | branches: 17 | except: 18 | - master 19 | 20 | notifications: 21 | webhooks: http://build.servo.org:54856/travis 22 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/pngusr.dfa: -------------------------------------------------------------------------------- 1 | # pngusr.dfa 2 | # 3 | # Build time configuration of libpng 4 | # 5 | # Enter build configuration options in this file 6 | # 7 | # Security settings: by default these limits are unset, you can change them 8 | # here by entering the appropriate values as #defines preceded by '@' (to cause, 9 | # them to be passed through to the build of pnglibconf.h), for example: 10 | # 11 | # @# define PNG_USER_WIDTH_MAX 1000000 12 | # @# define PNG_USER_HEIGHT_MAX 1000000 13 | # @# define PNG_USER_CHUNK_CACHE_MAX 128 14 | # @# define PNG_USER_CHUNK_MALLOC_MAX 8000000 15 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/projects/visualc71/PRJ0041.mak: -------------------------------------------------------------------------------- 1 | # Prevent "Cannot find missing dependency..." warnings while compiling 2 | # pngwin.rc (PRJ0041). 3 | 4 | all: $(IntDir)\alloc.h \ 5 | $(IntDir)\fp.h \ 6 | $(IntDir)\m68881.h \ 7 | $(IntDir)\mem.h \ 8 | $(IntDir)\pngusr.h \ 9 | $(IntDir)\strings.h \ 10 | $(IntDir)\unistd.h \ 11 | $(IntDir)\unixio.h 12 | 13 | $(IntDir)\alloc.h \ 14 | $(IntDir)\fp.h \ 15 | $(IntDir)\m68881.h \ 16 | $(IntDir)\mem.h \ 17 | $(IntDir)\pngusr.h \ 18 | $(IntDir)\strings.h \ 19 | $(IntDir)\unistd.h \ 20 | $(IntDir)\unixio.h: 21 | @!echo.>$@ 22 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngminim/preader/README: -------------------------------------------------------------------------------- 1 | This demonstrates the use of PNG_USER_CONFIG and pngusr.h 2 | 3 | The makefile builds a minimal read-only progressive decoder with 4 | embedded libpng, zlib and your system's X library. 5 | 6 | Specify the location of the zlib source (1.2.1 or later) as ZLIBSRC 7 | on the make command line. 8 | 9 | Edit makefile if required, to find your X library and include files, 10 | then 11 | 12 | make ZLIBSRC=directory 13 | 14 | If you prefer to use the shared libraries, go to contrib/gregbook 15 | and build the rpng2-x application there. 16 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | 3 | name = "png" 4 | version = "0.1.0" 5 | authors = ["The Servo Project Developers"] 6 | documentation = "http://doc.servo.org/png/" 7 | 8 | links = "png-sys" 9 | build = "build.rs" 10 | 11 | [dependencies.png-sys] 12 | path = "png-sys" 13 | 14 | [dependencies] 15 | libc = "0.1.5" 16 | 17 | [dependencies.serde] 18 | version = "*" 19 | optional = true 20 | 21 | [dependencies.serde_macros] 22 | version = "*" 23 | optional = true 24 | 25 | [build-dependencies] 26 | gcc = "0.3.4" 27 | 28 | [features] 29 | serde-serialization = [ "serde", "serde_macros" ] 30 | 31 | 32 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/vers.c: -------------------------------------------------------------------------------- 1 | 2 | /* vers.c - define format of libpng.vers 3 | * 4 | * Last changed in libpng version 1.6.16 [December 22, 2014] 5 | * Copyright (c) 2011-2014 Glenn Randers-Pehrson 6 | * 7 | * This code is released under the libpng license. 8 | * For conditions of distribution and use, see the disclaimer 9 | * and license in png.h 10 | */ 11 | 12 | #define PNG_EXPORTA(ordinal, type, name, args, attributes)\ 13 | PNG_DFN " @" SYMBOL_PREFIX "@@" name "@;" 14 | 15 | PNG_DFN "@" PNGLIB_LIBNAME "@ {global:" 16 | 17 | #include "../png.h" 18 | 19 | PNG_DFN "local: *; };" 20 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/visupng/VisualPng.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "VisualPng"=.\VisualPng.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/prefix.c: -------------------------------------------------------------------------------- 1 | 2 | /* prefix.c - generate an unprefixed symbol list 3 | * 4 | * Last changed in libpng version 1.6.16 [December 22, 2014] 5 | * Copyright (c) 2013-2014 Glenn Randers-Pehrson 6 | * 7 | * This code is released under the libpng license. 8 | * For conditions of distribution and use, see the disclaimer 9 | * and license in png.h 10 | */ 11 | 12 | #define PNG_EXPORTA(ordinal, type, name, args, attributes)\ 13 | PNG_DFN "@" name "@" 14 | 15 | /* The configuration information *before* the additional of symbol renames, 16 | * the list is the C name list; no symbol prefix. 17 | */ 18 | #include "pnglibconf.out" 19 | 20 | PNG_DFN_START_SORT 1 21 | 22 | #include "../png.h" 23 | 24 | PNG_DFN_END_SORT 25 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/intprefix.c: -------------------------------------------------------------------------------- 1 | 2 | /* intprefix.c - generate an unprefixed internal symbol list 3 | * 4 | * Last changed in libpng version 1.6.16 [December 22, 2014] 5 | * Copyright (c) 2013-2014 Glenn Randers-Pehrson 6 | * 7 | * This code is released under the libpng license. 8 | * For conditions of distribution and use, see the disclaimer 9 | * and license in png.h 10 | */ 11 | 12 | #define PNG_INTERNAL_DATA(type, name, array)\ 13 | PNG_DFN "@" name "@" 14 | 15 | #define PNG_INTERNAL_FUNCTION(type, name, args, attributes)\ 16 | PNG_DFN "@" name "@" 17 | 18 | #define PNG_INTERNAL_CALLBACK(type, name, args, attributes)\ 19 | PNG_DFN "@" name "@" 20 | 21 | #define PNGPREFIX_H /* self generation */ 22 | #include "../pngpriv.h" 23 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngminim/decoder/pngusr.h: -------------------------------------------------------------------------------- 1 | /* minrdpngconf.h: headers to make a minimal png-read-only library 2 | * 3 | * Copyright (c) 2007, 2010-2013 Glenn Randers-Pehrson 4 | * 5 | * This code is released under the libpng license. 6 | * For conditions of distribution and use, see the disclaimer 7 | * and license in png.h 8 | * 9 | * Derived from pngcrush.h, Copyright 1998-2007, Glenn Randers-Pehrson 10 | */ 11 | 12 | #ifndef MINRDPNGCONF_H 13 | #define MINRDPNGCONF_H 14 | 15 | /* To include pngusr.h set -DPNG_USER_CONFIG in CPPFLAGS */ 16 | 17 | /* List options to turn off features of the build that do not 18 | * affect the API (so are not recorded in pnglibconf.h) 19 | */ 20 | 21 | #define PNG_ALIGN_TYPE PNG_ALIGN_NONE 22 | 23 | #endif /* MINRDPNGCONF_H */ 24 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngminim/encoder/pngusr.h: -------------------------------------------------------------------------------- 1 | /* minwrpngconf.h: headers to make a minimal png-write-only library 2 | * 3 | * Copyright (c) 2007, 2010-2013 Glenn Randers-Pehrson 4 | * 5 | * This code is released under the libpng license. 6 | * For conditions of distribution and use, see the disclaimer 7 | * and license in png.h 8 | * 9 | * Derived from pngcrush.h, Copyright 1998-2007, Glenn Randers-Pehrson 10 | */ 11 | 12 | #ifndef MINWRPNGCONF_H 13 | #define MINWRPNGCONF_H 14 | 15 | /* To include pngusr.h set -DPNG_USER_CONFIG in CPPFLAGS */ 16 | 17 | /* List options to turn off features of the build that do not 18 | * affect the API (so are not recorded in pnglibconf.h) 19 | */ 20 | 21 | #define PNG_ALIGN_TYPE PNG_ALIGN_NONE 22 | 23 | #endif /* MINWRPNGCONF_H */ 24 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngminim/preader/pngusr.h: -------------------------------------------------------------------------------- 1 | /* minrdpngconf.h: headers to make a minimal png-read-only library 2 | * 3 | * Copyright (c) 2009, 2010-2013 Glenn Randers-Pehrson 4 | * 5 | * This code is released under the libpng license. 6 | * For conditions of distribution and use, see the disclaimer 7 | * and license in png.h 8 | * 9 | * Derived from pngcrush.h, Copyright 1998-2007, Glenn Randers-Pehrson 10 | */ 11 | 12 | #ifndef MINPRDPNGCONF_H 13 | #define MINPRDPNGCONF_H 14 | 15 | /* To include pngusr.h set -DPNG_USER_CONFIG in CPPFLAGS */ 16 | 17 | /* List options to turn off features of the build that do not 18 | * affect the API (so are not recorded in pnglibconf.h) 19 | */ 20 | 21 | #define PNG_ALIGN_TYPE PNG_ALIGN_NONE 22 | 23 | #endif /* MINPRDPNGCONF_H */ 24 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004 Free Software Foundation, Inc. 4 | # Written by Scott James Remnant, 2004 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # @configure_input@ 11 | 12 | # serial 3337 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.4.2]) 16 | m4_define([LT_PACKAGE_REVISION], [1.3337]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.4.2' 20 | macro_revision='1.3337' 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 22 | _LT_DECL(, macro_revision, 0) 23 | ]) 24 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/libpngpf.3: -------------------------------------------------------------------------------- 1 | .TH LIBPNGPF 3 "December 22, 2014" 2 | .SH NAME 3 | libpng \- Portable Network Graphics (PNG) Reference Library 1.6.16 4 | (private functions) 5 | .SH SYNOPSIS 6 | \fB#include \fI"pngpriv.h" 7 | 8 | \fBAs of libpng version \fP\fI1.5.1\fP\fB, this section is no longer \fP\fImaintained\fP\fB, now that the private function prototypes are hidden in pngpriv.h and not accessible to applications. Look in pngpriv.h for the prototypes and a short description of each \fIfunction. 9 | 10 | .SH DESCRIPTION 11 | The functions previously listed here are used privately by libpng and are not 12 | available for use by applications. They are not "exported" to applications 13 | using shared libraries. 14 | 15 | .SH SEE ALSO 16 | .BR "png"(5), " libpng"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5) 17 | .SH AUTHOR 18 | Glenn Randers-Pehrson 19 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/visupng/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by VisualPng.rc 4 | // 5 | #define IDM_FILE_OPEN 40001 6 | #define IDM_FILE_SAVE 40002 7 | #define IDM_FILE_NEXT 40003 8 | #define IDM_FILE_PREVIOUS 40004 9 | #define IDM_FILE_EXIT 40005 10 | #define IDM_OPTIONS_BACKGROUND 40006 11 | #define IDM_OPTIONS_STRETCH 40007 12 | #define IDM_HELP_ABOUT 40008 13 | 14 | // Next default values for new objects 15 | // 16 | #ifdef APSTUDIO_INVOKED 17 | #ifndef APSTUDIO_READONLY_SYMBOLS 18 | #define _APS_NEXT_RESOURCE_VALUE 113 19 | #define _APS_NEXT_COMMAND_VALUE 40009 20 | #define _APS_NEXT_CONTROL_VALUE 1001 21 | #define _APS_NEXT_SYMED_VALUE 101 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngminus/makefile.tc3: -------------------------------------------------------------------------------- 1 | # Makefile for PngMinus (png2pnm and pnm2png) 2 | # TurboC++ 3.0 3 | 4 | CC=tcc -Ic:\tc3\inc 5 | LD=tcc -Lc:\tc3\lib 6 | LB=tlib 7 | RM=del 8 | CP=copy 9 | MODEL=l 10 | CPPFLAGS=-I..\libpng -I..\zlib 11 | CFLAGS=-O -m$(MODEL) 12 | LDFLAGS=-m$(MODEL) -L..\libpng -L..\zlib 13 | C=.c 14 | O=.obj 15 | L=.lib 16 | E=.exe 17 | 18 | # dependencies 19 | 20 | all: png2pnm$(E) pnm2png$(E) 21 | 22 | png2pnm$(O): png2pnm$(C) 23 | $(CC) -c $(CPPFLAGS) $(CFLAGS) png2pnm$(C) 24 | 25 | png2pnm$(E): png2pnm$(O) 26 | $(LD) $(LDFLAGS) png2pnm$(O) libpng$(L) zlib$(L) 27 | 28 | pnm2png$(O): pnm2png$(C) 29 | $(CC) -c $(CPPFLAGS) $(CFLAGS) pnm2png$(C) 30 | 31 | pnm2png$(E): pnm2png$(O) 32 | $(LD) $(LDFLAGS) pnm2png$(O) libpng$(L) zlib$(L) 33 | 34 | clean: 35 | $(RM) *$(O) 36 | $(RM) *$(E) 37 | 38 | # End of makefile for png2pnm / pnm2png 39 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/projects/vstudio/WARNING: -------------------------------------------------------------------------------- 1 | WARNING 2 | ======= 3 | Libpng 1.6 does not use the default run-time library when building static 4 | library builds of libpng; instead of the shared DLL runtime it uses a static 5 | runtime. If you need to change this make sure to change the setting on all the 6 | relevant projects: 7 | 8 | libpng 9 | zlib 10 | all the test programs 11 | 12 | The runtime library settings for each build are as follows: 13 | 14 | Release Debug 15 | DLL /MD /MDd 16 | Library /MT /MTd 17 | 18 | NOTICE that libpng 1.5 erroneously used /MD for Debug DLL builds; if you used 19 | the debug builds in your app and you changed your app to use /MD you will need 20 | to change it to /MDd for libpng 1.6. 21 | 22 | The Visual Studio 2010 defaults for a Win32 DLL or Static Library project are 23 | as follows: 24 | 25 | Release Debug 26 | DLL /MD /MDd 27 | Static Library /MD /MDd 28 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/examples/README.txt: -------------------------------------------------------------------------------- 1 | 2 | This directory (contrib/examples) contains examples of libpng usage. 3 | 4 | NO COPYRIGHT RIGHTS ARE CLAIMED TO ANY OF THE FILES IN THIS DIRECTORY. 5 | 6 | To the extent possible under law, the authors have waived all copyright and 7 | related or neighboring rights to this work. This work is published from: 8 | United States. 9 | 10 | The files may be used freely in any way. The intention is that appropriate 11 | parts of the files be used in other libpng-using programs without any need for 12 | the authors of the using code to seek copyright or license from the original 13 | authors. 14 | 15 | The source code and comments in this directory are the original work of the 16 | people named below. No other person or organization has made contributions to 17 | the work in this directory. 18 | 19 | ORIGINAL AUTHORS 20 | The following people have contributed to the code in this directory. None 21 | of the people below claim any rights with regard to the contents of this 22 | directory. 23 | 24 | John Bowler 25 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/def.c: -------------------------------------------------------------------------------- 1 | /* def.c - define format of libpng.def 2 | * 3 | * Last changed in libpng version 1.6.16 [December 22, 2014] 4 | * Copyright (c) 2011-2014 Glenn Randers-Pehrson 5 | * 6 | * This code is released under the libpng license. 7 | * For conditions of distribution and use, see the disclaimer 8 | * and license in png.h 9 | */ 10 | 11 | /* Write the export file header: */ 12 | PNG_DFN ";--------------------------------------------------------------" 13 | PNG_DFN "; LIBPNG module definition file for OS/2" 14 | PNG_DFN ";--------------------------------------------------------------" 15 | PNG_DFN "" 16 | PNG_DFN "; If you give the library an explicit name one or other files" 17 | PNG_DFN "; may need modifying to support the new name on one or more" 18 | PNG_DFN "; systems." 19 | PNG_DFN "LIBRARY" 20 | PNG_DFN "OS2 DESCRIPTION "PNG image compression library"" 21 | PNG_DFN "OS2 CODE PRELOAD MOVEABLE DISCARDABLE" 22 | PNG_DFN "" 23 | PNG_DFN "EXPORTS" 24 | PNG_DFN ";Version 1.6.16" 25 | 26 | #define PNG_EXPORTA(ordinal, type, name, args, attributes)\ 27 | PNG_DFN "@" SYMBOL_PREFIX "@@" name "@" 28 | 29 | #include "../png.h" 30 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/smakefile.ppc: -------------------------------------------------------------------------------- 1 | # Amiga powerUP (TM) Makefile 2 | # makefile for libpng and SAS C V6.58/7.00 PPC compiler 3 | # Copyright (C) 1998 by Andreas R. Kleinert 4 | # 5 | # This code is released under the libpng license. 6 | # For conditions of distribution and use, see the disclaimer 7 | # and license in png.h 8 | 9 | CC = scppc 10 | CFLAGS = NOSTKCHK NOSINT OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL IDIR /zlib \ 11 | OPTLOOP OPTRDEP=8 OPTDEP=8 OPTCOMP=8 12 | LIBNAME = libpng.a 13 | AR = ppc-amigaos-ar 14 | AR_FLAGS = cr 15 | RANLIB = ppc-amigaos-ranlib 16 | LDFLAGS = -r -o 17 | LDLIBS = ../zlib/libzip.a LIB:scppc.a 18 | LN = ppc-amigaos-ld 19 | RM = delete quiet 20 | MKDIR = makedir 21 | 22 | OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o pngread.o \ 23 | pngerror.o pngpread.o pngwrite.o pngrtran.o pngwtran.o pngrio.o \ 24 | pngwio.o pngmem.o 25 | 26 | all: $(LIBNAME) pngtest 27 | 28 | $(LIBNAME): $(OBJS) 29 | $(AR) $(AR_FLAGS) $@ $(OBJS) 30 | $(RANLIB) $@ 31 | 32 | pngtest: pngtest.o $(LIBNAME) 33 | $(LN) $(LDFLAGS) pngtest LIB:c_ppc.o pngtest.o $(LIBNAME) $(LDLIBS) \ 34 | LIB:end.o 35 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/tools/README.txt: -------------------------------------------------------------------------------- 1 | This directory (contrib/tools) contains tools used by the authors of libpng. 2 | 3 | Code and data placed in this directory is not required to build libpng, 4 | however the code in this directory has been used to generate data or code in 5 | the body of the libpng source. The source code identifies where this has 6 | been done. Code in this directory may not compile on all operating systems 7 | that libpng supports. 8 | 9 | NO COPYRIGHT RIGHTS ARE CLAIMED TO ANY OF THE FILES IN THIS DIRECTORY. 10 | 11 | To the extent possible under law, the authors have waived all copyright and 12 | related or neighboring rights to this work. This work is published from: 13 | United States. 14 | 15 | The files may be used freely in any way. 16 | 17 | The source code and comments in this directory are the original work of the 18 | people named below. No other person or organization has made contributions to 19 | the work in this directory. 20 | 21 | ORIGINAL AUTHORS 22 | The following people have contributed to the code in this directory. None 23 | of the people below claim any rights with regard to the contents of this 24 | directory. 25 | 26 | John Bowler 27 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngminim/preader/pngusr.dfa: -------------------------------------------------------------------------------- 1 | # pngminim/preader/pngusr.dfa 2 | # 3 | # Copyright (c) 2010-2013 Glenn Randers-Pehrson 4 | # 5 | # This code is released under the libpng license. 6 | # For conditions of distribution and use, see the disclaimer 7 | # and license in png.h 8 | 9 | # First all the build options off: 10 | 11 | everything = off 12 | 13 | # Just switch on the progressive read code 14 | 15 | option PROGRESSIVE_READ on 16 | 17 | # You may choose fixed or floating point APIs: 18 | # option FLOATING_POINT on 19 | 20 | option FIXED_POINT on 21 | 22 | # You must chose the internal fixed point implementation or to 23 | # use the system floating point. The latter is considerably 24 | # smaller (by about 1kbyte on an x86 system): 25 | 26 | option FLOATING_ARITHMETIC on 27 | # option FLOATING_ARITHMETIC off 28 | 29 | # Your program will probably need other options. The example 30 | # program here, rpng2-x, requires the following. Take a look 31 | # at pnglibconf.h to find out the full set of what has to be 32 | # enabled to make the following work. 33 | 34 | option SETJMP on 35 | option STDIO on 36 | option READ_bKGD on 37 | option READ_GAMMA on 38 | option READ_EXPAND on 39 | option READ_STRIP_16_TO_8 on 40 | option READ_GRAY_TO_RGB on 41 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/visupng/PngFile.h: -------------------------------------------------------------------------------- 1 | /*------------------------------------------*/ 2 | /* PNGFILE.H -- Header File for pngfile.c*/ 3 | /*------------------------------------------*/ 4 | 5 | /* Copyright 2000, Willem van Schaik.*/ 6 | 7 | /* This code is released under the libpng license.*/ 8 | /* For conditions of distribution and use, see the disclaimer*/ 9 | /* and license in png.h*/ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | void PngFileInitialize (HWND hwnd) ; 17 | BOOL PngFileOpenDlg (HWND hwnd, PTSTR pstrFileName, PTSTR pstrTitleName) ; 18 | BOOL PngFileSaveDlg (HWND hwnd, PTSTR pstrFileName, PTSTR pstrTitleName) ; 19 | 20 | BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData, 21 | int *piWidth, int *piHeight, int *piChannels, png_color *pBkgColor); 22 | BOOL PngSaveImage (PTSTR pstrFileName, png_byte *pDiData, 23 | int iWidth, int iHeight, png_color BkgColor); 24 | 25 | #ifndef PNG_STDIO_SUPPORTED 26 | static void png_read_data(png_structp png_ptr, png_bytep data, png_size_t length); 27 | static void png_write_data(png_structp png_ptr, png_bytep data, png_size_t length); 28 | static void png_flush(png_structp png_ptr); 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngminim/encoder/pngusr.dfa: -------------------------------------------------------------------------------- 1 | # pngminim/encoder/pngusr.dfa 2 | # 3 | # Copyright (c) 2010-2013 Glenn Randers-Pehrson 4 | # 5 | # This code is released under the libpng license. 6 | # For conditions of distribution and use, see the disclaimer 7 | # and license in png.h 8 | 9 | # First all the build options off: 10 | 11 | everything = off 12 | 13 | # Switch on the write code - this makes a minimalist encoder 14 | 15 | option WRITE on 16 | 17 | # These 2 options are required if you need to read PBM (P1 or P4) files. 18 | option WRITE_INVERT on 19 | option WRITE_PACK on 20 | 21 | # You must choose fixed or floating point arithmetic: 22 | # option FLOATING_POINT on 23 | 24 | option FIXED_POINT on 25 | 26 | # You must chose the internal fixed point implementation or to 27 | # use the system floating point. The latter is considerably 28 | # smaller (by about 1kbyte on an x86 system): 29 | # option FLOATING_ARITHMETIC on 30 | 31 | option FLOATING_ARITHMETIC off 32 | 33 | # Your program will probably need other options. The example 34 | # program here, pnm2pngm, requires the following. Take a look 35 | # at pnglibconf.h to find out the full set of what has to be 36 | # enabled to make the following work. 37 | 38 | option SETJMP on 39 | option STDIO on 40 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/TODO: -------------------------------------------------------------------------------- 1 | /* 2 | TODO - list of things to do for libpng: 3 | 4 | Final bug fixes. 5 | Better C++ wrapper/full C++ implementation? 6 | Fix problem with C++ and EXTERN "C". 7 | cHRM transformation. 8 | Remove setjmp/longjmp usage in favor of returning error codes. 9 | Palette creation. 10 | Add "grayscale->palette" transformation and "palette->grayscale" detection. 11 | Improved dithering. 12 | Multi-lingual error and warning message support. 13 | Complete sRGB transformation (presently it simply uses gamma=0.45455). 14 | Make profile checking optional via a png_set_something() call. 15 | Man pages for function calls. 16 | Better documentation. 17 | Better filter selection 18 | (counting huffman bits/precompression? filter inertia? filter costs?). 19 | Histogram creation. 20 | Text conversion between different code pages (Latin-1 -> Mac and DOS). 21 | Avoid building gamma tables whenever possible. 22 | Use greater precision when changing to linear gamma for compositing against 23 | background and doing rgb-to-gray transformation. 24 | Investigate pre-incremented loop counters and other loop constructions. 25 | Add interpolated method of handling interlacing. 26 | Switch to the simpler zlib (zlib/libpng) license if legally possible. 27 | Extend pngvalid.c to validate more of the libpng transformations. 28 | 29 | */ 30 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngminim/decoder/pngusr.dfa: -------------------------------------------------------------------------------- 1 | # pngminim/decoder/pngusr.dfa 2 | # 3 | # Copyright (c) 2010-2013 Glenn Randers-Pehrson 4 | # 5 | # This code is released under the libpng license. 6 | # For conditions of distribution and use, see the disclaimer 7 | # and license in png.h 8 | 9 | # First all the build options off: 10 | 11 | everything = off 12 | 13 | # All that is required is some read code. This example switches 14 | # on the sequential read code (see ../preader for a progressive 15 | # read example). 16 | 17 | option SEQUENTIAL_READ on 18 | 19 | # You must choose fixed or floating point arithmetic: 20 | # option FLOATING_POINT on 21 | 22 | option FIXED_POINT on 23 | 24 | # You must chose the internal fixed point implementation or to 25 | # use the system floating point. The latter is considerably 26 | # smaller (by about 1kbyte on an x86 system): 27 | # option FLOATING_ARITHMETIC on 28 | 29 | option FLOATING_ARITHMETIC off 30 | 31 | # Your program will probably need other options. The example 32 | # program here, pngm2pnm, requires the following. Take a look 33 | # at pnglibconf.h to find out the full set of what has to be 34 | # enabled to make the following work. 35 | 36 | option SETJMP on 37 | option STDIO on 38 | option READ_EXPAND on 39 | option READ_STRIP_16_TO_8 on 40 | option USER_LIMITS on 41 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/libtests/fakepng.c: -------------------------------------------------------------------------------- 1 | /* Fake a PNG - just write it out directly. */ 2 | #include 3 | #include /* for crc32 */ 4 | 5 | void 6 | put_uLong(uLong val) 7 | { 8 | putchar(val >> 24); 9 | putchar(val >> 16); 10 | putchar(val >> 8); 11 | putchar(val >> 0); 12 | } 13 | 14 | void 15 | put_chunk(const unsigned char *chunk, uInt length) 16 | { 17 | uLong crc; 18 | 19 | put_uLong(length-4); /* Exclude the tag */ 20 | 21 | fwrite(chunk, length, 1, stdout); 22 | 23 | crc = crc32(0, Z_NULL, 0); 24 | put_uLong(crc32(crc, chunk, length)); 25 | } 26 | 27 | const unsigned char signature[] = 28 | { 29 | 137, 80, 78, 71, 13, 10, 26, 10 30 | }; 31 | 32 | const unsigned char IHDR[] = 33 | { 34 | 73, 72, 68, 82, /* IHDR */ 35 | 0, 0, 0, 1, /* width */ 36 | 0, 0, 0, 1, /* height */ 37 | 1, /* bit depth */ 38 | 0, /* color type: greyscale */ 39 | 0, /* compression method */ 40 | 0, /* filter method */ 41 | 0 /* interlace method: none */ 42 | }; 43 | 44 | const unsigned char unknown[] = 45 | { 46 | 'u', 'n', 'K', 'n' /* "unKn" - private safe to copy */ 47 | }; 48 | 49 | int 50 | main(void) 51 | { 52 | fwrite(signature, sizeof signature, 1, stdout); 53 | put_chunk(IHDR, sizeof IHDR); 54 | 55 | for (;;) 56 | put_chunk(unknown, sizeof unknown); 57 | } 58 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/conftest/s_write.dfa: -------------------------------------------------------------------------------- 1 | # s_write.dfa 2 | # Build time configuration of libpng 3 | # 4 | # Author: John Bowler 5 | # Copyright: (c) John Bowler, 2013 6 | # Usage rights: 7 | # To the extent possible under law, the author has waived all copyright and 8 | # related or neighboring rights to this work. This work is published from: 9 | # United States. 10 | # 11 | # Build libpng with (just) simplified write support 12 | # 13 | 14 | everything = off 15 | 16 | option SIMPLIFIED_WRITE on 17 | 18 | # It isn't necessary to chose fixed or floating point for the APIs because the 19 | # simplified API doesn't need fixed or floating point numbers. It is necessary 20 | # to chose an internal math implementation. The default (because of 'everything 21 | # = off') is fixed point - turn the floating point implementation on if you have 22 | # hardware floating point or prefer your software floating point implementation. 23 | option FLOATING_ARITHMETIC on 24 | 25 | # This is not strictly necessary, but without it the message strings in the API 26 | # will not be filled in 27 | option ERROR_TEXT on 28 | 29 | # Switching these options on enables the 'AFIRST' and 'BGR' formats - you don't 30 | # need this if you don't use them, they just allow the in-memory layout to be 31 | # changed to match common hardware formats. 32 | option SIMPLIFIED_WRITE_AFIRST on 33 | option SIMPLIFIED_WRITE_BGR on 34 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/tools/sRGB.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * sRGB.h 3 | * 4 | * Last changed in libpng 1.6.0 [February 14, 2013] 5 | * 6 | * COPYRIGHT: Written by John Cunningham Bowler, 2013. 7 | * To the extent possible under law, the author has waived all copyright and 8 | * related or neighboring rights to this work. This work is published from: 9 | * United States. 10 | * 11 | * Utility file; not actually a header, this contains definitions of sRGB 12 | * calculation functions for inclusion in those test programs that need them. 13 | * 14 | * All routines take and return a floating point value in the range 15 | * 0 to 1.0, doing a calculation according to the sRGB specification 16 | * (in fact the source of the numbers is the wikipedia article at 17 | * http://en.wikipedia.org/wiki/SRGB). 18 | */ 19 | static double 20 | sRGB_from_linear(double l) 21 | { 22 | if (l <= 0.0031308) 23 | l *= 12.92; 24 | 25 | else 26 | l = 1.055 * pow(l, 1/2.4) - 0.055; 27 | 28 | return l; 29 | } 30 | 31 | static double 32 | linear_from_sRGB(double s) 33 | { 34 | if (s <= 0.04045) 35 | return s / 12.92; 36 | 37 | else 38 | return pow((s+0.055)/1.055, 2.4); 39 | } 40 | 41 | static double 42 | YfromRGB(double r, double g, double b) 43 | { 44 | /* Use the sRGB (rounded) coefficients for Rlinear, Glinear, Blinear to get 45 | * the CIE Y value (also linear). 46 | */ 47 | return 0.2126 * r + 0.7152 * g + 0.0722 * b; 48 | } 49 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/conftest/simple.dfa: -------------------------------------------------------------------------------- 1 | # simple.dfa 2 | # Build time configuration of libpng 3 | # 4 | # Author: John Bowler 5 | # Copyright: (c) John Bowler, 2013 6 | # Usage rights: 7 | # To the extent possible under law, the author has waived all copyright and 8 | # related or neighboring rights to this work. This work is published from: 9 | # United States. 10 | # 11 | # Build libpng with just the simplified APIs (read and write). 12 | # 13 | 14 | everything = off 15 | 16 | option SIMPLIFIED_WRITE on 17 | option SIMPLIFIED_READ on 18 | 19 | # It isn't necessary to chose fixed or floating point for the APIs because the 20 | # simplified API doesn't need fixed or floating point numbers. It is necessary 21 | # to chose an internal math implementation. The default (because of 'everything 22 | # = off') is fixed point - turn the floating point implementation on if you have 23 | # hardware floating point or prefer your software floating point implementation. 24 | option FLOATING_ARITHMETIC on 25 | 26 | # This is not strictly necessary, but without it the message strings in the API 27 | # will not be filled in 28 | option ERROR_TEXT on 29 | 30 | # Switching these options on enables the 'AFIRST' and 'BGR' formats - you don't 31 | # need this if you don't use them, they just allow the in-memory layout to be 32 | # changed to match common hardware formats. 33 | option SIMPLIFIED_READ_AFIRST on 34 | option SIMPLIFIED_READ_BGR on 35 | option SIMPLIFIED_WRITE_AFIRST on 36 | option SIMPLIFIED_WRITE_BGR on 37 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/conftest/s_read.dfa: -------------------------------------------------------------------------------- 1 | # s_read.dfa 2 | # Build time configuration of libpng 3 | # 4 | # Author: John Bowler 5 | # Copyright: (c) John Bowler, 2013 6 | # Usage rights: 7 | # To the extent possible under law, the author has waived all copyright and 8 | # related or neighboring rights to this work. This work is published from: 9 | # United States. 10 | # 11 | # Build libpng with simplified read support (only). This builds a minimal 12 | # libpng able to read all PNG formats and convert them into a small number of 13 | # well understood memory formats. 14 | # 15 | 16 | everything = off 17 | 18 | option SIMPLIFIED_READ on 19 | 20 | # It isn't necessary to chose fixed or floating point for the APIs because the 21 | # simplified API doesn't need fixed or floating point numbers. It is necessary 22 | # to chose an internal math implementation. The default (because of 'everything 23 | # = off') is fixed point - turn the floating point implementation on if you have 24 | # hardware floating point or prefer your software floating point implementation. 25 | option FLOATING_ARITHMETIC on 26 | 27 | # This is not strictly necessary, but without it the message strings in the API 28 | # will not be filled in 29 | option ERROR_TEXT on 30 | 31 | # Switching these options on enables the 'AFIRST' and 'BGR' formats - you don't 32 | # need this if you don't use them, they just allow the in-memory layout to be 33 | # changed to match common hardware formats. 34 | option SIMPLIFIED_READ_AFIRST on 35 | option SIMPLIFIED_READ_BGR on 36 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/ANNOUNCE: -------------------------------------------------------------------------------- 1 | Libpng 1.6.16 - December 22, 2014 2 | 3 | This is a public release of libpng, intended for use in production codes. 4 | 5 | Files available for download: 6 | 7 | Source files with LF line endings (for Unix/Linux) and with a 8 | "configure" script 9 | 10 | libpng-1.6.16.tar.xz (LZMA-compressed, recommended) 11 | libpng-1.6.16.tar.gz 12 | 13 | Source files with CRLF line endings (for Windows), without the 14 | "configure" script 15 | 16 | lpng1616.7z (LZMA-compressed, recommended) 17 | lpng1616.zip 18 | 19 | Other information: 20 | 21 | libpng-1.6.16-README.txt 22 | libpng-1.6.16-LICENSE.txt 23 | libpng-1.6.16-*.asc (armored detached GPG signatures) 24 | 25 | Changes since the last public release (1.6.15): 26 | Added ".align 2" to arm/filter_neon.S to support old GAS assemblers that 27 | don't do alignment correctly. 28 | Revised Makefile.am and scripts/*.dfn to work with MinGW/MSYS; 29 | renamed scripts/*.dfn to scripts/*.c (Bob Friesenhahn and John Bowler). 30 | Quiet a "comparison always true" warning in pngstest.c (John Bowler). 31 | Restored a test on width that was removed from png.c at libpng-1.6.9 32 | (Bug report by Alex Eubanks). 33 | Fixed an overflow in png_combine_row with very wide interlaced images. 34 | 35 | Send comments/corrections/commendations to png-mng-implement at lists.sf.net 36 | (subscription required; visit 37 | https://lists.sourceforge.net/lists/listinfo/png-mng-implement 38 | to subscribe) 39 | or to glennrp at users.sourceforge.net 40 | 41 | Glenn R-P 42 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/arm-neon/android-ndk.c: -------------------------------------------------------------------------------- 1 | /* contrib/arm-neon/android-ndk.c 2 | * 3 | * Copyright (c) 2014 Glenn Randers-Pehrson 4 | * Written by John Bowler, 2014. 5 | * Last changed in libpng 1.6.10 [March 6, 2014] 6 | * 7 | * This code is released under the libpng license. 8 | * For conditions of distribution and use, see the disclaimer 9 | * and license in png.h 10 | * 11 | * SEE contrib/arm-neon/README before reporting bugs 12 | * 13 | * STATUS: COMPILED, UNTESTED 14 | * BUG REPORTS: png-mng-implement@sourceforge.net 15 | * 16 | * png_have_neon implemented for the Android NDK, see: 17 | * 18 | * Documentation: 19 | * http://www.kandroid.org/ndk/docs/CPU-ARM-NEON.html 20 | * http://code.google.com/p/android/issues/detail?id=49065 21 | * 22 | * NOTE: this requires that libpng is built against the Android NDK and linked 23 | * with an implementation of the Android ARM 'cpu-features' library. The code 24 | * has been compiled only, not linked: no version of the library has been found, 25 | * only the header files exist in the NDK. 26 | */ 27 | #include 28 | 29 | static int 30 | png_have_neon(png_structp png_ptr) 31 | { 32 | /* This is a whole lot easier than the linux code, however it is probably 33 | * implemented as below, therefore it is better to cache the result (these 34 | * function calls may be slow!) 35 | */ 36 | PNG_UNUSED(png_ptr) 37 | return android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM && 38 | (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; 39 | } 40 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/projects/owatcom/libpng.wpj: -------------------------------------------------------------------------------- 1 | 40 2 | projectIdent 3 | 0 4 | VpeMain 5 | 1 6 | WRect 7 | 256 8 | 0 9 | 8960 10 | 9294 11 | 2 12 | MProject 13 | 3 14 | MCommand 15 | 322 16 | # Locations of zlib and (if required) awk (change as required:) 17 | set zlib=..\..\..\zlib 18 | set awk= 19 | # 20 | @if not exist pngconfig.dfa $(MAKE) $(__MAKEOPTS__) -f pngconfig.mak defaults 21 | @if exist config.inf type config.inf 22 | @echo Checking for the libpng configuration file pnglibconf.h 23 | $(MAKE) $(__MAKEOPTS__) -f pngconfig.mak 24 | 4 25 | MCommand 26 | 19 27 | @type pngconfig.inf 28 | 4 29 | 5 30 | WFileName 31 | 10 32 | libpng.tgt 33 | 6 34 | WFileName 35 | 11 36 | pngtest.tgt 37 | 7 38 | WFileName 39 | 12 40 | pngvalid.tgt 41 | 8 42 | WFileName 43 | 12 44 | pngstest.tgt 45 | 9 46 | WVList 47 | 4 48 | 10 49 | VComponent 50 | 11 51 | WRect 52 | 0 53 | 0 54 | 5638 55 | 4174 56 | 0 57 | 0 58 | 12 59 | WFileName 60 | 10 61 | libpng.tgt 62 | 0 63 | 0 64 | 13 65 | VComponent 66 | 14 67 | WRect 68 | 1280 69 | 1550 70 | 5638 71 | 4174 72 | 0 73 | 0 74 | 15 75 | WFileName 76 | 11 77 | pngtest.tgt 78 | 0 79 | 1 80 | 16 81 | VComponent 82 | 17 83 | WRect 84 | 524 85 | 497 86 | 5638 87 | 4174 88 | 0 89 | 0 90 | 18 91 | WFileName 92 | 12 93 | pngvalid.tgt 94 | 0 95 | 1 96 | 19 97 | VComponent 98 | 20 99 | WRect 100 | 2054 101 | 2701 102 | 5674 103 | 4232 104 | 0 105 | 0 106 | 21 107 | WFileName 108 | 12 109 | pngstest.tgt 110 | 0 111 | 1 112 | 19 113 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngminus/pnm2png.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # -- grayscale 3 | ./pnm2png basn0g01.pgm basn0g01.png 4 | ./pnm2png basn0g02.pgm basn0g02.png 5 | ./pnm2png basn0g04.pgm basn0g04.png 6 | ./pnm2png basn0g08.pgm basn0g08.png 7 | ./pnm2png basn0g16.pgm basn0g16.png 8 | # -- full-color 9 | ./pnm2png basn2c08.ppm basn2c08.png 10 | ./pnm2png basn2c16.ppm basn2c16.png 11 | # -- palletted 12 | ./pnm2png basn3p01.ppm basn3p01.png 13 | ./pnm2png basn3p02.ppm basn3p02.png 14 | ./pnm2png basn3p04.ppm basn3p04.png 15 | ./pnm2png basn3p08.ppm basn3p08.png 16 | # -- gray with alpha-channel 17 | ./pnm2png -alpha basn6a08.pgm basn4a08.pgm basn4a08.png 18 | ./pnm2png -alpha basn6a16.pgm basn4a16.pgm basn4a16.png 19 | # -- color with alpha-channel 20 | ./pnm2png -alpha basn6a08.pgm basn6a08.ppm basn6a08.png 21 | ./pnm2png -alpha basn6a16.pgm basn6a16.ppm basn6a16.png 22 | # -- grayscale 23 | ./pnm2png rawn0g01.pgm rawn0g01.png 24 | ./pnm2png rawn0g02.pgm rawn0g02.png 25 | ./pnm2png rawn0g04.pgm rawn0g04.png 26 | ./pnm2png rawn0g08.pgm rawn0g08.png 27 | ./pnm2png rawn0g16.pgm rawn0g16.png 28 | # -- full-color 29 | ./pnm2png rawn2c08.ppm rawn2c08.png 30 | ./pnm2png rawn2c16.ppm rawn2c16.png 31 | # -- palletted 32 | ./pnm2png rawn3p01.ppm rawn3p01.png 33 | ./pnm2png rawn3p02.ppm rawn3p02.png 34 | ./pnm2png rawn3p04.ppm rawn3p04.png 35 | ./pnm2png rawn3p08.ppm rawn3p08.png 36 | # -- gray with alpha-channel 37 | ./pnm2png -alpha rawn6a08.pgm rawn4a08.pgm rawn4a08.png 38 | ./pnm2png -alpha rawn6a16.pgm rawn4a16.pgm rawn4a16.png 39 | # -- color with alpha-channel 40 | ./pnm2png -alpha rawn6a08.pgm rawn6a08.ppm rawn6a08.png 41 | ./pnm2png -alpha rawn6a16.pgm rawn6a16.ppm rawn6a16.png 42 | 43 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngminus/makefile.std: -------------------------------------------------------------------------------- 1 | # Makefile for PngMinus (png2pnm and pnm2png) 2 | # Linux / Unix 3 | 4 | #CC=cc 5 | CC=gcc 6 | LD=$(CC) 7 | 8 | RM=rm -f 9 | 10 | #PNGPATH = /usr/local 11 | #PNGINC = -I$(PNGPATH)/include/libpng16 12 | #PNGLIB = -L$(PNGPATH)/lib -lpng16 13 | #PNGLIBS = $(PNGPATH)/lib/libpng16.a 14 | PNGINC = -I../.. 15 | PNGLIB = -L../.. -lpng 16 | PNGLIBS = ../../libpng.a 17 | 18 | #ZPATH = /usr/local 19 | #ZINC = -I$(ZPATH)/include 20 | #ZLIB = -L$(ZPATH)/lib -lz 21 | #ZLIBS = $(ZPATH)/lib/libz.a 22 | ZINC = -I../../../zlib 23 | ZLIB = -L../../../zlib -lz 24 | ZLIBS = ../../../zlib/libz.a 25 | 26 | CPPFLAGS=$(PNGINC) $(ZINC) 27 | CFLAGS= 28 | LDLIBS=$(PNGLIB) $(ZLIB) 29 | LDLIBSS=$(PNGLIBS) $(ZLIBS) 30 | C=.c 31 | O=.o 32 | L=.a 33 | E= 34 | 35 | # dependencies 36 | 37 | #all: png2pnm$(E) pnm2png$(E) 38 | all: png2pnm$(E) pnm2png$(E) png2pnm-static$(E) pnm2png-static$(E) 39 | 40 | png2pnm$(O): png2pnm$(C) 41 | $(CC) -c $(CPPFLAGS) $(CFLAGS) png2pnm$(C) 42 | 43 | png2pnm$(E): png2pnm$(O) 44 | $(LD) $(LDFLAGS) -o png2pnm$(E) png2pnm$(O) $(LDLIBS) -lm 45 | 46 | png2pnm-static$(E): png2pnm$(O) 47 | $(LD) $(LDFLAGS) -o png2pnm-static$(E) png2pnm$(O) $(LDLIBSS) -lm 48 | 49 | pnm2png$(O): pnm2png$(C) 50 | $(CC) -c $(CPPFLAGS) $(CFLAGS) pnm2png$(C) 51 | 52 | pnm2png$(E): pnm2png$(O) 53 | $(LD) $(LDFLAGS) -o pnm2png$(E) pnm2png$(O) $(LDLIBS) -lm 54 | 55 | pnm2png-static$(E): pnm2png$(O) 56 | $(LD) $(LDFLAGS) -o pnm2png-static$(E) pnm2png$(O) $(LDLIBSS) -lm 57 | 58 | clean: 59 | $(RM) png2pnm$(O) 60 | $(RM) pnm2png$(O) 61 | $(RM) png2pnm$(E) 62 | $(RM) pnm2png$(E) 63 | $(RM) png2pnm-static$(E) 64 | $(RM) pnm2png-static$(E) 65 | 66 | # End of makefile for png2pnm / pnm2png 67 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/conftest/write.dfa: -------------------------------------------------------------------------------- 1 | # write.dfa 2 | # Build time configuration of libpng 3 | # 4 | # Author: John Bowler 5 | # Copyright: (c) John Bowler, 2013 6 | # Usage rights: 7 | # To the extent possible under law, the author has waived all copyright and 8 | # related or neighboring rights to this work. This work is published from: 9 | # United States. 10 | # 11 | # Build libpng with no read support and minimal write support. 12 | # 13 | 14 | everything = off 15 | 16 | # Switch on the write code - this makes a minimalist encoder 17 | 18 | option WRITE on 19 | 20 | # Choose fixed or floating point APIs and arithmetic. The choices are 21 | # independent but normally they will match. It is typically better to use the 22 | # floating point if you have floating point hardware. If you don't know, or 23 | # (perhaps) to make libpng smaller used fixed point throughout. 24 | 25 | #Fixed point: 26 | #option FIXED_POINT on 27 | #option FLOATING_ARITHMETIC off 28 | 29 | #Floating point: 30 | option FLOATING_POINT on 31 | option FLOATING_ARITHMETIC on 32 | 33 | # Basic error handling, IO and user memory support. The latter allows the 34 | # application program to provide its own implementations of 'malloc' and 'free'. 35 | option SETJMP on 36 | option STDIO on 37 | option USER_MEM on 38 | 39 | # Everything else is optional. Unlike the read code in libpng the write code 40 | # does not need to deal with arbitrary formats, so only add support for things 41 | # you really do write! For example you might only write sRGB images, sometimes 42 | # with transparency and never write 16 bit images, so: 43 | option WRITE_sRGB on 44 | option WRITE_tRNS on 45 | #option WRITE_16BIT off (this is the default with 'everything = off') 46 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngminus/pnm2png.bat: -------------------------------------------------------------------------------- 1 | REM -- grayscale 2 | pnm2png.exe basn0g01.pgm basn0g01.png 3 | pnm2png.exe basn0g02.pgm basn0g02.png 4 | pnm2png.exe basn0g04.pgm basn0g04.png 5 | pnm2png.exe basn0g08.pgm basn0g08.png 6 | pnm2png.exe basn0g16.pgm basn0g16.png 7 | REM -- full-color 8 | pnm2png.exe basn2c08.ppm basn2c08.png 9 | pnm2png.exe basn2c16.ppm basn2c16.png 10 | REM -- palletted 11 | pnm2png.exe basn3p01.ppm basn3p01.png 12 | pnm2png.exe basn3p02.ppm basn3p02.png 13 | pnm2png.exe basn3p04.ppm basn3p04.png 14 | pnm2png.exe basn3p08.ppm basn3p08.png 15 | REM -- gray with alpha-channel 16 | pnm2png.exe -alpha basn6a08.pgm basn4a08.pgm basn4a08.png 17 | pnm2png.exe -alpha basn6a16.pgm basn4a16.pgm basn4a16.png 18 | REM -- color with alpha-channel 19 | pnm2png.exe -alpha basn6a08.pgm basn6a08.ppm basn6a08.png 20 | pnm2png.exe -alpha basn6a16.pgm basn6a16.ppm basn6a16.png 21 | REM -- grayscale 22 | pnm2png.exe rawn0g01.pgm rawn0g01.png 23 | pnm2png.exe rawn0g02.pgm rawn0g02.png 24 | pnm2png.exe rawn0g04.pgm rawn0g04.png 25 | pnm2png.exe rawn0g08.pgm rawn0g08.png 26 | pnm2png.exe rawn0g16.pgm rawn0g16.png 27 | REM -- full-color 28 | pnm2png.exe rawn2c08.ppm rawn2c08.png 29 | pnm2png.exe rawn2c16.ppm rawn2c16.png 30 | REM -- palletted 31 | pnm2png.exe rawn3p01.ppm rawn3p01.png 32 | pnm2png.exe rawn3p02.ppm rawn3p02.png 33 | pnm2png.exe rawn3p04.ppm rawn3p04.png 34 | pnm2png.exe rawn3p08.ppm rawn3p08.png 35 | REM -- gray with alpha-channel 36 | pnm2png.exe -alpha rawn6a08.pgm rawn4a08.pgm rawn4a08.png 37 | pnm2png.exe -alpha rawn6a16.pgm rawn4a16.pgm rawn4a16.png 38 | REM -- color with alpha-channel 39 | pnm2png.exe -alpha rawn6a08.pgm rawn6a08.ppm rawn6a08.png 40 | pnm2png.exe -alpha rawn6a16.pgm rawn6a16.ppm rawn6a16.png 41 | 42 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/makefile.amiga: -------------------------------------------------------------------------------- 1 | # Commodore Amiga Makefile 2 | # makefile for libpng and SAS C V6.5x compiler 3 | # Copyright (C) 1995-2000 Wolf Faust 4 | # 5 | # This code is released under the libpng license. 6 | # For conditions of distribution and use, see the disclaimer 7 | # and license in png.h 8 | # 9 | # Location/path of zlib include files 10 | ZLIB=/zlib 11 | #compiler 12 | CC=sc 13 | #compiler flags 14 | # WARNING: a bug in V6.51 causes bad code with OPTGO 15 | # So use V6.55 or set NOOPTGO!!!!!!!!! 16 | CFLAGS= NOSTKCHK PARMS=REG OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL\ 17 | OPTLOOP OPTRDEP=4 OPTDEP=4 OPTCOMP=4 INCLUDEDIR=$(ZLIB) \ 18 | DEFINE=PNG_INTERNAL 19 | #linker flags 20 | LDFLAGS= SD ND BATCH 21 | #link libs 22 | LDLIBS= libpng.lib libgz.lib LIB:scm.lib LIB:sc.lib Lib:amiga.lib 23 | # linker 24 | LN= slink 25 | # file deletion command 26 | RM= delete quiet 27 | # library (.lib) file creation command 28 | AR= oml 29 | # make directory command 30 | MKDIR= makedir 31 | 32 | # Pre-built configuration 33 | # See scripts/pnglibconf.mak for more options 34 | PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt 35 | 36 | OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ 37 | pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ 38 | pngwtran.o pngmem.o pngerror.o pngpread.o 39 | 40 | all: libpng.lib pngtest 41 | 42 | libpng.lib: $(OBJS) 43 | -$(RM) libpng.lib 44 | $(AR) libpng.lib r $(OBJS) 45 | 46 | $(OBJS): pngpriv.h png.h pngconf.h pnglibconf.h pnginfo.h pngstruct.h pngdebug.h 47 | 48 | pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) 49 | COPY $(PNGLIBCONF_H_PREBUILT) TO pnglibconf.h 50 | 51 | pngtest: pngtest.o libpng.lib 52 | $(LN) 57 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/makefile.ne12bsd: -------------------------------------------------------------------------------- 1 | # makefile for libpng for NetBSD for the standard 2 | # make obj && make depend && make && make test 3 | # make includes && make install 4 | # Copyright (C) 2002 Patrick R.L. Welche 5 | # Copyright (C) 2007, 2009, 2014 Glenn Randers-Pehrson 6 | # 7 | # This code is released under the libpng license. 8 | # For conditions of distribution and use, see the disclaimer 9 | # and license in png.h 10 | 11 | # You should also run makefile.netbsd 12 | 13 | LOCALBASE?=/usr/local 14 | LIBDIR= ${LOCALBASE}/lib 15 | MANDIR= ${LOCALBASE}/man 16 | INCSDIR=${LOCALBASE}/include/libpng16 17 | 18 | LIB= png16 19 | SHLIB_MAJOR= 0 20 | SHLIB_MINOR= 1.6.16 21 | SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ 22 | pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ 23 | pngwtran.c pngmem.c pngerror.c pngpread.c 24 | INCS= png.h pngconf.h pnglibconf.h 25 | MAN= libpng.3 libpngpf.3 png.5 26 | 27 | CPPFLAGS+=-I${.CURDIR} 28 | 29 | # Pre-built configuration 30 | # See scripts/pnglibconf.mak for more options 31 | PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt 32 | 33 | # We should be able to do something like this instead of the manual 34 | # uncommenting, but it core dumps for me at the moment: 35 | # .if ${MACHINE_ARCH} == "i386" 36 | # MKLINT= no 37 | # .endif 38 | 39 | CLEANFILES+=pngtest.o pngtest pnglibconf.h 40 | 41 | .c.o: 42 | $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< 43 | 44 | pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) 45 | cp $(PNGLIBCONF_H_PREBUILT) $@ 46 | 47 | pngtest.o: pngtest.c 48 | ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} 49 | 50 | pngtest: pngtest.o libpng.a 51 | ${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm 52 | 53 | test: pngtest 54 | cd ${.CURDIR} && ${.OBJDIR}/pngtest 55 | 56 | .include 57 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/projects/vstudio/zlib.props: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 19 | 20 | 35 | ..\..\..\..\zlib-1.2.8 36 | 37 | 43 | true 44 | 45 | 46 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/projects/visualc71/README_zlib.txt: -------------------------------------------------------------------------------- 1 | /* WARNING: This file was put in the LibPNG distribution for convenience only. 2 | It is expected to be part of the next zlib release under 3 | "projects\visualc71\README.txt." */ 4 | 5 | Microsoft Developer Studio Project File, Format Version 7.10 for zlib. 6 | 7 | Copyright (C) 2004 Simon-Pierre Cadieux. 8 | Copyright (C) 2004 Cosmin Truta. 9 | 10 | This code is released under the libpng license. 11 | For conditions of distribution and use, see copyright notice in zlib.h. 12 | 13 | NOTE: This project will be removed from libpng-1.5.0. It has 14 | been replaced with the "vstudio" project. 15 | 16 | To use: 17 | 18 | 1) On the main menu, select "File | Open Solution". 19 | Open "zlib.sln". 20 | 21 | 2) Display the Solution Explorer view (Ctrl+Alt+L) 22 | 23 | 3) Set one of the project as the StartUp project. If you just want to build the 24 | binaries set "zlib" as the startup project (Select "zlib" tree view item + 25 | Project | Set as StartUp project). If you want to build and test the 26 | binaries set it to "example" (Select "example" tree view item + Project | 27 | Set as StartUp project), If you want to build the minigzip utility set it to 28 | "minigzip" (Select "minigzip" tree view item + Project | Set as StartUp 29 | project 30 | 31 | 4) Select "Build | Configuration Manager...". 32 | Choose the configuration you wish to build. 33 | 34 | 5) Select "Build | Clean Solution". 35 | 36 | 6) Select "Build | Build Solution (Ctrl-Shift-B)" 37 | 38 | This project builds the zlib binaries as follows: 39 | 40 | * Win32_DLL_Release\zlib1.dll DLL build 41 | * Win32_DLL_Debug\zlib1d.dll DLL build (debug version) 42 | * Win32_LIB_Release\zlib.lib static build 43 | * Win32_LIB_Debug\zlibd.lib static build (debug version) 44 | 45 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/conftest/README: -------------------------------------------------------------------------------- 1 | This directory contains test configuration files, currently always '.dfa' files 2 | intended to be used in the build by setting the make macro DFA_XTRA to the name 3 | of the file. 4 | 5 | These files are used in release validation of the 'configure' builds of libpng 6 | by building 'make check', or 'make all-am' for cross-builds, with each .dfa 7 | file. 8 | 9 | The files in this directory may change between minor releases, however 10 | contributions describing specific builds of libpng are welcomed. There is no 11 | guarantee that libpng will continue to build with such configurations; support 12 | for given configurations can be, and has been, dropped between successive minor 13 | releases. However if a .dfa file describing a configuration is not in this 14 | directory it is very unlikely that it will be tested before a minor release! 15 | 16 | You can use these .dfa files as the basis of new configurations. Files in this 17 | directory should not have any use restrictions or restrictive licenses. 18 | 19 | This directory is not included in the .zip and .7z distributions, which do 20 | not contain 'configure' scripts. 21 | 22 | DOCUMENTATION 23 | ============= 24 | 25 | Examples: 26 | ${srcdir}/pngusr.dfa 27 | ${srcdir}/contrib/pngminim/*/pngusr.dfa 28 | 29 | Documentation of the options: 30 | ${srcdir}/scripts/pnglibconf.dfa 31 | 32 | Documentation of the file format: 33 | ${srcdir}/scripts/options.awk 34 | 35 | FILE NAMING 36 | =========== 37 | 38 | File names in this directory may NOT contain any of the five characters: 39 | 40 | - , + * ? 41 | 42 | Neither may they contain any space character. 43 | 44 | While other characters may be used it is strongly suggested that file names be 45 | limited to lower case Latiin alphabetic characters (a-z), digits (0-9) and, if 46 | necessary the underscore (_) character. File names should be about 8 characters 47 | long (excluding the .dfa extension). Submitted .dfa files should have names 48 | between 7 and 16 characters long, shorter names (6 characters or less) are 49 | reserved for standard tests. 50 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngminus/png2pnm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # -- grayscale 3 | ./png2pnm -noraw ../pngsuite/basn0g01.png basn0g01.pgm 4 | ./png2pnm -noraw ../pngsuite/basn0g02.png basn0g02.pgm 5 | ./png2pnm -noraw ../pngsuite/basn0g04.png basn0g04.pgm 6 | ./png2pnm -noraw ../pngsuite/basn0g08.png basn0g08.pgm 7 | ./png2pnm -noraw ../pngsuite/basn0g16.png basn0g16.pgm 8 | # -- full-color 9 | ./png2pnm -noraw ../pngsuite/basn2c08.png basn2c08.ppm 10 | ./png2pnm -noraw ../pngsuite/basn2c16.png basn2c16.ppm 11 | # -- palletted 12 | ./png2pnm -noraw ../pngsuite/basn3p01.png basn3p01.ppm 13 | ./png2pnm -noraw ../pngsuite/basn3p02.png basn3p02.ppm 14 | ./png2pnm -noraw ../pngsuite/basn3p04.png basn3p04.ppm 15 | ./png2pnm -noraw ../pngsuite/basn3p08.png basn3p08.ppm 16 | # -- gray with alpha-channel 17 | ./png2pnm -noraw ../pngsuite/basn4a08.png basn4a08.pgm 18 | ./png2pnm -noraw ../pngsuite/basn4a16.png basn4a16.pgm 19 | # -- color with alpha-channel 20 | ./png2pnm -noraw -alpha basn6a08.pgm ../pngsuite/basn6a08.png basn6a08.ppm 21 | ./png2pnm -noraw -alpha basn6a16.pgm ../pngsuite/basn6a16.png basn6a16.ppm 22 | # -- grayscale 23 | ./png2pnm -raw ../pngsuite/basn0g01.png rawn0g01.pgm 24 | ./png2pnm -raw ../pngsuite/basn0g02.png rawn0g02.pgm 25 | ./png2pnm -raw ../pngsuite/basn0g04.png rawn0g04.pgm 26 | ./png2pnm -raw ../pngsuite/basn0g08.png rawn0g08.pgm 27 | ./png2pnm -raw ../pngsuite/basn0g16.png rawn0g16.pgm 28 | # -- full-color 29 | ./png2pnm -raw ../pngsuite/basn2c08.png rawn2c08.ppm 30 | ./png2pnm -raw ../pngsuite/basn2c16.png rawn2c16.ppm 31 | # -- palletted 32 | ./png2pnm -raw ../pngsuite/basn3p01.png rawn3p01.ppm 33 | ./png2pnm -raw ../pngsuite/basn3p02.png rawn3p02.ppm 34 | ./png2pnm -raw ../pngsuite/basn3p04.png rawn3p04.ppm 35 | ./png2pnm -raw ../pngsuite/basn3p08.png rawn3p08.ppm 36 | # -- gray with alpha-channel 37 | ./png2pnm -raw ../pngsuite/basn4a08.png rawn4a08.pgm 38 | ./png2pnm -raw ../pngsuite/basn4a16.png rawn4a16.pgm 39 | # -- color with alpha-channel 40 | ./png2pnm -noraw -alpha rawn6a08.pgm ../pngsuite/basn6a08.png rawn6a08.ppm 41 | ./png2pnm -noraw -alpha rawn6a16.pgm ../pngsuite/basn6a16.png rawn6a16.ppm 42 | 43 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/makefile.freebsd: -------------------------------------------------------------------------------- 1 | # makefile for libpng under FreeBSD 2 | # Copyright (C) 2014 Glenn Randers-Pehrson and Andrey A. Chernov 3 | # Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov 4 | # 5 | # This code is released under the libpng license. 6 | # For conditions of distribution and use, see the disclaimer 7 | # and license in png.h 8 | 9 | PREFIX?= /usr/local 10 | SHLIB_VER?= 16 11 | 12 | LIB= png 13 | SHLIB_MAJOR= ${SHLIB_VER} 14 | SHLIB_MINOR= 0 15 | NO_PROFILE= YES 16 | NO_OBJ= YES 17 | 18 | # where make install puts libpng.a and png.h 19 | DESTDIR= ${PREFIX} 20 | LIBDIR= /lib 21 | INCS= png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 22 | INCSDIR= /include/libpng 23 | INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk 24 | MAN= libpng.3 libpngpf.3 png.5 25 | MANDIR= /man/man 26 | SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \ 27 | libpng/pngconf.h ${INCSDIR}/../pngconf.h \ 28 | libpng/pnglibconf.h ${INCSDIR}/../pnglibconf.h 29 | 30 | # where make install finds libz.a and zlib.h 31 | ZLIBLIB= /usr/lib 32 | ZLIBINC= /usr/include 33 | 34 | LDADD+= -lm -lz 35 | #LDADD+= -lm -lz -lssp_nonshared # for OSVERSION < 800000 ? 36 | 37 | DPADD+= ${LIBM} ${LIBZ} 38 | 39 | CPPFLAGS+= -I. -I${ZLIBINC} 40 | CFLAGS+= -W -Wall 41 | 42 | # Pre-built configuration 43 | # See scripts/pnglibconf.mak for more options 44 | PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt 45 | 46 | SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ 47 | pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ 48 | pngwtran.c pngmem.c pngerror.c pngpread.c 49 | 50 | .c.o: 51 | $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< 52 | 53 | pngtest: pngtest.o libpng.a 54 | ${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -L${ZLIBLIB} \ 55 | -lpng ${LDADD} 56 | 57 | CLEANFILES= pngtest pngtest.o pngout.png 58 | 59 | test: pngtest 60 | ./pngtest 61 | 62 | pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) 63 | cp $(PNGLIBCONF_H_PREBUILT) $@ 64 | 65 | DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO 66 | writelock: 67 | chmod a-w *.[ch35] $(DOCS) scripts/* 68 | 69 | .include 70 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/libpng-config-body.in: -------------------------------------------------------------------------------- 1 | 2 | usage() 3 | { 4 | cat <.pngtest 33 | @remove .pngtest 34 | 35 | #It would be nice if you could stop "make" listing from here on! 36 | @.pngtest: @.o.pngtest @.libpng-lib C:o.Stubs Zlib:zlib_lib 37 | Link $(Linkflags) @.o.pngtest @.libpng-lib C:o.Stubs Zlib:zlib_lib 38 | 39 | .SUFFIXES: .o .mm .c 40 | 41 | .c.mm: 42 | MemCheck.CC cc $(ccflags) -o $@ LibPng:$< 43 | .c.o: 44 | cc $(ccflags) -o $@ $< 45 | 46 | # See scripts.mak.libpngconf for how to generate this: 47 | @.h.libpngconf: @.scripts.h.libpngconf 48 | copy @.scripts.h.libpngconf $@ 49 | 50 | # Static dependencies: 51 | @.o.png @.o.pngerror @.o.pngrio @.o.pngwio @.o.pngmem \ 52 | @.o.pngpread @.o.pngset @.o.pngget @.o.pngread @.o.pngrtran \ 53 | @.o.pngrutil @.o.pngtrans @.o.pngwrite @.o.pngwtran @.o.pngwutil \ 54 | @.o.pngtest: @.h.libpngconf 55 | 56 | 57 | # Dynamic dependencies: 58 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/symbols.c: -------------------------------------------------------------------------------- 1 | 2 | /* symbols.c - find all exported symbols 3 | * 4 | * Last changed in libpng version 1.6.16 [December 22, 2014] 5 | * Copyright (c) 2011-2014 Glenn Randers-Pehrson 6 | * 7 | * This code is released under the libpng license. 8 | * For conditions of distribution and use, see the disclaimer 9 | * and license in png.h 10 | */ 11 | 12 | /* NOTE: making 'symbols.chk' checks both that the exported 13 | * symbols in the library don't change and (implicitly) that 14 | * scripts/pnglibconf.h.prebuilt is as expected. 15 | * If scripts/pnglibconf.h.prebuilt is remade using 16 | * scripts/pnglibconf.dfa then this checks the .dfa file too. 17 | */ 18 | 19 | #define PNG_EXPORTA(ordinal, type, name, args, attributes)\ 20 | PNG_DFN "@" name "@ @@" ordinal "@" 21 | #define PNG_REMOVED(ordinal, type, name, args, attributes)\ 22 | PNG_DFN "; @" name "@ @@" ordinal "@" 23 | #define PNG_EXPORT_LAST_ORDINAL(ordinal)\ 24 | PNG_DFN "; @@" ordinal "@" 25 | 26 | /* Read the defaults, but use scripts/pnglibconf.h.prebuilt; the 'standard' 27 | * header file. 28 | */ 29 | #include "pnglibconf.h.prebuilt" 30 | #include "../png.h" 31 | 32 | /* Some things are turned off by default. Turn these things 33 | * on here (by hand) to get the APIs they expose and validate 34 | * that no harm is done. This list is the set of options 35 | * defaulted to 'off' in scripts/pnglibconf.dfa 36 | * 37 | * Maintenance: if scripts/pnglibconf.dfa options are changed 38 | * from, or to, 'disabled' this needs updating! 39 | */ 40 | #define PNG_BENIGN_ERRORS_SUPPORTED 41 | #define PNG_ERROR_NUMBERS_SUPPORTED 42 | #define PNG_READ_BIG_ENDIAN_SUPPORTED /* should do nothing! */ 43 | #define PNG_INCH_CONVERSIONS_SUPPORTED 44 | #define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED 45 | #define PNG_SET_OPTION_SUPPORTED 46 | 47 | #undef PNG_H 48 | #include "../png.h" 49 | 50 | /* Finally there are a couple of places where option support 51 | * actually changes the APIs revealed using a #if/#else/#endif 52 | * test in png.h, test these here. 53 | */ 54 | #undef PNG_FLOATING_POINT_SUPPORTED /* Exposes 'fixed' APIs */ 55 | #undef PNG_ERROR_TEXT_SUPPORTED /* Exposes unsupported APIs */ 56 | 57 | #undef PNG_H 58 | #include "../png.h" 59 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/projects/owatcom/pngtest.tgt: -------------------------------------------------------------------------------- 1 | 40 2 | targetIdent 3 | 0 4 | MProject 5 | 1 6 | MComponent 7 | 0 8 | 2 9 | WString 10 | 4 11 | NEXE 12 | 3 13 | WString 14 | 5 15 | nc2en 16 | 1 17 | 0 18 | 0 19 | 4 20 | MCommand 21 | 0 22 | 5 23 | MCommand 24 | 34 25 | cd ..\.. 26 | projects\owatcom\pngtest 27 | 6 28 | MItem 29 | 11 30 | pngtest.exe 31 | 7 32 | WString 33 | 4 34 | NEXE 35 | 8 36 | WVList 37 | 4 38 | 9 39 | MVState 40 | 10 41 | WString 42 | 7 43 | WINLINK 44 | 11 45 | WString 46 | 28 47 | ?????Library directories(;): 48 | 1 49 | 12 50 | WString 51 | 8 52 | $(%zlib) 53 | 0 54 | 13 55 | MVState 56 | 14 57 | WString 58 | 7 59 | WINLINK 60 | 15 61 | WString 62 | 18 63 | ?????Libraries(,): 64 | 1 65 | 16 66 | WString 67 | 19 68 | libpng.lib zlib.lib 69 | 0 70 | 17 71 | MVState 72 | 18 73 | WString 74 | 7 75 | WINLINK 76 | 19 77 | WString 78 | 28 79 | ?????Library directories(;): 80 | 0 81 | 20 82 | WString 83 | 8 84 | $(%zlib) 85 | 0 86 | 21 87 | MVState 88 | 22 89 | WString 90 | 7 91 | WINLINK 92 | 23 93 | WString 94 | 18 95 | ?????Libraries(,): 96 | 0 97 | 24 98 | WString 99 | 19 100 | libpng.lib zlib.lib 101 | 0 102 | 25 103 | WVList 104 | 0 105 | -1 106 | 1 107 | 1 108 | 0 109 | 26 110 | WPickList 111 | 2 112 | 27 113 | MItem 114 | 3 115 | *.c 116 | 28 117 | WString 118 | 4 119 | COBJ 120 | 29 121 | WVList 122 | 2 123 | 30 124 | MVState 125 | 31 126 | WString 127 | 3 128 | WCC 129 | 32 130 | WString 131 | 25 132 | n????Include directories: 133 | 1 134 | 33 135 | WString 136 | 39 137 | "$(%zlib);$(%watcom)/h;$(%watcom)/h/nt" 138 | 0 139 | 34 140 | MVState 141 | 35 142 | WString 143 | 3 144 | WCC 145 | 36 146 | WString 147 | 25 148 | n????Include directories: 149 | 0 150 | 37 151 | WString 152 | 39 153 | "$(%zlib);$(%watcom)/h;$(%watcom)/h/nt" 154 | 0 155 | 38 156 | WVList 157 | 0 158 | -1 159 | 1 160 | 1 161 | 0 162 | 39 163 | MItem 164 | 15 165 | ..\..\pngtest.c 166 | 40 167 | WString 168 | 4 169 | COBJ 170 | 41 171 | WVList 172 | 0 173 | 42 174 | WVList 175 | 0 176 | 27 177 | 1 178 | 1 179 | 0 180 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/descrip.mms: -------------------------------------------------------------------------------- 1 | 2 | cc_defs = /inc=$(ZLIBSRC) 3 | c_deb = 4 | 5 | .ifdef __DECC__ 6 | pref = /prefix=all 7 | .endif 8 | 9 | 10 | 11 | OBJS = png.obj, pngset.obj, pngget.obj, pngrutil.obj, pngtrans.obj,\ 12 | pngwutil.obj, pngread.obj, pngmem.obj, pngwrite.obj, pngrtran.obj,\ 13 | pngwtran.obj, pngrio.obj, pngwio.obj, pngerror.obj, pngpread.obj 14 | 15 | 16 | CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF) 17 | 18 | all : pngtest.exe libpng.olb 19 | @ write sys$output " pngtest available" 20 | 21 | libpng.olb : libpng.olb($(OBJS)) 22 | @ write sys$output " Libpng available" 23 | 24 | 25 | pngtest.exe : pngtest.obj libpng.olb 26 | link pngtest,libpng.olb/lib,$(ZLIBSRC)libz.olb/lib 27 | 28 | test : pngtest.exe 29 | run pngtest 30 | 31 | clean : 32 | delete *.obj;*,*.exe; 33 | 34 | 35 | # Other dependencies. 36 | png.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h 37 | pngpread.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h 38 | pngset.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h 39 | pngget.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h 40 | pngread.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h 41 | pngrtran.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h 42 | pngrutil.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h 43 | pngerror.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h 44 | pngmem.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h 45 | pngrio.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h 46 | pngwio.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h 47 | pngtrans.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h 48 | pngwrite.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h 49 | pngwtran.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h 50 | pngwutil.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h 51 | 52 | pngtest.obj : png.h, pngconf.h, pnglibconf.h 53 | -------------------------------------------------------------------------------- /png-sys/build.rs: -------------------------------------------------------------------------------- 1 | use std::env; 2 | use std::path::PathBuf; 3 | 4 | use std::process::Command; 5 | use std::process::Stdio; 6 | 7 | fn main() { 8 | let target = env::var("TARGET").unwrap(); 9 | let host = env::var("HOST").unwrap(); 10 | 11 | if host != target { 12 | if env::var_os("CC").is_none() { 13 | env::set_var("CC", format!("{}-gcc", target)); 14 | } 15 | if env::var_os("AR").is_none() { 16 | env::set_var("AR", format!("{}-ar", target)); 17 | } 18 | if env::var_os("RANLIB").is_none() { 19 | env::set_var("RANLIB", format!("{}-ranlib", target)); 20 | } 21 | } 22 | 23 | let cfg = PathBuf::from(&env::var("CARGO_MANIFEST_DIR") 24 | .unwrap()).join("libpng-1.6.16/configure"); 25 | let dst = PathBuf::from(&env::var("OUT_DIR").unwrap()); 26 | env::set_var("CFLAGS", "-fPIC -O3"); 27 | let mut cmd; 28 | if host.find("windows").is_some() { 29 | // Here be windows hacks 30 | 31 | // Windows doesn't know how to handle executables 32 | // with shebangs, so we pass it through `sh` 33 | cmd = Command::new(PathBuf::from("sh")); 34 | 35 | // Windows under mingw also doesn't understand its 36 | // own paths, so we pass the path through cygpath 37 | cmd.arg("-c").arg(&format!("$(cygpath \"{}\") --with-libpng-prefix=RUST_", 38 | cfg.to_str().unwrap())); 39 | } else { 40 | cmd = Command::new(cfg); 41 | cmd.arg("--with-libpng-prefix=RUST_"); 42 | if host != target { 43 | cmd.arg(format!("--host={}", target)); 44 | } 45 | } 46 | cmd.current_dir(&dst); 47 | run(&mut cmd); 48 | let mut cmd = Command::new("make"); 49 | cmd.arg("-j4"); 50 | cmd.current_dir(&dst); 51 | run(&mut cmd); 52 | 53 | println!("cargo:root={}", dst.display()); 54 | println!("cargo:rustc-link-search=native={}/.libs", dst.display()); 55 | println!("cargo:rustc-link-lib=static=png16"); 56 | } 57 | 58 | fn run(cmd: &mut Command) { 59 | println!("running: {:?}", cmd); 60 | assert!(cmd.stdout(Stdio::inherit()) 61 | .stderr(Stdio::inherit()) 62 | .status() 63 | .unwrap() 64 | .success()); 65 | } 66 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/pnglibconf.mak: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # pnglibconf.mak - standard make lines for pnglibconf.h 3 | # 4 | # These lines are copied from Makefile.am, they illustrate 5 | # how to automate the build of pnglibconf.h from scripts/pnglibconf.dfa 6 | # given just 'awk', a C preprocessor and standard command line utilities 7 | 8 | # Override as appropriate, these definitions can be overridden on 9 | # the make command line (AWK='nawk' for example). 10 | AWK = gawk 11 | AWK = mawk 12 | AWK = nawk 13 | AWK = one-true-awk 14 | AWK = awk # Crashes on SunOS 5.10 - use 'nawk' 15 | CPP = $(CC) -E # On SUN OS 5.10 if this causes problems use /lib/cpp 16 | 17 | MOVE = mv 18 | DELETE = rm -f 19 | ECHO = echo 20 | DFA_XTRA = # Put your configuration file here, see scripts/pnglibconf.dfa. Eg: 21 | # DFA_XTRA = pngusr.dfa 22 | 23 | # CPPFLAGS should contain the options to control the result, 24 | # but DEFS and CFLAGS are also supported here, override 25 | # as appropriate 26 | DFNFLAGS = $(DEFS) $(CPPFLAGS) $(CFLAGS) 27 | 28 | # srcdir is a defacto standard for the location of the source 29 | srcdir = . 30 | 31 | # The standard pnglibconf.h exists as scripts/pnglibconf.h.prebuilt, 32 | # copy this if the following doesn't work. 33 | pnglibconf.h: pnglibconf.dfn 34 | $(DELETE) $@ pnglibconf.c pnglibconf.out pnglibconf.tmp 35 | $(ECHO) '#include "pnglibconf.dfn"' >pnglibconf.c 36 | $(ECHO) "If '$(CC) -E' crashes try /lib/cpp (e.g. CPP='/lib/cpp')" >&2 37 | $(CPP) $(DFNFLAGS) pnglibconf.c >pnglibconf.out 38 | $(AWK) -f "$(srcdir)/scripts/dfn.awk" out="pnglibconf.tmp" pnglibconf.out 1>&2 39 | $(MOVE) pnglibconf.tmp $@ 40 | 41 | pnglibconf.dfn: $(srcdir)/scripts/pnglibconf.dfa $(srcdir)/scripts/options.awk $(srcdir)/pngconf.h $(srcdir)/pngusr.dfa $(DFA_XTRA) 42 | $(DELETE) $@ pnglibconf.pre pnglibconf.tmp 43 | $(ECHO) "Calling $(AWK) from scripts/pnglibconf.mak" >&2 44 | $(ECHO) "If 'awk' crashes try a better awk (e.g. AWK='nawk')" >&2 45 | $(AWK) -f $(srcdir)/scripts/options.awk out="pnglibconf.pre"\ 46 | version=search $(srcdir)/pngconf.h $(srcdir)/scripts/pnglibconf.dfa\ 47 | $(srcdir)/pngusr.dfa $(DFA_XTRA) 1>&2 48 | $(AWK) -f $(srcdir)/scripts/options.awk out="pnglibconf.tmp" pnglibconf.pre 1>&2 49 | $(MOVE) pnglibconf.tmp $@ 50 | 51 | clean-pnglibconf: 52 | $(DELETE) pnglibconf.* 53 | 54 | clean: clean-pnglibconf 55 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/conftest/read.dfa: -------------------------------------------------------------------------------- 1 | # read.dfa 2 | # Build time configuration of libpng 3 | # 4 | # Author: John Bowler 5 | # Copyright: (c) John Bowler, 2013 6 | # Usage rights: 7 | # To the extent possible under law, the author has waived all copyright and 8 | # related or neighboring rights to this work. This work is published from: 9 | # United States. 10 | # 11 | # Build libpng with basic read support. This enables the lowest level libpng 12 | # read API - the one where the calling code has to use a loop to read each row. 13 | # At present this is the API used by most programs. 14 | # 15 | # Support is enabled only for those chunks and transformations that are 16 | # typically required - others can be added easily. 17 | # 18 | 19 | everything = off 20 | 21 | # The sequential read code is enabled here; the progressive code can be used 22 | # instead but there is no point enabling both. 23 | 24 | option SEQUENTIAL_READ on 25 | 26 | # Likewise it is pointless enabling both fixed and floating point APIs. Choose 27 | # one or the other for both the API and the internal math. 28 | 29 | #Fixed point: 30 | #option FIXED_POINT on 31 | #option FLOATING_ARITHMETIC off 32 | 33 | #Floating point: 34 | option FLOATING_POINT on 35 | option FLOATING_ARITHMETIC on 36 | 37 | # Basic error handling, IO and user memory support. The latter allows the 38 | # application program to provide its own implementations of 'malloc' and 'free'. 39 | option SETJMP on 40 | option STDIO on 41 | option USER_MEM on 42 | 43 | # To read the full set of PNG images correctly interlace, transparency and 44 | # 16-bit support is required. The application can implement interlace itself, 45 | # but very few do and it's no longer possible to disable it when READ is 46 | # enabled. 47 | option READ_tRNS on 48 | option READ_16BIT on 49 | 50 | # Everything else is application dependent. This file assumes the app handles 51 | # all the native PNG bit layouts, so it doesn't need any of layout change 52 | # transforms, but needs libpng to perform gamma correction. It doesn't do any 53 | # colorspace stuff and ignores the 'significant bit' information. 54 | # 55 | # If your app always expands the image to a limited set of bit layouts you 56 | # probably want to consider using the simplified API instead of the low level 57 | # one - see png.h and s_read.dfa. 58 | option READ_GAMMA on 59 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/visupng/README.txt: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Build File, Format Version 6.00 for VisualPng 2 | ------------------------------------------------------------------------ 3 | 4 | Copyright 2000, Willem van Schaik. 5 | 6 | This code is released under the libpng license. 7 | For conditions of distribution and use, see the disclaimer 8 | and license in png.h 9 | 10 | As a PNG .dll demo VisualPng is finished. More features would only hinder 11 | the program's objective. However, further extensions (like support for other 12 | graphics formats) are in development. To get these, or for pre-compiled 13 | binaries, go to "http://www.schaik.com/png/visualpng.html". 14 | 15 | ------------------------------------------------------------------------ 16 | 17 | Assumes that 18 | 19 | libpng DLLs and LIBs are in ..\..\projects\msvc\win32\libpng 20 | zlib DLLs and LIBs are in ..\..\projects\msvc\win32\zlib 21 | libpng header files are in ..\..\..\libpng 22 | zlib header files are in ..\..\..\zlib 23 | the pngsuite images are in ..\pngsuite 24 | 25 | To build: 26 | 27 | 1) On the main menu Select "Build|Set Active configuration". 28 | Choose the configuration that corresponds to the library you want to test. 29 | This library must have been built using the libpng MS project located in 30 | the "..\..\mscv" subdirectory. 31 | 32 | 2) Select "Build|Clean" 33 | 34 | 3) Select "Build|Rebuild All" 35 | 36 | 4) After compiling and linking VisualPng will be started to view an image 37 | from the PngSuite directory. Press Ctrl-N (and Ctrl-V) for other images. 38 | 39 | 40 | To install: 41 | 42 | When distributing VisualPng (or a further development) the following options 43 | are available: 44 | 45 | 1) Build the program with the configuration "Win32 LIB" and you only need to 46 | include the executable from the ./lib directory in your distribution. 47 | 48 | 2) Build the program with the configuration "Win32 DLL" and you need to put 49 | in your distribution the executable from the ./dll directory and the dll's 50 | libpng1.dll, zlib.dll and msvcrt.dll. These need to be in the user's PATH. 51 | 52 | 53 | Willem van Schaik 54 | Calgary, June 6th 2000 55 | 56 | P.S. VisualPng was written based on preliminary work of: 57 | 58 | - Simon-Pierre Cadieux 59 | - Glenn Randers-Pehrson 60 | - Greg Roelofs 61 | 62 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/makefile.atari: -------------------------------------------------------------------------------- 1 | # makefile for libpng 2 | # Copyright (C) 2002, 2014 Glenn Randers-Pehrson 3 | # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. 4 | # 5 | # This code is released under the libpng license. 6 | # For conditions of distribution and use, see the disclaimer 7 | # and license in png.h 8 | # 9 | # Modified for LC56/ATARI assumes libz.lib is in same dir and uses default 10 | # rules for library management 11 | # 12 | CPPFLAGS = -I..\zlib 13 | CFLAGS = -O 14 | LBR = png.lib 15 | LDFLAGS = -L. -L..\zlib -lpng -lz -lm 16 | 17 | # where make install puts libpng.a and png.h 18 | prefix=/usr/local 19 | INCPATH=$(prefix)/include 20 | LIBPATH=$(prefix)/lib 21 | 22 | # override DESTDIR= on the make install command line to easily support 23 | # installing into a temporary location. Example: 24 | # 25 | # make install DESTDIR=/tmp/build/libpng 26 | # 27 | # If you're going to install into a temporary location 28 | # via DESTDIR, $(DESTDIR)$(prefix) must already exist before 29 | # you execute make install. 30 | DESTDIR= 31 | 32 | # Pre-built configuration 33 | # See scripts/pnglibconf.mak for more options 34 | PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt 35 | 36 | OBJS = $(LBR)(png.o) $(LBR)(pngset.o) $(LBR)(pngget.o) $(LBR)(pngrutil.o)\ 37 | $(LBR)(pngtrans.o) $(LBR)(pngwutil.o)\ 38 | $(LBR)(pngread.o) $(LBR)(pngerror.o) $(LBR)(pngwrite.o)\ 39 | $(LBR)(pngrtran.o) $(LBR)(pngwtran.o)\ 40 | $(LBR)(pngmem.o) $(LBR)(pngrio.o) $(LBR)(pngwio.o) $(LBR)(pngpread.o) 41 | 42 | all: $(LBR) pngtest.ttp 43 | 44 | .c.o: 45 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $< 46 | 47 | $(LBR): $(OBJS) 48 | 49 | $(OBJS): pngpriv.h png.h pngconf.h pnglibconf.h pnginfo.h pngstruct.h pngdebug.h 50 | 51 | pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) 52 | cp $(PNGLIBCONF_H_PREBUILT) $@ 53 | 54 | pngtest.ttp: pngtest.o $(LBR) 55 | $(CC) $(CFLAGS) $(LDFLAGS) -o$@ pngtest.o 56 | 57 | install: libpng.a 58 | -@mkdir $(DESTDIR)$(INCPATH) 59 | -@mkdir $(DESTDIR)$(INCPATH)/libpng 60 | -@mkdir $(DESTDIR)$(LIBPATH) 61 | -@rm -f $(DESTDIR)$(INCPATH)/png.h 62 | -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h 63 | -@rm -f $(DESTDIR)$(INCPATH)/pnglibconf.h 64 | cp png.h $(DESTDIR)$(INCPATH)/libpng 65 | cp pngconf.h $(DESTDIR)$(INCPATH)/libpng 66 | cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng 67 | chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h 68 | chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h 69 | chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h 70 | (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \ 71 | ln -f -s $(LIBNAME)/* .) 72 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/projects/visualc71/README.txt: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Project File, Format Version 7.10 for libpng. 2 | 3 | Copyright (C) 2004 Simon-Pierre Cadieux. 4 | 5 | This code is released under the libpng license. 6 | For conditions of distribution and use, see copyright notice in png.h 7 | 8 | NOTE: This project will be removed from libpng-1.5.0. It has 9 | been replaced with the "vstudio" project. 10 | 11 | Assumptions: 12 | * The libpng source files are in ..\.. 13 | * The zlib source files are in ..\..\..\zlib 14 | * The zlib project file is in . /* Warning: This is until the zlib project 15 | files get intergrated into the next zlib release. The final zlib project 16 | directory will then be ..\..\..\zlib\projects\visualc71. */ 17 | 18 | To use: 19 | 20 | 1) On the main menu, select "File | Open Solution". 21 | Open "libpng.sln". 22 | 23 | 2) Display the Solution Explorer view (Ctrl+Alt+L) 24 | 25 | 3) Set one of the project as the StartUp project. If you just want to build the 26 | binaries set "libpng" as the startup project (Select "libpng" tree view 27 | item + Project | Set as StartUp project). If you want to build and test the 28 | binaries set it to "pngtest" (Select "pngtest" tree view item + 29 | Project | Set as StartUp project) 30 | 31 | 4) Select "Build | Configuration Manager...". 32 | Choose the configuration you wish to build. 33 | 34 | 5) Select "Build | Clean Solution". 35 | 36 | 6) Select "Build | Build Solution (Ctrl-Shift-B)" 37 | 38 | This project builds the libpng binaries as follows: 39 | 40 | * Win32_DLL_Release\libpng16.dll DLL build 41 | * Win32_DLL_Debug\libpng16d.dll DLL build (debug version) 42 | * Win32_DLL_VB\libpng16vb.dll DLL build for Visual Basic, using stdcall 43 | * Win32_LIB_Release\libpng.lib static build 44 | * Win32_LIB_Debug\libpngd.lib static build (debug version) 45 | 46 | Notes: 47 | 48 | If you change anything in the source files, or select different compiler 49 | settings, please change the DLL name to something different than any of 50 | the above names. Also, make sure that in your "pngusr.h" you define 51 | PNG_USER_PRIVATEBUILD and PNG_USER_DLLFNAME_POSTFIX according to the 52 | instructions provided in "pngconf.h". 53 | 54 | All DLLs built by this project use the Microsoft dynamic C runtime library 55 | MSVCR71.DLL (MSVCR71D.DLL for debug versions). If you distribute any of the 56 | above mentioned libraries you may have to include this DLL in your package. 57 | For a list of files that are redistributable in Visual Studio see 58 | $(VCINSTALLDIR)\redist.txt. 59 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/gregbook/LICENSE: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------------- 2 | 3 | Copyright (c) 1998-2008 Greg Roelofs. All rights reserved. 4 | 5 | This software is provided "as is," without warranty of any kind, 6 | express or implied. In no event shall the author or contributors 7 | be held liable for any damages arising in any way from the use of 8 | this software. 9 | 10 | The contents of this file are DUAL-LICENSED. You may modify and/or 11 | redistribute this software according to the terms of one of the 12 | following two licenses (at your option): 13 | 14 | 15 | LICENSE 1 ("BSD-like with advertising clause"): 16 | 17 | Permission is granted to anyone to use this software for any purpose, 18 | including commercial applications, and to alter it and redistribute 19 | it freely, subject to the following restrictions: 20 | 21 | 1. Redistributions of source code must retain the above copyright 22 | notice, disclaimer, and this list of conditions. 23 | 2. Redistributions in binary form must reproduce the above copyright 24 | notice, disclaimer, and this list of conditions in the documenta- 25 | tion and/or other materials provided with the distribution. 26 | 3. All advertising materials mentioning features or use of this 27 | software must display the following acknowledgment: 28 | 29 | This product includes software developed by Greg Roelofs 30 | and contributors for the book, "PNG: The Definitive Guide," 31 | published by O'Reilly and Associates. 32 | 33 | 34 | LICENSE 2 (GNU GPL v2 or later): 35 | 36 | This program is free software; you can redistribute it and/or modify 37 | it under the terms of the GNU General Public License as published by 38 | the Free Software Foundation; either version 2 of the License, or 39 | (at your option) any later version. 40 | 41 | This program is distributed in the hope that it will be useful, 42 | but WITHOUT ANY WARRANTY; without even the implied warranty of 43 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 44 | GNU General Public License for more details. 45 | 46 | You should have received a copy of the GNU General Public License 47 | along with this program; if not, write to the Free Software Foundation, 48 | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 49 | 50 | --------------------------------------------------------------------------- 51 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/projects/owatcom/pngvalid.tgt: -------------------------------------------------------------------------------- 1 | 40 2 | targetIdent 3 | 0 4 | MProject 5 | 1 6 | MComponent 7 | 0 8 | 2 9 | WString 10 | 4 11 | NEXE 12 | 3 13 | WString 14 | 5 15 | nc2en 16 | 1 17 | 0 18 | 0 19 | 4 20 | MCommand 21 | 0 22 | 5 23 | MCommand 24 | 8 25 | pngvalid 26 | 6 27 | MItem 28 | 12 29 | pngvalid.exe 30 | 7 31 | WString 32 | 4 33 | NEXE 34 | 8 35 | WVList 36 | 6 37 | 9 38 | MVState 39 | 10 40 | WString 41 | 7 42 | WINLINK 43 | 11 44 | WString 45 | 11 46 | ?????Stack: 47 | 1 48 | 12 49 | WString 50 | 4 51 | 768k 52 | 0 53 | 13 54 | MVState 55 | 14 56 | WString 57 | 7 58 | WINLINK 59 | 15 60 | WString 61 | 28 62 | ?????Library directories(;): 63 | 1 64 | 16 65 | WString 66 | 8 67 | $(%zlib) 68 | 0 69 | 17 70 | MVState 71 | 18 72 | WString 73 | 7 74 | WINLINK 75 | 19 76 | WString 77 | 18 78 | ?????Libraries(,): 79 | 1 80 | 20 81 | WString 82 | 19 83 | libpng.lib zlib.lib 84 | 0 85 | 21 86 | MVState 87 | 22 88 | WString 89 | 7 90 | WINLINK 91 | 23 92 | WString 93 | 11 94 | ?????Stack: 95 | 0 96 | 24 97 | WString 98 | 4 99 | 768k 100 | 0 101 | 25 102 | MVState 103 | 26 104 | WString 105 | 7 106 | WINLINK 107 | 27 108 | WString 109 | 28 110 | ?????Library directories(;): 111 | 0 112 | 28 113 | WString 114 | 8 115 | $(%zlib) 116 | 0 117 | 29 118 | MVState 119 | 30 120 | WString 121 | 7 122 | WINLINK 123 | 31 124 | WString 125 | 18 126 | ?????Libraries(,): 127 | 0 128 | 32 129 | WString 130 | 19 131 | libpng.lib zlib.lib 132 | 0 133 | 33 134 | WVList 135 | 0 136 | -1 137 | 1 138 | 1 139 | 0 140 | 34 141 | WPickList 142 | 2 143 | 35 144 | MItem 145 | 3 146 | *.c 147 | 36 148 | WString 149 | 4 150 | COBJ 151 | 37 152 | WVList 153 | 2 154 | 38 155 | MVState 156 | 39 157 | WString 158 | 3 159 | WCC 160 | 40 161 | WString 162 | 25 163 | n????Include directories: 164 | 1 165 | 41 166 | WString 167 | 39 168 | "$(%zlib);$(%watcom)/h;$(%watcom)/h/nt" 169 | 0 170 | 42 171 | MVState 172 | 43 173 | WString 174 | 3 175 | WCC 176 | 44 177 | WString 178 | 25 179 | n????Include directories: 180 | 0 181 | 45 182 | WString 183 | 39 184 | "$(%zlib);$(%watcom)/h;$(%watcom)/h/nt" 185 | 0 186 | 46 187 | WVList 188 | 0 189 | -1 190 | 1 191 | 1 192 | 0 193 | 47 194 | MItem 195 | 33 196 | ..\..\contrib\libtests\pngvalid.c 197 | 48 198 | WString 199 | 4 200 | COBJ 201 | 49 202 | WVList 203 | 0 204 | 50 205 | WVList 206 | 0 207 | 35 208 | 1 209 | 1 210 | 0 211 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/png.5: -------------------------------------------------------------------------------- 1 | .TH PNG 5 "December 22, 2014" 2 | .SH NAME 3 | png \- Portable Network Graphics (PNG) format 4 | .SH DESCRIPTION 5 | PNG (Portable Network Graphics) is an extensible file format for the 6 | lossless, portable, well-compressed storage of raster images. PNG provides 7 | a patent-free replacement for GIF and can also replace many 8 | common uses of TIFF. Indexed-color, grayscale, and truecolor images are 9 | supported, plus an optional alpha channel. Sample depths range from 10 | 1 to 16 bits. 11 | .br 12 | 13 | PNG is designed to work well in online viewing applications, such as the 14 | World Wide Web, so it is fully streamable with a progressive display 15 | option. PNG is robust, providing both full file integrity checking and 16 | fast, simple detection of common transmission errors. Also, PNG can store 17 | gamma and chromaticity data for improved color matching on heterogeneous 18 | platforms. 19 | 20 | .SH "SEE ALSO" 21 | .BR "libpng"(3), " libpngpf"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5) 22 | .LP 23 | PNG specification (second edition), November 2003: 24 | .IP 25 | .br 26 | &2 18 | echo "$0 []" 19 | echo ' Generate a set of PNG test files in "directory" ("tests" by default)' 20 | exit 1 21 | } 22 | 23 | mp="$PWD/makepng" 24 | test -x "$mp" || { 25 | exec >&2 26 | echo "$0: the 'makepng' program must exist" 27 | echo " in the directory within which this program:" 28 | echo " $mp" 29 | echo " is executed" 30 | usage 31 | } 32 | 33 | # Just one argument: the directory 34 | testdir="tests" 35 | test $# -gt 1 && { 36 | testdir="$1" 37 | shift 38 | } 39 | test $# -eq 0 || usage 40 | 41 | # Take care not to clobber something 42 | if test -e "$testdir" 43 | then 44 | test -d "$testdir" || usage 45 | else 46 | # mkdir -p isn't portable, so do the following 47 | mkdir "$testdir" 2>/dev/null || mkdir -p "$testdir" || usage 48 | fi 49 | 50 | # This fails in a very satisfactory way if it's not accessible 51 | cd "$testdir" 52 | :>"test$$.png" || { 53 | exec >&2 54 | echo "$testdir: directory not writable" 55 | usage 56 | } 57 | rm "test$$.png" || { 58 | exec >&2 59 | echo "$testdir: you have create but not write privileges here." 60 | echo " This is unexpected. You have a spurion; "'"'"test$$.png"'"'"." 61 | echo " You need to remove this yourself. Try a different directory." 62 | exit 1 63 | } 64 | 65 | # Now call makepng ($mp) to create every file we can think of with a 66 | # reasonable name 67 | doit(){ 68 | for gamma in "" --sRGB --linear --1.8 69 | do 70 | case "$gamma" in 71 | "") 72 | gname=;; 73 | --sRGB) 74 | gname="-srgb";; 75 | --linear) 76 | gname="-lin";; 77 | --1.8) 78 | gname="-18";; 79 | *) 80 | gname="-$gamma";; 81 | esac 82 | "$mp" $gamma "$1" "$2" "test-$1-$2$gname.png" 83 | done 84 | } 85 | # 86 | for ct in gray palette 87 | do 88 | for bd in 1 2 4 8 89 | do 90 | doit "$ct" "$bd" 91 | done 92 | done 93 | # 94 | doit "gray" "16" 95 | # 96 | for ct in gray-alpha rgb rgb-alpha 97 | do 98 | for bd in 8 16 99 | do 100 | doit "$ct" "$bd" 101 | done 102 | done 103 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/makefile.dj2: -------------------------------------------------------------------------------- 1 | # DJGPP (DOS gcc) makefile for libpng 2 | # Copyright (C) 2002, 2006, 2009-2014 Glenn Randers-Pehrson 3 | # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. 4 | # 5 | # This code is released under the libpng license. 6 | # For conditions of distribution and use, see the disclaimer 7 | # and license in png.h 8 | 9 | # where make install will put libpng.a and png.h 10 | #prefix=/usr/local 11 | prefix=. 12 | INCPATH=$(prefix)/include 13 | LIBPATH=$(prefix)/lib 14 | 15 | CC=gcc 16 | CPPFLAGS=-I../zlib -DPNG_NO_SNPRINTF 17 | CFLAGS=-O 18 | LDFLAGS=-L. -L../zlib/ -lpng -lz -lm 19 | 20 | RANLIB=ranlib 21 | 22 | CP=cp 23 | RM_F=rm -f 24 | 25 | # Pre-built configuration 26 | # See scripts/pnglibconf.mak for more options 27 | PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt 28 | 29 | OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ 30 | pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o pngwtran.o \ 31 | pngmem.o pngerror.o pngpread.o 32 | 33 | .c.o: 34 | $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< 35 | 36 | all: libpng.a pngtest 37 | 38 | pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) 39 | $(CP) $(PNGLIBCONF_H_PREBUILT) $@ 40 | 41 | libpng.a: $(OBJS) 42 | ar rc $@ $(OBJS) 43 | $(RANLIB) $@ 44 | 45 | pngtest: pngtest.o libpng.a 46 | $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) 47 | coff2exe pngtest 48 | 49 | test: pngtest 50 | ./pngtest 51 | clean: 52 | $(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h 53 | 54 | # DO NOT DELETE THIS LINE -- make depend depends on it. 55 | 56 | png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 57 | pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 58 | pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 59 | pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 60 | pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 61 | pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 62 | pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 63 | pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 64 | pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 65 | pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 66 | pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 67 | pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 68 | pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 69 | pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 70 | pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 71 | 72 | pngtest.o: png.h pngconf.h pnglibconf.h 73 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/tools/checksum-icc.c: -------------------------------------------------------------------------------- 1 | /* checksum-icc.c 2 | * 3 | * Copyright (c) 2013 John Cunningham Bowler 4 | * 5 | * Last changed in libpng 1.6.0 [February 14, 2013] 6 | * 7 | * This code is released under the libpng license. 8 | * For conditions of distribution and use, see the disclaimer 9 | * and license in png.h 10 | * 11 | * Generate crc32 and adler32 checksums of the given input files, used to 12 | * generate check-codes for use when matching ICC profiles within libpng. 13 | */ 14 | #include 15 | 16 | #include 17 | 18 | static int 19 | read_one_file(FILE *ip, const char *name) 20 | { 21 | uLong length = 0; 22 | uLong a32 = adler32(0, NULL, 0); 23 | uLong c32 = crc32(0, NULL, 0); 24 | Byte header[132]; 25 | 26 | for (;;) 27 | { 28 | int ch = getc(ip); 29 | Byte b; 30 | 31 | if (ch == EOF) break; 32 | 33 | b = (Byte)ch; 34 | 35 | if (length < sizeof header) 36 | header[length] = b; 37 | 38 | ++length; 39 | a32 = adler32(a32, &b, 1); 40 | c32 = crc32(c32, &b, 1); 41 | } 42 | 43 | if (ferror(ip)) 44 | return 0; 45 | 46 | /* Success */ 47 | printf("PNG_ICC_CHECKSUM(0x%8.8lx, 0x%8.8lx,\n PNG_MD5(" 48 | "0x%2.2x%2.2x%2.2x%2.2x, 0x%2.2x%2.2x%2.2x%2.2x, 0x%2.2x%2.2x%2.2x%2.2x," 49 | " 0x%2.2x%2.2x%2.2x%2.2x), %d,\n" 50 | " \"%4.4d/%2.2d/%2.2d %2.2d:%2.2d:%2.2d\", %lu, \"%s\")\n", 51 | (unsigned long)a32, (unsigned long)c32, 52 | header[84], header[85], header[86], header[87], 53 | header[88], header[89], header[90], header[91], 54 | header[92], header[93], header[94], header[95], 55 | header[96], header[97], header[98], header[99], 56 | # define u16(x) (header[x] * 256 + header[x+1]) 57 | # define u32(x) (u16(x) * 65536 + u16(x+2)) 58 | u32(64), u16(24), u16(26), u16(28), u16(30), u16(32), u16(34), 59 | (unsigned long)length, name); 60 | 61 | return 1; 62 | } 63 | 64 | int main(int argc, char **argv) 65 | { 66 | int err = 0; 67 | 68 | printf("/* adler32, crc32, MD5[16], intent, date, length, file-name */\n"); 69 | 70 | if (argc > 1) 71 | { 72 | int i; 73 | 74 | for (i=1; i 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | 10 | {EB33566E-DA7F-4D28-9077-88C0B7C77E35} 11 | pnglibconf 12 | 13 | 14 | 15 | Application 16 | false 17 | true 18 | MultiByte 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | Build 30 | 31 | 32 | 33 | Level3 34 | MaxSpeed 35 | true 36 | true 37 | 38 | 39 | true 40 | true 41 | true 42 | 43 | 44 | copy ..\..\..\scripts\pnglibconf.h.prebuilt ..\..\..\pnglibconf.h 45 | 46 | 47 | Generating pnglibconf.h 48 | 49 | 50 | ..\..\..\pnglibconf.h 51 | 52 | 53 | ..\..\..\scripts\pnglibconf.h.prebuilt 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/projects/vstudio/readme.txt: -------------------------------------------------------------------------------- 1 | 2 | VisualStudio instructions 3 | 4 | libpng version 1.6.16 - December 22, 2014 5 | 6 | Copyright (c) 1998-2010 Glenn Randers-Pehrson 7 | 8 | This code is released under the libpng license. 9 | For conditions of distribution and use, see the disclaimer 10 | and license in png.h 11 | 12 | This directory contains support for building libpng under MicroSoft 13 | VisualStudio 2010. It may also work under later versions of VisualStudio. 14 | You should be familiar with VisualStudio before using this directory. 15 | 16 | Initial preparations 17 | ==================== 18 | You must enter some information in zlib.props before attempting to build 19 | with this 'solution'. Please read and edit zlib.props first. You will 20 | probably not be familiar with the contents of zlib.props - do not worry, 21 | it is mostly harmless. 22 | 23 | This is all you need to do to build the 'release' and 'release library' 24 | configurations. 25 | 26 | Debugging 27 | ========= 28 | The release configurations default to /Ox optimization. Full debugging 29 | information is produced (in the .pdb), but if you encounter a problem the 30 | optimization may make it difficult to debug. Simply rebuild with a lower 31 | optimization level (e.g. /Od.) 32 | 33 | Linking your application 34 | ======================== 35 | Normally you should link against the 'release' configuration. This builds a 36 | DLL for libpng with the default runtime options used by Visual Studio 2010. 37 | In particular the runtime library is the "MultiThreaded DLL" version. 38 | If you use Visual Studio defaults to build your application you will have no 39 | problems. 40 | 41 | If you don't use the Visual Studio defaults your application must still be built 42 | with the default runtime option (/MD). If, for some reason, it is not then your 43 | application will crash inside libpng16.dll as soon as libpng tries to read 44 | from a file handle you pass in. 45 | 46 | If you do not want to use the DLL, for example for a very small application, 47 | the 'release library' configuration may be more appropriate. This is built 48 | with a non-standard runtime library - the "MultiThreaded" version. When you 49 | build your application it must be compiled with this option (/MT), otherwise 50 | it will not build (if you are lucky) or crash (if you are not.) 51 | 52 | Stop reading here 53 | ================= 54 | You have enough information to build a working application. 55 | 56 | Debug versions have limited support 57 | =================================== 58 | This solution includes limited support for debug versions of libpng. You 59 | do not need these unless your own solution itself uses debug builds (it is 60 | far more effective to debug on the release builds, there is no point building 61 | a special debug build unless you have heap corruption problems that you can't 62 | track down.) 63 | 64 | The debug build of libpng is minimally supported. Support for debug builds of 65 | zlib is also minimal. You really don't want to do this. 66 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/makefile.openbsd: -------------------------------------------------------------------------------- 1 | # makefile for libpng 2 | # Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson 3 | # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. 4 | # 5 | # This code is released under the libpng license. 6 | # For conditions of distribution and use, see the disclaimer 7 | # and license in png.h 8 | 9 | PREFIX?= /usr/local 10 | LIBDIR= ${PREFIX}/lib 11 | MANDIR= ${PREFIX}/man/cat 12 | 13 | SHLIB_MAJOR= 16 14 | SHLIB_MINOR= 1.6.16 15 | 16 | LIB= png 17 | SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \ 18 | pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c \ 19 | pngwio.c pngwrite.c pngwtran.c pngwutil.c 20 | 21 | HDRS= png.h pngconf.h pnglibconf.h 22 | 23 | CFLAGS+= -W -Wall 24 | CPPFLAGS+= -I${.CURDIR} 25 | 26 | NOPROFILE= Yes 27 | 28 | CLEANFILES+= pngtest.o pngtest pnglibconf.h 29 | 30 | MAN= libpng.3 libpngpf.3 png.5 31 | DOCS= ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \ 32 | libpng-manual.txt 33 | 34 | # Pre-built configuration 35 | # See scripts/pnglibconf.mak for more options 36 | PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt 37 | 38 | .c.o: 39 | $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< 40 | 41 | pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) 42 | cp $(PNGLIBCONF_H_PREBUILT) $@ 43 | 44 | pngtest.o: pngtest.c 45 | ${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} 46 | 47 | pngtest: pngtest.o 48 | ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm 49 | 50 | test: pngtest 51 | cd ${.OBJDIR} && env \ 52 | LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest 53 | 54 | beforeinstall: 55 | if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \ 56 | ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include; \ 57 | fi 58 | if [ ! -d ${DESTDIR}${LIBDIR} ]; then \ 59 | ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \ 60 | fi 61 | if [ ! -d ${DESTDIR}${LIBDIR}/debug ]; then \ 62 | ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}/debug; \ 63 | fi 64 | if [ ! -d ${DESTDIR}${MANDIR}3 ]; then \ 65 | ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}3; \ 66 | fi 67 | if [ ! -d ${DESTDIR}${MANDIR}5 ]; then \ 68 | ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}5; \ 69 | fi 70 | if [ ! -d ${DESTDIR}${PREFIX}/share/doc/png ]; then \ 71 | ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/share/doc/png; \ 72 | fi 73 | 74 | afterinstall: 75 | @rm -f ${DESTDIR}${LIBDIR}/libpng_pic.a 76 | @rm -f ${DESTDIR}${LIBDIR}/debug/libpng.a 77 | @rm -f ${DESTDIR}${PREFIX}/include/png.h 78 | @rm -f ${DESTDIR}${PREFIX}/include/pngconf.h 79 | @rm -f ${DESTDIR}${PREFIX}/include/pnglibconf.h 80 | @rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true 81 | ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ 82 | -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include 83 | ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ 84 | -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include 85 | ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ 86 | -m ${NONBINMODE} ${DOCS} ${DESTDIR}${PREFIX}/share/doc/png 87 | 88 | .include 89 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/libpng-config.in: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # libpng-config 4 | # provides configuration info for libpng. 5 | 6 | # Copyright (C) 2002, 2004, 2006, 2007 Glenn Randers-Pehrson 7 | 8 | # This code is released under the libpng license. 9 | # For conditions of distribution and use, see the disclaimer 10 | # and license in png.h 11 | 12 | # Modeled after libxml-config. 13 | 14 | version="@PNGLIB_VERSION@" 15 | prefix="@prefix@" 16 | exec_prefix="@exec_prefix@" 17 | libdir="@libdir@" 18 | includedir="@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@" 19 | libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@" 20 | all_libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ @LIBS@" 21 | I_opts="-I${includedir}" 22 | L_opts="-L${libdir}" 23 | R_opts="" 24 | cppflags="" 25 | ccopts="" 26 | ldopts="" 27 | 28 | usage() 29 | { 30 | cat < 15 | #include 16 | #include 17 | #include 18 | 19 | /* Normally use here to get the installed libpng, but this is done to 20 | * ensure the code picks up the local libpng implementation: 21 | */ 22 | #include "../../png.h" 23 | 24 | int main(int argc, const char **argv) 25 | { 26 | int result = 1; 27 | 28 | if (argc == 3) 29 | { 30 | png_image image; 31 | 32 | /* Only the image structure version number needs to be set. */ 33 | memset(&image, 0, sizeof image); 34 | image.version = PNG_IMAGE_VERSION; 35 | 36 | if (png_image_begin_read_from_file(&image, argv[1])) 37 | { 38 | png_bytep buffer; 39 | 40 | /* Change this to try different formats! If you set a colormap format 41 | * then you must also supply a colormap below. 42 | */ 43 | image.format = PNG_FORMAT_RGBA; 44 | 45 | buffer = malloc(PNG_IMAGE_SIZE(image)); 46 | 47 | if (buffer != NULL) 48 | { 49 | if (png_image_finish_read(&image, NULL/*background*/, buffer, 50 | 0/*row_stride*/, NULL/*colormap for PNG_FORMAT_FLAG_COLORMAP */)) 51 | { 52 | if (png_image_write_to_file(&image, argv[2], 53 | 0/*convert_to_8bit*/, buffer, 0/*row_stride*/, 54 | NULL/*colormap*/)) 55 | result = 0; 56 | 57 | else 58 | fprintf(stderr, "pngtopng: write %s: %s\n", argv[2], 59 | image.message); 60 | 61 | free(buffer); 62 | } 63 | 64 | else 65 | { 66 | fprintf(stderr, "pngtopng: read %s: %s\n", argv[1], 67 | image.message); 68 | 69 | /* This is the only place where a 'free' is required; libpng does 70 | * the cleanup on error and success, but in this case we couldn't 71 | * complete the read because of running out of memory. 72 | */ 73 | png_image_free(&image); 74 | } 75 | } 76 | 77 | else 78 | fprintf(stderr, "pngtopng: out of memory: %lu bytes\n", 79 | (unsigned long)PNG_IMAGE_SIZE(image)); 80 | } 81 | 82 | else 83 | /* Failed to read the first argument: */ 84 | fprintf(stderr, "pngtopng: %s: %s\n", argv[1], image.message); 85 | } 86 | 87 | else 88 | /* Wrong number of arguments */ 89 | fprintf(stderr, "pngtopng: usage: pngtopng input-file output-file\n"); 90 | 91 | return result; 92 | } 93 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/makefile.ibmc: -------------------------------------------------------------------------------- 1 | # Makefile for libpng (static) 2 | # IBM C version 3.x for Win32 and OS/2 3 | # Copyright (C) 2006, 2014 Glenn Randers-Pehrson 4 | # Copyright (C) 2000 Cosmin Truta 5 | # 6 | # This code is released under the libpng license. 7 | # For conditions of distribution and use, see the disclaimer 8 | # and license in png.h 9 | # 10 | # Notes: 11 | # Derived from makefile.std 12 | # All modules are compiled in C mode 13 | # Tested under Win32, expected to work under OS/2 14 | # Can be easily adapted for IBM VisualAge/C++ for AIX 15 | 16 | # Location of the zlib library and include files 17 | ZLIBINC = ../zlib 18 | ZLIBLIB = ../zlib 19 | 20 | # Compiler, linker, lib and other tools 21 | CC = icc 22 | LD = ilink 23 | AR = ilib 24 | CP = copy 25 | RM = del 26 | 27 | CPPFLAGS = -I$(ZLIBINC) 28 | CFLAGS = -Mc -O2 -W3 29 | LDFLAGS = 30 | 31 | # Pre-built configuration 32 | # See scripts/pnglibconf.mak for more options 33 | PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt 34 | 35 | # File extensions 36 | O=.obj 37 | A=.lib 38 | E=.exe 39 | 40 | # Variables 41 | OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \ 42 | pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \ 43 | pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) 44 | 45 | LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A) 46 | 47 | # Targets 48 | .c$(O): 49 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $< 50 | 51 | all: libpng$(A) pngtest$(E) 52 | 53 | pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) 54 | $(CP) $(PNGLIBCONF_H_PREBUILT) $@ 55 | 56 | libpng$(A): $(OBJS) 57 | $(AR) -out:$@ $(OBJS) 58 | 59 | test: pngtest$(E) 60 | pngtest$(E) 61 | 62 | pngtest: pngtest$(E) 63 | 64 | pngtest$(E): pngtest$(O) libpng$(A) 65 | $(LD) $(LDFLAGS) pngtest$(O) $(LIBS) 66 | 67 | clean: 68 | $(RM) *$(O) 69 | $(RM) libpng$(A) 70 | $(RM) pnglibconf.h 71 | $(RM) pngtest$(E) 72 | $(RM) pngout.png 73 | 74 | png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 75 | pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 76 | pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 77 | pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 78 | pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 79 | pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 80 | pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 81 | pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 82 | pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 83 | pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 84 | pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 85 | pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 86 | pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 87 | pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 88 | pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 89 | 90 | pngtest$(O): png.h pngconf.h pnglibconf.h 91 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/libtests/readpng.c: -------------------------------------------------------------------------------- 1 | /* readpng.c 2 | * 3 | * Copyright (c) 2013 John Cunningham Bowler 4 | * 5 | * Last changed in libpng 1.6.1 [March 28, 2013] 6 | * 7 | * This code is released under the libpng license. 8 | * For conditions of distribution and use, see the disclaimer 9 | * and license in png.h 10 | * 11 | * Load an arbitrary number of PNG files (from the command line, or, if there 12 | * are no arguments on the command line, from stdin) then run a time test by 13 | * reading each file by row. The test does nothing with the read result and 14 | * does no transforms. The only output is a time as a floating point number of 15 | * seconds with 9 decimal digits. 16 | */ 17 | #include 18 | #include 19 | #include 20 | 21 | #if defined(HAVE_CONFIG_H) && !defined(PNG_NO_CONFIG_H) 22 | # include 23 | #endif 24 | 25 | /* Define the following to use this test against your installed libpng, rather 26 | * than the one being built here: 27 | */ 28 | #ifdef PNG_FREESTANDING_TESTS 29 | # include 30 | #else 31 | # include "../../png.h" 32 | #endif 33 | 34 | static int 35 | read_png(FILE *fp) 36 | { 37 | png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,0,0,0); 38 | png_infop info_ptr = NULL; 39 | png_bytep row = NULL, display = NULL; 40 | 41 | if (png_ptr == NULL) 42 | return 0; 43 | 44 | if (setjmp(png_jmpbuf(png_ptr))) 45 | { 46 | png_destroy_read_struct(&png_ptr, &info_ptr, NULL); 47 | if (row != NULL) free(row); 48 | if (display != NULL) free(display); 49 | return 0; 50 | } 51 | 52 | png_init_io(png_ptr, fp); 53 | 54 | info_ptr = png_create_info_struct(png_ptr); 55 | if (info_ptr == NULL) 56 | png_error(png_ptr, "OOM allocating info structure"); 57 | 58 | png_set_keep_unknown_chunks(png_ptr, PNG_HANDLE_CHUNK_ALWAYS, NULL, 0); 59 | 60 | png_read_info(png_ptr, info_ptr); 61 | 62 | { 63 | png_size_t rowbytes = png_get_rowbytes(png_ptr, info_ptr); 64 | 65 | row = malloc(rowbytes); 66 | display = malloc(rowbytes); 67 | 68 | if (row == NULL || display == NULL) 69 | png_error(png_ptr, "OOM allocating row buffers"); 70 | 71 | { 72 | png_uint_32 height = png_get_image_height(png_ptr, info_ptr); 73 | int passes = png_set_interlace_handling(png_ptr); 74 | int pass; 75 | 76 | png_start_read_image(png_ptr); 77 | 78 | for (pass = 0; pass < passes; ++pass) 79 | { 80 | png_uint_32 y = height; 81 | 82 | /* NOTE: this trashes the row each time; interlace handling won't 83 | * work, but this avoids memory thrashing for speed testing. 84 | */ 85 | while (y-- > 0) 86 | png_read_row(png_ptr, row, display); 87 | } 88 | } 89 | } 90 | 91 | /* Make sure to read to the end of the file: */ 92 | png_read_end(png_ptr, info_ptr); 93 | png_destroy_read_struct(&png_ptr, &info_ptr, NULL); 94 | free(row); 95 | free(display); 96 | return 1; 97 | } 98 | 99 | int 100 | main(void) 101 | { 102 | /* Exit code 0 on success. */ 103 | return !read_png(stdin); 104 | } 105 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/makefile.gcc: -------------------------------------------------------------------------------- 1 | # makefile for libpng using gcc (generic, static library) 2 | # Copyright (C) 2008, 2014 Glenn Randers-Pehrson 3 | # Copyright (C) 2000 Cosmin Truta 4 | # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. 5 | # 6 | # This code is released under the libpng license. 7 | # For conditions of distribution and use, see the disclaimer 8 | # and license in png.h 9 | 10 | # Location of the zlib library and include files 11 | ZLIBINC = ../zlib 12 | ZLIBLIB = ../zlib 13 | 14 | # Compiler, linker, lib and other tools 15 | CC = gcc 16 | LD = $(CC) 17 | AR_RC = ar rcs 18 | RANLIB = ranlib 19 | CP = cp 20 | RM_F = rm -f 21 | 22 | WARNMORE = -Wwrite-strings -Wpointer-arith -Wshadow \ 23 | -Wmissing-declarations -Wtraditional -Wcast-align \ 24 | -Wstrict-prototypes -Wmissing-prototypes # -Wconversion 25 | CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5 26 | CFLAGS = -W -Wall -O2 # $(WARNMORE) -g 27 | LDFLAGS = 28 | LIBS = -lz -lm 29 | 30 | # File extensions 31 | EXEEXT = 32 | 33 | # Pre-built configuration 34 | # See scripts/pnglibconf.mak for more options 35 | PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt 36 | 37 | # Variables 38 | OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ 39 | pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \ 40 | pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o 41 | 42 | # Targets 43 | all: static 44 | 45 | pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) 46 | $(CP) $(PNGLIBCONF_H_PREBUILT) $@ 47 | 48 | .c.o: 49 | $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< 50 | 51 | static: libpng.a pngtest$(EXEEXT) 52 | 53 | shared: 54 | @echo This is a generic makefile that cannot create shared libraries. 55 | @echo Please use a configuration that is specific to your platform. 56 | @false 57 | 58 | libpng.a: $(OBJS) 59 | $(AR_RC) $@ $(OBJS) 60 | $(RANLIB) $@ 61 | 62 | test: pngtest$(EXEEXT) 63 | ./pngtest$(EXEEXT) 64 | 65 | pngtest$(EXEEXT): pngtest.o libpng.a 66 | $(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest.o libpng.a $(LIBS) 67 | 68 | clean: 69 | $(RM_F) *.o libpng.a pngtest$(EXEEXT) pngout.png pnglibconf.h 70 | 71 | png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 72 | pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 73 | pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 74 | pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 75 | pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 76 | pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 77 | pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 78 | pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 79 | pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 80 | pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 81 | pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 82 | pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 83 | pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 84 | pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 85 | pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 86 | 87 | pngtest.o: png.h pngconf.h pnglibconf.h 88 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/tools/intgamma.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # intgamma.sh 4 | # 5 | # Last changed in libpng 1.6.0 [February 14, 2013] 6 | # 7 | # COPYRIGHT: Written by John Cunningham Bowler, 2013. 8 | # To the extent possible under law, the author has waived all copyright and 9 | # related or neighboring rights to this work. This work is published from: 10 | # United States. 11 | # 12 | # Shell script to generate png.c 8-bit and 16-bit log tables (see the code in 13 | # png.c for details). 14 | # 15 | # This script uses the "bc" arbitrary precision calculator to calculate 32-bit 16 | # fixed point values of logarithms appropriate to finding the log of an 8-bit 17 | # (0..255) value and a similar table for the exponent calculation. 18 | # 19 | # "bc" must be on the path when the script is executed, and the math library 20 | # (-lm) must be available 21 | # 22 | # function to print out a list of numbers as integers; the function truncates 23 | # the integers which must be one-per-line 24 | function print(){ 25 | awk 'BEGIN{ 26 | str = "" 27 | } 28 | { 29 | sub("\\.[0-9]*$", "") 30 | if ($0 == "") 31 | $0 = "0" 32 | 33 | if (str == "") 34 | t = " " $0 "U" 35 | else 36 | t = str ", " $0 "U" 37 | 38 | if (length(t) >= 80) { 39 | print str "," 40 | str = " " $0 "U" 41 | } else 42 | str = t 43 | } 44 | END{ 45 | print str 46 | }' 47 | } 48 | # 49 | # The logarithm table. 50 | cat <= 2^32) x = 2^32-1; 94 | x; 95 | } 96 | END 97 | echo '};' 98 | echo 99 | # 100 | # And the table of adjustment values. 101 | cat <=0;--i){ 107 | (1 - e(-(2^i)/65536*l(2))) * 2^(32-i) 108 | } 109 | END 110 | echo '#endif' 111 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/gregbook/Makefile.sgi: -------------------------------------------------------------------------------- 1 | # Sample makefile for rpng-x / rpng2-x / wpng for SGI using cc and make. 2 | # Greg Roelofs 3 | # Last modified: 7 March 2002 4 | # 5 | # The programs built by this makefile are described in the book, 6 | # "PNG: The Definitive Guide," by Greg Roelofs (O'Reilly and 7 | # Associates, 1999). Go buy a copy, eh? Buy some for friends 8 | # and family, too. (Not that this is a blatant plug or anything.) 9 | # 10 | # Invoke this makefile from a shell prompt in the usual way; for example: 11 | # 12 | # make -f Makefile.sgi 13 | # 14 | # This makefile assumes libpng and zlib have already been built or downloaded 15 | # and are both installed in /usr/local/{include,lib} (as indicated by the 16 | # PNG* and Z* macros below). Edit as appropriate--choose only ONE each of 17 | # the PNGINC, PNGLIB, ZINC and ZLIB lines. 18 | # 19 | # This makefile builds dynamically linked executables (against libpng and zlib, 20 | # that is), but that can be changed by uncommenting the appropriate PNGLIB and 21 | # ZLIB lines. 22 | 23 | 24 | # macros -------------------------------------------------------------------- 25 | 26 | PNGINC = -I/usr/local/include/libpng16 27 | PNGLIB = -L/usr/local/lib -lpng16 # dynamically linked against libpng 28 | #PNGLIB = /usr/local/lib/libpng16.a # statically linked against libpng 29 | # or: 30 | #PNGINC = -I../.. 31 | #PNGLIB = -L../.. -lpng 32 | #PNGLIB = ../../libpng.a 33 | 34 | ZINC = -I/usr/local/include 35 | ZLIB = -L/usr/local/lib -lz # dynamically linked against zlib 36 | #ZLIB = /usr/local/lib/libz.a # statically linked against zlib 37 | #ZINC = -I../zlib 38 | #ZLIB = -L../zlib -lz 39 | #ZLIB = ../../../zlib/libz.a 40 | 41 | XINC = -I/usr/include/X11 # old-style, stock X distributions 42 | XLIB = -L/usr/lib/X11 -lX11 43 | #XINC = -I/usr/openwin/include # Sun workstations (OpenWindows) 44 | #XLIB = -L/usr/openwin/lib -lX11 45 | #XINC = -I/usr/X11R6/include # new X distributions (XFree86, etc.) 46 | #XLIB = -L/usr/X11R6/lib -lX11 47 | 48 | INCS = $(PNGINC) $(ZINC) $(XINC) 49 | RLIBS = $(PNGLIB) $(ZLIB) $(XLIB) -lm 50 | WLIBS = $(PNGLIB) $(ZLIB) 51 | 52 | CC = cc 53 | LD = cc 54 | RM = rm -f 55 | # ABI must be the same as that used to build libpng. 56 | ABI = 57 | CPPFLAGS = 58 | CFLAGS = $(ABI) -O -fullwarn $(INCS) 59 | LDFLAGS = $(ABI) 60 | O = .o 61 | E = 62 | 63 | RPNG = rpng-x 64 | RPNG2 = rpng2-x 65 | WPNG = wpng 66 | 67 | ROBJS = $(RPNG)$(O) readpng$(O) 68 | ROBJS2 = $(RPNG2)$(O) readpng2$(O) 69 | WOBJS = $(WPNG)$(O) writepng$(O) 70 | 71 | EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E) 72 | 73 | 74 | # implicit make rules ------------------------------------------------------- 75 | 76 | .c$(O): 77 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $< 78 | 79 | 80 | # dependencies -------------------------------------------------------------- 81 | 82 | all: $(EXES) 83 | 84 | $(RPNG)$(E): $(ROBJS) 85 | $(LD) $(LDFLAGS) -o $@ $(ROBJS) $(RLIBS) 86 | 87 | $(RPNG2)$(E): $(ROBJS2) 88 | $(LD) $(LDFLAGS) -o $@ $(ROBJS2) $(RLIBS) 89 | 90 | $(WPNG)$(E): $(WOBJS) 91 | $(LD) $(LDFLAGS) -o $@ $(WOBJS) $(WLIBS) 92 | 93 | $(RPNG)$(O): $(RPNG).c readpng.h 94 | $(RPNG2)$(O): $(RPNG2).c readpng2.h 95 | $(WPNG)$(O): $(WPNG).c writepng.h 96 | 97 | readpng$(O): readpng.c readpng.h 98 | readpng2$(O): readpng2.c readpng2.h 99 | writepng$(O): writepng.c writepng.h 100 | 101 | 102 | # maintenance --------------------------------------------------------------- 103 | 104 | clean: 105 | $(RM) $(EXES) $(ROBJS) $(ROBJS2) $(WOBJS) 106 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/gregbook/readpng.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | 3 | rpng - simple PNG display program readpng.h 4 | 5 | --------------------------------------------------------------------------- 6 | 7 | Copyright (c) 1998-2007 Greg Roelofs. All rights reserved. 8 | 9 | This software is provided "as is," without warranty of any kind, 10 | express or implied. In no event shall the author or contributors 11 | be held liable for any damages arising in any way from the use of 12 | this software. 13 | 14 | The contents of this file are DUAL-LICENSED. You may modify and/or 15 | redistribute this software according to the terms of one of the 16 | following two licenses (at your option): 17 | 18 | 19 | LICENSE 1 ("BSD-like with advertising clause"): 20 | 21 | Permission is granted to anyone to use this software for any purpose, 22 | including commercial applications, and to alter it and redistribute 23 | it freely, subject to the following restrictions: 24 | 25 | 1. Redistributions of source code must retain the above copyright 26 | notice, disclaimer, and this list of conditions. 27 | 2. Redistributions in binary form must reproduce the above copyright 28 | notice, disclaimer, and this list of conditions in the documenta- 29 | tion and/or other materials provided with the distribution. 30 | 3. All advertising materials mentioning features or use of this 31 | software must display the following acknowledgment: 32 | 33 | This product includes software developed by Greg Roelofs 34 | and contributors for the book, "PNG: The Definitive Guide," 35 | published by O'Reilly and Associates. 36 | 37 | 38 | LICENSE 2 (GNU GPL v2 or later): 39 | 40 | This program is free software; you can redistribute it and/or modify 41 | it under the terms of the GNU General Public License as published by 42 | the Free Software Foundation; either version 2 of the License, or 43 | (at your option) any later version. 44 | 45 | This program is distributed in the hope that it will be useful, 46 | but WITHOUT ANY WARRANTY; without even the implied warranty of 47 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 48 | GNU General Public License for more details. 49 | 50 | You should have received a copy of the GNU General Public License 51 | along with this program; if not, write to the Free Software Foundation, 52 | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 53 | 54 | ---------------------------------------------------------------------------*/ 55 | 56 | #ifndef TRUE 57 | # define TRUE 1 58 | # define FALSE 0 59 | #endif 60 | 61 | #ifndef MAX 62 | # define MAX(a,b) ((a) > (b)? (a) : (b)) 63 | # define MIN(a,b) ((a) < (b)? (a) : (b)) 64 | #endif 65 | 66 | #ifdef DEBUG 67 | # define Trace(x) {fprintf x ; fflush(stderr); fflush(stdout);} 68 | #else 69 | # define Trace(x) ; 70 | #endif 71 | 72 | typedef unsigned char uch; 73 | typedef unsigned short ush; 74 | typedef unsigned long ulg; 75 | 76 | 77 | /* prototypes for public functions in readpng.c */ 78 | 79 | void readpng_version_info(void); 80 | 81 | int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight); 82 | 83 | int readpng_get_bgcolor(uch *bg_red, uch *bg_green, uch *bg_blue); 84 | 85 | uch *readpng_get_image(double display_exponent, int *pChannels, 86 | ulg *pRowbytes); 87 | 88 | void readpng_cleanup(int free_image_data); 89 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.ac by autoheader. */ 2 | 3 | /* Define to 1 if you have the header file. */ 4 | #undef HAVE_DLFCN_H 5 | 6 | /* Define to 1 if you have the `feenableexcept' function. */ 7 | #undef HAVE_FEENABLEEXCEPT 8 | 9 | /* Define to 1 if you have the header file. */ 10 | #undef HAVE_INTTYPES_H 11 | 12 | /* Define to 1 if you have the `m' library (-lm). */ 13 | #undef HAVE_LIBM 14 | 15 | /* Define to 1 if you have the `z' library (-lz). */ 16 | #undef HAVE_LIBZ 17 | 18 | /* Define to 1 if you have the header file. */ 19 | #undef HAVE_MEMORY_H 20 | 21 | /* Define to 1 if you have the `memset' function. */ 22 | #undef HAVE_MEMSET 23 | 24 | /* Define to 1 if you have the `pow' function. */ 25 | #undef HAVE_POW 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_STDINT_H 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_STDLIB_H 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #undef HAVE_STRINGS_H 35 | 36 | /* Define to 1 if you have the header file. */ 37 | #undef HAVE_STRING_H 38 | 39 | /* Define to 1 if you have the header file. */ 40 | #undef HAVE_SYS_STAT_H 41 | 42 | /* Define to 1 if you have the header file. */ 43 | #undef HAVE_SYS_TYPES_H 44 | 45 | /* Define to 1 if you have the header file. */ 46 | #undef HAVE_UNISTD_H 47 | 48 | /* Define to the sub-directory in which libtool stores uninstalled libraries. 49 | */ 50 | #undef LT_OBJDIR 51 | 52 | /* Name of package */ 53 | #undef PACKAGE 54 | 55 | /* Define to the address where bug reports for this package should be sent. */ 56 | #undef PACKAGE_BUGREPORT 57 | 58 | /* Define to the full name of this package. */ 59 | #undef PACKAGE_NAME 60 | 61 | /* Define to the full name and version of this package. */ 62 | #undef PACKAGE_STRING 63 | 64 | /* Define to the one symbol short name of this package. */ 65 | #undef PACKAGE_TARNAME 66 | 67 | /* Define to the home page for this package. */ 68 | #undef PACKAGE_URL 69 | 70 | /* Define to the version of this package. */ 71 | #undef PACKAGE_VERSION 72 | 73 | /* Turn on ARM Neon optimizations at run-time */ 74 | #undef PNG_ARM_NEON_API_SUPPORTED 75 | 76 | /* Check for ARM Neon support at run-time */ 77 | #undef PNG_ARM_NEON_CHECK_SUPPORTED 78 | 79 | /* Enable ARM Neon optimizations */ 80 | #undef PNG_ARM_NEON_OPT 81 | 82 | /* Define to 1 if you have the ANSI C header files. */ 83 | #undef STDC_HEADERS 84 | 85 | /* Define to 1 if your declares `struct tm'. */ 86 | #undef TM_IN_SYS_TIME 87 | 88 | /* Version number of package */ 89 | #undef VERSION 90 | 91 | /* Define to empty if `const' does not conform to ANSI C. */ 92 | #undef const 93 | 94 | /* Define to the equivalent of the C99 'restrict' keyword, or to 95 | nothing if this is not supported. Do not define if restrict is 96 | supported directly. */ 97 | #undef restrict 98 | /* Work around a bug in Sun C++: it does not support _Restrict or 99 | __restrict__, even though the corresponding Sun C compiler ends up with 100 | "#define restrict _Restrict" or "#define restrict __restrict__" in the 101 | previous line. Perhaps some future version of Sun C++ will work with 102 | restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ 103 | #if defined __SUNPRO_CC && !defined __RESTRICT 104 | # define _Restrict 105 | # define __restrict__ 106 | #endif 107 | 108 | /* Define to `unsigned int' if does not define. */ 109 | #undef size_t 110 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/arm-neon/README: -------------------------------------------------------------------------------- 1 | OPERATING SYSTEM SPECIFIC ARM NEON DETECTION 2 | -------------------------------------------- 3 | 4 | Detection of the ability to exexcute ARM NEON on an ARM processor requires 5 | operating system support. (The information is not available in user mode.) 6 | 7 | HOW TO USE THIS 8 | --------------- 9 | 10 | This directory contains C code fragments that can be included in arm/arm_init.c 11 | by setting the macro PNG_ARM_NEON_FILE to the file name in "" or <> at build 12 | time. This setting is not recorded in pnglibconf.h and can be changed simply by 13 | rebuilding arm/arm_init.o with the required macro definition. 14 | 15 | For any of this code to be used the ARM NEON code must be enabled and run time 16 | checks must be supported. I.e.: 17 | 18 | #if PNG_ARM_NEON_OPT > 0 19 | #ifdef PNG_ARM_NEON_CHECK_SUPPORTED 20 | 21 | This is done in a 'configure' build by passing configure the argument: 22 | 23 | --enable-arm-neon=check 24 | 25 | Apart from the basic Linux implementation in contrib/arm-neon/linux.c this code 26 | is unsupported. That means that it is not even compiled on a regular basis and 27 | may be broken in any given minor release. 28 | 29 | FILE FORMAT 30 | ----------- 31 | 32 | Each file documents its testing status as of the last time it was tested (which 33 | may have been a long time ago): 34 | 35 | STATUS: one of: 36 | SUPPORTED: This indicates that the file is included in the regularly 37 | performed test builds and bugs are fixed when discovered. 38 | COMPILED: This indicates that the code did compile at least once. See the 39 | more detailed description for the extent to which the result was 40 | successful. 41 | TESTED: This means the code was fully compiled into the libpng test programs 42 | and these were run at least once. 43 | 44 | BUG REPORTS: an email address to which to send reports of problems 45 | 46 | The file is a fragment of C code. It should not define any 'extern' symbols; 47 | everything should be static. It must define the function: 48 | 49 | static int png_have_neon(png_structp png_ptr); 50 | 51 | That function must return 1 if ARM NEON instructions are supported, 0 if not. 52 | It must not execute png_error unless it detects a bug. A png_error will prevent 53 | the reading of the PNG and in the future, writing too. 54 | 55 | BUG REPORTS 56 | ----------- 57 | 58 | If you mail a bug report for any file that is not SUPPORTED there may only be 59 | limited response. Consider fixing it and sending a patch to fix the problem - 60 | this is more likely to result in action. 61 | 62 | CONTRIBUTIONS 63 | ------------- 64 | 65 | You may send contributions of new implementations to 66 | png-mng-implement@sourceforge.net. Please write code in strict C90 C where 67 | possible. Obviously OS dependencies are to be expected. If you submit code you 68 | must have the authors permission and it must have a license that is acceptable 69 | to the current maintainer; in particular that license must permit modification 70 | and redistribution. 71 | 72 | Please try to make the contribution a single file and give the file a clear and 73 | unambiguous name that identifies the target OS. If multiple files really are 74 | required put them all in a sub-directory. 75 | 76 | You must also be prepared to handle bug reports from users of the code, either 77 | by joining the png-mng-implement mailing list or by providing an email for the 78 | "BUG REPORTS" entry or both. Please make sure that the header of the file 79 | contains the STATUS and BUG REPORTS fields as above. 80 | 81 | Please list the OS requirements as precisely as possible. Ideally you should 82 | also list the environment in which the code has been tested and certainly list 83 | any environments where you suspect it might not work. 84 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/makefile.tc3: -------------------------------------------------------------------------------- 1 | # Makefile for libpng 2 | # TurboC/C++ (Note: All modules are compiled in C mode) 3 | 4 | # To use, do "make -fmakefile.tc3" 5 | 6 | # ----- Turbo C++ 3.0 ----- 7 | 8 | MODEL=l 9 | CPPFLAGS=-I..\zlib 10 | CFLAGS=-O2 -Z -m$(MODEL) 11 | CC=tcc 12 | LD=tcc 13 | LIB=tlib 14 | LDFLAGS=-m$(MODEL) -L..\zlib 15 | CP=copy 16 | 17 | # Pre-built configuration 18 | # See scripts\pnglibconf.mak for more options 19 | !ifndef PNGLIBCONF_H_PREBUILT 20 | PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt 21 | !endif 22 | 23 | O=.obj 24 | E=.exe 25 | 26 | # variables 27 | OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) 28 | OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) 29 | OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) 30 | OBJSL1 = +png$(O) +pngset$(O) +pngget$(O) +pngrutil$(O) +pngtrans$(O) 31 | OBJSL2 = +pngwutil$(O) +pngmem$(O) +pngpread$(O) +pngread$(O) +pngerror$(O) 32 | OBJSL3 = +pngwrite$(O) +pngrtran$(O) +pngwtran$(O) +pngrio$(O) +pngwio$(O) 33 | 34 | all: libpng$(MODEL).lib pngtest$(E) 35 | 36 | pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) 37 | $(CP) $(PNGLIBCONF_H_PREBUILT) $@ 38 | 39 | pngtest: pngtest$(E) 40 | 41 | test: pngtest$(E) 42 | pngtest$(E) 43 | 44 | png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 45 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c 46 | 47 | pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 48 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c 49 | 50 | pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 51 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c 52 | 53 | pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 54 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c 55 | 56 | pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 57 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c 58 | 59 | pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 60 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c 61 | 62 | pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 63 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c 64 | 65 | pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 66 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c 67 | 68 | pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 69 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c 70 | 71 | pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 72 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c 73 | 74 | pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 75 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c 76 | 77 | pngtest$(O): png.h pngconf.h pnglibconf.h 78 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c 79 | 80 | pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 81 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c 82 | 83 | pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 84 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c 85 | 86 | pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 87 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c 88 | 89 | pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 90 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c 91 | 92 | libpng$(MODEL).lib: $(OBJS1) $(OBJS2) $(OBJS3) 93 | $(LIB) libpng$(MODEL) +$(OBJSL1) 94 | $(LIB) libpng$(MODEL) +$(OBJSL2) 95 | $(LIB) libpng$(MODEL) +$(OBJSL3) 96 | 97 | pngtest$(E): pngtest$(O) libpng$(MODEL).lib 98 | $(LD) $(LDFLAGS) pngtest.obj libpng$(MODEL).lib zlib_$(MODEL).lib 99 | 100 | # End of makefile for libpng 101 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/projects/owatcom/pngstest.tgt: -------------------------------------------------------------------------------- 1 | 40 2 | targetIdent 3 | 0 4 | MProject 5 | 1 6 | MComponent 7 | 0 8 | 2 9 | WString 10 | 4 11 | NEXE 12 | 3 13 | WString 14 | 5 15 | nc2en 16 | 1 17 | 0 18 | 0 19 | 4 20 | MCommand 21 | 0 22 | 5 23 | MCommand 24 | 1118 25 | pngstest --strict --log ../../contrib/pngsuite/basn0g01.png ../../contrib/pngsuite/basn0g02.png ../../contrib/pngsuite/basn0g04.png ../../contrib/pngsuite/basn0g08.png ../../contrib/pngsuite/basn0g16.png ../../contrib/pngsuite/basn2c08.png ../../contrib/pngsuite/basn2c16.png ../../contrib/pngsuite/basn3p01.png ../../contrib/pngsuite/basn3p02.png ../../contrib/pngsuite/basn3p04.png ../../contrib/pngsuite/basn3p08.png ../../contrib/pngsuite/basn4a08.png ../../contrib/pngsuite/basn4a16.png ../../contrib/pngsuite/basn6a08.png ../../contrib/pngsuite/basn6a16.png ../../contrib/pngsuite/ftbbn0g04.png ../../contrib/pngsuite/ftbbn0g01.png ../../contrib/pngsuite/ftbbn0g02.png ../../contrib/pngsuite/ftbbn2c16.png ../../contrib/pngsuite/ftbbn3p08.png ../../contrib/pngsuite/ftbgn2c16.png ../../contrib/pngsuite/ftbgn3p08.png ../../contrib/pngsuite/ftbrn2c08.png ../../contrib/pngsuite/ftbwn0g16.png ../../contrib/pngsuite/ftbwn3p08.png ../../contrib/pngsuite/ftbyn3p08.png ../../contrib/pngsuite/ftp0n0g08.png ../../contrib/pngsuite/ftp0n2c08.png ../../contrib/pngsuite/ftp0n3p08.png ../../contrib/pngsuite/ftp1n3p08.png 26 | 6 27 | MItem 28 | 12 29 | pngstest.exe 30 | 7 31 | WString 32 | 4 33 | NEXE 34 | 8 35 | WVList 36 | 6 37 | 9 38 | MVState 39 | 10 40 | WString 41 | 7 42 | WINLINK 43 | 11 44 | WString 45 | 11 46 | ?????Stack: 47 | 1 48 | 12 49 | WString 50 | 4 51 | 768k 52 | 0 53 | 13 54 | MVState 55 | 14 56 | WString 57 | 7 58 | WINLINK 59 | 15 60 | WString 61 | 28 62 | ?????Library directories(;): 63 | 1 64 | 16 65 | WString 66 | 8 67 | $(%zlib) 68 | 0 69 | 17 70 | MVState 71 | 18 72 | WString 73 | 7 74 | WINLINK 75 | 19 76 | WString 77 | 18 78 | ?????Libraries(,): 79 | 1 80 | 20 81 | WString 82 | 19 83 | libpng.lib zlib.lib 84 | 0 85 | 21 86 | MVState 87 | 22 88 | WString 89 | 7 90 | WINLINK 91 | 23 92 | WString 93 | 11 94 | ?????Stack: 95 | 0 96 | 24 97 | WString 98 | 4 99 | 768k 100 | 0 101 | 25 102 | MVState 103 | 26 104 | WString 105 | 7 106 | WINLINK 107 | 27 108 | WString 109 | 28 110 | ?????Library directories(;): 111 | 0 112 | 28 113 | WString 114 | 8 115 | $(%zlib) 116 | 0 117 | 29 118 | MVState 119 | 30 120 | WString 121 | 7 122 | WINLINK 123 | 31 124 | WString 125 | 18 126 | ?????Libraries(,): 127 | 0 128 | 32 129 | WString 130 | 19 131 | libpng.lib zlib.lib 132 | 0 133 | 33 134 | WVList 135 | 1 136 | 34 137 | ActionStates 138 | 35 139 | WString 140 | 4 141 | &Run 142 | 36 143 | WVList 144 | 0 145 | -1 146 | 1 147 | 1 148 | 0 149 | 37 150 | WPickList 151 | 2 152 | 38 153 | MItem 154 | 3 155 | *.c 156 | 39 157 | WString 158 | 4 159 | COBJ 160 | 40 161 | WVList 162 | 2 163 | 41 164 | MVState 165 | 42 166 | WString 167 | 3 168 | WCC 169 | 43 170 | WString 171 | 25 172 | n????Include directories: 173 | 1 174 | 44 175 | WString 176 | 39 177 | "$(%zlib);$(%watcom)/h;$(%watcom)/h/nt" 178 | 0 179 | 45 180 | MVState 181 | 46 182 | WString 183 | 3 184 | WCC 185 | 47 186 | WString 187 | 25 188 | n????Include directories: 189 | 0 190 | 48 191 | WString 192 | 39 193 | "$(%zlib);$(%watcom)/h;$(%watcom)/h/nt" 194 | 0 195 | 49 196 | WVList 197 | 0 198 | -1 199 | 1 200 | 1 201 | 0 202 | 50 203 | MItem 204 | 33 205 | ..\..\contrib\libtests\pngstest.c 206 | 51 207 | WString 208 | 4 209 | COBJ 210 | 52 211 | WVList 212 | 0 213 | 53 214 | WVList 215 | 0 216 | 38 217 | 1 218 | 1 219 | 0 220 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/projects/visualc71/libpng.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 8.00 2 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "libpng.vcproj", "{0008960E-E0DD-41A6-8265-00B31DDB4C21}" 3 | ProjectSection(ProjectDependencies) = postProject 4 | {2D4F8105-7D21-454C-9932-B47CAB71A5C0} = {2D4F8105-7D21-454C-9932-B47CAB71A5C0} 5 | EndProjectSection 6 | EndProject 7 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pngtest", "pngtest.vcproj", "{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}" 8 | ProjectSection(ProjectDependencies) = postProject 9 | {0008960E-E0DD-41A6-8265-00B31DDB4C21} = {0008960E-E0DD-41A6-8265-00B31DDB4C21} 10 | EndProjectSection 11 | EndProject 12 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib.vcproj", "{2D4F8105-7D21-454C-9932-B47CAB71A5C0}" 13 | ProjectSection(ProjectDependencies) = postProject 14 | EndProjectSection 15 | EndProject 16 | Global 17 | GlobalSection(SolutionConfiguration) = preSolution 18 | DLL Debug = DLL Debug 19 | DLL Release = DLL Release 20 | DLL VB = DLL VB 21 | LIB Debug = LIB Debug 22 | LIB Release = LIB Release 23 | EndGlobalSection 24 | GlobalSection(ProjectConfiguration) = postSolution 25 | {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Debug.ActiveCfg = DLL Debug|Win32 26 | {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Debug.Build.0 = DLL Debug|Win32 27 | {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Release.ActiveCfg = DLL Release|Win32 28 | {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Release.Build.0 = DLL Release|Win32 29 | {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL VB.ActiveCfg = DLL VB|Win32 30 | {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL VB.Build.0 = DLL VB|Win32 31 | {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Debug.ActiveCfg = LIB Debug|Win32 32 | {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Debug.Build.0 = LIB Debug|Win32 33 | {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Release.ActiveCfg = LIB Release|Win32 34 | {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Release.Build.0 = LIB Release|Win32 35 | {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Debug.ActiveCfg = DLL Debug|Win32 36 | {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Debug.Build.0 = DLL Debug|Win32 37 | {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Release.ActiveCfg = DLL Release|Win32 38 | {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Release.Build.0 = DLL Release|Win32 39 | {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL VB.ActiveCfg = DLL VB|Win32 40 | {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL VB.Build.0 = DLL VB|Win32 41 | {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Debug.ActiveCfg = LIB Debug|Win32 42 | {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Debug.Build.0 = LIB Debug|Win32 43 | {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Release.ActiveCfg = LIB Release|Win32 44 | {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Release.Build.0 = LIB Release|Win32 45 | {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Debug.ActiveCfg = DLL Debug|Win32 46 | {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Debug.Build.0 = DLL Debug|Win32 47 | {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Release.ActiveCfg = DLL Release|Win32 48 | {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Release.Build.0 = DLL Release|Win32 49 | {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL VB.ActiveCfg = DLL Release|Win32 50 | {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL VB.Build.0 = DLL Release|Win32 51 | {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Debug.ActiveCfg = LIB Debug|Win32 52 | {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Debug.Build.0 = LIB Debug|Win32 53 | {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Release.ActiveCfg = LIB Release|Win32 54 | {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Release.Build.0 = LIB Release|Win32 55 | EndGlobalSection 56 | GlobalSection(ExtensibilityGlobals) = postSolution 57 | EndGlobalSection 58 | GlobalSection(ExtensibilityAddIns) = postSolution 59 | EndGlobalSection 60 | EndGlobal 61 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/makefile.cegcc: -------------------------------------------------------------------------------- 1 | # Makefile for creating Windows CE release archives, with the 2 | # mingw32ce compiler. 3 | 4 | # Last updated: 22-Jul-2008 5 | 6 | # Copyright (C) 2008 Vincent Torri 7 | 8 | # This code is released under the libpng license. 9 | # For conditions of distribution and use, see the disclaimer 10 | # and license in png.h 11 | 12 | # To get some help, type 13 | # 14 | # make help 15 | # 16 | # To create the archives 17 | # 18 | # make 19 | # 20 | # To remove everything, type: 21 | # 22 | # make clean 23 | 24 | VERMAJ = 1 25 | VERMIN = 6 26 | VERMIC = 16 27 | VER = $(VERMAJ).$(VERMIN).$(VERMIC) 28 | NAME = libpng 29 | PACKAGE = $(NAME)-$(VER) 30 | 31 | BIN = libpng16-0.dll 32 | LIB = libpng16.a libpng16.dll.a libpng.a libpng.dll.a 33 | INCLUDE = png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 34 | PC = libpng16.pc libpng.pc 35 | 36 | MANIFESTVERBIN = "Libpng-$(VER): Binary files" 37 | MANIFESTVERDEV = "Libpng-$(VER): Developer files" 38 | MANIFESTVERDESC = "Libpng: the official PNG reference library" 39 | 40 | all: $(NAME) 41 | 42 | $(NAME): remove-old copy-src compilation copy manifest archive 43 | @echo " * Removal of the directories" 44 | @rm -rf $(PACKAGE)/ $(PACKAGE)-bin/ $(PACKAGE)-dev/ 45 | 46 | remove-old: 47 | @echo " * Removal of the old files" 48 | @rm -rf $(PACKAGE)-bin* 49 | @rm -rf $(PACKAGE)-dev* 50 | 51 | copy-src: 52 | @echo " * Copy of source files" 53 | @cp -R ../src/$(PACKAGE) . 54 | @echo " * Creation of directories and files" 55 | @mkdir -p $(PACKAGE)-bin/bin 56 | @mkdir -p $(PACKAGE)-bin/manifest 57 | @mkdir -p $(PACKAGE)-dev/lib/pkgconfig 58 | @mkdir -p $(PACKAGE)-dev/include/$(NAME)$(VERMAJ)$(VERMIN) 59 | @mkdir -p $(PACKAGE)-dev/manifest 60 | @touch $(PACKAGE)-bin/manifest/$(PACKAGE)-bin.mft 61 | @touch $(PACKAGE)-bin/manifest/$(PACKAGE)-bin.ver 62 | @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.mft 63 | @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.ver 64 | 65 | compilation: 66 | @echo " * Compilation of $(PACKAGE)" 67 | cd $(PACKAGE) && CPPFLAGS="$(CPPFLAGS) -DPNG_CONSOLE_IO_SUPPORTED -D_WIN32_WCE=0x0420" \ 68 | CFLAGS="$(CFLAGS) -mms-bitfields -O3 -pipe -fomit-frame-pointer" \ 69 | LDFLAGS="$(LDFLAGS) -Wl,--enable-auto-import -Wl,-s" \ 70 | ./configure --prefix=/opt/wince --host=arm-mingw32ce && make 71 | 72 | copy: 73 | @echo " * Copy of binary and development files" 74 | @for i in $(BIN); do \ 75 | cp $(PACKAGE)/.libs/$$i $(PACKAGE)-bin/bin; \ 76 | done 77 | @for i in $(LIB); do \ 78 | cp $(PACKAGE)/.libs/$$i $(PACKAGE)-dev/lib; \ 79 | done 80 | @for i in $(INCLUDE); do \ 81 | cp $(PACKAGE)/$$i $(PACKAGE)-dev/include/$(NAME)$(VERMAJ)$(VERMIN); \ 82 | done 83 | @for i in $(PC); do \ 84 | cp $(PACKAGE)/$$i $(PACKAGE)-dev/lib/pkgconfig; \ 85 | done 86 | 87 | manifest: 88 | @echo " * Creation of the manifest" 89 | @cd $(PACKAGE)-bin && find * >> manifest/$(PACKAGE)-bin.mft 90 | @cd $(PACKAGE)-bin && \ 91 | echo $(MANIFESTVERBIN) >> manifest/$(PACKAGE)-bin.ver && \ 92 | echo $(MANIFESTVERDESC) >> manifest/$(PACKAGE)-bin.ver 93 | @cd $(PACKAGE)-dev && find * >> manifest/$(PACKAGE)-dev.mft 94 | @cd $(PACKAGE)-dev && \ 95 | echo $(MANIFESTVERDEV) >> manifest/$(PACKAGE)-dev.ver && \ 96 | echo $(MANIFESTVERDESC) >> manifest/$(PACKAGE)-dev.ver 97 | 98 | archive: 99 | @echo " * Creation of the archives" 100 | @tar cf $(PACKAGE)-bin.tar $(PACKAGE)-bin 101 | @bzip2 -9 $(PACKAGE)-bin.tar 102 | @tar cf $(PACKAGE)-dev.tar $(PACKAGE)-dev 103 | @bzip2 -9 $(PACKAGE)-dev.tar 104 | 105 | clean: 106 | @echo " * Cleaning" 107 | @rm -rf $(PACKAGE)* 108 | 109 | help: 110 | @echo 111 | @echo "To create the archives, type:" 112 | @echo " make" 113 | @echo 114 | @echo "To remove everything, type:" 115 | @echo " make clean" 116 | @echo 117 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/arm-neon/linux-auxv.c: -------------------------------------------------------------------------------- 1 | /* contrib/arm-neon/linux-auxv.c 2 | * 3 | * Copyright (c) 2014 Glenn Randers-Pehrson 4 | * Written by Mans Rullgard, 2011. 5 | * Last changed in libpng 1.6.10 [March 6, 2014] 6 | * 7 | * This code is released under the libpng license. 8 | * For conditions of distribution and use, see the disclaimer 9 | * and license in png.h 10 | * 11 | * SEE contrib/arm-neon/README before reporting bugs 12 | * 13 | * STATUS: COMPILED, TESTED 14 | * BUG REPORTS: png-mng-implement@sourceforge.net 15 | * 16 | * png_have_neon implemented for Linux versions which allow access to 17 | * /proc/self/auxv. This is probably faster, cleaner and safer than the code to 18 | * read /proc/cpuinfo in contrib/arm-neon/linux, however it is yet another piece 19 | * of potentially untested code and has more complex dependencies than the code 20 | * to read cpuinfo. 21 | * 22 | * This generic __linux__ implementation requires reading /proc/self/auxv and 23 | * looking at each element for one that records NEON capabilities. 24 | */ 25 | #include /* for POSIX 1003.1 */ 26 | #include /* for EINTR */ 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | /* A read call may be interrupted, in which case it returns -1 and sets errno to 35 | * EINTR if nothing was done, otherwise (if something was done) a partial read 36 | * may result. 37 | */ 38 | static size_t 39 | safe_read(png_structp png_ptr, int fd, void *buffer_in, size_t nbytes) 40 | { 41 | size_t ntotal = 0; 42 | char *buffer = png_voidcast(char*, buffer_in); 43 | 44 | while (nbytes > 0) 45 | { 46 | unsigned int nread; 47 | int iread; 48 | 49 | /* Passing nread > INT_MAX to read is implementation defined in POSIX 50 | * 1003.1, therefore despite the unsigned argument portable code must 51 | * limit the value to INT_MAX! 52 | */ 53 | if (nbytes > INT_MAX) 54 | nread = INT_MAX; 55 | 56 | else 57 | nread = (unsigned int)/*SAFE*/nbytes; 58 | 59 | iread = read(fd, buffer, nread); 60 | 61 | if (iread == -1) 62 | { 63 | /* This is the devil in the details, a read can terminate early with 0 64 | * bytes read because of EINTR, yet it still returns -1 otherwise end 65 | * of file cannot be distinguished. 66 | */ 67 | if (errno != EINTR) 68 | { 69 | png_warning(png_ptr, "/proc read failed"); 70 | return 0; /* I.e., a permanent failure */ 71 | } 72 | } 73 | 74 | else if (iread < 0) 75 | { 76 | /* Not a valid 'read' result: */ 77 | png_warning(png_ptr, "OS /proc read bug"); 78 | return 0; 79 | } 80 | 81 | else if (iread > 0) 82 | { 83 | /* Continue reading until a permanent failure, or EOF */ 84 | buffer += iread; 85 | nbytes -= (unsigned int)/*SAFE*/iread; 86 | ntotal += (unsigned int)/*SAFE*/iread; 87 | } 88 | 89 | else 90 | return ntotal; 91 | } 92 | 93 | return ntotal; /* nbytes == 0 */ 94 | } 95 | 96 | static int 97 | png_have_neon(png_structp png_ptr) 98 | { 99 | int fd = open("/proc/self/auxv", O_RDONLY); 100 | Elf32_auxv_t aux; 101 | 102 | /* Failsafe: failure to open means no NEON */ 103 | if (fd == -1) 104 | { 105 | png_warning(png_ptr, "/proc/self/auxv open failed"); 106 | return 0; 107 | } 108 | 109 | while (safe_read(png_ptr, fd, &aux, sizeof aux) == sizeof aux) 110 | { 111 | if (aux.a_type == AT_HWCAP && (aux.a_un.a_val & HWCAP_NEON) != 0) 112 | { 113 | close(fd); 114 | return 1; 115 | } 116 | } 117 | 118 | close(fd); 119 | return 0; 120 | } 121 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/gregbook/Makefile.w32: -------------------------------------------------------------------------------- 1 | # Sample makefile for rpng-win / rpng2-win / wpng using MSVC and NMAKE. 2 | # Greg Roelofs 3 | # Last modified: 2 June 2007 4 | # 5 | # The programs built by this makefile are described in the book, 6 | # "PNG: The Definitive Guide," by Greg Roelofs (O'Reilly and 7 | # Associates, 1999). Go buy a copy, eh? Well, OK, it's not 8 | # generally for sale anymore, but it's the thought that counts, 9 | # right? (Hint: http://www.libpng.org/pub/png/book/ ) 10 | # 11 | # Invoke this makefile from a DOS prompt window via: 12 | # 13 | # %devstudio%\vc\bin\vcvars32.bat 14 | # nmake -nologo -f Makefile.w32 15 | # 16 | # where %devstudio% is the installation directory for MSVC / DevStudio. If 17 | # you get "environment out of space" errors, create a desktop shortcut with 18 | # "c:\windows\command.com /e:4096" as the program command line and set the 19 | # working directory to this directory. Then double-click to open the new 20 | # DOS-prompt window with a bigger environment and retry the commands above. 21 | # 22 | # This makefile assumes libpng and zlib have already been built or downloaded 23 | # and are in subdirectories at the same level as the current subdirectory 24 | # (as indicated by the PNGPATH and ZPATH macros below). Edit as appropriate. 25 | # 26 | # Note that the names of the dynamic and static libpng and zlib libraries 27 | # used below may change in later releases of the libraries. This makefile 28 | # builds statically linked executables, but that can be changed by uncom- 29 | # menting the appropriate PNGLIB and ZLIB lines. 30 | 31 | !include 32 | 33 | 34 | # macros -------------------------------------------------------------------- 35 | 36 | PNGPATH = ../libpng 37 | PNGINC = -I$(PNGPATH) 38 | #PNGLIB = $(PNGPATH)/pngdll.lib 39 | PNGLIB = $(PNGPATH)/libpng.lib 40 | 41 | ZPATH = ../zlib 42 | ZINC = -I$(ZPATH) 43 | #ZLIB = $(ZPATH)/zlibdll.lib 44 | ZLIB = $(ZPATH)/zlibstat.lib 45 | 46 | WINLIBS = -defaultlib:user32.lib gdi32.lib 47 | # ["real" apps may also need comctl32.lib, comdlg32.lib, winmm.lib, etc.] 48 | 49 | INCS = $(PNGINC) $(ZINC) 50 | RLIBS = $(PNGLIB) $(ZLIB) $(WINLIBS) 51 | WLIBS = $(PNGLIB) $(ZLIB) 52 | 53 | CC = cl 54 | LD = link 55 | RM = del 56 | CPPFLAGS = $(INCS) 57 | CFLAGS = -nologo -O -W3 $(cvars) 58 | # [note that -W3 is an MSVC-specific compilation flag ("all warnings on")] 59 | # [see %devstudio%\vc\include\win32.mak for cvars macro definition] 60 | O = .obj 61 | E = .exe 62 | 63 | RLDFLAGS = -nologo -subsystem:windows 64 | WLDFLAGS = -nologo 65 | 66 | RPNG = rpng-win 67 | RPNG2 = rpng2-win 68 | WPNG = wpng 69 | 70 | ROBJS = $(RPNG)$(O) readpng$(O) 71 | ROBJS2 = $(RPNG2)$(O) readpng2$(O) 72 | WOBJS = $(WPNG)$(O) writepng$(O) 73 | 74 | EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E) 75 | 76 | 77 | # implicit make rules ------------------------------------------------------- 78 | 79 | .c$(O): 80 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $< 81 | 82 | 83 | # dependencies -------------------------------------------------------------- 84 | 85 | all: $(EXES) 86 | 87 | $(RPNG)$(E): $(ROBJS) 88 | $(LD) $(RLDFLAGS) -out:$@ $(ROBJS) $(RLIBS) 89 | 90 | $(RPNG2)$(E): $(ROBJS2) 91 | $(LD) $(RLDFLAGS) -out:$@ $(ROBJS2) $(RLIBS) 92 | 93 | $(WPNG)$(E): $(WOBJS) 94 | $(LD) $(WLDFLAGS) -out:$@ $(WOBJS) $(WLIBS) 95 | 96 | $(RPNG)$(O): $(RPNG).c readpng.h 97 | $(RPNG2)$(O): $(RPNG2).c readpng2.h 98 | $(WPNG)$(O): $(WPNG).c writepng.h 99 | 100 | readpng$(O): readpng.c readpng.h 101 | readpng2$(O): readpng2.c readpng2.h 102 | writepng$(O): writepng.c writepng.h 103 | 104 | 105 | # maintenance --------------------------------------------------------------- 106 | 107 | clean: 108 | # ideally we could just do this: 109 | # $(RM) $(EXES) $(ROBJS) $(ROBJS2) $(WOBJS) 110 | # ...but the Windows "DEL" command is none too bright, so: 111 | $(RM) r*$(E) 112 | $(RM) w*$(E) 113 | $(RM) r*$(O) 114 | $(RM) w*$(O) 115 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/makefile.msc: -------------------------------------------------------------------------------- 1 | # makefile for libpng 2 | # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. 3 | # Copyright (C) 2006, 2009, 2014 Glenn Randers-Pehrson 4 | # 5 | # This code is released under the libpng license. 6 | # For conditions of distribution and use, see the disclaimer 7 | # and license in png.h 8 | # 9 | # Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib 10 | 11 | # -------- Microsoft C 5.1 and later, does not use assembler code -------- 12 | MODEL=L 13 | CPPFLAGS=-I..\zlib 14 | CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL) 15 | #-Ox generates bad code with MSC 5.1 16 | CC=cl 17 | LD=link 18 | LDFLAGS=/e/st:0x1500/noe 19 | CP=copy 20 | O=.obj 21 | 22 | # Pre-built configuration 23 | # See scripts\pnglibconf.mak for more options 24 | PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt 25 | 26 | #uncomment next to put error messages in a file 27 | ERRFILE= >> pngerrs 28 | 29 | # variables 30 | OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) 31 | OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) 32 | OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) 33 | 34 | all: libpng.lib 35 | 36 | pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) 37 | $(CP) $(PNGLIBCONF_H_PREBUILT) $@ 38 | 39 | png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 40 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 41 | 42 | pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 43 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 44 | 45 | pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 46 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 47 | 48 | pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 49 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 50 | 51 | pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 52 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 53 | 54 | pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 55 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 56 | 57 | pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 58 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 59 | 60 | pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 61 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 62 | 63 | pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 64 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 65 | 66 | pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 67 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 68 | 69 | pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 70 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 71 | 72 | pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 73 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 74 | 75 | pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 76 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 77 | 78 | pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 79 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 80 | 81 | pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 82 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 83 | 84 | libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) 85 | del libpng.lib 86 | lib libpng $(OBJS1); 87 | lib libpng $(OBJS2); 88 | lib libpng $(OBJS3); 89 | 90 | pngtest$(O): png.h pngconf.h pnglibconf.h 91 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 92 | 93 | pngtest.exe: pngtest.obj libpng.lib 94 | $(LD) $(LDFLAGS) pngtest.obj,,,libpng.lib ..\zlib\zlib.lib ; 95 | 96 | test: pngtest.exe 97 | pngtest 98 | 99 | # End of makefile for libpng 100 | 101 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/makefile.mips: -------------------------------------------------------------------------------- 1 | # makefile for libpng 2 | # Copyright (C) 1998-2014 Glenn Randers-Pehrson 3 | # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. 4 | # 5 | # This code is released under the libpng license. 6 | # For conditions of distribution and use, see the disclaimer 7 | # and license in png.h 8 | 9 | # where make install puts libpng.a and png.h 10 | prefix=/usr/local 11 | INCPATH=$(prefix)/include 12 | LIBPATH=$(prefix)/lib 13 | 14 | # override DESTDIR= on the make install command line to easily support 15 | # installing into a temporary location. Example: 16 | # 17 | # make install DESTDIR=/tmp/build/libpng 18 | # 19 | # If you're going to install into a temporary location 20 | # via DESTDIR, $(DESTDIR)$(prefix) must already exist before 21 | # you execute make install. 22 | DESTDIR= 23 | 24 | CC=cc 25 | CPPFLAGS=-I../zlib -DSYSV -Dmips 26 | CFLAGS=-O -systype sysv -w 27 | #CFLAGS=-O 28 | LDFLAGS=-L. -L../zlib/ -lpng -lz -lm 29 | 30 | #RANLIB=ranlib 31 | RANLIB=echo 32 | 33 | CP=cp 34 | 35 | # Pre-built configuration 36 | # See scripts/pnglibconf.mak for more options 37 | PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt 38 | 39 | OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ 40 | pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ 41 | pngwtran.o pngmem.o pngerror.o pngpread.o 42 | 43 | .c.o: 44 | $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< 45 | 46 | all: libpng.a pngtest 47 | 48 | pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) 49 | $(CP) $(PNGLIBCONF_H_PREBUILT) $@ 50 | 51 | libpng.a: $(OBJS) 52 | ar rc $@ $(OBJS) 53 | $(RANLIB) $@ 54 | 55 | pngtest: pngtest.o libpng.a 56 | $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) 57 | 58 | test: pngtest 59 | ./pngtest 60 | 61 | install: libpng.a 62 | -@mkdir $(DESTDIR)$(INCPATH) 63 | -@mkdir $(DESTDIR)$(INCPATH)/libpng 64 | -@mkdir $(DESTDIR)$(LIBPATH) 65 | -@rm -f $(DESTDIR)$(INCPATH)/png.h 66 | -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h 67 | -@rm -f $(DESTDIR)$(INCPATH)/pnglibconf.h 68 | cp png.h $(DESTDIR)$(INCPATH)/libpng 69 | cp pngconf.h $(DESTDIR)$(INCPATH)/libpng 70 | cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng 71 | chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h 72 | chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h 73 | chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h 74 | (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .) 75 | cp libpng.a $(DESTDIR)$(LIBPATH) 76 | chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a 77 | 78 | clean: 79 | rm -f *.o libpng.a pngtest pngout.png pnglibconf.h 80 | 81 | DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO 82 | writelock: 83 | chmod a-w *.[ch35] $(DOCS) scripts/* 84 | 85 | # DO NOT DELETE THIS LINE -- make depend depends on it. 86 | 87 | png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 88 | pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 89 | pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 90 | pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 91 | pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 92 | pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 93 | pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 94 | pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 95 | pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 96 | pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 97 | pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 98 | pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 99 | pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 100 | pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 101 | pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 102 | 103 | pngtest.o: png.h pngconf.h pnglibconf.h 104 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/pngsuite/README: -------------------------------------------------------------------------------- 1 | 2 | pngsuite 3 | -------- 4 | (c) Willem van Schaik, 1999, 2011, 2012 5 | Two images are by Glenn Randers-Pehrson, 2012 6 | 7 | Permission to use, copy, modify, and distribute these images for any 8 | purpose and without fee is hereby granted. 9 | 10 | The 15 "bas*.png" images are part of the much larger PngSuite test-set of 11 | images, available for developers of PNG supporting software. The 12 | complete set, available at http:/www.schaik.com/pngsuite/, contains 13 | a variety of images to test interlacing, gamma settings, ancillary 14 | chunks, etc. 15 | 16 | The "ft*.png" images are "free/libre" replacements for the transparent 17 | corresponding t*.png images in the PngSuite. 18 | 19 | The images in this directory represent the basic PNG color-types: 20 | grayscale (1-16 bit deep), full color (8 or 16 bit), paletted 21 | (1-8 bit) and grayscale or color images with alpha channel. You 22 | can use them to test the proper functioning of PNG software. 23 | 24 | filename depth type 25 | ------------ ------ -------------- 26 | basn0g01.png 1-bit grayscale 27 | basn0g02.png 2-bit grayscale 28 | basn0g04.png 4-bit grayscale 29 | basn0g08.png 8-bit grayscale 30 | basn0g16.png 16-bit grayscale 31 | basn2c08.png 8-bit truecolor 32 | basn2c16.png 16-bit truecolor 33 | basn3p01.png 1-bit paletted 34 | basn3p02.png 2-bit paletted 35 | basn3p04.png 4-bit paletted 36 | basn3p08.png 8-bit paletted 37 | basn4a08.png 8-bit gray with alpha 38 | basn4a16.png 16-bit gray with alpha 39 | basn6a08.png 8-bit RGBA 40 | basn6a16.png 16-bit RGBA 41 | 42 | ftbbn0g01.png 1-bit grayscale, black bKGD 43 | ftbbn0g02.png 2-bit grayscale, black bKGD 44 | ftbbn0g04.png 4-bit grayscale, black bKGD 45 | ftbbn2c16.png 16-bit truecolor, black bKGD 46 | ftbbn3p08.png 8-bit paletted, black bKGD 47 | ftbgn2c16.png 16-bit truecolor, gray bKGD 48 | ftbgn3p08.png 8-bit paletted, gray bKGD 49 | ftbrn2c08.png 8-bit truecolor, red bKGD 50 | ftbwn0g16.png 16-bit gray, white bKGD 51 | ftbwn3p08.png 8-bit paletted, white bKGD 52 | ftbyn3p08.png 8-bit paletted, yellow bKGD 53 | ftp0n0g08.png 8-bit grayscale, opaque 54 | ftp0n2c08.png 8-bit truecolor, opaque 55 | ftp0n3p08.png 8-bit paletted, opaque 56 | ftp1n3p08.png 8-bit paletted, no bKGD 57 | 58 | Here is the correct result of typing "pngtest -m bas*.png" in 59 | this directory: 60 | 61 | Testing basn0g01.png: PASS (524 zero samples) 62 | Filter 0 was used 32 times 63 | Testing basn0g02.png: PASS (448 zero samples) 64 | Filter 0 was used 32 times 65 | Testing basn0g04.png: PASS (520 zero samples) 66 | Filter 0 was used 32 times 67 | Testing basn0g08.png: PASS (3 zero samples) 68 | Filter 1 was used 9 times 69 | Filter 4 was used 23 times 70 | Testing basn0g16.png: PASS (1 zero samples) 71 | Filter 1 was used 1 times 72 | Filter 2 was used 31 times 73 | Testing basn2c08.png: PASS (6 zero samples) 74 | Filter 1 was used 5 times 75 | Filter 4 was used 27 times 76 | Testing basn2c16.png: PASS (592 zero samples) 77 | Filter 1 was used 1 times 78 | Filter 4 was used 31 times 79 | Testing basn3p01.png: PASS (512 zero samples) 80 | Filter 0 was used 32 times 81 | Testing basn3p02.png: PASS (448 zero samples) 82 | Filter 0 was used 32 times 83 | Testing basn3p04.png: PASS (544 zero samples) 84 | Filter 0 was used 32 times 85 | Testing basn3p08.png: PASS (4 zero samples) 86 | Filter 0 was used 32 times 87 | Testing basn4a08.png: PASS (32 zero samples) 88 | Filter 1 was used 1 times 89 | Filter 4 was used 31 times 90 | Testing basn4a16.png: PASS (64 zero samples) 91 | Filter 0 was used 1 times 92 | Filter 1 was used 2 times 93 | Filter 2 was used 1 times 94 | Filter 4 was used 28 times 95 | Testing basn6a08.png: PASS (160 zero samples) 96 | Filter 1 was used 1 times 97 | Filter 4 was used 31 times 98 | Testing basn6a16.png: PASS (1072 zero samples) 99 | Filter 1 was used 4 times 100 | Filter 4 was used 28 times 101 | libpng passes test 102 | 103 | Willem van Schaik 104 | 105 | October 1999 106 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/contrib/gregbook/makevms.com: -------------------------------------------------------------------------------- 1 | $!------------------------------------------------------------------------------ 2 | $! make "PNG: The Definitive Guide" demo programs (for X) under OpenVMS 3 | $! 4 | $! Script created by Martin Zinser for libpng; modified by Greg Roelofs 5 | $! for standalone pngbook source distribution. 6 | $! 7 | $! 8 | $! Set locations where zlib and libpng sources live. 9 | $! 10 | $ zpath = "" 11 | $ pngpath = "" 12 | $! 13 | $ if f$search("[---.zlib]zlib.h").nes."" then zpath = "[---.zlib]" 14 | $ if f$search("[--]png.h").nes."" then pngpath = "[--]" 15 | $! 16 | $ if f$search("[-.zlib]zlib.h").nes."" then zpath = "[-.zlib]" 17 | $ if f$search("[-.libpng]png.h").nes."" then pngpath = "[-.libpng]" 18 | $! 19 | $ if zpath .eqs. "" 20 | $ then 21 | $ write sys$output "zlib include not found. Exiting..." 22 | $ exit 2 23 | $ endif 24 | $! 25 | $ if pngpath .eqs. "" 26 | $ then 27 | $ write sys$output "libpng include not found. Exiting..." 28 | $ exit 2 29 | $ endif 30 | $! 31 | $! Look for the compiler used. 32 | $! 33 | $ ccopt="/include=(''zpath',''pngpath')" 34 | $ if f$getsyi("HW_MODEL").ge.1024 35 | $ then 36 | $ ccopt = "/prefix=all"+ccopt 37 | $ comp = "__decc__=1" 38 | $ if f$trnlnm("SYS").eqs."" then define sys sys$library: 39 | $ else 40 | $ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs."" 41 | $ then 42 | $ if f$trnlnm("SYS").eqs."" then define sys sys$library: 43 | $ if f$search("SYS$SYSTEM:VAXC.EXE").eqs."" 44 | $ then 45 | $ comp = "__gcc__=1" 46 | $ CC :== GCC 47 | $ else 48 | $ comp = "__vaxc__=1" 49 | $ endif 50 | $ else 51 | $ if f$trnlnm("SYS").eqs."" then define sys decc$library_include: 52 | $ ccopt = "/decc/prefix=all"+ccopt 53 | $ comp = "__decc__=1" 54 | $ endif 55 | $ endif 56 | $ open/write lopt lib.opt 57 | $ write lopt "''pngpath'libpng.olb/lib" 58 | $ write lopt "''zpath'libz.olb/lib" 59 | $ close lopt 60 | $ open/write xopt x11.opt 61 | $ write xopt "sys$library:decw$xlibshr.exe/share" 62 | $ close xopt 63 | $! 64 | $! Build 'em. 65 | $! 66 | $ write sys$output "Compiling PNG book programs ..." 67 | $ CALL MAKE readpng.OBJ "cc ''CCOPT' readpng" - 68 | readpng.c readpng.h 69 | $ CALL MAKE readpng2.OBJ "cc ''CCOPT' readpng2" - 70 | readpng2.c readpng2.h 71 | $ CALL MAKE writepng.OBJ "cc ''CCOPT' writepng" - 72 | writepng.c writepng.h 73 | $ write sys$output "Building rpng-x..." 74 | $ CALL MAKE rpng-x.OBJ "cc ''CCOPT' rpng-x" - 75 | rpng-x.c readpng.h 76 | $ call make rpng-x.exe - 77 | "LINK rpng-x,readpng,lib.opt/opt,x11.opt/opt" - 78 | rpng-x.obj readpng.obj 79 | $ write sys$output "Building rpng2-x..." 80 | $ CALL MAKE rpng2-x.OBJ "cc ''CCOPT' rpng2-x" - 81 | rpng2-x.c readpng2.h 82 | $ call make rpng2-x.exe - 83 | "LINK rpng2-x,readpng2,lib.opt/opt,x11.opt/opt" - 84 | rpng2-x.obj readpng2.obj 85 | $ write sys$output "Building wpng..." 86 | $ CALL MAKE wpng.OBJ "cc ''CCOPT' wpng" - 87 | wpng.c writepng.h 88 | $ call make wpng.exe - 89 | "LINK wpng,writepng,lib.opt/opt" - 90 | wpng.obj writepng.obj 91 | $ exit 92 | $! 93 | $! 94 | $MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES 95 | $ V = 'F$Verify(0) 96 | $! P1 = What we are trying to make 97 | $! P2 = Command to make it 98 | $! P3 - P8 What it depends on 99 | $ 100 | $ If F$Search(P1) .Eqs. "" Then Goto Makeit 101 | $ Time = F$CvTime(F$File(P1,"RDT")) 102 | $arg=3 103 | $Loop: 104 | $ Argument = P'arg 105 | $ If Argument .Eqs. "" Then Goto Exit 106 | $ El=0 107 | $Loop2: 108 | $ File = F$Element(El," ",Argument) 109 | $ If File .Eqs. " " Then Goto Endl 110 | $ AFile = "" 111 | $Loop3: 112 | $ OFile = AFile 113 | $ AFile = F$Search(File) 114 | $ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl 115 | $ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit 116 | $ Goto Loop3 117 | $NextEL: 118 | $ El = El + 1 119 | $ Goto Loop2 120 | $EndL: 121 | $ arg=arg+1 122 | $ If arg .Le. 8 Then Goto Loop 123 | $ Goto Exit 124 | $ 125 | $Makeit: 126 | $ VV=F$VERIFY(0) 127 | $ write sys$output P2 128 | $ 'P2 129 | $ VV='F$Verify(VV) 130 | $Exit: 131 | $ If V Then Set Verify 132 | $ENDSUBROUTINE 133 | -------------------------------------------------------------------------------- /png-sys/libpng-1.6.16/scripts/makefile.vcwin32: -------------------------------------------------------------------------------- 1 | # makefile for libpng 2 | # Copyright (C) 1998 Tim Wegner 3 | # Copyright (C) 2006,2009,2011,2014 Glenn Randers-Pehrson 4 | # 5 | # This code is released under the libpng license. 6 | # For conditions of distribution and use, see the disclaimer 7 | # and license in png.h 8 | # 9 | # Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib 10 | # To use, do "nmake /f scripts\makefile.vcwin32" 11 | 12 | # -------- Microsoft Visual C++ 2.0 and later -------- 13 | 14 | # Compiler, linker, librarian and other tools 15 | CC = cl 16 | LD = link 17 | AR = lib 18 | CPPFLAGS = -I..\zlib 19 | CFLAGS = -nologo -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -MD -O2 -W3 20 | LDFLAGS = -nologo 21 | ARFLAGS = -nologo 22 | CP = copy 23 | RM = del 24 | 25 | # Pre-built configuration 26 | # See scripts\pnglibconf.mak for more options 27 | PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt 28 | 29 | # File extensions 30 | O=.obj 31 | 32 | #uncomment next to put error messages in a file 33 | #ERRFILE= >> pngerrs.log 34 | 35 | # Variables 36 | OBJS1 = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) 37 | OBJS2 = pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) 38 | OBJS3 = pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) 39 | OBJS = $(OBJS1) $(OBJS2) $(OBJS3) 40 | 41 | # Targets 42 | all: libpng.lib 43 | 44 | pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) 45 | $(CP) $(PNGLIBCONF_H_PREBUILT) $@ 46 | 47 | png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 48 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 49 | 50 | pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 51 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 52 | 53 | pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 54 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 55 | 56 | pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 57 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 58 | 59 | pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 60 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 61 | 62 | pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 63 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 64 | 65 | pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 66 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 67 | 68 | pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 69 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 70 | 71 | pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 72 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 73 | 74 | pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 75 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 76 | 77 | pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 78 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 79 | 80 | pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 81 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 82 | 83 | pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 84 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 85 | 86 | pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 87 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 88 | 89 | pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 90 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 91 | 92 | libpng.lib: $(OBJS) 93 | -$(RM) $@ 94 | $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE) 95 | 96 | pngtest$(O): png.h pngconf.h pnglibconf.h 97 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 98 | 99 | pngtest.exe: pngtest$(O) libpng.lib 100 | $(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE) 101 | 102 | test: pngtest.exe 103 | pngtest 104 | 105 | clean: 106 | -$(RM) *$(O) 107 | -$(RM) libpng.lib 108 | -$(RM) pnglibconf.h 109 | -$(RM) pngtest.exe 110 | -$(RM) pngout.png 111 | 112 | # End of makefile for libpng 113 | 114 | --------------------------------------------------------------------------------