diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2015-12-28 13:33:57 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2015-12-28 13:33:57 +0000 |
commit | 5220b85007fbd61c7925bafba0bf06551e965e98 (patch) | |
tree | 1795f8c739df9cd1722550e728d0cf8d9cf427e5 /Build/source/libs | |
parent | 74c0c4d1d90ea4f85a3de0304bcd009cb29acf9d (diff) |
libpng-1.6.20
git-svn-id: svn://tug.org/texlive/trunk@39214 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs')
-rw-r--r-- | Build/source/libs/README | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/libs/libpng/README | 9 | ||||
-rwxr-xr-x | Build/source/libs/libpng/configure | 24 | ||||
-rw-r--r-- | Build/source/libs/libpng/configure.ac | 4 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-1.6.18/ANNOUNCE | 90 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngimage-full | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngimage-quick | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngstest | 13 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g01 | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g02 | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g04 | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g08 | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g16 | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-2c08 | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-2c16 | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-3p01 | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-3p02 | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-3p04 | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-3p08 | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-4a08 | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-4a16 | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-6a08 | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-6a16 | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-error | 14 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-IDAT | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-discard | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-if-safe | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-sAPI | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-sTER | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-save | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-vpAg | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-16-to-8 | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-alpha-mode | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-background | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-expand16-alpha-mode | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-expand16-background | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-expand16-transform | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-sbit | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-threshold | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-transform | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-progressive-interlace-size | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-progressive-interlace-standard | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-progressive-interlace-transform | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-progressive-standard | 2 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-standard | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src-PATCHES/ChangeLog (renamed from Build/source/libs/libpng/libpng-1.6.18-PATCHES/ChangeLog) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src-PATCHES/TL-Changes (renamed from Build/source/libs/libpng/libpng-1.6.18-PATCHES/TL-Changes) | 5 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/ANNOUNCE | 52 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/CHANGES (renamed from Build/source/libs/libpng/libpng-1.6.18/CHANGES) | 171 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/CMakeLists.txt (renamed from Build/source/libs/libpng/libpng-1.6.18/CMakeLists.txt) | 4 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/INSTALL (renamed from Build/source/libs/libpng/libpng-1.6.18/INSTALL) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/LICENSE (renamed from Build/source/libs/libpng/libpng-1.6.18/LICENSE) | 27 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/Makefile.am (renamed from Build/source/libs/libpng/libpng-1.6.18/Makefile.am) | 16 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/README (renamed from Build/source/libs/libpng/libpng-1.6.18/README) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/TODO (renamed from Build/source/libs/libpng/libpng-1.6.18/TODO) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/arm/arm_init.c (renamed from Build/source/libs/libpng/libpng-1.6.18/arm/arm_init.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/arm/filter_neon.S (renamed from Build/source/libs/libpng/libpng-1.6.18/arm/filter_neon.S) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/arm/filter_neon_intrinsics.c (renamed from Build/source/libs/libpng/libpng-1.6.18/arm/filter_neon_intrinsics.c) | 0 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-src/autogen.sh (renamed from Build/source/libs/libpng/libpng-1.6.18/autogen.sh) | 4 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/config.h.in (renamed from Build/source/libs/libpng/libpng-1.6.18/config.h.in) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/configure.ac (renamed from Build/source/libs/libpng/libpng-1.6.18/configure.ac) | 6 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/README.txt (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/README.txt) | 3 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/arm-neon/README (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/arm-neon/README) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/arm-neon/android-ndk.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/arm-neon/android-ndk.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/arm-neon/linux-auxv.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/arm-neon/linux-auxv.c) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/arm-neon/linux.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/arm-neon/linux.c) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/conftest/README (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/conftest/README) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/conftest/read.dfa (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/conftest/read.dfa) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/conftest/s_read.dfa (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/conftest/s_read.dfa) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/conftest/s_write.dfa (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/conftest/s_write.dfa) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/conftest/simple.dfa (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/conftest/simple.dfa) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/conftest/write.dfa (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/conftest/write.dfa) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/examples/README.txt (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/examples/README.txt) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/examples/iccfrompng.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/examples/iccfrompng.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/examples/pngpixel.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/examples/pngpixel.c) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/examples/pngtopng.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/examples/pngtopng.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/examples/simpleover.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/examples/simpleover.c) | 8 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/COPYING (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/COPYING) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/LICENSE (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/LICENSE) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/Makefile.mingw32 (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/Makefile.mingw32) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/Makefile.sgi (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/Makefile.sgi) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/Makefile.unx (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/Makefile.unx) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/Makefile.w32 (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/Makefile.w32) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/README (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/README) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/makevms.com (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/makevms.com) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/readpng.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng.h (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/readpng.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng2.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/readpng2.c) | 57 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng2.h (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/readpng2.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/readppm.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/readppm.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng-win.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/rpng-win.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng-x.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/rpng-x.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-win.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/rpng2-win.c) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-x.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/rpng2-x.c) | 11 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/toucan.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/toucan.png) | bin | 12901 -> 12901 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/wpng.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/wpng.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/writepng.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/writepng.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/gregbook/writepng.h (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/writepng.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/libtests/fakepng.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/fakepng.c) | 10 | ||||
-rwxr-xr-x | Build/source/libs/libpng/libpng-src/contrib/libtests/gentests.sh (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/gentests.sh) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/libtests/makepng.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/makepng.c) | 539 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/libtests/pngimage.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/pngimage.c) | 61 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/libtests/pngstest-errors.h | 165 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/libtests/pngstest.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/pngstest.c) | 175 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/libtests/pngunknown.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/pngunknown.c) | 38 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/libtests/pngvalid.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/pngvalid.c) | 1180 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/libtests/readpng.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/readpng.c) | 13 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/libtests/tarith.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/tarith.c) | 28 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/libtests/timepng.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/timepng.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminim/README (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/README) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminim/decoder/README (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/decoder/README) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminim/decoder/makefile (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/decoder/makefile) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminim/decoder/pngusr.dfa (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/decoder/pngusr.dfa) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminim/decoder/pngusr.h (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/decoder/pngusr.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminim/encoder/README (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/encoder/README) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminim/encoder/makefile (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/encoder/makefile) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminim/encoder/pngusr.dfa (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/encoder/pngusr.dfa) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminim/encoder/pngusr.h (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/encoder/pngusr.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminim/preader/README (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/preader/README) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminim/preader/makefile (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/preader/makefile) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminim/preader/pngusr.dfa (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/preader/pngusr.dfa) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminim/preader/pngusr.h (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/preader/pngusr.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminus/README (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/README) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminus/makefile.std (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/makefile.std) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminus/makefile.tc3 (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/makefile.tc3) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminus/makevms.com (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/makevms.com) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminus/png2pnm.bat (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/png2pnm.bat) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminus/png2pnm.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/png2pnm.c) | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | Build/source/libs/libpng/libpng-src/contrib/pngminus/png2pnm.sh (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/png2pnm.sh) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminus/pngminus.bat (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/pngminus.bat) | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | Build/source/libs/libpng/libpng-src/contrib/pngminus/pngminus.sh (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/pngminus.sh) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminus/pnm2png.bat (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/pnm2png.bat) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngminus/pnm2png.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/pnm2png.c) | 29 | ||||
-rwxr-xr-x[-rw-r--r--] | Build/source/libs/libpng/libpng-src/contrib/pngminus/pnm2png.sh (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/pnm2png.sh) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/README (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/README) | 4 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn0g01.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn0g01.png) | bin | 164 -> 164 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn0g02.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn0g02.png) | bin | 104 -> 104 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn0g04.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn0g04.png) | bin | 145 -> 145 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn0g08.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn0g08.png) | bin | 138 -> 138 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn0g16.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn0g16.png) | bin | 167 -> 167 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn2c08.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn2c08.png) | bin | 145 -> 145 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn2c16.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn2c16.png) | bin | 302 -> 302 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn3p01.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn3p01.png) | bin | 112 -> 112 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn3p02.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn3p02.png) | bin | 146 -> 146 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn3p04.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn3p04.png) | bin | 216 -> 216 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn3p08.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn3p08.png) | bin | 1286 -> 1286 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn4a08.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn4a08.png) | bin | 126 -> 126 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn4a16.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn4a16.png) | bin | 2206 -> 2206 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn6a08.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn6a08.png) | bin | 184 -> 184 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn6a16.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn6a16.png) | bin | 3435 -> 3435 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbbn0g01.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbbn0g01.png) | bin | 176 -> 176 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbbn0g02.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbbn0g02.png) | bin | 197 -> 197 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbbn0g04.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbbn0g04.png) | bin | 429 -> 429 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbbn2c16.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbbn2c16.png) | bin | 2041 -> 2041 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbbn3p08.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbbn3p08.png) | bin | 1499 -> 1499 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbgn2c16.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbgn2c16.png) | bin | 2041 -> 2041 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbgn3p08.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbgn3p08.png) | bin | 1499 -> 1499 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbrn2c08.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbrn2c08.png) | bin | 1633 -> 1633 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbwn0g16.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbwn0g16.png) | bin | 1313 -> 1313 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbwn3p08.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbwn3p08.png) | bin | 1496 -> 1496 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbyn3p08.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbyn3p08.png) | bin | 1499 -> 1499 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftp0n0g08.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftp0n0g08.png) | bin | 719 -> 719 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftp0n2c08.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftp0n2c08.png) | bin | 1594 -> 1594 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftp0n3p08.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftp0n3p08.png) | bin | 1476 -> 1476 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftp1n3p08.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftp1n3p08.png) | bin | 1483 -> 1483 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-1.8-tRNS.png | bin | 0 -> 325 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-1.8.png | bin | 0 -> 311 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-linear-tRNS.png | bin | 0 -> 325 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-linear.png | bin | 0 -> 311 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-sRGB-tRNS.png | bin | 0 -> 278 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-sRGB.png | bin | 0 -> 264 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-tRNS.png | bin | 0 -> 265 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1.png | bin | 0 -> 251 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-1.8-tRNS.png | bin | 0 -> 744 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-1.8.png | bin | 0 -> 744 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-linear-tRNS.png | bin | 0 -> 744 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-linear.png | bin | 0 -> 744 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-sRGB-tRNS.png | bin | 0 -> 697 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-sRGB.png | bin | 0 -> 697 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-tRNS.png | bin | 0 -> 684 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16.png | bin | 0 -> 684 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-1.8-tRNS.png | bin | 0 -> 325 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-1.8.png | bin | 0 -> 311 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-linear-tRNS.png | bin | 0 -> 325 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-linear.png | bin | 0 -> 311 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-sRGB-tRNS.png | bin | 0 -> 278 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-sRGB.png | bin | 0 -> 264 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-tRNS.png | bin | 0 -> 265 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2.png | bin | 0 -> 251 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-1.8-tRNS.png | bin | 0 -> 327 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-1.8.png | bin | 0 -> 313 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-linear-tRNS.png | bin | 0 -> 327 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-linear.png | bin | 0 -> 313 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-sRGB-tRNS.png | bin | 0 -> 280 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-sRGB.png | bin | 0 -> 266 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-tRNS.png | bin | 0 -> 267 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4.png | bin | 0 -> 253 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-1.8-tRNS.png | bin | 0 -> 327 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-1.8.png | bin | 0 -> 313 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-linear-tRNS.png | bin | 0 -> 327 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-linear.png | bin | 0 -> 313 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-sRGB-tRNS.png | bin | 0 -> 280 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-sRGB.png | bin | 0 -> 266 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-tRNS.png | bin | 0 -> 267 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8.png | bin | 0 -> 253 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-16-1.8.png | bin | 0 -> 919 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-16-linear.png | bin | 0 -> 919 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-16-sRGB.png | bin | 0 -> 872 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-16.png | bin | 0 -> 859 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-8-1.8.png | bin | 0 -> 744 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-8-linear.png | bin | 0 -> 744 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-8-sRGB.png | bin | 0 -> 697 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-8.png | bin | 0 -> 684 bytes | |||
-rwxr-xr-x | Build/source/libs/libpng/libpng-src/contrib/testpngs/makepngs.sh | 94 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-1.8-tRNS.png | bin | 0 -> 342 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-1.8.png | bin | 0 -> 329 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-linear-tRNS.png | bin | 0 -> 342 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-linear.png | bin | 0 -> 329 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-sRGB-tRNS.png | bin | 0 -> 295 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-sRGB.png | bin | 0 -> 282 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-tRNS.png | bin | 0 -> 282 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1.png | bin | 0 -> 269 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-1.8-tRNS.png | bin | 0 -> 350 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-1.8.png | bin | 0 -> 335 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-linear-tRNS.png | bin | 0 -> 350 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-linear.png | bin | 0 -> 335 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-sRGB-tRNS.png | bin | 0 -> 303 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-sRGB.png | bin | 0 -> 288 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-tRNS.png | bin | 0 -> 290 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2.png | bin | 0 -> 275 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-1.8-tRNS.png | bin | 0 -> 400 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-1.8.png | bin | 0 -> 373 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-linear-tRNS.png | bin | 0 -> 400 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-linear.png | bin | 0 -> 373 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-sRGB-tRNS.png | bin | 0 -> 353 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-sRGB.png | bin | 0 -> 326 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-tRNS.png | bin | 0 -> 340 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4.png | bin | 0 -> 313 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-1.8-tRNS.png | bin | 0 -> 1360 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-1.8.png | bin | 0 -> 1093 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-linear-tRNS.png | bin | 0 -> 1360 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-linear.png | bin | 0 -> 1093 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-sRGB-tRNS.png | bin | 0 -> 1313 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-sRGB.png | bin | 0 -> 1046 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-tRNS.png | bin | 0 -> 1300 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8.png | bin | 0 -> 1033 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-1.8-tRNS.png | bin | 0 -> 1211 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-1.8.png | bin | 0 -> 1211 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-linear-tRNS.png | bin | 0 -> 1211 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-linear.png | bin | 0 -> 1211 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-sRGB-tRNS.png | bin | 0 -> 1164 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-sRGB.png | bin | 0 -> 1164 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-tRNS.png | bin | 0 -> 1151 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16.png | bin | 0 -> 1151 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-1.8-tRNS.png | bin | 0 -> 837 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-1.8.png | bin | 0 -> 819 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-linear-tRNS.png | bin | 0 -> 837 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-linear.png | bin | 0 -> 819 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-sRGB-tRNS.png | bin | 0 -> 790 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-sRGB.png | bin | 0 -> 772 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-tRNS.png | bin | 0 -> 777 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8.png | bin | 0 -> 759 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-16-1.8.png | bin | 0 -> 1437 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-16-linear.png | bin | 0 -> 1437 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-16-sRGB.png | bin | 0 -> 1390 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-16.png | bin | 0 -> 1377 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-8-1.8.png | bin | 0 -> 919 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-8-linear.png | bin | 0 -> 919 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-8-sRGB.png | bin | 0 -> 872 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-8.png | bin | 0 -> 859 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/tools/README.txt (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/tools/README.txt) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/tools/checksum-icc.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/tools/checksum-icc.c) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | Build/source/libs/libpng/libpng-src/contrib/tools/chkfmt (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/tools/chkfmt) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/tools/cvtcolor.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/tools/cvtcolor.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/tools/genpng.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/tools/genpng.c) | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | Build/source/libs/libpng/libpng-src/contrib/tools/intgamma.sh (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/tools/intgamma.sh) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/tools/makesRGB.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/tools/makesRGB.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/tools/png-fix-itxt.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/tools/png-fix-itxt.c) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/tools/pngfix.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/tools/pngfix.c) | 34 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/tools/sRGB.h (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/tools/sRGB.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/visupng/PngFile.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/PngFile.c) | 4 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/visupng/PngFile.h (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/PngFile.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/visupng/README.txt (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/README.txt) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.c (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/VisualPng.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.dsp (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/VisualPng.dsp) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.dsw (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/VisualPng.dsw) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.ico (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/VisualPng.ico) | bin | 766 -> 766 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.png (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/VisualPng.png) | bin | 208 -> 208 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.rc (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/VisualPng.rc) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/visupng/cexcept.h (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/cexcept.h) | 7 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/contrib/visupng/resource.h (renamed from Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/resource.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/example.c (renamed from Build/source/libs/libpng/libpng-1.6.18/example.c) | 14 | ||||
-rw-r--r--[-rwxr-xr-x] | Build/source/libs/libpng/libpng-src/libpng-config.in (renamed from Build/source/libs/libpng/libpng-1.6.18/libpng-config.in) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/libpng-manual.txt (renamed from Build/source/libs/libpng/libpng-1.6.18/libpng-manual.txt) | 302 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/libpng.3 (renamed from Build/source/libs/libpng/libpng-1.6.18/libpng.3) | 587 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/libpng.pc.in (renamed from Build/source/libs/libpng/libpng-1.6.18/libpng.pc.in) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/libpngpf.3 (renamed from Build/source/libs/libpng/libpng-1.6.18/libpngpf.3) | 4 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/png.5 (renamed from Build/source/libs/libpng/libpng-1.6.18/png.5) | 6 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/png.c (renamed from Build/source/libs/libpng/libpng-1.6.18/png.c) | 61 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/png.h (renamed from Build/source/libs/libpng/libpng-1.6.18/png.h) | 407 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngbar.jpg (renamed from Build/source/libs/libpng/libpng-1.6.18/pngbar.jpg) | bin | 2498 -> 2498 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngbar.png (renamed from Build/source/libs/libpng/libpng-1.6.18/pngbar.png) | bin | 2399 -> 2399 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngconf.h (renamed from Build/source/libs/libpng/libpng-1.6.18/pngconf.h) | 14 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngdebug.h (renamed from Build/source/libs/libpng/libpng-1.6.18/pngdebug.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngerror.c (renamed from Build/source/libs/libpng/libpng-1.6.18/pngerror.c) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngget.c (renamed from Build/source/libs/libpng/libpng-1.6.18/pngget.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pnginfo.h (renamed from Build/source/libs/libpng/libpng-1.6.18/pnginfo.h) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pnglibconf.h (renamed from Build/source/libs/libpng/libpng-1.6.18/pnglibconf.h) | 8 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngmem.c (renamed from Build/source/libs/libpng/libpng-1.6.18/pngmem.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngnow.png (renamed from Build/source/libs/libpng/libpng-1.6.18/pngnow.png) | bin | 2069 -> 2069 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngpread.c (renamed from Build/source/libs/libpng/libpng-1.6.18/pngpread.c) | 6 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngpriv.h (renamed from Build/source/libs/libpng/libpng-1.6.18/pngpriv.h) | 16 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngread.c (renamed from Build/source/libs/libpng/libpng-1.6.18/pngread.c) | 22 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngrio.c (renamed from Build/source/libs/libpng/libpng-1.6.18/pngrio.c) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngrtran.c (renamed from Build/source/libs/libpng/libpng-1.6.18/pngrtran.c) | 25 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngrutil.c (renamed from Build/source/libs/libpng/libpng-1.6.18/pngrutil.c) | 75 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngset.c (renamed from Build/source/libs/libpng/libpng-1.6.18/pngset.c) | 29 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngstruct.h (renamed from Build/source/libs/libpng/libpng-1.6.18/pngstruct.h) | 3 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngtest.c (renamed from Build/source/libs/libpng/libpng-1.6.18/pngtest.c) | 162 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngtest.png (renamed from Build/source/libs/libpng/libpng-1.6.18/pngtest.png) | bin | 8695 -> 8695 bytes | |||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngtrans.c (renamed from Build/source/libs/libpng/libpng-1.6.18/pngtrans.c) | 4 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngusr.dfa (renamed from Build/source/libs/libpng/libpng-1.6.18/pngusr.dfa) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngwio.c (renamed from Build/source/libs/libpng/libpng-1.6.18/pngwio.c) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngwrite.c (renamed from Build/source/libs/libpng/libpng-1.6.18/pngwrite.c) | 8 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngwtran.c (renamed from Build/source/libs/libpng/libpng-1.6.18/pngwtran.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngwutil.c (renamed from Build/source/libs/libpng/libpng-1.6.18/pngwutil.c) | 22 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/owatcom/libpng.tgt (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/owatcom/libpng.tgt) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/owatcom/libpng.wpj (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/owatcom/libpng.wpj) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/owatcom/pngconfig.mak (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/owatcom/pngconfig.mak) | 320 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/owatcom/pngstest.tgt (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/owatcom/pngstest.tgt) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/owatcom/pngtest.tgt (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/owatcom/pngtest.tgt) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/owatcom/pngvalid.tgt (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/owatcom/pngvalid.tgt) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/visualc71/PRJ0041.mak (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/PRJ0041.mak) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/visualc71/README.txt (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/README.txt) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/visualc71/README_zlib.txt (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/README_zlib.txt) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/visualc71/libpng.sln (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/libpng.sln) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/visualc71/libpng.vcproj (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/libpng.vcproj) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/visualc71/pngtest.vcproj (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/pngtest.vcproj) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/visualc71/zlib.vcproj (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/zlib.vcproj) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/vstudio/WARNING (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/WARNING) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/vstudio/libpng/libpng.vcxproj (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/libpng/libpng.vcxproj) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/vstudio/pnglibconf/pnglibconf.vcxproj (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/pnglibconf/pnglibconf.vcxproj) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/vstudio/pngstest/pngstest.vcxproj (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/pngstest/pngstest.vcxproj) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/vstudio/pngtest/pngtest.vcxproj (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/pngtest/pngtest.vcxproj) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/vstudio/pngunknown/pngunknown.vcxproj (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/pngunknown/pngunknown.vcxproj) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/vstudio/pngvalid/pngvalid.vcxproj (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/pngvalid/pngvalid.vcxproj) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/vstudio/readme.txt (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/readme.txt) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/vstudio/vstudio.sln (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/vstudio.sln) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/vstudio/zlib.props (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/zlib.props) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/projects/vstudio/zlib/zlib.vcxproj (renamed from Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/zlib/zlib.vcxproj) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/README.txt (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/README.txt) | 10 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/SCOPTIONS.ppc (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/SCOPTIONS.ppc) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | Build/source/libs/libpng/libpng-src/scripts/checksym.awk (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/checksym.awk) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/def.c (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/def.c) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/descrip.mms (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/descrip.mms) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/dfn.awk (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/dfn.awk) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/intprefix.c (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/intprefix.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/libpng-config-body.in (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/libpng-config-body.in) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/libpng-config-head.in (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/libpng-config-head.in) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/libpng.pc.in (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/libpng.pc.in) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/libtool.m4 (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/libtool.m4) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/ltoptions.m4 (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/ltoptions.m4) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/ltsugar.m4 (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/ltsugar.m4) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/ltversion.m4 (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/ltversion.m4) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/lt~obsolete.m4 (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/lt~obsolete.m4) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/macro.lst (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/macro.lst) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.32sunu (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.32sunu) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.64sunu (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.64sunu) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.acorn (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.acorn) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.aix (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.aix) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.amiga (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.amiga) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.atari (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.atari) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.bc32 (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.bc32) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.beos (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.beos) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.bor (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.bor) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.cegcc (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.cegcc) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.darwin (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.darwin) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.dec (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.dec) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.dj2 (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.dj2) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.freebsd (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.freebsd) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.gcc (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.gcc) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.hp64 (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.hp64) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.hpgcc (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.hpgcc) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.hpux (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.hpux) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.ibmc (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.ibmc) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.intel (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.intel) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.knr (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.knr) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.linux (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.linux) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.mips (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.mips) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.msc (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.msc) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.msys (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.msys) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.ne12bsd (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.ne12bsd) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.netbsd (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.netbsd) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.openbsd (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.openbsd) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.sco (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.sco) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.sggcc (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.sggcc) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.sgi (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.sgi) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.so9 (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.so9) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.solaris (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.solaris) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.solaris-x86 (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.solaris-x86) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.std (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.std) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.sunos (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.sunos) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.tc3 (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.tc3) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makefile.vcwin32 (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.vcwin32) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/makevms.com (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/makevms.com) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | Build/source/libs/libpng/libpng-src/scripts/options.awk (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/options.awk) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/pnglibconf.dfa (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/pnglibconf.dfa) | 9 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/pnglibconf.h.prebuilt) | 8 | ||||
-rw-r--r--[-rwxr-xr-x] | Build/source/libs/libpng/libpng-src/scripts/pnglibconf.mak (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/pnglibconf.mak) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/pngwin.rc (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/pngwin.rc) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/prefix.c (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/prefix.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/smakefile.ppc (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/smakefile.ppc) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/sym.c (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/sym.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/symbols.c (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/symbols.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/symbols.def (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/symbols.def) | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/scripts/vers.c (renamed from Build/source/libs/libpng/libpng-1.6.18/scripts/vers.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngimage-full | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngimage-quick | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngstest | 52 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngstest-1.8 | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngstest-1.8-alpha | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngstest-linear | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngstest-linear-alpha | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngstest-none | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngstest-none-alpha | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngstest-sRGB | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngstest-sRGB-alpha | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | Build/source/libs/libpng/libpng-src/tests/pngtest (renamed from Build/source/libs/libpng/libpng-1.6.18/tests/pngtest) | 0 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngunknown-IDAT | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngunknown-discard | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngunknown-if-safe | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngunknown-sAPI | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngunknown-sTER | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngunknown-save | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngunknown-vpAg | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-16-to-8 | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-alpha-mode | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-background | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-expand16-alpha-mode | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-expand16-background | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-expand16-transform | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-sbit | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-threshold | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-transform | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngvalid-progressive-interlace-standard | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngvalid-progressive-size | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngvalid-progressive-standard | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngvalid-standard | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/libpng-src/tests/pngvalid-transform | 2 | ||||
-rw-r--r-- | Build/source/libs/libpng/version.ac | 2 |
451 files changed, 3132 insertions, 2140 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README index 484618e09a0..1c4f4957b60 100644 --- a/Build/source/libs/README +++ b/Build/source/libs/README @@ -33,7 +33,7 @@ icu 56.1 (release) - checked 8oct15 libpaper 1.1.24+nmu2 - checked 24oct13 ftp://ftp.de.debian.org/debian/pool/main/libp/libpaper/ -libpng 1.6.18 - checked 1aug15 +libpng 1.6.20 - checked 28dec15 http://www.libpng.org/ - used by many http://www.libpng.org/pub/png/pngcode.html diff --git a/Build/source/libs/libpng/ChangeLog b/Build/source/libs/libpng/ChangeLog index 1607cb4619d..b7a87930005 100644 --- a/Build/source/libs/libpng/ChangeLog +++ b/Build/source/libs/libpng/ChangeLog @@ -1,3 +1,8 @@ +2015-12-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + Import libpng-1.6.20. + * version.ac: Adjust. + 2015-08-01 Peter Breitenlohner <peb@mppmu.mpg.de> Import libpng-1.6.18. diff --git a/Build/source/libs/libpng/README b/Build/source/libs/libpng/README index ace3e93c773..06051646a7d 100644 --- a/Build/source/libs/libpng/README +++ b/Build/source/libs/libpng/README @@ -1,16 +1,17 @@ - Building libpng-1.2.26 as part of the TL tree + Building libpng-1.6.20 as part of the TL tree ============================================= This directory libs/libpng/ uses a proxy Makefile.am to build the libpng library -from the unmodified (*) source tree in libs/libpng/libpng-x.y.z/, bypassing +from the unmodified (*) source tree in libs/libpng/libpng-src/, bypassing the original build system. -(*) The directory libpng-x.y.z-PATCHES contains patches (if any) applied to +(*) The directory libpng-src-PATCHES contains patches (if any) applied to the original source tree. -As far as applicable, the tests in libs/libpng-x.y.z/configure.ac have been +As far as applicable, the tests in libs/libpng-src/configure.ac have been copied to libs/libpng/configure.ac. ============================= 2009-07-23 Peter Breitenlohner <peb@mppmu.mpg.de> +2015-12-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp> diff --git a/Build/source/libs/libpng/configure b/Build/source/libs/libpng/configure index 992074ed2b6..21e1458bfd3 100755 --- a/Build/source/libs/libpng/configure +++ b/Build/source/libs/libpng/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libpng (TeX Live) 1.6.18. +# Generated by GNU Autoconf 2.69 for libpng (TeX Live) 1.6.20. # # Report bugs to <tex-k@tug.org>. # @@ -580,12 +580,12 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libpng (TeX Live)' PACKAGE_TARNAME='libpng--tex-live-' -PACKAGE_VERSION='1.6.18' -PACKAGE_STRING='libpng (TeX Live) 1.6.18' +PACKAGE_VERSION='1.6.20' +PACKAGE_STRING='libpng (TeX Live) 1.6.20' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' -ac_unique_file="libpng-1.6.18/pngget.c" +ac_unique_file="libpng-src/pngget.c" # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> @@ -1287,7 +1287,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libpng (TeX Live) 1.6.18 to adapt to many kinds of systems. +\`configure' configures libpng (TeX Live) 1.6.20 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1354,7 +1354,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libpng (TeX Live) 1.6.18:";; + short | recursive ) echo "Configuration of libpng (TeX Live) 1.6.20:";; esac cat <<\_ACEOF @@ -1459,7 +1459,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libpng (TeX Live) configure 1.6.18 +libpng (TeX Live) configure 1.6.20 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1882,7 +1882,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libpng (TeX Live) $as_me 1.6.18, which was +It was created by libpng (TeX Live) $as_me 1.6.20, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3805,7 +3805,7 @@ fi # Define the identity of the package. PACKAGE='libpng--tex-live-' - VERSION='1.6.18' + VERSION='1.6.20' cat >>confdefs.h <<_ACEOF @@ -5774,7 +5774,7 @@ LIBS=$kpse_save_LIBS echo timestamp >config.force fi -LIBPNG_TREE=libpng-1.6.18 +LIBPNG_TREE=libpng-src LIBPNG_DEFINES='-DPNG_CONFIGURE_LIBPNG -DPNG_NO_MMX_CODE' @@ -6325,7 +6325,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libpng (TeX Live) $as_me 1.6.18, which was +This file was extended by libpng (TeX Live) $as_me 1.6.20, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6391,7 +6391,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libpng (TeX Live) config.status 1.6.18 +libpng (TeX Live) config.status 1.6.20 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/Build/source/libs/libpng/configure.ac b/Build/source/libs/libpng/configure.ac index 8c815a8d753..dfefa551145 100644 --- a/Build/source/libs/libpng/configure.ac +++ b/Build/source/libs/libpng/configure.ac @@ -9,7 +9,7 @@ dnl m4_include([version.ac])[] dnl define libpng_version AC_INIT([libpng (TeX Live)], libpng_version, [tex-k@tug.org]) AC_PREREQ([2.65]) -AC_CONFIG_SRCDIR([libpng-]libpng_version[/pngget.c]) +AC_CONFIG_SRCDIR([libpng-src/pngget.c]) AC_CONFIG_AUX_DIR([../../build-aux]) AC_CONFIG_MACRO_DIR([../../m4]) @@ -51,7 +51,7 @@ KPSE_RESTORE_FLAGS echo timestamp >config.force fi -AC_SUBST([LIBPNG_TREE], [libpng-]libpng_version) +AC_SUBST([LIBPNG_TREE], [libpng-src]) AC_SUBST([LIBPNG_DEFINES], ['-DPNG_CONFIGURE_LIBPNG -DPNG_NO_MMX_CODE']) diff --git a/Build/source/libs/libpng/libpng-1.6.18/ANNOUNCE b/Build/source/libs/libpng/libpng-1.6.18/ANNOUNCE deleted file mode 100644 index c0289c1a8e6..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/ANNOUNCE +++ /dev/null @@ -1,90 +0,0 @@ -Libpng 1.6.18 - July 23, 2015 - -This is a public release of libpng, intended for use in production codes. - -Files available for download: - -Source files with LF line endings (for Unix/Linux) and with a -"configure" script - - libpng-1.6.18.tar.xz (LZMA-compressed, recommended) - libpng-1.6.18.tar.gz - -Source files with CRLF line endings (for Windows), without the -"configure" script - - lpng1618.7z (LZMA-compressed, recommended) - lpng1618.zip - -Other information: - - libpng-1.6.18-README.txt - libpng-1.6.18-LICENSE.txt - libpng-1.6.18-*.asc (armored detached GPG signatures) - -Changes since the last public release (1.6.17): - Removed PNG_SET_CHUNK_[CACHE|MALLOC]_LIMIT_SUPPORTED macros. They - have been combined with PNG_SET_USER_LIMITS_SUPPORTED (resolves - bug report by Andrew Church). - Fixed rgb_to_gray checks and added tRNS checks to pngvalid.c. This - fixes some arithmetic errors that caused some tests to fail on - some 32-bit platforms (Bug reports by Peter Breitenlohner [i686] - and Petr Gajdos [i586]). - Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler - (Bug report by Viktor Szaka'ts). - Replaced "unexpected" with an integer (0xabadca11) in pngset.c - where a long was expected, to avoid a compiler warning when PNG_DEBUG > 1. - Added contrib/examples/simpleover.c, to demonstrate how to handle - alpha compositing of multiple images, using the "simplified API" - and an example PNG generation tool, contrib/examples/genpng.c - (John Bowler). - PNG_RELEASE_BUILD replaces tests where the code depended on the build base - type and can be defined on the command line, allowing testing in beta - builds (John Bowler). - Avoid Coverity issue 80858 (REVERSE NULL) in pngtest.c - Avoid a harmless potential integer overflow in png_XYZ_from_xy() (Bug - report from Christopher Ferris). - Backport filter selection code from libpng-1.7.0beta51, to combine - sub_row, up_row, avg_row, and paeth_row into try_row and tst_row. - Changed png_voidcast(), etc., to voidcast(), etc., in contrib/tools/pngfix.c - to avoid confusion with the libpng private macros. - Fixed old cut&paste bug in the weighted filter selection code in - pngwutil.c, introduced in libpng-0.95, March 1997. - Removed WRITE_WEIGHTED_FILTERED code, to save a few kbytes of the - compiled library size. It never worked properly and as far as we can - tell, no one uses it. The png_set_filter_heuristics() and - png_set_filter_heuristics_fixed() APIs are retained but deprecated - and do nothing. - Quieted some Coverity issues in pngfix.c, png-fix-itxt.c, pngvalid.c, - pngstest.c, and pngimage.c. Most seem harmless, but png-fix-itxt - would only work with iTXt chunks with length 255 or less. - Removed non-working progressive reader 'skip' function. This - function has apparently never been used. It was implemented - to support back-door modification of png_struct in libpng-1.4.x - but (because it does nothing and cannot do anything) was apparently - never tested (John Bowler). - Fixed cexcept.h in which GCC 5 now reports that one of the auto - variables in the Try macro needs to be volatile to prevent value - being lost over the setjmp (John Bowler). - Added #ifdef's to contrib/examples programs so people don't try - to compile them without the minimum required support enabled - (suggested by Flavio Medeiros). - Eliminated the final two Coverity defects (insecure temporary file - handling in contrib/libtests/pngstest.c; possible overflow of - unsigned char in contrib/tools/png-fix-itxt.c). To use the "secure" - file handling, define PNG_USE_MKSTEMP, otherwise "tmpfile()" will - be used. - Removed some unused WEIGHTED_FILTER macros from pngstruct.h - Replaced arbitrary use of 'extern' with #define PNG_LINKAGE_*. To - preserve API compatibility, the new defines all default to "extern" - (requested by Jan Nijtmans). - Belatedly added Mans Rullgard and James Yu to the list of Contributing - Authors. - -Send comments/corrections/commendations to png-mng-implement at lists.sf.net -(subscription required; visit -https://lists.sourceforge.net/lists/listinfo/png-mng-implement -to subscribe) -or to glennrp at users.sourceforge.net - -Glenn R-P diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngimage-full b/Build/source/libs/libpng/libpng-1.6.18/tests/pngimage-full deleted file mode 100755 index f5eb9895eed..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngimage-full +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngimage --exhaustive --log "${srcdir}/contrib/pngsuite/"*.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngimage-quick b/Build/source/libs/libpng/libpng-1.6.18/tests/pngimage-quick deleted file mode 100755 index 2d4b5db225b..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngimage-quick +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngimage --log "${srcdir}/contrib/pngsuite/"*.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest b/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest deleted file mode 100755 index f5cbdbcae43..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# -# Usage: -# -# tests/pngstest pattern -# -# Runs pngstest on all the contrib/pngsuite/[^x]*${pattern}.png files -# NOTE: pattern is used to name the temporary files pngstest generates -# -pattern="$1" -shift -exec ./pngstest --strict --tmpfile "${pattern}" --log ${1+"$@"}\ - "${srcdir}/contrib/pngsuite/"[a-wyz]*${pattern}".png" diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g01 b/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g01 deleted file mode 100755 index 4a495ccb8f0..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g01 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec "${srcdir}/tests/pngstest" 0g01 diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g02 b/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g02 deleted file mode 100755 index 1a607c8e17a..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g02 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec "${srcdir}/tests/pngstest" 0g02 diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g04 b/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g04 deleted file mode 100755 index 595ba01e333..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g04 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec "${srcdir}/tests/pngstest" 0g04 diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g08 b/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g08 deleted file mode 100755 index 21a8b4bb4e0..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g08 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec "${srcdir}/tests/pngstest" 0g08 diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g16 b/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g16 deleted file mode 100755 index 0104c37bdd5..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-0g16 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec "${srcdir}/tests/pngstest" 0g16 diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-2c08 b/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-2c08 deleted file mode 100755 index 9e0de6f1e03..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-2c08 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec "${srcdir}/tests/pngstest" 2c08 diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-2c16 b/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-2c16 deleted file mode 100755 index c1b88b04ed6..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-2c16 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec "${srcdir}/tests/pngstest" 2c16 diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-3p01 b/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-3p01 deleted file mode 100755 index 6aeb8d06cf9..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-3p01 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec "${srcdir}/tests/pngstest" 3p01 diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-3p02 b/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-3p02 deleted file mode 100755 index 770a75c0b10..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-3p02 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec "${srcdir}/tests/pngstest" 3p02 diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-3p04 b/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-3p04 deleted file mode 100755 index 957d6ae341e..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-3p04 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec "${srcdir}/tests/pngstest" 3p04 diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-3p08 b/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-3p08 deleted file mode 100755 index d0947afdef1..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-3p08 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec "${srcdir}/tests/pngstest" 3p08 diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-4a08 b/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-4a08 deleted file mode 100755 index 2fab57f01df..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-4a08 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec "${srcdir}/tests/pngstest" 4a08 diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-4a16 b/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-4a16 deleted file mode 100755 index e4ad5aa9adb..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-4a16 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec "${srcdir}/tests/pngstest" 4a16 diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-6a08 b/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-6a08 deleted file mode 100755 index aa6c03c3d97..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-6a08 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec "${srcdir}/tests/pngstest" 6a08 diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-6a16 b/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-6a16 deleted file mode 100755 index 545b1b394bb..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-6a16 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec "${srcdir}/tests/pngstest" 6a16 diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-error b/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-error deleted file mode 100755 index ebf3a7b59ea..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngstest-error +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -code=77 # skipped -for t in "${srcdir}/contrib/pngsuite/"x*".png" -do - if test "$t" != "${srcdir}/contrib/pngsuite/x*.png" - then - # not skipped, test it - if ./pngstest --strict --tmpfile "error" --log "$@" "$t" - then - code=0 # oops, success: should not happen! - fi - fi -done -exit $code diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-IDAT b/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-IDAT deleted file mode 100755 index 71d915a9ca3..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-IDAT +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngunknown default=discard IDAT=save "${srcdir}/pngtest.png" diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-discard b/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-discard deleted file mode 100755 index f1f02d4c7b1..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-discard +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngunknown default=discard "${srcdir}/pngtest.png" diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-if-safe b/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-if-safe deleted file mode 100755 index 7c52824f83c..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-if-safe +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngunknown default=if-safe "${srcdir}/pngtest.png" diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-sAPI b/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-sAPI deleted file mode 100755 index e087ef25a7e..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-sAPI +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngunknown bKGD=save cHRM=save gAMA=save all=discard iCCP=save sBIT=save sRGB=save "${srcdir}/pngtest.png" diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-sTER b/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-sTER deleted file mode 100755 index 1b945dc3476..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-sTER +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngunknown sTER=if-safe "${srcdir}/pngtest.png" diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-save b/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-save deleted file mode 100755 index ae849308ce8..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-save +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngunknown default=save "${srcdir}/pngtest.png" diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-vpAg b/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-vpAg deleted file mode 100755 index 396c6e40d4e..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngunknown-vpAg +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngunknown vpAg=if-safe "${srcdir}/pngtest.png" diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-16-to-8 b/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-16-to-8 deleted file mode 100755 index b3223382950..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-16-to-8 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngvalid --gamma-16-to-8 diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-alpha-mode b/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-alpha-mode deleted file mode 100755 index ed04fa511b8..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-alpha-mode +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngvalid --gamma-alpha-mode diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-background b/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-background deleted file mode 100755 index 658e5fe4def..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-background +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngvalid --gamma-background diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-expand16-alpha-mode b/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-expand16-alpha-mode deleted file mode 100755 index bdda566a06b..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-expand16-alpha-mode +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngvalid --gamma-alpha-mode --expand16 diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-expand16-background b/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-expand16-background deleted file mode 100755 index f993c21aebb..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-expand16-background +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngvalid --gamma-background --expand16 diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-expand16-transform b/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-expand16-transform deleted file mode 100755 index f462534e854..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-expand16-transform +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngvalid --gamma-transform --expand16 diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-sbit b/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-sbit deleted file mode 100755 index aa82fe04fea..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-sbit +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngvalid --gamma-sbit diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-threshold b/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-threshold deleted file mode 100755 index 2cfca914677..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-threshold +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngvalid --gamma-threshold diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-transform b/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-transform deleted file mode 100755 index a71ab4d5ec7..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-gamma-transform +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngvalid --gamma-transform diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-progressive-interlace-size b/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-progressive-interlace-size deleted file mode 100755 index a31b2835570..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-progressive-interlace-size +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngvalid --size --progressive-read diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-progressive-interlace-standard b/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-progressive-interlace-standard deleted file mode 100755 index 59042eb1720..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-progressive-interlace-standard +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngvalid --standard --progressive-read --interlace diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-progressive-interlace-transform b/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-progressive-interlace-transform deleted file mode 100755 index edf9a8a79ee..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-progressive-interlace-transform +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngvalid --transform diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-progressive-standard b/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-progressive-standard deleted file mode 100755 index aa1b4b4db3a..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-progressive-standard +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngvalid --standard --progressive-read diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-standard b/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-standard deleted file mode 100755 index aa1b4b4db3a..00000000000 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngvalid-standard +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./pngvalid --standard --progressive-read diff --git a/Build/source/libs/libpng/libpng-1.6.18-PATCHES/ChangeLog b/Build/source/libs/libpng/libpng-src-PATCHES/ChangeLog index 26311ea5079..26311ea5079 100644 --- a/Build/source/libs/libpng/libpng-1.6.18-PATCHES/ChangeLog +++ b/Build/source/libs/libpng/libpng-src-PATCHES/ChangeLog diff --git a/Build/source/libs/libpng/libpng-1.6.18-PATCHES/TL-Changes b/Build/source/libs/libpng/libpng-src-PATCHES/TL-Changes index e51d6311713..f149a3e3e9c 100644 --- a/Build/source/libs/libpng/libpng-1.6.18-PATCHES/TL-Changes +++ b/Build/source/libs/libpng/libpng-src-PATCHES/TL-Changes @@ -1,5 +1,5 @@ -Changes applied to the libpng-1.6.18/ tree as obtained from: - http://www.libpng.org/ libpng-1.6.18.tar.xz +Changes applied to the libpng-1.6.20/ tree as obtained from: + http://www.libpng.org/ libpng-1.6.20.tar.xz Copied: scripts/pnglibconf.h.prebuilt -> pnglibconf.h @@ -16,4 +16,3 @@ Removed: ltmain.sh missing test-driver - diff --git a/Build/source/libs/libpng/libpng-src/ANNOUNCE b/Build/source/libs/libpng/libpng-src/ANNOUNCE new file mode 100644 index 00000000000..4dae783b559 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/ANNOUNCE @@ -0,0 +1,52 @@ +Libpng 1.6.20 - December 3, 2015 + +This is a public release of libpng, intended for use in production codes. + +Files available for download: + +Source files with LF line endings (for Unix/Linux) and with a +"configure" script + + libpng-1.6.20.tar.xz (LZMA-compressed, recommended) + libpng-1.6.20.tar.gz + +Source files with CRLF line endings (for Windows), without the +"configure" script + + /scratch/glennrp/Libpng16/lpng1620.7z (LZMA-compressed, recommended) + /scratch/glennrp/Libpng16/lpng1620.zip + +Other information: + + libpng-1.6.20-README.txt + libpng-1.6.20-LICENSE.txt + libpng-1.6.20-*.asc (armored detached GPG signatures) + +Changes since the last public release (1.6.19): + Avoid potential pointer overflow/underflow in png_handle_sPLT() and + png_handle_pCAL() (Bug report by John Regehr). + Fixed incorrect implementation of png_set_PLTE() that uses png_ptr + not info_ptr, that left png_set_PLTE() open to the CVE-2015-8126 + vulnerability. + Backported tests from libpng-1.7.0beta69. + Fixed an error in handling of bad zlib CMINFO field in pngfix, found by + American Fuzzy Lop, reported by Brian Carpenter. inflate() doesn't + immediately fault a bad CMINFO field; instead a 'too far back' error + happens later (at least some times). pngfix failed to limit CMINFO to + the allowed values but then assumed that window_bits was in range, + triggering an assert. The bug is mostly harmless; the PNG file cannot + be fixed. + In libpng 1.6 zlib initialization was changed to use the window size + in the zlib stream, not a fixed value. This causes some invalid images, + where CINFO is too large, to display 'correctly' if the rest of the + data is valid. This provides a workaround for zlib versions where the + error arises (ones that support the API change to use the window size + in the stream). + +Send comments/corrections/commendations to png-mng-implement at lists.sf.net +(subscription required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-implement +to subscribe) +or to glennrp at users.sourceforge.net + +Glenn R-P diff --git a/Build/source/libs/libpng/libpng-1.6.18/CHANGES b/Build/source/libs/libpng/libpng-src/CHANGES index d678392a515..28094fd26cb 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/CHANGES +++ b/Build/source/libs/libpng/libpng-src/CHANGES @@ -3756,8 +3756,9 @@ Version 1.5.7beta04 [November 17, 2011] Version 1.5.7beta05 [November 25, 2011] Removed "zTXt" from warning in generic chunk decompression function. - Validate time settings passed to pngset() and png_convert_to_rfc1123() - (Frank Busse). + Validate time settings passed to png_set_tIME() and png_convert_to_rfc1123() + (Frank Busse). Note: This prevented CVE-2015-7981 from affecting + libpng-1.5.7 and later. Added MINGW support to CMakeLists.txt Reject invalid compression flag or method when reading the iTXt chunk. Backed out 'simplified' API changes. The API seems too complex and there @@ -3803,12 +3804,13 @@ Version 1.6.0beta01 [December 15, 2011] (the other two required headers aren't used). Non-ANSI systems that don't have stddef.h or limits.h will have to provide an appropriate fake containing the relevant types and #defines. - The use of FAR/far has been eliminated and the definition of png_alloc_size_t - is now controlled by a flag so that 'small size_t' systems can select it - if necessary. Libpng 1.6 may not currently work on such systems -- it - seems likely that it will ask 'malloc' for more than 65535 bytes with any - image that has a sufficiently large row size (rather than simply failing - to read such images). + Dropped support for 16-bit platforms. The use of FAR/far has been eliminated + and the definition of png_alloc_size_t is now controlled by a flag so + that 'small size_t' systems can select it if necessary. Libpng 1.6 may + not currently work on such systems -- it seems likely that it will + ask 'malloc' for more than 65535 bytes with any image that has a + sufficiently large row size (rather than simply failing to read such + images). New tools directory containing tools used to generate libpng code. Fixed race conditions in parallel make builds. With higher degrees of parallelism during 'make' the use of the same temporary file names such @@ -4420,7 +4422,7 @@ Version 1.6.1beta02 [February 19, 2013] Version 1.6.1beta03 [February 22, 2013] Fixed ALIGNED_MEMORY support. - Allow run-time ARM NEON checking to be disabled. A new configure option: + Added a new configure option: --enable-arm-neon=always will stop the run-time checks. New checks within arm/arm_init.c will cause the code not to be compiled unless __ARM_NEON__ is set. This should make it fail safe (if someone asks @@ -4439,10 +4441,10 @@ Version 1.6.1beta05 [March 1, 2013] Version 1.6.1beta06 [March 4, 2013] Better documentation of unknown handling API interactions. Corrected Android builds and corrected libpng.vers with symbol - prefixing. This adds an API to set optimization options externally, + prefixing. It also makes those tests compile and link on Android. + Added an API png_set_option() to set optimization options externally, providing an alternative and general solution for the non-portable - run-time tests used by the ARM Neon code. It also makes those tests - compile and link on Android. + run-time tests used by the ARM Neon code, using the PNG_ARM_NEON option. The order of settings vs options in pnglibconf.h is reversed to allow settings to depend on options and options can now set (or override) the defaults for settings. @@ -4540,7 +4542,8 @@ Version 1.6.3beta05 [May 9, 2013] Calculate our own zlib windowBits when decoding rather than trusting the CMF bytes in the PNG datastream. Added an option to force maximum window size for inflating, which was - the behavior of libpng15 and earlier. + the behavior of libpng15 and earlier, via a new PNG_MAXIMUM_INFLATE_WINDOW + option for png_set_options(). Added png-fix-itxt and png-fix-too-far-back to the built programs and removed warnings from the source code and timepng that are revealed as a result. @@ -5143,7 +5146,9 @@ Version 1.6.17beta01 [January 29, 2015] Added testing of png_set_packing() to pngvalid.c Regenerated configure scripts in the *.tar distributions with libtool-2.4.4 Implement previously untested cases of libpng transforms in pngvalid.c - Fixed byte order in 2-byte filler, in png_do_read_filler(). + Fixed byte order in png_do_read_filler() with 16-bit input. Previously + the high and low bytes of the filler, from png_set_filler() or from + png_set_add_alpha(), were read in the wrong order. Made the check for out-of-range values in png_set_tRNS() detect values that are exactly 2^bit_depth, and work on 16-bit platforms. Merged some parts of libpng-1.6.17beta01 and libpng-1.7.0beta47. @@ -5225,7 +5230,7 @@ Version 1.6.18beta01 [April 1, 2015] Version 1.6.18beta02 [April 26, 2015] Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler - (Bug report by Viktor Szaka'ts). + (Bug report by Viktor Szakats). Version 1.6.18beta03 [May 6, 2015] Replaced "unexpected" with an integer (0xabadca11) in pngset.c @@ -5305,6 +5310,142 @@ Version 1.6.18rc03 [July 15, 2015] Version 1.6.18 [July 23, 2015] No changes. +Version 1.6.19beta01 [July 30, 2015] + Updated obsolete information about the simplified API macros in the + manual pages (Bug report by Arc Riley). + Avoid potentially dereferencing NULL info_ptr in png_info_init_3(). + Rearranged png.h to put the major sections in the same order as + in libpng17. + Eliminated unused PNG_COST_SHIFT, PNG_WEIGHT_SHIFT, PNG_COST_FACTOR, and + PNG_WEIGHT_FACTOR macros. + Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler + (Bug report by Viktor Szakats). Several warnings remain and are + unavoidable, where we test for overflow. + Fixed potential leak of png_pixels in contrib/pngminus/pnm2png.c + Fixed uninitialized variable in contrib/gregbook/rpng2-x.c + +Version 1.6.19beta02 [August 19, 2015] + Moved config.h.in~ from the "libpng_autotools_files" list to the + "libpng_autotools_extra" list in autogen.sh because it was causing a + false positive for missing files (bug report by Robert C. Seacord). + Removed unreachable "break" statements in png.c, pngread.c, and pngrtran.c + to suppress clang warnings (Bug report by Viktor Szakats). + Fixed some bad links in the man page. + Changed "n bit" to "n-bit" in comments. + Added signed/unsigned 16-bit safety net. This removes the dubious + 0x8000 flag definitions on 16-bit systems. They aren't supported + yet the defs *probably* work, however it seems much safer to do this + and be advised if anyone, contrary to advice, is building libpng 1.6 + on a 16-bit system. It also adds back various switch default clauses + for GCC; GCC errors out if they are not present (with an appropriately + high level of warnings). + Safely convert num_bytes to a png_byte in png_set_sig_bytes() (Robert + Seacord). + Fixed the recently reported 1's complement security issue by replacing + the value that is illegal in the PNG spec, in both signed and unsigned + values, with 0. Illegal unsigned values (anything greater than or equal + to 0x80000000) can still pass through, but since these are not illegal + in ANSI-C (unlike 0x80000000 in the signed case) the checking that + occurs later can catch them (John Bowler). + +Version 1.6.19beta03 [September 26, 2015] + Fixed png_save_int_32 when int is not 2's complement (John Bowler). + Updated libpng16 with all the recent test changes from libpng17, + including changes to pngvalid.c to ensure that the original, + distributed, version of contrib/visupng/cexcept.h can be used + (John Bowler). + pngvalid contains the correction to the use of SAVE/STORE_ + UNKNOWN_CHUNKS; a bug revealed by changes in libpng 1.7. More + tests contain the --strict option to detect warnings and the + pngvalid-standard test has been corrected so that it does not + turn on progressive-read. There is a separate test which does + that. (John Bowler) + Also made some signed/unsigned fixes. + Make pngstest error limits version specific. Splitting the machine + generated error structs out to a file allows the values to be updated + without changing pngstest.c itself. Since libpng 1.6 and 1.7 have + slightly different error limits this simplifies maintenance. The + makepngs.sh script has also been updated to more accurately reflect + current problems in libpng 1.7 (John Bowler). + Incorporated new test PNG files into make check. tests/pngstest-* + are changed so that the new test files are divided into 8 groups by + gamma and alpha channel. These tests have considerably better code + and pixel-value coverage than contrib/pngsuite; however,coverage is + still incomplete (John Bowler). + Removed the '--strict' in 1.6 because of the double-gamma-correction + warning, updated pngstest-errors.h for the errors detected with the + new contrib/testspngs PNG test files (John Bowler). + +Version 1.6.19beta04 [October 15, 2015] + Worked around rgb-to-gray issues in libpng 1.6. The previous + attempts to ignore the errors in the code aren't quite enough to + deal with the 'channel selection' encoding added to libpng 1.7; abort. + pngvalid.c is changed to drop this encoding in prior versions. + Fixed 'pow' macros in pngvalid.c. It is legal for 'pow' to be a + macro, therefore the argument list cannot contain preprocessing + directives. Make sure pow is a function where this happens. This is + a minimal safe fix, the issue only arises in non-performance-critical + code (bug report by Curtis Leach, fix by John Bowler). + Added sPLT support to pngtest.c + +Version 1.6.19rc01 [October 23, 2015] + No changes. + +Version 1.6.19rc02 [October 31, 2015] + Prevent setting or writing over-length PLTE chunk (Cosmin Truta). + Silently truncate over-length PLTE chunk while reading. + Libpng incorrectly calculated the output rowbytes when the application + decreased either the number of channels or the bit depth (or both) in + a user transform. This was safe; libpng overallocated buffer space + (potentially by quite a lot; up to 4 times the amount required) but, + from 1.5.4 on, resulted in a png_error (John Bowler). + +Version 1.6.19rc03 [November 3, 2015] + Fixed some inconsequential cut-and-paste typos in png_set_cHRM_XYZ_fixed(). + Clarified COPYRIGHT information to state explicitly that versions + are derived from previous versions. + Removed much of the long list of previous versions from png.h and + libpng.3. + +Version 1.6.19rc04 [November 5, 2015] + Fixed new bug with CRC error after reading an over-length palette + (bug report by Cosmin Truta) (CVE-2015-8126). + +Version 1.6.19 [November 12, 2015] + Cleaned up coding style in png_handle_PLTE(). + +Version 1.6.20beta01 [November 20, 2015] + Avoid potential pointer overflow/underflow in png_handle_sPLT() and + png_handle_pCAL() (Bug report by John Regehr). + +Version 1.6.20beta02 [November 23, 2015] + Fixed incorrect implementation of png_set_PLTE() that uses png_ptr + not info_ptr, that left png_set_PLTE() open to the CVE-2015-8126 + vulnerability. + +Version 1.6.20beta03 [November 24, 2015] + Backported tests from libpng-1.7.0beta69. + +Version 1.6.20rc01 [November 26, 2015] + Fixed an error in handling of bad zlib CMINFO field in pngfix, found by + American Fuzzy Lop, reported by Brian Carpenter. inflate() doesn't + immediately fault a bad CMINFO field; instead a 'too far back' error + happens later (at least some times). pngfix failed to limit CMINFO to + the allowed values but then assumed that window_bits was in range, + triggering an assert. The bug is mostly harmless; the PNG file cannot + be fixed. + +Version 1.6.20rc02 [November 29, 2015] + In libpng 1.6 zlib initialization was changed to use the window size + in the zlib stream, not a fixed value. This causes some invalid images, + where CINFO is too large, to display 'correctly' if the rest of the + data is valid. This provides a workaround for zlib versions where the + error arises (ones that support the API change to use the window size + in the stream). + +Version 1.6.20 [December 3, 2015] + No changes. + Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement diff --git a/Build/source/libs/libpng/libpng-1.6.18/CMakeLists.txt b/Build/source/libs/libpng/libpng-src/CMakeLists.txt index 62d516070e6..7bc49c5b7cb 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/CMakeLists.txt +++ b/Build/source/libs/libpng/libpng-src/CMakeLists.txt @@ -16,7 +16,7 @@ enable_testing() set(PNGLIB_MAJOR 1) set(PNGLIB_MINOR 6) -set(PNGLIB_RELEASE 18) +set(PNGLIB_RELEASE 20) set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR}) set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE}) @@ -261,7 +261,7 @@ endif(NOT WIN32 OR CYGWIN OR MINGW) # SET UP LINKS if(PNG_SHARED) set_target_properties(${PNG_LIB_NAME} PROPERTIES -# VERSION 16.${PNGLIB_RELEASE}.1.6.18 +# VERSION 16.${PNGLIB_RELEASE}.1.6.20 VERSION 16.${PNGLIB_RELEASE}.0 SOVERSION 16 CLEAN_DIRECT_OUTPUT 1) diff --git a/Build/source/libs/libpng/libpng-1.6.18/INSTALL b/Build/source/libs/libpng/libpng-src/INSTALL index a294ffe633a..a294ffe633a 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/INSTALL +++ b/Build/source/libs/libpng/libpng-src/INSTALL diff --git a/Build/source/libs/libpng/libpng-1.6.18/LICENSE b/Build/source/libs/libpng/libpng-src/LICENSE index 090a3600caf..82dbe117f6d 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/LICENSE +++ b/Build/source/libs/libpng/libpng-src/LICENSE @@ -10,10 +10,11 @@ this sentence. This code is released under the libpng license. -libpng versions 1.0.7, July 1, 2000, through 1.6.18, July 23, 2015, are -Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, and are -distributed according to the same disclaimer and license as libpng-1.0.6 -with the following individuals added to the list of Contributing Authors: +libpng versions 1.0.7, July 1, 2000, through 1.6.20, December 3, 2015, are +Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, are +derived from libpng-1.0.6, and are distributed according to the same +disclaimer and license as libpng-1.0.6 with the following individuals +added to the list of Contributing Authors: Simon-Pierre Cadieux Eric S. Raymond @@ -32,18 +33,20 @@ and with the following additions to the disclaimer: the user. libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are -Copyright (c) 1998-2000 Glenn Randers-Pehrson, and are distributed according -to the same disclaimer and license as libpng-0.96, with the following -individuals added to the list of Contributing Authors: +Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from +libpng-0.96, and are distributed according to the same disclaimer and +license as libpng-0.96, with the following individuals added to the list +of Contributing Authors: Tom Lane Glenn Randers-Pehrson Willem van Schaik libpng versions 0.89, June 1996, through 0.96, May 1997, are -Copyright (c) 1996-1997 Andreas Dilger, and are -distributed according to the same disclaimer and license as libpng-0.88, -with the following individuals added to the list of Contributing Authors: +Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, +and are distributed according to the same disclaimer and license as +libpng-0.88, with the following individuals added to the list of +Contributing Authors: John Bowler Kevin Bracey @@ -90,6 +93,8 @@ supporting the PNG file format in commercial products. If you use this source code in a product, acknowledgment is not required but would be appreciated. +END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE. + A "png_get_copyright" function is available, for convenient use in "about" boxes and the like: @@ -104,4 +109,4 @@ the additional disclaimers inserted at version 1.0.7. Glenn Randers-Pehrson glennrp at users.sourceforge.net -July 23, 2015 +December 3, 2015 diff --git a/Build/source/libs/libpng/libpng-1.6.18/Makefile.am b/Build/source/libs/libpng/libpng-src/Makefile.am index ac5f95cf71a..73097dbccc9 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/Makefile.am +++ b/Build/source/libs/libpng/libpng-src/Makefile.am @@ -51,23 +51,17 @@ TESTS =\ tests/pngvalid-gamma-expand16-background\ tests/pngvalid-gamma-expand16-transform tests/pngvalid-gamma-sbit\ tests/pngvalid-gamma-threshold tests/pngvalid-gamma-transform\ - tests/pngvalid-progressive-interlace-size\ + tests/pngvalid-progressive-size\ tests/pngvalid-progressive-interlace-standard\ - tests/pngvalid-progressive-interlace-transform\ + tests/pngvalid-transform\ tests/pngvalid-progressive-standard tests/pngvalid-standard\ - tests/pngstest-0g01 tests/pngstest-0g02 tests/pngstest-0g04\ - tests/pngstest-0g08 tests/pngstest-0g16 tests/pngstest-2c08\ - tests/pngstest-2c16 tests/pngstest-3p01 tests/pngstest-3p02\ - tests/pngstest-3p04 tests/pngstest-3p08 tests/pngstest-4a08\ - tests/pngstest-4a16 tests/pngstest-6a08 tests/pngstest-6a16\ - tests/pngstest-error tests/pngunknown-IDAT\ + tests/pngstest-1.8 tests/pngstest-1.8-alpha tests/pngstest-linear\ + tests/pngstest-linear-alpha tests/pngstest-none tests/pngstest-none-alpha\ + tests/pngstest-sRGB tests/pngstest-sRGB-alpha tests/pngunknown-IDAT\ tests/pngunknown-discard tests/pngunknown-if-safe tests/pngunknown-sAPI\ tests/pngunknown-sTER tests/pngunknown-save tests/pngunknown-vpAg\ tests/pngimage-quick tests/pngimage-full -# These tests are expected, and required, to fail: -XFAIL_TESTS = tests/pngstest-error - # man pages dist_man_MANS= libpng.3 libpngpf.3 png.5 diff --git a/Build/source/libs/libpng/libpng-1.6.18/README b/Build/source/libs/libpng/libpng-src/README index 3c181a304f7..59f1f918ae2 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/README +++ b/Build/source/libs/libpng/libpng-src/README @@ -1,4 +1,4 @@ -README for libpng version 1.6.18 - July 23, 2015 (shared library 16.0) +README for libpng version 1.6.20 - December 3, 2015 (shared library 16.0) See the note about version numbers near the top of png.h See INSTALL for instructions on how to install libpng. diff --git a/Build/source/libs/libpng/libpng-1.6.18/TODO b/Build/source/libs/libpng/libpng-src/TODO index 72633774fff..72633774fff 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/TODO +++ b/Build/source/libs/libpng/libpng-src/TODO diff --git a/Build/source/libs/libpng/libpng-1.6.18/arm/arm_init.c b/Build/source/libs/libpng/libpng-src/arm/arm_init.c index fb3d50d04ae..fb3d50d04ae 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/arm/arm_init.c +++ b/Build/source/libs/libpng/libpng-src/arm/arm_init.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/arm/filter_neon.S b/Build/source/libs/libpng/libpng-src/arm/filter_neon.S index 3b061d6bbf2..3b061d6bbf2 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/arm/filter_neon.S +++ b/Build/source/libs/libpng/libpng-src/arm/filter_neon.S diff --git a/Build/source/libs/libpng/libpng-1.6.18/arm/filter_neon_intrinsics.c b/Build/source/libs/libpng/libpng-src/arm/filter_neon_intrinsics.c index d42c7889091..d42c7889091 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/arm/filter_neon_intrinsics.c +++ b/Build/source/libs/libpng/libpng-src/arm/filter_neon_intrinsics.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/autogen.sh b/Build/source/libs/libpng/libpng-src/autogen.sh index 702a0c110f3..91607171bbd 100755 --- a/Build/source/libs/libpng/libpng-1.6.18/autogen.sh +++ b/Build/source/libs/libpng/libpng-src/autogen.sh @@ -74,12 +74,12 @@ done # # The autotools generated files: libpng_autotools_files="Makefile.in aclocal.m4 config.guess config.h.in - config.h.in~ config.sub configure depcomp install-sh ltmain.sh missing\ + config.sub configure depcomp install-sh ltmain.sh missing\ test-driver" # # Files generated by versions of configue >2.68 or automake >1.13 (i.e. later # versions than those required by configure.ac): -libpng_autotools_extra="compile" +libpng_autotools_extra="compile config.h.in~" # # These are separate because 'maintainer-clean' does not remove them. libpng_libtool_files="scripts/libtool.m4 scripts/ltoptions.m4\ diff --git a/Build/source/libs/libpng/libpng-1.6.18/config.h.in b/Build/source/libs/libpng/libpng-src/config.h.in index 898037ec37c..898037ec37c 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/config.h.in +++ b/Build/source/libs/libpng/libpng-src/config.h.in diff --git a/Build/source/libs/libpng/libpng-1.6.18/configure.ac b/Build/source/libs/libpng/libpng-src/configure.ac index 4fb07785ffb..845ae1c354b 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/configure.ac +++ b/Build/source/libs/libpng/libpng-src/configure.ac @@ -18,7 +18,7 @@ AC_PREREQ([2.68]) dnl Version number stuff here: -AC_INIT([libpng],[1.6.18],[png-mng-implement@lists.sourceforge.net]) +AC_INIT([libpng],[1.6.20],[png-mng-implement@lists.sourceforge.net]) AC_CONFIG_MACRO_DIR([scripts]) # libpng does not follow GNU file name conventions (hence 'foreign') @@ -39,10 +39,10 @@ dnl automake, so the following is not necessary (and is not defined anyway): dnl AM_PREREQ([1.11.2]) dnl stop configure from automagically running automake -PNGLIB_VERSION=1.6.18 +PNGLIB_VERSION=1.6.20 PNGLIB_MAJOR=1 PNGLIB_MINOR=6 -PNGLIB_RELEASE=18 +PNGLIB_RELEASE=20 dnl End of version number stuff diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/README.txt b/Build/source/libs/libpng/libpng-src/contrib/README.txt index bcd433d3523..97963c6d545 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/README.txt +++ b/Build/source/libs/libpng/libpng-src/contrib/README.txt @@ -1,4 +1,5 @@ This "contrib" directory contains contributions which are not necessarily under the libpng license, although all are open source. They are not part of -libpng proper and are not used for building the library. +libpng proper and are not used for building the library, although some are used +for testing the library via "make check". diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/arm-neon/README b/Build/source/libs/libpng/libpng-src/contrib/arm-neon/README index b4248cf2897..b4248cf2897 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/arm-neon/README +++ b/Build/source/libs/libpng/libpng-src/contrib/arm-neon/README diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/arm-neon/android-ndk.c b/Build/source/libs/libpng/libpng-src/contrib/arm-neon/android-ndk.c index 7240123487d..7240123487d 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/arm-neon/android-ndk.c +++ b/Build/source/libs/libpng/libpng-src/contrib/arm-neon/android-ndk.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/arm-neon/linux-auxv.c b/Build/source/libs/libpng/libpng-src/contrib/arm-neon/linux-auxv.c index 696e297ef4c..4d26bd3b354 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/arm-neon/linux-auxv.c +++ b/Build/source/libs/libpng/libpng-src/contrib/arm-neon/linux-auxv.c @@ -7,7 +7,7 @@ * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer * and license in png.h - * + * * SEE contrib/arm-neon/README before reporting bugs * * STATUS: COMPILED, TESTED diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/arm-neon/linux.c b/Build/source/libs/libpng/libpng-src/contrib/arm-neon/linux.c index abae9e33bf6..94f9bb1e09f 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/arm-neon/linux.c +++ b/Build/source/libs/libpng/libpng-src/contrib/arm-neon/linux.c @@ -72,7 +72,7 @@ png_have_neon(png_structp png_ptr) state = Colon; break; } - + /* did not match 'feature' */ state = SkipLine; /* FALL THROUGH */ diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/conftest/README b/Build/source/libs/libpng/libpng-src/contrib/conftest/README index 0f472791f27..0f472791f27 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/conftest/README +++ b/Build/source/libs/libpng/libpng-src/contrib/conftest/README diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/conftest/read.dfa b/Build/source/libs/libpng/libpng-src/contrib/conftest/read.dfa index 21e88d01a21..21e88d01a21 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/conftest/read.dfa +++ b/Build/source/libs/libpng/libpng-src/contrib/conftest/read.dfa diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/conftest/s_read.dfa b/Build/source/libs/libpng/libpng-src/contrib/conftest/s_read.dfa index cb1ce0ba65f..cb1ce0ba65f 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/conftest/s_read.dfa +++ b/Build/source/libs/libpng/libpng-src/contrib/conftest/s_read.dfa diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/conftest/s_write.dfa b/Build/source/libs/libpng/libpng-src/contrib/conftest/s_write.dfa index e540a46dc8b..e540a46dc8b 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/conftest/s_write.dfa +++ b/Build/source/libs/libpng/libpng-src/contrib/conftest/s_write.dfa diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/conftest/simple.dfa b/Build/source/libs/libpng/libpng-src/contrib/conftest/simple.dfa index 04193334452..04193334452 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/conftest/simple.dfa +++ b/Build/source/libs/libpng/libpng-src/contrib/conftest/simple.dfa diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/conftest/write.dfa b/Build/source/libs/libpng/libpng-src/contrib/conftest/write.dfa index 3319aabeeb3..3319aabeeb3 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/conftest/write.dfa +++ b/Build/source/libs/libpng/libpng-src/contrib/conftest/write.dfa diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/examples/README.txt b/Build/source/libs/libpng/libpng-src/contrib/examples/README.txt index 0525c9d36b4..0525c9d36b4 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/examples/README.txt +++ b/Build/source/libs/libpng/libpng-src/contrib/examples/README.txt diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/examples/iccfrompng.c b/Build/source/libs/libpng/libpng-src/contrib/examples/iccfrompng.c index 603037e7097..603037e7097 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/examples/iccfrompng.c +++ b/Build/source/libs/libpng/libpng-src/contrib/examples/iccfrompng.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/examples/pngpixel.c b/Build/source/libs/libpng/libpng-src/contrib/examples/pngpixel.c index 27f2cb93647..f762379ed3c 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/examples/pngpixel.c +++ b/Build/source/libs/libpng/libpng-src/contrib/examples/pngpixel.c @@ -87,7 +87,7 @@ print_pixel(png_structp png_ptr, png_infop info_ptr, png_const_bytep row, */ case PNG_COLOR_TYPE_PALETTE: { - PNG_CONST unsigned int index = component(row, x, 0, bit_depth, 1); + PNG_CONST int index = component(row, x, 0, bit_depth, 1); png_colorp palette = NULL; int num_palette = 0; diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/examples/pngtopng.c b/Build/source/libs/libpng/libpng-src/contrib/examples/pngtopng.c index 4acf6b3ad4d..4acf6b3ad4d 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/examples/pngtopng.c +++ b/Build/source/libs/libpng/libpng-src/contrib/examples/pngtopng.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/examples/simpleover.c b/Build/source/libs/libpng/libpng-src/contrib/examples/simpleover.c index 6852a957466..59dd313688c 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/examples/simpleover.c +++ b/Build/source/libs/libpng/libpng-src/contrib/examples/simpleover.c @@ -136,7 +136,7 @@ sprite_op(const struct sprite *sprite, int x_offset, int y_offset, /* This is the optimized Porter-Duff 'Over' operation, when the * input alpha is 0 the output is not changed. */ - if (in_alpha > 0) + if (in_alpha > 0) { png_uint_16 *out_pixel = sprite->buffer + ((y+y_offset) * sprite->width + (x+x_offset))*4; @@ -184,7 +184,7 @@ sprite_op(const struct sprite *sprite, int x_offset, int y_offset, } } -static int +static int create_sprite(struct sprite *sprite, int *argc, const char ***argv) { /* Read the arguments and create this sprite. The sprite buffer has already @@ -415,7 +415,7 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc, n = sscanf(argv[0], "--sprite=%u,%u,%" str(sprite_name_chars) "s%c", &sprites[nsprites].width, &sprites[nsprites].height, sprites[nsprites].name, &tombstone); - + if ((n == 2 || n == 3) && sprites[nsprites].width > 0 && sprites[nsprites].height > 0) { @@ -492,7 +492,7 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc, if (!add_sprite(output, out_buf, sprites+isprite, &argc, &argv)) goto out; /* error in add_sprite */ - break; + break; } } diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/COPYING b/Build/source/libs/libpng/libpng-src/contrib/gregbook/COPYING index a3e97747969..a3e97747969 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/COPYING +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/COPYING diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/LICENSE b/Build/source/libs/libpng/libpng-src/contrib/gregbook/LICENSE index d9567178cb6..d9567178cb6 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/LICENSE +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/LICENSE diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/Makefile.mingw32 b/Build/source/libs/libpng/libpng-src/contrib/gregbook/Makefile.mingw32 index 3a3ff607e81..3a3ff607e81 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/Makefile.mingw32 +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/Makefile.mingw32 diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/Makefile.sgi b/Build/source/libs/libpng/libpng-src/contrib/gregbook/Makefile.sgi index 94d61b4652c..94d61b4652c 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/Makefile.sgi +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/Makefile.sgi diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/Makefile.unx b/Build/source/libs/libpng/libpng-src/contrib/gregbook/Makefile.unx index 1a73e03bff4..1a73e03bff4 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/Makefile.unx +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/Makefile.unx diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/Makefile.w32 b/Build/source/libs/libpng/libpng-src/contrib/gregbook/Makefile.w32 index ab7dcf7cae7..ab7dcf7cae7 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/Makefile.w32 +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/Makefile.w32 diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/README b/Build/source/libs/libpng/libpng-src/contrib/gregbook/README index 7b1f6a3ea62..7b1f6a3ea62 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/README +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/README diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/makevms.com b/Build/source/libs/libpng/libpng-src/contrib/gregbook/makevms.com index f32bcaba7f9..f32bcaba7f9 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/makevms.com +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/makevms.com diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/readpng.c b/Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng.c index 9167403e597..9167403e597 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/readpng.c +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/readpng.h b/Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng.h index fad9fe3b4c5..fad9fe3b4c5 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/readpng.h +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng.h diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/readpng2.c b/Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng2.c index 4cf2600a41d..a9e7ba59dae 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/readpng2.c +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng2.c @@ -4,7 +4,7 @@ --------------------------------------------------------------------------- - Copyright (c) 1998-2007 Greg Roelofs. All rights reserved. + Copyright (c) 1998-2015 Greg Roelofs. All rights reserved. This software is provided "as is," without warranty of any kind, express or implied. In no event shall the author or contributors @@ -51,6 +51,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + --------------------------------------------------------------------------- + + Changelog: + %RDATE% - Check return value of png_get_bKGD() (Glenn R-P) + ---------------------------------------------------------------------------*/ @@ -261,36 +266,38 @@ static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr) /* since we know we've read all of the PNG file's "header" (i.e., up * to IDAT), we can check for a background color here */ - if (mainprog_ptr->need_bgcolor && - png_get_valid(png_ptr, info_ptr, PNG_INFO_bKGD)) + if (mainprog_ptr->need_bgcolor) { png_color_16p pBackground; /* it is not obvious from the libpng documentation, but this function * takes a pointer to a pointer, and it always returns valid red, * green and blue values, regardless of color_type: */ - png_get_bKGD(png_ptr, info_ptr, &pBackground); - - /* however, it always returns the raw bKGD data, regardless of any - * bit-depth transformations, so check depth and adjust if necessary */ - if (bit_depth == 16) { - mainprog_ptr->bg_red = pBackground->red >> 8; - mainprog_ptr->bg_green = pBackground->green >> 8; - mainprog_ptr->bg_blue = pBackground->blue >> 8; - } else if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { - if (bit_depth == 1) - mainprog_ptr->bg_red = mainprog_ptr->bg_green = - mainprog_ptr->bg_blue = pBackground->gray? 255 : 0; - else if (bit_depth == 2) - mainprog_ptr->bg_red = mainprog_ptr->bg_green = - mainprog_ptr->bg_blue = (255/3) * pBackground->gray; - else /* bit_depth == 4 */ - mainprog_ptr->bg_red = mainprog_ptr->bg_green = - mainprog_ptr->bg_blue = (255/15) * pBackground->gray; - } else { - mainprog_ptr->bg_red = (uch)pBackground->red; - mainprog_ptr->bg_green = (uch)pBackground->green; - mainprog_ptr->bg_blue = (uch)pBackground->blue; + if (png_get_bKGD(png_ptr, info_ptr, &pBackground)) + { + + /* however, it always returns the raw bKGD data, regardless of any + * bit-depth transformations, so check depth and adjust if necessary + */ + if (bit_depth == 16) { + mainprog_ptr->bg_red = pBackground->red >> 8; + mainprog_ptr->bg_green = pBackground->green >> 8; + mainprog_ptr->bg_blue = pBackground->blue >> 8; + } else if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { + if (bit_depth == 1) + mainprog_ptr->bg_red = mainprog_ptr->bg_green = + mainprog_ptr->bg_blue = pBackground->gray? 255 : 0; + else if (bit_depth == 2) + mainprog_ptr->bg_red = mainprog_ptr->bg_green = + mainprog_ptr->bg_blue = (255/3) * pBackground->gray; + else /* bit_depth == 4 */ + mainprog_ptr->bg_red = mainprog_ptr->bg_green = + mainprog_ptr->bg_blue = (255/15) * pBackground->gray; + } else { + mainprog_ptr->bg_red = (uch)pBackground->red; + mainprog_ptr->bg_green = (uch)pBackground->green; + mainprog_ptr->bg_blue = (uch)pBackground->blue; + } } } diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/readpng2.h b/Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng2.h index 6b3660d7c17..6b3660d7c17 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/readpng2.h +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng2.h diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/readppm.c b/Build/source/libs/libpng/libpng-src/contrib/gregbook/readppm.c index 7fefc3943ec..7fefc3943ec 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/readppm.c +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/readppm.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/rpng-win.c b/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng-win.c index f53ddc8ece6..f53ddc8ece6 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/rpng-win.c +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng-win.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/rpng-x.c b/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng-x.c index ddd7c58d6f3..ddd7c58d6f3 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/rpng-x.c +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng-x.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/rpng2-win.c b/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-win.c index eda176eee33..a7b9dfaafa4 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/rpng2-win.c +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-win.c @@ -33,7 +33,7 @@ - 2.02: fixed improper display of usage screen on PNG error(s); fixed unexpected-EOF and file-read-error cases - 2.03: removed runtime MMX-enabling/disabling and obsolete -mmx* options - - 2.04: + - 2.04: (GR-P) --------------------------------------------------------------------------- diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/rpng2-x.c b/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-x.c index cf371014c8d..0c8ddeba223 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/rpng2-x.c +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-x.c @@ -43,12 +43,10 @@ - 2.03: deleted runtime MMX-enabling/disabling and obsolete -mmx* options - 2.04: Added "void(foo);" statements to quiet pedantic compiler warnings about unused variables (GR-P) - - TO DO: - use nanosleep() instead of usleep(), which is obsolete/deprecated. + - 2.05: Use nanosleep() instead of usleep(), which is deprecated (GR-P). --------------------------------------------------------------------------- - Copyright (c) 1998-2008 Greg Roelofs. All rights reserved. + Copyright (c) 1998-2010, 2014-2015 Greg Roelofs. All rights reserved. This software is provided "as is," without warranty of any kind, express or implied. In no event shall the author or contributors @@ -119,6 +117,7 @@ # undef usleep # define usleep(usec) { \ struct timespec ts; \ + ts.tv_sec = 0; \ ts.tv_nsec = (usec) * 1000; \ nanosleep(&ts, NULL); } # endif @@ -497,12 +496,12 @@ int main(int argc, char **argv) "\t\t transparent images; overrides -bgcolor\n", num_bgpat-1); #ifdef FEATURE_LOOP - fprintf(stderr, + fprintf(stderr, " -loop\tloops through background images after initial display\n" "\t\t is complete (depends on -bgpat)\n" " sec \tseconds to display each background image (default = 2)\n"); #endif - fprintf(stderr, + fprintf(stderr, " dur \tduration in microseconds to wait after displaying each\n" "\t\t row (for demo purposes)\n" " -timing\tenables delay for every block read, to simulate modem\n" diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/toucan.png b/Build/source/libs/libpng/libpng-src/contrib/gregbook/toucan.png Binary files differindex 03960d49399..03960d49399 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/toucan.png +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/toucan.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/wpng.c b/Build/source/libs/libpng/libpng-src/contrib/gregbook/wpng.c index a06e3529ecb..a06e3529ecb 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/wpng.c +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/wpng.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/writepng.c b/Build/source/libs/libpng/libpng-src/contrib/gregbook/writepng.c index c5c9534797b..c5c9534797b 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/writepng.c +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/writepng.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/writepng.h b/Build/source/libs/libpng/libpng-src/contrib/gregbook/writepng.h index 78b966b5874..78b966b5874 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/gregbook/writepng.h +++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/writepng.h diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/fakepng.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/fakepng.c index fcc111286c6..6512c140104 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/fakepng.c +++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/fakepng.c @@ -1,4 +1,12 @@ -/* Fake a PNG - just write it out directly. */ +/* Fake a PNG - just write it out directly. + * + * COPYRIGHT: Written by John Cunningham Bowler, 2014. + * To the extent possible under law, the author has waived all copyright and + * related or neighboring rights to this work. This work is published from: + * United States. + * + */ + #include <stdio.h> #include <zlib.h> /* for crc32 */ diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/gentests.sh b/Build/source/libs/libpng/libpng-src/contrib/libtests/gentests.sh index f0f8d2395a5..f0f8d2395a5 100755 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/gentests.sh +++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/gentests.sh diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/makepng.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/makepng.c index 9f11b29645b..60d96d198dc 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/makepng.c +++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/makepng.c @@ -1,8 +1,9 @@ -/* makepng.c - * - * Copyright (c) 2013 John Cunningham Bowler - * - * Last changed in libpng 1.6.1 [March 28, 2013] +/* makepng.c */ +#define _ISOC99_SOURCE +/* Copyright: */ +#define COPYRIGHT "\251 2013,2015 John Cunningham Bowler" +/* + * Last changed in libpng 1.7.0 [(PENDING RELEASE)] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer @@ -10,8 +11,8 @@ * * Make a test PNG image. The arguments are as follows: * - * makepng [--sRGB|--linear|--1.8] [--color=<color>] color-type bit-depth \ - * [file-name] + * makepng [--sRGB|--linear|--1.8] [--tRNS] [--nofilters] \ + * color-type bit-depth [file-name] * * The color-type may be numeric (and must match the numbers used by the PNG * specification) or one of the format names listed below. The bit-depth is the @@ -39,8 +40,8 @@ * 4 channels: linear combinations of, from the top-left corner clockwise, * transparent, red, green, blue. * - * For color-mapped images a four channel color-map is used and the PNG file has - * a tRNS chunk, as follows: + * For color-mapped images a four channel color-map is used and if --tRNS is + * given the PNG file has a tRNS chunk, as follows: * * 1-bit: entry 0 is transparent-red, entry 1 is opaque-white * 2-bit: entry 0: transparent-green @@ -53,6 +54,9 @@ * The palette always has 2^bit-depth entries and the tRNS chunk one fewer. The * image is the 1-channel diamond, but using palette index, not luminosity. * + * For formats other than color-mapped ones if --tRNS is specified a tRNS chunk + * is generated with all channels equal to the low bits of 0x0101. + * * Image size is determined by the final pixel depth in bits, i.e. channels x * bit-depth, as follows: * @@ -60,20 +64,64 @@ * 16 bits: 256x256 * More than 16 bits: 1024x1024 * - * Row filtering is turned off (the 'none' filter is used on every row) and the - * images are not interlaced. + * Row filtering is the libpng default but may be turned off (the 'none' filter + * is used on every row) with the --nofilters option. * - * If --color is given then the whole image has that color, color-mapped images - * will have exactly one palette entry and all image files with be 16x16 in - * size. The color value is 1 to 4 decimal numbers as appropriate for the color - * type. + * The images are not interlaced. * * If file-name is given then the PNG is written to that file, else it is * written to stdout. Notice that stdout is not supported on systems where, by * default, it assumes text output; this program makes no attempt to change the * text mode of stdout! + * + * makepng --color=<color> ... + * + * If --color is given then the whole image has that color, color-mapped images + * will have exactly one palette entry and all image files with be 16x16 in + * size. The color value is 1 to 4 decimal numbers as appropriate for the color + * type. + * + * makepng --small ... + * + * If --small is given the images are no larger than required to include every + * possible pixel value for the format. + * + * For formats with pixels 8 bits or fewer in size the images consist of a + * single row with 2^pixel-depth pixels, one of every possible value. + * + * For formats with 16-bit pixels a 256x256 image is generated containing every + * possible pixel value. + * + * For larger pixel sizes a 256x256 image is generated where the first row + * consists of each pixel that has identical byte values throughout the pixel + * followed by rows where the byte values differ within the pixel. + * + * In all cases the pixel values are arranged in such a way that the SUB and UP + * filters give byte sequences for maximal zlib compression. By default (if + * --nofilters is not given) the SUB filter is used on the first row and the UP + * filter on all following rows. + * + * The --small option is meant to provide good test-case coverage, however the + * images are not easy to examine visually. Without the --small option the + * images contain identical color values; the pixel values are adjusted + * according to the gamma encoding with no gamma encoding being interpreted as + * sRGB. + * + * LICENSING + * ========= + * + * This code is copyright of the authors, see the COPYRIGHT define above. The + * code is licensed as above, using the libpng license. The code generates + * images which are solely the product of the code; the options choose which of + * the many possibilities to generate. The images that result (but not the code + * which generates them) are licensed as defined here: + * + * IMPORTANT: the COPYRIGHT #define must contain ISO-Latin-1 characters, the + * IMAGE_LICENSING #define must contain UTF-8 characters. The 'copyright' + * symbol 0xA9U (\251) in ISO-Latin-1 encoding and 0xC20xA9 (\302\251) in UTF-8. */ -#define _ISOC99_SOURCE /* for strtoull */ +#define IMAGE_LICENSING "Dedicated to the public domain per Creative Commons "\ + "license \"CC0 1.0\"; https://creativecommons.org/publicdomain/zero/1.0/" #include <stddef.h> /* for offsetof */ #include <stdlib.h> @@ -82,6 +130,8 @@ #include <ctype.h> #include <math.h> #include <errno.h> +#include <assert.h> +#include <stdint.h> #if defined(HAVE_CONFIG_H) && !defined(PNG_NO_CONFIG_H) # include <config.h> @@ -96,6 +146,25 @@ # include "../../png.h" #endif +#include <zlib.h> + +/* Work round for GCC complaints about casting a (double) function result to + * an unsigned: + */ +static unsigned int +flooru(double d) +{ + d = floor(d); + return (unsigned int)d; +} + +static png_byte +floorb(double d) +{ + d = floor(d); + return (png_byte)d; +} + /* This structure is used for inserting extra chunks (the --insert argument, not * documented above.) */ @@ -107,7 +176,7 @@ typedef struct chunk_insert png_charp parameters[1]; } chunk_insert; -static int +static unsigned int channels_of_type(int color_type) { if (color_type & PNG_COLOR_MASK_PALETTE) @@ -128,14 +197,15 @@ channels_of_type(int color_type) } } -static int +static unsigned int pixel_depth_of_type(int color_type, int bit_depth) { return channels_of_type(color_type) * bit_depth; } static unsigned int -image_size_of_type(int color_type, int bit_depth, unsigned int *colors) +image_size_of_type(int color_type, int bit_depth, unsigned int *colors, + int small) { if (*colors) return 16; @@ -144,7 +214,16 @@ image_size_of_type(int color_type, int bit_depth, unsigned int *colors) { int pixel_depth = pixel_depth_of_type(color_type, bit_depth); - if (pixel_depth < 8) + if (small) + { + if (pixel_depth <= 8) /* there will be one row */ + return 1 << pixel_depth; + + else + return 256; + } + + else if (pixel_depth < 8) return 64; else if (pixel_depth > 16) @@ -217,7 +296,8 @@ generate_palette(png_colorp palette, png_bytep trans, int bit_depth, else { unsigned int size = 1U << (bit_depth/2); /* 2, 4 or 16 */ - unsigned int x, y, ip; + unsigned int x, y; + volatile unsigned int ip = 0; for (x=0; x<size; ++x) for (y=0; y<size; ++y) { @@ -281,7 +361,7 @@ set_value(png_bytep row, size_t rowbytes, png_uint_32 x, unsigned int bit_depth, exit(1); case 16: - value = (unsigned int)floor(65535*pow(value/65535.,conv)+.5); + value = flooru(65535*pow(value/65535.,conv)+.5); *row++ = (png_byte)(value >> 8); *row = (png_byte)value; return; @@ -306,15 +386,148 @@ set_value(png_bytep row, size_t rowbytes, png_uint_32 x, unsigned int bit_depth, } } -static void +static int /* filter mask for row */ generate_row(png_bytep row, size_t rowbytes, unsigned int y, int color_type, int bit_depth, png_const_bytep gamma_table, double conv, - unsigned int *colors) + unsigned int *colors, int small) { - png_uint_32 size_max = image_size_of_type(color_type, bit_depth, colors)-1; + int filters = 0; /* file *MASK*, 0 means the default, not NONE */ + png_uint_32 size_max = + image_size_of_type(color_type, bit_depth, colors, small)-1; png_uint_32 depth_max = (1U << bit_depth)-1; /* up to 65536 */ - if (colors[0] == 0) switch (channels_of_type(color_type)) + if (colors[0] == 0) if (small) + { + unsigned int pixel_depth = pixel_depth_of_type(color_type, bit_depth); + + /* For pixel depths less than 16 generate a single row containing all the + * possible pixel values. For 16 generate all 65536 byte pair + * combinations in a 256x256 pixel array. + */ + switch (pixel_depth) + { + case 1: + assert(y == 0 && rowbytes == 1 && size_max == 1); + row[0] = 0x6CU; /* binary: 01101100, only top 2 bits used */ + filters = PNG_FILTER_NONE; + break; + + case 2: + assert(y == 0 && rowbytes == 1 && size_max == 3); + row[0] = 0x1BU; /* binary 00011011, all bits used */ + filters = PNG_FILTER_NONE; + break; + + case 4: + assert(y == 0 && rowbytes == 8 && size_max == 15); + row[0] = 0x01U; + row[1] = 0x23U; /* SUB gives 0x22U for all following bytes */ + row[2] = 0x45U; + row[3] = 0x67U; + row[4] = 0x89U; + row[5] = 0xABU; + row[6] = 0xCDU; + row[7] = 0xEFU; + filters = PNG_FILTER_SUB; + break; + + case 8: + /* The row will have all the pixel values in order starting with + * '1', the SUB filter will change every byte into '1' (including + * the last, which generates pixel value '0'). Since the SUB filter + * has value 1 this should result in maximum compression. + */ + assert(y == 0 && rowbytes == 256 && size_max == 255); + for (;;) + { + row[size_max] = 0xFFU & (size_max+1); + if (size_max == 0) + break; + --size_max; + } + filters = PNG_FILTER_SUB; + break; + + case 16: + /* Rows are generated such that each row has a constant difference + * between the first and second byte of each pixel and so that the + * difference increases by 1 at each row. The rows start with the + * first byte value of 0 and the value increases to 255 across the + * row. + * + * The difference starts at 1, so the first row is: + * + * 0 1 1 2 2 3 3 4 ... 254 255 255 0 + * + * This means that running the SUB filter on the first row produces: + * + * [SUB==1] 0 1 0 1 0 1... + * + * Then the difference is 2 on the next row, giving: + * + * 0 2 1 3 2 4 3 5 ... 254 0 255 1 + * + * When the UP filter is run on this libpng produces: + * + * [UP ==2] 0 1 0 1 0 1... + * + * And so on for all the remain rows to the final two * rows: + * + * row 254: 0 255 1 0 2 1 3 2 4 3 ... 254 253 255 254 + * row 255: 0 0 1 1 2 2 3 3 4 4 ... 254 254 255 255 + */ + assert(rowbytes == 512 && size_max == 255); + for (;;) + { + row[2*size_max ] = 0xFFU & size_max; + row[2*size_max+1] = 0xFFU & (size_max+y+1); + if (size_max == 0) + break; + --size_max; + } + /* The first row must include PNG_FILTER_UP so that libpng knows we + * need to keep it for the following row: + */ + filters = (y == 0 ? PNG_FILTER_SUB+PNG_FILTER_UP : PNG_FILTER_UP); + break; + + case 24: + case 32: + case 48: + case 64: + /* The rows are filled by an alogorithm similar to the above, in the + * first row pixel bytes are all equal, increasing from 0 by 1 for + * each pixel. In the second row the bytes within a pixel are + * incremented 1,3,5,7,... from the previous row byte. Using an odd + * number ensures all the possible byte values are used. + */ + assert(size_max == 255 && rowbytes == 256*(pixel_depth>>3)); + pixel_depth >>= 3; /* now in bytes */ + while (rowbytes > 0) + { + const size_t pixel_index = --rowbytes/pixel_depth; + + if (y == 0) + row[rowbytes] = 0xFFU & pixel_index; + + else + { + const size_t byte_offset = + rowbytes - pixel_index * pixel_depth; + + row[rowbytes] = + 0xFFU & (pixel_index + (byte_offset * 2*y) + 1); + } + } + filters = (y == 0 ? PNG_FILTER_SUB+PNG_FILTER_UP : PNG_FILTER_UP); + break; + + default: + assert(0/*NOT REACHED*/); + } + } + + else switch (channels_of_type(color_type)) { /* 1 channel: a square image with a diamond, the least luminous colors are on * the edge of the image, the most luminous in the center. @@ -526,6 +739,8 @@ generate_row(png_bytep row, size_t rowbytes, unsigned int y, int color_type, colors[0], channels_of_type(color_type)); exit(1); } + + return filters; } @@ -554,7 +769,7 @@ makepng_error(png_structp png_ptr, png_const_charp message) static int /* 0 on success, else an error code */ write_png(const char **name, FILE *fp, int color_type, int bit_depth, volatile png_fixed_point gamma, chunk_insert * volatile insert, - unsigned int filters, unsigned int *colors) + unsigned int filters, unsigned int *colors, int small, int tRNS) { png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, name, makepng_error, makepng_warning); @@ -581,6 +796,15 @@ write_png(const char **name, FILE *fp, int color_type, int bit_depth, /* Allow benign errors so that we can write PNGs with errors */ png_set_benign_errors(png_ptr, 1/*allowed*/); + + /* Max out the text compression level in an attempt to make the license + * small. If --small then do the same for the IDAT. + */ + if (small) + png_set_compression_level(png_ptr, Z_BEST_COMPRESSION); + + png_set_text_compression_level(png_ptr, Z_BEST_COMPRESSION); + png_init_io(png_ptr, fp); info_ptr = png_create_info_struct(png_ptr); @@ -588,11 +812,37 @@ write_png(const char **name, FILE *fp, int color_type, int bit_depth, png_error(png_ptr, "OOM allocating info structure"); { - unsigned int size = image_size_of_type(color_type, bit_depth, colors); + const unsigned int size = + image_size_of_type(color_type, bit_depth, colors, small); + unsigned int ysize; png_fixed_point real_gamma = 45455; /* For sRGB */ png_byte gamma_table[256]; double conv; + /* Normally images are square, but with 'small' we want to simply generate + * all the pixel values, or all that we reasonably can: + */ + if (small) + { + const unsigned int pixel_depth = + pixel_depth_of_type(color_type, bit_depth); + + if (pixel_depth <= 8U) + { + assert(size == (1U<<pixel_depth)); + ysize = 1U; + } + + else + { + assert(size == 256U); + ysize = 256U; + } + } + + else + ysize = size; + /* This function uses the libpng values used on read to carry extra * information about the gamma: */ @@ -625,13 +875,13 @@ write_png(const char **name, FILE *fp, int color_type, int bit_depth, gamma_table[0] = 0; for (i=1; i<255; ++i) - gamma_table[i] = (png_byte)floor(pow(i/255.,conv) * 255 + .5); + gamma_table[i] = floorb(pow(i/255.,conv) * 255 + .5); gamma_table[255] = 255; } } - png_set_IHDR(png_ptr, info_ptr, size, size, bit_depth, color_type, + png_set_IHDR(png_ptr, info_ptr, size, ysize, bit_depth, color_type, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); if (color_type & PNG_COLOR_MASK_PALETTE) @@ -643,14 +893,26 @@ write_png(const char **name, FILE *fp, int color_type, int bit_depth, npalette = generate_palette(palette, trans, bit_depth, gamma_table, colors); png_set_PLTE(png_ptr, info_ptr, palette, npalette); - png_set_tRNS(png_ptr, info_ptr, trans, npalette-1, - NULL/*transparent color*/); + + if (tRNS) + png_set_tRNS(png_ptr, info_ptr, trans, npalette-1, + NULL/*transparent color*/); /* Reset gamma_table to prevent the image rows being changed */ for (npalette=0; npalette<256; ++npalette) gamma_table[npalette] = (png_byte)npalette; } + else if (tRNS) + { + png_color_16 col; + + col.red = col.green = col.blue = col.gray = + 0x0101U & ((1U<<bit_depth)-1U); + col.index = 0U; + png_set_tRNS(png_ptr, info_ptr, NULL/*trans*/, 1U, &col); + } + if (gamma == PNG_DEFAULT_sRGB) png_set_sRGB(png_ptr, info_ptr, PNG_sRGB_INTENT_ABSOLUTE); @@ -682,7 +944,11 @@ write_png(const char **name, FILE *fp, int color_type, int bit_depth, png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, filters); { - int passes = png_set_interlace_handling(png_ptr); +# ifdef PNG_WRITE_INTERLACING_SUPPORTED + int passes = png_set_interlace_handling(png_ptr); +# else /* !WRITE_INTERLACING */ + int passes = 1; +# endif /* !WRITE_INTERLACING */ int pass; png_size_t rowbytes = png_get_rowbytes(png_ptr, info_ptr); @@ -695,10 +961,15 @@ write_png(const char **name, FILE *fp, int color_type, int bit_depth, { unsigned int y; - for (y=0; y<size; ++y) + for (y=0; y<ysize; ++y) { - generate_row(row, rowbytes, y, color_type, bit_depth, - gamma_table, conv, colors); + unsigned int row_filters = + generate_row(row, rowbytes, y, color_type, bit_depth, + gamma_table, conv, colors, small); + + if (row_filters != 0 && filters == PNG_ALL_FILTERS) + png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, row_filters); + png_write_row(png_ptr, row); } } @@ -827,7 +1098,7 @@ static png_size_t load_fake(png_charp param, png_bytepp profile) { char *endptr = NULL; - unsigned long long int size = strtoull(param, &endptr, 0/*base*/); + uint64_t size = strtoull(param, &endptr, 0/*base*/); /* The 'fake' format is <number>*[string] */ if (endptr != NULL && *endptr == '*') @@ -1062,7 +1333,8 @@ insert_iTXt(png_structp png_ptr, png_infop info_ptr, int nparams, } static void -insert_hIST(png_structp png_ptr, png_infop info_ptr, int nparams, png_charpp params) +insert_hIST(png_structp png_ptr, png_infop info_ptr, int nparams, + png_charpp params) { int i; png_uint_16 freq[256]; @@ -1089,6 +1361,56 @@ insert_hIST(png_structp png_ptr, png_infop info_ptr, int nparams, png_charpp par png_set_hIST(png_ptr, info_ptr, freq); } +static png_byte +bval(png_const_structrp png_ptr, png_charp param, unsigned int maxval) +{ + char *endptr = NULL; + unsigned long int l = strtoul(param, &endptr, 0/*base*/); + + if (param[0] && *endptr == 0 && l <= maxval) + return (png_byte)l; + + else + png_error(png_ptr, "sBIT: invalid sBIT value"); +} + +static void +insert_sBIT(png_structp png_ptr, png_infop info_ptr, int nparams, + png_charpp params) +{ + const int ct = png_get_color_type(png_ptr, info_ptr); + const int c = (ct & PNG_COLOR_MASK_COLOR ? 3 : 1) + + (ct & PNG_COLOR_MASK_ALPHA ? 1 : 0); + const unsigned int maxval = + ct & PNG_COLOR_MASK_PALETTE ? 8U : png_get_bit_depth(png_ptr, info_ptr); + png_color_8 sBIT; + + if (nparams != c) + png_error(png_ptr, "sBIT: incorrect parameter count"); + + if (ct & PNG_COLOR_MASK_COLOR) + { + sBIT.red = bval(png_ptr, params[0], maxval); + sBIT.green = bval(png_ptr, params[1], maxval); + sBIT.blue = bval(png_ptr, params[2], maxval); + sBIT.gray = 42; + } + + else + { + sBIT.red = sBIT.green = sBIT.blue = 42; + sBIT.gray = bval(png_ptr, params[0], maxval); + } + + if (ct & PNG_COLOR_MASK_ALPHA) + sBIT.alpha = bval(png_ptr, params[nparams-1], maxval); + + else + sBIT.alpha = 42; + + png_set_sBIT(png_ptr, info_ptr, &sBIT); +} + #if 0 static void insert_sPLT(png_structp png_ptr, png_infop info_ptr, int nparams, png_charpp params) @@ -1216,6 +1538,11 @@ find_insert(png_const_charp what, png_charp param) return make_insert(what, insert_hIST, nparams, parameter_list); break; + case CHUNK(115,66,73,84): /* sBIT */ + if (nparams <= 4) + return make_insert(what, insert_sBIT, nparams, parameter_list); + break; + #if 0 case CHUNK(115,80,76,84): /* sPLT */ return make_insert(what, insert_sPLT, nparams, parameter_list); @@ -1231,6 +1558,80 @@ find_insert(png_const_charp what, png_charp param) return NULL; } +/* This is necessary because libpng expects writeable strings for things like + * text chunks (maybe this should be fixed...) + */ +static png_charp +strstash(png_const_charp foo) +{ + /* The program indicates a memory allocation error by crashing, this is by + * design. + */ + if (foo != NULL) + { + png_charp bar = malloc(strlen(foo)+1); + return strcpy(bar, foo); + } + + return NULL; +} + +static png_charp +strstash_list(const png_const_charp *text) +{ + size_t foo = 0; + png_charp result, bar; + const png_const_charp *line = text; + + while (*line != NULL) + foo += strlen(*line++); + + result = bar = malloc(foo+1); + + line = text; + while (*line != NULL) + { + foo = strlen(*line); + memcpy(bar, *line++, foo); + bar += foo; + } + + *bar = 0; + return result; +} + +/* These are used to insert Copyright and Licence fields, they allow the text to + * have \n unlike the --insert option. + */ +static chunk_insert * +add_tEXt(const char *key, const png_const_charp *text) +{ + static char what[5] = { 116, 69, 88, 116, 0 }; + png_charp parameter_list[3]; + + parameter_list[0] = strstash(key); + parameter_list[1] = strstash_list(text); + parameter_list[2] = NULL; + + return make_insert(what, insert_tEXt, 2, parameter_list); +} + +static chunk_insert * +add_iTXt(const char *key, const char *language, const char *language_key, + const png_const_charp *text) +{ + static char what[5] = { 105, 84, 88, 116, 0 }; + png_charp parameter_list[5]; + + parameter_list[0] = strstash(key); + parameter_list[1] = strstash(language); + parameter_list[2] = strstash(language_key); + parameter_list[3] = strstash_list(text); + parameter_list[4] = NULL; + + return make_insert(what, insert_iTXt, 4, parameter_list); +} + /* This is a not-very-good parser for a sequence of numbers (including 0). It * doesn't accept some apparently valid things, but it accepts all the sensible * combinations. @@ -1280,6 +1681,8 @@ main(int argc, char **argv) const char *file_name = NULL; int color_type = 8; /* invalid */ int bit_depth = 32; /* invalid */ + int small = 0; /* make full size images */ + int tRNS = 0; /* don't output a tRNS chunk */ unsigned int colors[5]; unsigned int filters = PNG_ALL_FILTERS; png_fixed_point gamma = 0; /* not set */ @@ -1292,6 +1695,18 @@ main(int argc, char **argv) { char *arg = *++argv; + if (strcmp(arg, "--small") == 0) + { + small = 1; + continue; + } + + if (strcmp(arg, "--tRNS") == 0) + { + tRNS = 1; + continue; + } + if (strcmp(arg, "--sRGB") == 0) { gamma = PNG_DEFAULT_sRGB; @@ -1432,9 +1847,10 @@ main(int argc, char **argv) if (color_type == 8 || bit_depth == 32) { - fprintf(stderr, "usage: makepng [--sRGB|--linear|--1.8] " + fprintf(stderr, "usage: makepng [--small] [--sRGB|--linear|--1.8] " "[--color=...] color-type bit-depth [file-name]\n" - " Make a test PNG file, by default writes to stdout.\n"); + " Make a test PNG file, by default writes to stdout.\n" + " Other options are available, UTSL.\n"); exit(1); } @@ -1453,10 +1869,19 @@ main(int argc, char **argv) } } + /* small and colors are incomparible (will probably crash if both are used at + * the same time!) + */ + if (small && colors[0] != 0) + { + fprintf(stderr, "makepng: --color --small: only one at a time!\n"); + exit(1); + } + /* Restrict the filters for more speed to those we know are used for the * generated images. */ - if (filters == PNG_ALL_FILTERS) + if (filters == PNG_ALL_FILTERS && !small/*small provides defaults*/) { if ((color_type & PNG_COLOR_MASK_PALETTE) != 0 || bit_depth < 8) filters = PNG_FILTER_NONE; @@ -1474,9 +1899,39 @@ main(int argc, char **argv) filters &= ~PNG_FILTER_NONE; } + /* Insert standard copyright and licence text. */ + { + static png_const_charp copyright[] = + { + COPYRIGHT, /* ISO-Latin-1 */ + NULL + }; + static png_const_charp licensing[] = + { + IMAGE_LICENSING, /* UTF-8 */ + NULL + }; + + chunk_insert *new_insert; + + new_insert = add_tEXt("Copyright", copyright); + if (new_insert != NULL) + { + *insert_ptr = new_insert; + insert_ptr = &new_insert->next; + } + + new_insert = add_iTXt("Licensing", "en", NULL, licensing); + if (new_insert != NULL) + { + *insert_ptr = new_insert; + insert_ptr = &new_insert->next; + } + } + { int ret = write_png(&file_name, fp, color_type, bit_depth, gamma, - head_insert, filters, colors); + head_insert, filters, colors, small, tRNS); if (ret != 0 && file_name != NULL) remove(file_name); diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/pngimage.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngimage.c index 180cf0a16cb..442b2f43001 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/pngimage.c +++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngimage.c @@ -2,7 +2,7 @@ * * Copyright (c) 2015 John Cunningham Bowler * - * Last changed in libpng 1.6.18 [July 23, 2015] + * Last changed in libpng 1.6.20 [December 3, 2015] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer @@ -36,7 +36,8 @@ # include <setjmp.h> /* because png.h did *not* include this */ #endif -#if defined(PNG_INFO_IMAGE_SUPPORTED) && defined(PNG_SEQUENTIAL_READ_SUPPORTED) +#if defined(PNG_INFO_IMAGE_SUPPORTED) && defined(PNG_SEQUENTIAL_READ_SUPPORTED)\ + && (defined(PNG_READ_PNG_SUPPORTED) || PNG_LIBPNG_VER < 10700) /* If a transform is valid on both read and write this implies that if the * transform is applied to read it must also be applied on write to produce * meaningful data. This is because these transforms when performed on read @@ -236,10 +237,12 @@ static struct transform_info */ #endif #ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED - T(SCALE_16, NONE, X, X, 16, R) + T(SCALE_16, NONE, X, X, 16, R), /* scales 16-bit components to 8-bits. */ #endif + { NULL /*name*/, 0, 0, 0, 0, 0, 0, 0/*!tested*/ } + #undef T }; @@ -294,7 +297,7 @@ transform_name(int t) t &= -t; /* first set bit */ - for (i=0; i<TTABLE_SIZE; ++i) + for (i=0; i<TTABLE_SIZE; ++i) if (transform_info[i].name != NULL) { if ((transform_info[i].transform & t) != 0) return transform_info[i].name; @@ -315,7 +318,7 @@ validate_T(void) { unsigned int i; - for (i=0; i<TTABLE_SIZE; ++i) + for (i=0; i<TTABLE_SIZE; ++i) if (transform_info[i].name != NULL) { if (transform_info[i].when & TRANSFORM_R) read_transforms |= transform_info[i].transform; @@ -505,6 +508,7 @@ typedef enum #define SKIP_BUGS 0x100 /* Skip over known bugs */ #define LOG_SKIPPED 0x200 /* Log skipped bugs */ #define FIND_BAD_COMBOS 0x400 /* Attempt to deduce bad combos */ +#define LIST_COMBOS 0x800 /* List combos by name */ /* Result masks apply to the result bits in the 'results' field below; these * bits are simple 1U<<error_level. A pass requires either nothing worse than @@ -690,7 +694,35 @@ display_log(struct display *dp, error_level level, const char *fmt, ...) int tr = dp->transforms; if (is_combo(tr)) - fprintf(stderr, "(0x%x)", tr); + { + if (dp->options & LIST_COMBOS) + { + int trx = tr; + + fprintf(stderr, "("); + if (trx) + { + int start = 0; + + while (trx) + { + int trz = trx & -trx; + + if (start) fprintf(stderr, "+"); + fprintf(stderr, "%s", transform_name(trz)); + start = 1; + trx &= ~trz; + } + } + + else + fprintf(stderr, "-"); + fprintf(stderr, ")"); + } + + else + fprintf(stderr, "(0x%x)", tr); + } else fprintf(stderr, "(%s)", transform_name(tr)); @@ -910,13 +942,13 @@ update_display(struct display *dp) int bd = dp->bit_depth; unsigned int i; - for (i=0; i<TTABLE_SIZE; ++i) + for (i=0; i<TTABLE_SIZE; ++i) if (transform_info[i].name != NULL) { int transform = transform_info[i].transform; if ((transform_info[i].valid_chunks == 0 || (transform_info[i].valid_chunks & chunks) != 0) && - (transform_info[i].color_mask_required & ct) == + (transform_info[i].color_mask_required & ct) == transform_info[i].color_mask_required && (transform_info[i].color_mask_absent & ct) == 0 && (transform_info[i].bit_depths & bd) != 0 && @@ -935,9 +967,6 @@ update_display(struct display *dp) dp->active_transforms = active; dp->ignored_transforms = inactive; /* excluding write-only transforms */ - - if (active == 0) - display_log(dp, INTERNAL_ERROR, "bad transform table"); } } @@ -977,7 +1006,7 @@ compare_read(struct display *dp, int applied_transforms) { unsigned long chunks = png_get_valid(dp->read_pp, dp->read_ip, 0xffffffff); - + if (chunks != dp->chunks) display_log(dp, APP_FAIL, "PNG chunks changed from 0x%lx to 0x%lx", (unsigned long)dp->chunks, chunks); @@ -1588,6 +1617,12 @@ main(const int argc, const char * const * const argv) else if (strcmp(name, "--nofind-bad-combos") == 0) d.options &= ~FIND_BAD_COMBOS; + else if (strcmp(name, "--list-combos") == 0) + d.options |= LIST_COMBOS; + + else if (strcmp(name, "--nolist-combos") == 0) + d.options &= ~LIST_COMBOS; + else if (name[0] == '-' && name[1] == '-') { fprintf(stderr, "pngimage: %s: unknown option\n", name); @@ -1642,7 +1677,7 @@ main(const int argc, const char * const * const argv) return errors != 0; } } -#else /* !PNG_INFO_IMAGE_SUPPORTED || !PNG_READ_SUPPORTED */ +#else /* !INFO_IMAGE || !SEQUENTIAL_READ || !READ_PNG*/ int main(void) { diff --git a/Build/source/libs/libpng/libpng-src/contrib/libtests/pngstest-errors.h b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngstest-errors.h new file mode 100644 index 00000000000..3356f1c46ff --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngstest-errors.h @@ -0,0 +1,165 @@ +/* contrib/libtests/pngstest-errors.h + * + * BUILT USING: libpng version 1.6.19beta03 - September 25, 2015 + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * THIS IS A MACHINE GENERATED FILE: do not edit it directly! + * Instead run: + * + * pngstest --accumulate + * + * on as many PNG files as possible; at least PNGSuite and + * contrib/libtests/testpngs. + */ +static png_uint_16 gpc_error[16/*in*/][16/*out*/][4/*a*/] = +{ + { /* input: sRGB-gray */ + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 372, 0 }, { 0, 0, 372, 0 }, { 0, 0, 372, 0 }, { 0, 0, 372, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } + }, { /* input: sRGB-gray+alpha */ + { 0, 19, 0, 0 }, { 0, 0, 0, 0 }, { 0, 20, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 897, 788, 0 }, { 0, 897, 788, 0 }, { 0, 897, 788, 0 }, { 0, 897, 788, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } + }, { /* input: sRGB-rgb */ + { 0, 0, 19, 0 }, { 0, 0, 19, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 893, 0 }, { 0, 0, 893, 0 }, { 0, 0, 811, 0 }, { 0, 0, 811, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } + }, { /* input: sRGB-rgb+alpha */ + { 0, 16, 17, 0 }, { 0, 17, 17, 0 }, { 0, 19, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 850, 875, 0 }, { 0, 850, 875, 0 }, { 0, 897, 788, 0 }, { 0, 897, 788, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } + }, { /* input: linear-gray */ + { 0, 0, 9, 0 }, { 0, 0, 9, 0 }, { 0, 0, 9, 0 }, { 0, 0, 9, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } + }, { /* input: linear-gray+alpha */ + { 0, 74, 9, 0 }, { 0, 20, 9, 0 }, { 0, 74, 9, 0 }, { 0, 20, 9, 0 }, + { 0, 0, 0, 0 }, { 0, 1, 0, 0 }, { 0, 0, 0, 0 }, { 0, 1, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } + }, { /* input: linear-rgb */ + { 0, 0, 9, 0 }, { 0, 0, 9, 0 }, { 0, 0, 9, 0 }, { 0, 0, 9, 0 }, + { 0, 0, 4, 0 }, { 0, 0, 4, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } + }, { /* input: linear-rgb+alpha */ + { 0, 126, 143, 0 }, { 0, 11, 7, 0 }, { 0, 74, 9, 0 }, { 0, 17, 9, 0 }, + { 0, 4, 4, 0 }, { 0, 5, 4, 0 }, { 0, 0, 0, 0 }, { 0, 1, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } + }, { /* input: color-mapped-sRGB-gray */ + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } + }, { /* input: color-mapped-sRGB-gray+alpha */ + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } + }, { /* input: color-mapped-sRGB-rgb */ + { 0, 0, 13, 0 }, { 0, 0, 13, 0 }, { 0, 0, 9, 0 }, { 0, 0, 9, 0 }, + { 0, 0, 673, 0 }, { 0, 0, 673, 0 }, { 0, 0, 674, 0 }, { 0, 0, 674, 0 }, + { 0, 0, 1, 0 }, { 0, 0, 1, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 460, 0 }, { 0, 0, 460, 0 }, { 0, 0, 263, 0 }, { 0, 0, 263, 0 } + }, { /* input: color-mapped-sRGB-rgb+alpha */ + { 0, 6, 8, 0 }, { 0, 7, 8, 0 }, { 0, 75, 9, 0 }, { 0, 9, 9, 0 }, + { 0, 585, 427, 0 }, { 0, 585, 427, 0 }, { 0, 717, 514, 0 }, { 0, 717, 514, 0 }, + { 0, 1, 1, 0 }, { 0, 1, 1, 0 }, { 0, 1, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 13323, 460, 0 }, { 0, 427, 460, 0 }, { 0, 16480, 263, 0 }, { 0, 243, 263, 0 } + }, { /* input: color-mapped-linear-gray */ + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 282, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } + }, { /* input: color-mapped-linear-gray+alpha */ + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 253, 282, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } + }, { /* input: color-mapped-linear-rgb */ + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 265, 0 }, { 0, 0, 0, 0 } + }, { /* input: color-mapped-linear-rgb+alpha */ + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 243, 265, 0 } + } +}; +static png_uint_16 gpc_error_via_linear[16][4/*out*/][4] = +{ + { /* input: sRGB-gray */ + { 0, 0, 7, 0 }, { 0, 0, 7, 0 }, { 0, 0, 7, 0 }, { 0, 0, 7, 0 } + }, { /* input: sRGB-gray+alpha */ + { 0, 15, 15, 0 }, { 0, 186, 15, 0 }, { 0, 15, 15, 0 }, { 0, 186, 15, 0 } + }, { /* input: sRGB-rgb */ + { 0, 0, 20, 0 }, { 0, 0, 20, 0 }, { 0, 0, 15, 0 }, { 0, 0, 15, 0 } + }, { /* input: sRGB-rgb+alpha */ + { 0, 16, 17, 0 }, { 0, 187, 17, 0 }, { 0, 15, 15, 0 }, { 0, 186, 15, 0 } + }, { /* input: linear-gray */ + { 0, 0, 1, 0 }, { 0, 0, 1, 0 }, { 0, 0, 1, 0 }, { 0, 0, 1, 0 } + }, { /* input: linear-gray+alpha */ + { 0, 1, 1, 0 }, { 0, 1, 1, 0 }, { 0, 1, 1, 0 }, { 0, 1, 1, 0 } + }, { /* input: linear-rgb */ + { 0, 0, 1, 0 }, { 0, 0, 1, 0 }, { 0, 0, 1, 0 }, { 0, 0, 1, 0 } + }, { /* input: linear-rgb+alpha */ + { 0, 1, 1, 0 }, { 0, 9, 1, 0 }, { 0, 1, 1, 0 }, { 0, 1, 1, 0 } + }, { /* input: color-mapped-sRGB-gray */ + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } + }, { /* input: color-mapped-sRGB-gray+alpha */ + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } + }, { /* input: color-mapped-sRGB-rgb */ + { 0, 0, 13, 0 }, { 0, 0, 13, 0 }, { 0, 0, 14, 0 }, { 0, 0, 14, 0 } + }, { /* input: color-mapped-sRGB-rgb+alpha */ + { 0, 4, 8, 0 }, { 0, 9, 8, 0 }, { 0, 9, 5, 0 }, { 0, 32, 5, 0 } + }, { /* input: color-mapped-linear-gray */ + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } + }, { /* input: color-mapped-linear-gray+alpha */ + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } + }, { /* input: color-mapped-linear-rgb */ + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } + }, { /* input: color-mapped-linear-rgb+alpha */ + { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } + } +}; +static png_uint_16 gpc_error_to_colormap[8/*i*/][8/*o*/][4] = +{ + { /* input: sRGB-gray */ + { 0, 0, 9, 0 }, { 0, 0, 9, 0 }, { 0, 0, 9, 0 }, { 0, 0, 9, 0 }, + { 0, 0, 560, 0 }, { 0, 0, 560, 0 }, { 0, 0, 560, 0 }, { 0, 0, 560, 0 } + }, { /* input: sRGB-gray+alpha */ + { 0, 19, 9, 0 }, { 0, 255, 9, 25 }, { 0, 88, 9, 0 }, { 0, 255, 9, 25 }, + { 0, 1012, 928, 0 }, { 0, 16026, 928, 6425 }, { 0, 1012, 928, 0 }, { 0, 16026, 928, 6425 } + }, { /* input: sRGB-rgb */ + { 0, 0, 19, 0 }, { 0, 0, 19, 0 }, { 0, 0, 25, 0 }, { 0, 0, 25, 0 }, + { 0, 0, 962, 0 }, { 0, 0, 962, 0 }, { 0, 0, 13677, 0 }, { 0, 0, 13677, 0 } + }, { /* input: sRGB-rgb+alpha */ + { 0, 63, 77, 0 }, { 0, 255, 19, 25 }, { 0, 225, 25, 0 }, { 0, 255, 25, 67 }, + { 0, 17534, 18491, 0 }, { 0, 15736, 2824, 6425 }, { 0, 14019, 13677, 0 }, { 0, 50115, 13677, 17219 } + }, { /* input: linear-gray */ + { 0, 0, 73, 0 }, { 0, 0, 73, 0 }, { 0, 0, 73, 0 }, { 0, 0, 73, 0 }, + { 0, 0, 18817, 0 }, { 0, 0, 18817, 0 }, { 0, 0, 18817, 0 }, { 0, 0, 18817, 0 } + }, { /* input: linear-gray+alpha */ + { 0, 74, 74, 0 }, { 0, 255, 74, 25 }, { 0, 99, 74, 0 }, { 0, 255, 74, 25 }, + { 0, 18919, 18907, 0 }, { 0, 24549, 18907, 6553 }, { 0, 18919, 18907, 0 }, { 0, 24549, 18907, 6553 } + }, { /* input: linear-rgb */ + { 0, 0, 73, 0 }, { 0, 0, 73, 0 }, { 0, 0, 98, 0 }, { 0, 0, 98, 0 }, + { 0, 0, 18664, 0 }, { 0, 0, 18664, 0 }, { 0, 0, 24998, 0 }, { 0, 0, 24998, 0 } + }, { /* input: linear-rgb+alpha */ + { 0, 181, 196, 0 }, { 0, 255, 61, 25 }, { 206, 187, 98, 0 }, { 0, 255, 98, 67 }, + { 0, 18141, 18137, 0 }, { 0, 17494, 17504, 6553 }, { 0, 24979, 24992, 0 }, { 0, 49172, 24992, 17347 } + } +}; +/* END MACHINE GENERATED */ diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/pngstest.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngstest.c index 5a080b46edd..3374c7202fa 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/pngstest.c +++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngstest.c @@ -3,7 +3,7 @@ * * Copyright (c) 2013-2015 John Cunningham Bowler * - * Last changed in libpng 1.6.18 [July 23, 2015] + * Last changed in libpng 1.6.19 [(PENDING RELEASE)] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer @@ -1984,156 +1984,7 @@ static void (* const gpc_fn_colormapped[8/*in*/][8/*out*/]) * gpc_error_to_colormap. */ #if PNG_FORMAT_FLAG_COLORMAP == 8 /* extra check also required */ -/* START MACHINE GENERATED */ -static png_uint_16 gpc_error[16/*in*/][16/*out*/][4/*a*/] = -{ - { /* input: sRGB-gray */ - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 372, 0 }, { 0, 0, 372, 0 }, { 0, 0, 372, 0 }, { 0, 0, 372, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } - }, { /* input: sRGB-gray+alpha */ - { 0, 18, 0, 0 }, { 0, 0, 0, 0 }, { 0, 20, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 897, 788, 0 }, { 0, 897, 788, 0 }, { 0, 897, 788, 0 }, { 0, 897, 788, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } - }, { /* input: sRGB-rgb */ - { 0, 0, 19, 0 }, { 0, 0, 19, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 893, 0 }, { 0, 0, 893, 0 }, { 0, 0, 811, 0 }, { 0, 0, 811, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } - }, { /* input: sRGB-rgb+alpha */ - { 0, 4, 13, 0 }, { 0, 14, 13, 0 }, { 0, 19, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 832, 764, 0 }, { 0, 832, 764, 0 }, { 0, 897, 788, 0 }, { 0, 897, 788, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } - }, { /* input: linear-gray */ - { 0, 0, 9, 0 }, { 0, 0, 9, 0 }, { 0, 0, 9, 0 }, { 0, 0, 9, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } - }, { /* input: linear-gray+alpha */ - { 0, 74, 9, 0 }, { 0, 20, 9, 0 }, { 0, 74, 9, 0 }, { 0, 20, 9, 0 }, - { 0, 0, 0, 0 }, { 0, 1, 0, 0 }, { 0, 0, 0, 0 }, { 0, 1, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } - }, { /* input: linear-rgb */ - { 0, 0, 9, 0 }, { 0, 0, 9, 0 }, { 0, 0, 9, 0 }, { 0, 0, 9, 0 }, - { 0, 0, 4, 0 }, { 0, 0, 4, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } - }, { /* input: linear-rgb+alpha */ - { 0, 126, 143, 0 }, { 0, 9, 7, 0 }, { 0, 74, 9, 0 }, { 0, 16, 9, 0 }, - { 0, 4, 4, 0 }, { 0, 5, 4, 0 }, { 0, 0, 0, 0 }, { 0, 1, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } - }, { /* input: color-mapped-sRGB-gray */ - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } - }, { /* input: color-mapped-sRGB-gray+alpha */ - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } - }, { /* input: color-mapped-sRGB-rgb */ - { 0, 0, 13, 0 }, { 0, 0, 13, 0 }, { 0, 0, 8, 0 }, { 0, 0, 8, 0 }, - { 0, 0, 673, 0 }, { 0, 0, 673, 0 }, { 0, 0, 674, 0 }, { 0, 0, 674, 0 }, - { 0, 0, 1, 0 }, { 0, 0, 1, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 460, 0 }, { 0, 0, 460, 0 }, { 0, 0, 263, 0 }, { 0, 0, 263, 0 } - }, { /* input: color-mapped-sRGB-rgb+alpha */ - { 0, 6, 8, 0 }, { 0, 7, 8, 0 }, { 0, 75, 8, 0 }, { 0, 9, 8, 0 }, - { 0, 585, 427, 0 }, { 0, 585, 427, 0 }, { 0, 717, 409, 0 }, { 0, 717, 409, 0 }, - { 0, 1, 1, 0 }, { 0, 1, 1, 0 }, { 0, 1, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 13323, 460, 0 }, { 0, 334, 460, 0 }, { 0, 16480, 263, 0 }, { 0, 243, 263, 0 } - }, { /* input: color-mapped-linear-gray */ - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 282, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } - }, { /* input: color-mapped-linear-gray+alpha */ - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 253, 282, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } - }, { /* input: color-mapped-linear-rgb */ - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 265, 0 }, { 0, 0, 0, 0 } - }, { /* input: color-mapped-linear-rgb+alpha */ - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 243, 265, 0 } - } -}; -static png_uint_16 gpc_error_via_linear[16][4/*out*/][4] = -{ - { /* input: sRGB-gray */ - { 0, 0, 7, 0 }, { 0, 0, 7, 0 }, { 0, 0, 7, 0 }, { 0, 0, 7, 0 } - }, { /* input: sRGB-gray+alpha */ - { 0, 15, 15, 0 }, { 0, 186, 15, 0 }, { 0, 15, 15, 0 }, { 0, 186, 15, 0 } - }, { /* input: sRGB-rgb */ - { 0, 0, 19, 0 }, { 0, 0, 19, 0 }, { 0, 0, 15, 0 }, { 0, 0, 15, 0 } - }, { /* input: sRGB-rgb+alpha */ - { 0, 12, 14, 0 }, { 0, 180, 14, 0 }, { 0, 14, 15, 0 }, { 0, 186, 15, 0 } - }, { /* input: linear-gray */ - { 0, 0, 1, 0 }, { 0, 0, 1, 0 }, { 0, 0, 1, 0 }, { 0, 0, 1, 0 } - }, { /* input: linear-gray+alpha */ - { 0, 1, 1, 0 }, { 0, 1, 1, 0 }, { 0, 1, 1, 0 }, { 0, 1, 1, 0 } - }, { /* input: linear-rgb */ - { 0, 0, 1, 0 }, { 0, 0, 1, 0 }, { 0, 0, 1, 0 }, { 0, 0, 1, 0 } - }, { /* input: linear-rgb+alpha */ - { 0, 1, 1, 0 }, { 0, 8, 1, 0 }, { 0, 1, 1, 0 }, { 0, 1, 1, 0 } - }, { /* input: color-mapped-sRGB-gray */ - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } - }, { /* input: color-mapped-sRGB-gray+alpha */ - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } - }, { /* input: color-mapped-sRGB-rgb */ - { 0, 0, 13, 0 }, { 0, 0, 13, 0 }, { 0, 0, 14, 0 }, { 0, 0, 14, 0 } - }, { /* input: color-mapped-sRGB-rgb+alpha */ - { 0, 4, 8, 0 }, { 0, 9, 8, 0 }, { 0, 8, 3, 0 }, { 0, 32, 3, 0 } - }, { /* input: color-mapped-linear-gray */ - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } - }, { /* input: color-mapped-linear-gray+alpha */ - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } - }, { /* input: color-mapped-linear-rgb */ - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } - }, { /* input: color-mapped-linear-rgb+alpha */ - { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } - } -}; -static png_uint_16 gpc_error_to_colormap[8/*i*/][8/*o*/][4] = -{ - { /* input: sRGB-gray */ - { 0, 0, 9, 0 }, { 0, 0, 9, 0 }, { 0, 0, 9, 0 }, { 0, 0, 9, 0 }, - { 0, 0, 560, 0 }, { 0, 0, 560, 0 }, { 0, 0, 560, 0 }, { 0, 0, 560, 0 } - }, { /* input: sRGB-gray+alpha */ - { 0, 19, 2, 0 }, { 0, 255, 2, 25 }, { 0, 88, 2, 0 }, { 0, 255, 2, 25 }, - { 0, 1012, 745, 0 }, { 0, 16026, 745, 6425 }, { 0, 1012, 745, 0 }, { 0, 16026, 745, 6425 } - }, { /* input: sRGB-rgb */ - { 0, 0, 19, 0 }, { 0, 0, 19, 0 }, { 0, 0, 25, 0 }, { 0, 0, 25, 0 }, - { 0, 0, 937, 0 }, { 0, 0, 937, 0 }, { 0, 0, 13677, 0 }, { 0, 0, 13677, 0 } - }, { /* input: sRGB-rgb+alpha */ - { 0, 63, 77, 0 }, { 0, 255, 19, 25 }, { 0, 220, 25, 0 }, { 0, 255, 25, 67 }, - { 0, 17534, 18491, 0 }, { 0, 15614, 2824, 6425 }, { 0, 14019, 13677, 0 }, { 0, 48573, 13677, 17219 } - }, { /* input: linear-gray */ - { 0, 0, 73, 0 }, { 0, 0, 73, 0 }, { 0, 0, 73, 0 }, { 0, 0, 73, 0 }, - { 0, 0, 18817, 0 }, { 0, 0, 18817, 0 }, { 0, 0, 18817, 0 }, { 0, 0, 18817, 0 } - }, { /* input: linear-gray+alpha */ - { 0, 74, 74, 0 }, { 0, 255, 74, 25 }, { 0, 97, 74, 0 }, { 0, 255, 74, 25 }, - { 0, 18919, 18907, 0 }, { 0, 24549, 18907, 6552 }, { 0, 18919, 18907, 0 }, { 0, 24549, 18907, 6552 } - }, { /* input: linear-rgb */ - { 0, 0, 73, 0 }, { 0, 0, 73, 0 }, { 0, 0, 98, 0 }, { 0, 0, 98, 0 }, - { 0, 0, 18664, 0 }, { 0, 0, 18664, 0 }, { 0, 0, 24998, 0 }, { 0, 0, 24998, 0 } - }, { /* input: linear-rgb+alpha */ - { 0, 181, 196, 0 }, { 0, 255, 61, 25 }, { 206, 187, 98, 0 }, { 0, 255, 98, 67 }, - { 0, 18141, 18137, 0 }, { 0, 17494, 17504, 6553 }, { 0, 24979, 24992, 0 }, { 0, 46509, 24992, 17347 } - } -}; -/* END MACHINE GENERATED */ +# include "pngstest-errors.h" /* machine generated */ #endif /* COLORMAP flag check */ #endif /* flag checks */ @@ -2154,7 +2005,7 @@ typedef struct int in_opaque; /* Value of input alpha that is opaque */ int is_palette; /* Sample values come from the palette */ int accumulate; /* Accumlate component errors (don't log) */ - int output_8bit; /* Output is 8 bit (else 16 bit) */ + int output_8bit; /* Output is 8-bit (else 16-bit) */ void (*in_gp)(Pixel*, png_const_voidp); void (*out_gp)(Pixel*, png_const_voidp); @@ -3279,7 +3130,7 @@ write_one_file(Image *output, Image *image, int convert_to_8bit) (void) unlink(tmpfile); } #endif - + if (f != NULL) { if (png_image_write_to_stdio(&image->image, f, convert_to_8bit, @@ -3722,6 +3573,23 @@ main(int argc, char **argv) { unsigned int in; + printf("/* contrib/libtests/pngstest-errors.h\n"); + printf(" *\n"); + printf(" * BUILT USING:" PNG_HEADER_VERSION_STRING); + printf(" *\n"); + printf(" * This code is released under the libpng license.\n"); + printf(" * For conditions of distribution and use, see the disclaimer\n"); + printf(" * and license in png.h\n"); + printf(" *\n"); + printf(" * THIS IS A MACHINE GENERATED FILE: do not edit it directly!\n"); + printf(" * Instead run:\n"); + printf(" *\n"); + printf(" * pngstest --accumulate\n"); + printf(" *\n"); + printf(" * on as many PNG files as possible; at least PNGSuite and\n"); + printf(" * contrib/libtests/testpngs.\n"); + printf(" */\n"); + printf("static png_uint_16 gpc_error[16/*in*/][16/*out*/][4/*a*/] =\n"); printf("{\n"); for (in=0; in<16; ++in) @@ -3811,6 +3679,7 @@ main(int argc, char **argv) putchar('\n'); } printf("};\n"); + printf("/* END MACHINE GENERATED */\n"); } if (retval == 0 && touch != NULL) diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/pngunknown.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngunknown.c index 309ee604e59..0d52ff8ab5d 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/pngunknown.c +++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngunknown.c @@ -363,7 +363,7 @@ ancillary(const char *name) return PNG_CHUNK_ANCILLARY(PNG_U32(name[0], name[1], name[2], name[3])); } -#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +#ifdef PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED static int ancillaryb(const png_byte *name) { @@ -554,7 +554,7 @@ read_callback(png_structp pp, png_unknown_chunkp pc) /* However if there is no support to store unknown chunks don't ask libpng to * do it; there will be an png_error. */ -# ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +# ifdef PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED return discard; # else return 1; /*handled; discard*/ @@ -562,7 +562,7 @@ read_callback(png_structp pp, png_unknown_chunkp pc) } #endif /* READ_USER_CHUNKS_SUPPORTED */ -#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +#ifdef PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED static png_uint_32 get_unknown(display *d, png_infop info_ptr, int after_IDAT) { @@ -722,11 +722,17 @@ check(FILE *fp, int argc, const char **argv, png_uint_32p flags/*out*/, * in this case, so we just check the arguments! This could * be improved in the future by using the read callback. */ - png_byte name[5]; - - memcpy(name, chunk_info[chunk].name, 5); - png_set_keep_unknown_chunks(d->png_ptr, option, name, 1); - chunk_info[chunk].keep = option; +# if PNG_LIBPNG_VER >= 10700 &&\ + !defined(PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED) + if (option < PNG_HANDLE_CHUNK_IF_SAFE) +# endif /* 1.7+ SAVE_UNKNOWN_CHUNKS */ + { + png_byte name[5]; + + memcpy(name, chunk_info[chunk].name, 5); + png_set_keep_unknown_chunks(d->png_ptr, option, name, 1); + chunk_info[chunk].keep = option; + } continue; } @@ -735,7 +741,12 @@ check(FILE *fp, int argc, const char **argv, png_uint_32p flags/*out*/, case 7: /* default */ if (memcmp(argv[i], "default", 7) == 0) { - png_set_keep_unknown_chunks(d->png_ptr, option, NULL, 0); +# if PNG_LIBPNG_VER >= 10700 &&\ + !defined(PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED) + if (option < PNG_HANDLE_CHUNK_IF_SAFE) +# endif /* 1.7+ SAVE_UNKNOWN_CHUNKS */ + png_set_keep_unknown_chunks(d->png_ptr, option, NULL, 0); + d->keep = option; continue; } @@ -745,7 +756,12 @@ check(FILE *fp, int argc, const char **argv, png_uint_32p flags/*out*/, case 3: /* all */ if (memcmp(argv[i], "all", 3) == 0) { - png_set_keep_unknown_chunks(d->png_ptr, option, NULL, -1); +# if PNG_LIBPNG_VER >= 10700 &&\ + !defined(PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED) + if (option < PNG_HANDLE_CHUNK_IF_SAFE) +# endif /* 1.7+ SAVE_UNKNOWN_CHUNKS */ + png_set_keep_unknown_chunks(d->png_ptr, option, NULL, -1); + d->keep = option; for (chunk = 0; chunk < NINFO; ++chunk) @@ -1242,4 +1258,4 @@ main(void) /* So the test is skipped: */ return 77; } -#endif /* SET_UNKNOWN_CHUNKS && READ */ +#endif /* SET_UNKNOWN_CHUNKS && READ*/ diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/pngvalid.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngvalid.c index 1efab64538a..bdd3c9188d6 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/pngvalid.c +++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngvalid.c @@ -1,7 +1,7 @@ /* pngvalid.c - validate libpng by constructing then reading png files. * - * Last changed in libpng 1.6.18 [July 23, 2015] + * Last changed in libpng 1.5.25 [December 3, 2015] * Copyright (c) 2014-2015 Glenn Randers-Pehrson * Written by John Cunningham Bowler * @@ -74,7 +74,7 @@ (defined(PNG_FIXED_POINT_SUPPORTED) || defined(PNG_FLOATING_POINT_SUPPORTED)) #if PNG_LIBPNG_VER < 10500 -/* This deliberately lacks the PNG_CONST. */ +/* This deliberately lacks the const. */ typedef png_byte *png_const_bytep; /* This is copied from 1.5.1 png.h: */ @@ -164,6 +164,24 @@ define_exception_type(struct png_store*); */ #define ARRAY_SIZE(a) ((unsigned int)((sizeof (a))/(sizeof (a)[0]))) +/* GCC BUG 66447 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66447) requires + * some broken GCC versions to be fixed up to avoid invalid whining about auto + * variables that are *not* changed within the scope of a setjmp being changed. + * + * Feel free to extend the list of broken versions. + */ +#define is_gnu(major,minor)\ + (defined __GNUC__) && __GNUC__ == (major) && __GNUC_MINOR__ == (minor) +#define is_gnu_patch(major,minor,patch)\ + is_gnu(major,minor) && __GNUC_PATCHLEVEL__ == 0 +/* For the moment just do it always; all versions of GCC seem to be broken: */ +#ifdef __GNUC__ + const void * volatile make_volatile_for_gnu; +# define gnu_volatile(x) make_volatile_for_gnu = &x; +#else /* !GNUC broken versions */ +# define gnu_volatile(x) +#endif /* !GNUC broken versions */ + /******************************* UTILITIES ************************************/ /* Error handling is particularly problematic in production code - error * handlers often themselves have bugs which lead to programs that detect @@ -172,7 +190,7 @@ define_exception_type(struct png_store*); * warning messages into buffers that are too small. */ static size_t safecat(char *buffer, size_t bufsize, size_t pos, - PNG_CONST char *cat) + const char *cat) { while (pos < bufsize && cat != NULL && *cat != 0) buffer[pos++] = *cat++; @@ -201,16 +219,16 @@ static size_t safecatd(char *buffer, size_t bufsize, size_t pos, double d, } #endif -static PNG_CONST char invalid[] = "invalid"; -static PNG_CONST char sep[] = ": "; +static const char invalid[] = "invalid"; +static const char sep[] = ": "; -static PNG_CONST char *colour_types[8] = +static const char *colour_types[8] = { "grayscale", invalid, "truecolour", "indexed-colour", "grayscale with alpha", invalid, "truecolour with alpha", invalid }; -#ifdef PNG_READ_SUPPORTED +#ifdef PNG_READ_TRANSFORMS_SUPPORTED /* Convert a double precision value to fixed point. */ static png_fixed_point fix(double d) @@ -269,7 +287,7 @@ randomize(void *pv, size_t size) #define RANDOMIZE(this) randomize(&(this), sizeof (this)) #endif /* READ || WRITE_tRNS */ -#ifdef PNG_READ_SUPPORTED +#ifdef PNG_READ_TRANSFORMS_SUPPORTED static unsigned int random_mod(unsigned int max) { @@ -514,7 +532,8 @@ sample(png_const_bytep row, png_byte colour_type, png_byte bit_depth, */ static void pixel_copy(png_bytep toBuffer, png_uint_32 toIndex, - png_const_bytep fromBuffer, png_uint_32 fromIndex, unsigned int pixelSize) + png_const_bytep fromBuffer, png_uint_32 fromIndex, unsigned int pixelSize, + int littleendian) { /* Assume we can multiply by 'size' without overflow because we are * just working in a single buffer. @@ -524,15 +543,25 @@ pixel_copy(png_bytep toBuffer, png_uint_32 toIndex, if (pixelSize < 8) /* Sub-byte */ { /* Mask to select the location of the copied pixel: */ - unsigned int destMask = ((1U<<pixelSize)-1) << (8-pixelSize-(toIndex&7)); + unsigned int destMask = ((1U<<pixelSize)-1) << + (littleendian ? toIndex&7 : 8-pixelSize-(toIndex&7)); /* The following read the entire pixels and clears the extra: */ unsigned int destByte = toBuffer[toIndex >> 3] & ~destMask; unsigned int sourceByte = fromBuffer[fromIndex >> 3]; /* Don't rely on << or >> supporting '0' here, just in case: */ fromIndex &= 7; - if (fromIndex > 0) sourceByte <<= fromIndex; - if ((toIndex & 7) > 0) sourceByte >>= toIndex & 7; + if (littleendian) + { + if (fromIndex > 0) sourceByte >>= fromIndex; + if ((toIndex & 7) > 0) sourceByte <<= toIndex & 7; + } + + else + { + if (fromIndex > 0) sourceByte <<= fromIndex; + if ((toIndex & 7) > 0) sourceByte >>= toIndex & 7; + } toBuffer[toIndex >> 3] = (png_byte)(destByte | (sourceByte & destMask)); } @@ -545,7 +574,8 @@ pixel_copy(png_bytep toBuffer, png_uint_32 toIndex, * bytes at the end. */ static void -row_copy(png_bytep toBuffer, png_const_bytep fromBuffer, unsigned int bitWidth) +row_copy(png_bytep toBuffer, png_const_bytep fromBuffer, unsigned int bitWidth, + int littleendian) { memcpy(toBuffer, fromBuffer, bitWidth >> 3); @@ -555,10 +585,10 @@ row_copy(png_bytep toBuffer, png_const_bytep fromBuffer, unsigned int bitWidth) toBuffer += bitWidth >> 3; fromBuffer += bitWidth >> 3; - /* The remaining bits are in the top of the byte, the mask is the bits to - * retain. - */ - mask = 0xff >> (bitWidth & 7); + if (littleendian) + mask = 0xff << (bitWidth & 7); + else + mask = 0xff >> (bitWidth & 7); *toBuffer = (png_byte)((*toBuffer & mask) | (*fromBuffer & ~mask)); } } @@ -722,7 +752,7 @@ store_pool_mark(png_bytep mark) make_four_random_bytes(store_seed, mark); } -#ifdef PNG_READ_SUPPORTED +#ifdef PNG_READ_TRANSFORMS_SUPPORTED /* Use this for random 32 bit values; this function makes sure the result is * non-zero. */ @@ -880,7 +910,7 @@ store_storefile(png_store *ps, png_uint_32 id) /* Generate an error message (in the given buffer) */ static size_t store_message(png_store *ps, png_const_structp pp, char *buffer, size_t bufsize, - size_t pos, PNG_CONST char *msg) + size_t pos, const char *msg) { if (pp != NULL && pp == ps->pread) { @@ -998,7 +1028,7 @@ store_warning(png_structp ppIn, png_const_charp message) */ /* Return a single row from the correct image. */ static png_bytep -store_image_row(PNG_CONST png_store* ps, png_const_structp pp, int nImage, +store_image_row(const png_store* ps, png_const_structp pp, int nImage, png_uint_32 y) { png_size_t coffset = (nImage * ps->image_h + y) * (ps->cb_row + 5) + 2; @@ -1102,7 +1132,7 @@ store_ensure_image(png_store *ps, png_const_structp pp, int nImages, #ifdef PNG_READ_SUPPORTED static void -store_image_check(PNG_CONST png_store* ps, png_const_structp pp, int iImage) +store_image_check(const png_store* ps, png_const_structp pp, int iImage) { png_const_bytep image = ps->image; @@ -1352,7 +1382,7 @@ typedef struct store_memory * all the memory. */ static void -store_pool_error(png_store *ps, png_const_structp pp, PNG_CONST char *msg) +store_pool_error(png_store *ps, png_const_structp pp, const char *msg) { if (pp != NULL) png_error(pp, msg); @@ -1416,7 +1446,7 @@ store_pool_delete(png_store *ps, store_pool *pool) next->next = NULL; fprintf(stderr, "\t%lu bytes @ %p\n", - (unsigned long)next->size, (PNG_CONST void*)(next+1)); + (unsigned long)next->size, (const void*)(next+1)); /* The NULL means this will always return, even if the memory is * corrupted. */ @@ -1571,8 +1601,7 @@ store_write_reset(png_store *ps) * returned libpng structures as destroyed by store_write_reset above. */ static png_structp -set_store_for_write(png_store *ps, png_infopp ppi, - PNG_CONST char * volatile name) +set_store_for_write(png_store *ps, png_infopp ppi, const char *name) { anon_context(ps); @@ -1692,7 +1721,7 @@ store_read_set(png_store *ps, png_uint_32 id) */ static png_structp set_store_for_read(png_store *ps, png_infopp ppi, png_uint_32 id, - PNG_CONST char *name) + const char *name) { /* Set the name for png_error */ safecat(ps->test, sizeof ps->test, 0, name); @@ -1799,6 +1828,7 @@ typedef struct color_encoding } color_encoding; #ifdef PNG_READ_SUPPORTED +#if defined PNG_READ_TRANSFORMS_SUPPORTED && defined PNG_READ_cHRM_SUPPORTED static double chromaticity_x(CIE_color c) { @@ -1812,7 +1842,7 @@ chromaticity_y(CIE_color c) } static CIE_color -white_point(PNG_CONST color_encoding *encoding) +white_point(const color_encoding *encoding) { CIE_color white; @@ -1822,12 +1852,13 @@ white_point(PNG_CONST color_encoding *encoding) return white; } +#endif /* READ_TRANSFORMS && READ_cHRM */ #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED static void normalize_color_encoding(color_encoding *encoding) { - PNG_CONST double whiteY = encoding->red.Y + encoding->green.Y + + const double whiteY = encoding->red.Y + encoding->green.Y + encoding->blue.Y; if (whiteY != 1) @@ -1845,9 +1876,10 @@ normalize_color_encoding(color_encoding *encoding) } #endif +#ifdef PNG_READ_TRANSFORMS_SUPPORTED static size_t safecat_color_encoding(char *buffer, size_t bufsize, size_t pos, - PNG_CONST color_encoding *e, double encoding_gamma) + const color_encoding *e, double encoding_gamma) { if (e != 0) { @@ -1884,6 +1916,7 @@ safecat_color_encoding(char *buffer, size_t bufsize, size_t pos, return pos; } +#endif /* READ_TRANSFORMS */ #endif /* PNG_READ_SUPPORTED */ typedef struct png_modifier @@ -1908,9 +1941,9 @@ typedef struct png_modifier unsigned int ngammas; unsigned int ngamma_tests; /* Number of gamma tests to run*/ double current_gamma; /* 0 if not set */ - PNG_CONST color_encoding *encodings; + const color_encoding *encodings; unsigned int nencodings; - PNG_CONST color_encoding *current_encoding; /* If an encoding has been set */ + const color_encoding *current_encoding; /* If an encoding has been set */ unsigned int encoding_counter; /* For iteration */ int encoding_ignored; /* Something overwrote it */ @@ -1921,7 +1954,7 @@ typedef struct png_modifier unsigned int repeat :1; /* Repeat this transform test. */ unsigned int test_uses_encoding :1; - /* Lowest sbit to test (libpng fails for sbit < 8) */ + /* Lowest sbit to test (pre-1.7 libpng fails for sbit < 8) */ png_byte sbitlow; /* Error control - these are the limits on errors accepted by the gamma tests @@ -2008,7 +2041,7 @@ typedef struct png_modifier unsigned int test_gamma_expand16 :1; unsigned int test_exhaustive :1; - /* Whether or not to run the low-bit-depth grayscale tests. This fail on + /* Whether or not to run the low-bit-depth grayscale tests. This fails on * gamma images in some cases because of gross inaccuracies in the grayscale * gamma handling for low bit depth. */ @@ -2125,7 +2158,7 @@ static double digitize(double value, int depth, int do_round) * rounding and 'do_round' should be 1, if it is 0 the digitized value will * be truncated. */ - PNG_CONST unsigned int digitization_factor = (1U << depth) -1; + const unsigned int digitization_factor = (1U << depth) -1; /* Limiting the range is done as a convenience to the caller - it's easier to * do it once here than every time at the call site. @@ -2144,7 +2177,7 @@ static double digitize(double value, int depth, int do_round) #endif /* RGB_TO_GRAY */ #ifdef PNG_READ_GAMMA_SUPPORTED -static double abserr(PNG_CONST png_modifier *pm, int in_depth, int out_depth) +static double abserr(const png_modifier *pm, int in_depth, int out_depth) { /* Absolute error permitted in linear values - affected by the bit depth of * the calculations. @@ -2156,7 +2189,7 @@ static double abserr(PNG_CONST png_modifier *pm, int in_depth, int out_depth) return pm->maxabs8; } -static double calcerr(PNG_CONST png_modifier *pm, int in_depth, int out_depth) +static double calcerr(const png_modifier *pm, int in_depth, int out_depth) { /* Error in the linear composition arithmetic - only relevant when * composition actually happens (0 < alpha < 1). @@ -2169,7 +2202,7 @@ static double calcerr(PNG_CONST png_modifier *pm, int in_depth, int out_depth) return pm->maxcalc8; } -static double pcerr(PNG_CONST png_modifier *pm, int in_depth, int out_depth) +static double pcerr(const png_modifier *pm, int in_depth, int out_depth) { /* Percentage error permitted in the linear values. Note that the specified * value is a percentage but this routine returns a simple number. @@ -2192,7 +2225,7 @@ static double pcerr(PNG_CONST png_modifier *pm, int in_depth, int out_depth) * The specified parameter does *not* include the base .5 digitization error but * it is added here. */ -static double outerr(PNG_CONST png_modifier *pm, int in_depth, int out_depth) +static double outerr(const png_modifier *pm, int in_depth, int out_depth) { /* There is a serious error in the 2 and 4 bit grayscale transform because * the gamma table value (8 bits) is simply shifted, not rounded, so the @@ -2224,7 +2257,7 @@ static double outerr(PNG_CONST png_modifier *pm, int in_depth, int out_depth) * rather than raising a warning. This is useful for debugging to track down * exactly what set of parameters cause high error values. */ -static double outlog(PNG_CONST png_modifier *pm, int in_depth, int out_depth) +static double outlog(const png_modifier *pm, int in_depth, int out_depth) { /* The command line parameters are either 8 bit (0..255) or 16 bit (0..65535) * and so must be adjusted for low bit depth grayscale: @@ -2262,7 +2295,7 @@ static double outlog(PNG_CONST png_modifier *pm, int in_depth, int out_depth) * but in the 8 bit calculation case it's actually quantization to a multiple of * 257! */ -static int output_quantization_factor(PNG_CONST png_modifier *pm, int in_depth, +static int output_quantization_factor(const png_modifier *pm, int in_depth, int out_depth) { if (out_depth == 16 && in_depth != 16 && @@ -2326,7 +2359,7 @@ modification_init(png_modification *pmm) #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED static void -modifier_current_encoding(PNG_CONST png_modifier *pm, color_encoding *ce) +modifier_current_encoding(const png_modifier *pm, color_encoding *ce) { if (pm->current_encoding != 0) *ce = *pm->current_encoding; @@ -2338,9 +2371,10 @@ modifier_current_encoding(PNG_CONST png_modifier *pm, color_encoding *ce) } #endif +#ifdef PNG_READ_TRANSFORMS_SUPPORTED static size_t safecat_current_encoding(char *buffer, size_t bufsize, size_t pos, - PNG_CONST png_modifier *pm) + const png_modifier *pm) { pos = safecat_color_encoding(buffer, bufsize, pos, pm->current_encoding, pm->current_gamma); @@ -2350,6 +2384,7 @@ safecat_current_encoding(char *buffer, size_t bufsize, size_t pos, return pos; } +#endif /* Iterate through the usefully testable color encodings. An encoding is one * of: @@ -2369,7 +2404,7 @@ safecat_current_encoding(char *buffer, size_t bufsize, size_t pos, * caller of modifier_reset must reset it at the start of each run of the test! */ static unsigned int -modifier_total_encodings(PNG_CONST png_modifier *pm) +modifier_total_encodings(const png_modifier *pm) { return 1 + /* (1) nothing */ pm->ngammas + /* (2) gamma values to test */ @@ -2485,14 +2520,14 @@ modifier_set_encoding(png_modifier *pm) * assumption below that the first encoding in the list is the one for sRGB. */ static int -modifier_color_encoding_is_sRGB(PNG_CONST png_modifier *pm) +modifier_color_encoding_is_sRGB(const png_modifier *pm) { return pm->current_encoding != 0 && pm->current_encoding == pm->encodings && pm->current_encoding->gamma == pm->current_gamma; } static int -modifier_color_encoding_is_set(PNG_CONST png_modifier *pm) +modifier_color_encoding_is_set(const png_modifier *pm) { return pm->current_gamma != 0; } @@ -2811,7 +2846,7 @@ modifier_progressive_read(png_modifier *pm, png_structp pp, png_infop pi) /* Set up a modifier. */ static png_structp set_modifier_for_read(png_modifier *pm, png_infopp ppi, png_uint_32 id, - PNG_CONST char *name) + const char *name) { /* Do this first so that the modifier fields are cleared even if an error * happens allocating the png_struct. No allocation is done here so no @@ -2871,7 +2906,7 @@ gama_modification_init(gama_modification *me, png_modifier *pm, double gammad) typedef struct chrm_modification { png_modification this; - PNG_CONST color_encoding *encoding; + const color_encoding *encoding; png_fixed_point wx, wy, rx, ry, gx, gy, bx, by; } chrm_modification; @@ -2895,7 +2930,7 @@ chrm_modify(png_modifier *pm, png_modification *me, int add) static void chrm_modification_init(chrm_modification *me, png_modifier *pm, - PNG_CONST color_encoding *encoding) + const color_encoding *encoding) { CIE_color white = white_point(encoding); @@ -3232,8 +3267,8 @@ init_standard_palette(png_store *ps, png_structp pp, png_infop pi, int npalette, #ifdef PNG_WRITE_tRNS_SUPPORTED static void -set_random_tRNS(png_structp pp, png_infop pi, PNG_CONST png_byte colour_type, - PNG_CONST int bit_depth) +set_random_tRNS(png_structp pp, png_infop pi, const png_byte colour_type, + const int bit_depth) { /* To make this useful the tRNS color needs to match at least one pixel. * Random values are fine for gray, including the 16-bit case where we know @@ -3518,13 +3553,17 @@ transform_row(png_const_structp pp, png_byte buffer[TRANSFORM_ROWMAX], #ifdef PNG_WRITE_INTERLACING_SUPPORTED # define INTERLACE_LAST PNG_INTERLACE_LAST # define check_interlace_type(type) ((void)(type)) -#else -# define INTERLACE_LAST (PNG_INTERLACE_NONE+1) -# define png_set_interlace_handling(a) (1) - +# define set_write_interlace_handling(pp,type) png_set_interlace_handling(pp) +# define do_own_interlace 0 +#elif PNG_LIBPNG_VER < 10700 +# define set_write_interlace_handling(pp,type) (1) static void -check_interlace_type(int PNG_CONST interlace_type) +check_interlace_type(int const interlace_type) { + /* Prior to 1.7.0 libpng does not support the write of an interlaced image + * unless PNG_WRITE_INTERLACING_SUPPORTED, even with do_interlace so the + * code here does the pixel interlace itself, so: + */ if (interlace_type != PNG_INTERLACE_NONE) { /* This is an internal error - --interlace tests should be skipped, not @@ -3534,17 +3573,85 @@ check_interlace_type(int PNG_CONST interlace_type) exit(99); } } +# define INTERLACE_LAST (PNG_INTERLACE_NONE+1) +# define do_own_interlace 0 +#else /* libpng 1.7+ */ +# define set_write_interlace_handling(pp,type)\ + npasses_from_interlace_type(pp,type) +# define check_interlace_type(type) ((void)(type)) +# define INTERLACE_LAST PNG_INTERLACE_LAST +# define do_own_interlace 1 +#endif /* WRITE_INTERLACING tests */ + +#define CAN_WRITE_INTERLACE\ + PNG_LIBPNG_VER >= 10700 || defined PNG_WRITE_INTERLACING_SUPPORTED + +/* Do the same thing for read interlacing; this controls whether read tests do + * their own de-interlace or use libpng. + */ +#ifdef PNG_READ_INTERLACING_SUPPORTED +# define do_read_interlace 0 +#else /* no libpng read interlace support */ +# define do_read_interlace 1 #endif +/* The following two routines use the PNG interlace support macros from + * png.h to interlace or deinterlace rows. + */ +static void +interlace_row(png_bytep buffer, png_const_bytep imageRow, + unsigned int pixel_size, png_uint_32 w, int pass, int littleendian) +{ + png_uint_32 xin, xout, xstep; + + /* Note that this can, trivially, be optimized to a memcpy on pass 7, the + * code is presented this way to make it easier to understand. In practice + * consult the code in the libpng source to see other ways of doing this. + * + * It is OK for buffer and imageRow to be identical, because 'xin' moves + * faster than 'xout' and we copy up. + */ + xin = PNG_PASS_START_COL(pass); + xstep = 1U<<PNG_PASS_COL_SHIFT(pass); + + for (xout=0; xin<w; xin+=xstep) + { + pixel_copy(buffer, xout, imageRow, xin, pixel_size, littleendian); + ++xout; + } +} + +#ifdef PNG_READ_SUPPORTED +static void +deinterlace_row(png_bytep buffer, png_const_bytep row, + unsigned int pixel_size, png_uint_32 w, int pass, int littleendian) +{ + /* The inverse of the above, 'row' is part of row 'y' of the output image, + * in 'buffer'. The image is 'w' wide and this is pass 'pass', distribute + * the pixels of row into buffer and return the number written (to allow + * this to be checked). + */ + png_uint_32 xin, xout, xstep; + + xout = PNG_PASS_START_COL(pass); + xstep = 1U<<PNG_PASS_COL_SHIFT(pass); + + for (xin=0; xout<w; xout+=xstep) + { + pixel_copy(buffer, xout, row, xin, pixel_size, littleendian); + ++xin; + } +} +#endif /* PNG_READ_SUPPORTED */ -/* Make a standardized image given a an image colour type, bit depth and +/* Make a standardized image given an image colour type, bit depth and * interlace type. The standard images have a very restricted range of * rows and heights and are used for testing transforms rather than image * layout details. See make_size_images below for a way to make images * that test odd sizes along with the libpng interlace handling. */ static void -make_transform_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, - png_byte PNG_CONST bit_depth, unsigned int palette_number, +make_transform_image(png_store* const ps, png_byte const colour_type, + png_byte const bit_depth, unsigned int palette_number, int interlace_type, png_const_charp name) { context(ps, fault); @@ -3555,7 +3662,7 @@ make_transform_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, { png_infop pi; png_structp pp = set_store_for_write(ps, &pi, name); - png_uint_32 h; + png_uint_32 h, w; /* In the event of a problem return control to the Catch statement below * to do the clean up - it is not possible to 'return' directly from a Try @@ -3564,10 +3671,10 @@ make_transform_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, if (pp == NULL) Throw ps; + w = transform_width(pp, colour_type, bit_depth); h = transform_height(pp, colour_type, bit_depth); - png_set_IHDR(pp, pi, transform_width(pp, colour_type, bit_depth), h, - bit_depth, colour_type, interlace_type, + png_set_IHDR(pp, pi, w, h, bit_depth, colour_type, interlace_type, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); #ifdef PNG_TEXT_SUPPORTED @@ -3611,7 +3718,7 @@ make_transform_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, if (png_get_rowbytes(pp, pi) != transform_rowsize(pp, colour_type, bit_depth)) - png_error(pp, "row size incorrect"); + png_error(pp, "transform row size incorrect"); else { @@ -3619,7 +3726,7 @@ make_transform_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, * because if it is called before, the information in *pp has not been * updated to reflect the interlaced image. */ - int npasses = png_set_interlace_handling(pp); + int npasses = set_write_interlace_handling(pp, interlace_type); int pass; if (npasses != npasses_from_interlace_type(pp, interlace_type)) @@ -3629,11 +3736,37 @@ make_transform_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, { png_uint_32 y; + /* do_own_interlace is a pre-defined boolean (a #define) which is + * set if we have to work out the interlaced rows here. + */ for (y=0; y<h; ++y) { png_byte buffer[TRANSFORM_ROWMAX]; transform_row(pp, buffer, colour_type, bit_depth, y); + +# if do_own_interlace + /* If do_own_interlace *and* the image is interlaced we need a + * reduced interlace row; this may be reduced to empty. + */ + if (interlace_type == PNG_INTERLACE_ADAM7) + { + /* The row must not be written if it doesn't exist, notice + * that there are two conditions here, either the row isn't + * ever in the pass or the row would be but isn't wide + * enough to contribute any pixels. In fact the wPass test + * can be used to skip the whole y loop in this case. + */ + if (PNG_ROW_IN_INTERLACE_PASS(y, pass) && + PNG_PASS_COLS(w, pass) > 0) + interlace_row(buffer, buffer, + bit_size(pp, colour_type, bit_depth), w, pass, + 0/*data always bigendian*/); + else + continue; + } +# endif /* do_own_interlace */ + png_write_row(pp, buffer); } } @@ -3703,59 +3836,13 @@ make_transform_images(png_modifier *pm) char name[FILE_NAME_SIZE]; standard_name(name, sizeof name, 0, colour_type, bit_depth, - palette_number, interlace_type, 0, 0, 0); + palette_number, interlace_type, 0, 0, do_own_interlace); make_transform_image(&pm->this, colour_type, bit_depth, palette_number, interlace_type, name); } } } -/* The following two routines use the PNG interlace support macros from - * png.h to interlace or deinterlace rows. - */ -static void -interlace_row(png_bytep buffer, png_const_bytep imageRow, - unsigned int pixel_size, png_uint_32 w, int pass) -{ - png_uint_32 xin, xout, xstep; - - /* Note that this can, trivially, be optimized to a memcpy on pass 7, the - * code is presented this way to make it easier to understand. In practice - * consult the code in the libpng source to see other ways of doing this. - */ - xin = PNG_PASS_START_COL(pass); - xstep = 1U<<PNG_PASS_COL_SHIFT(pass); - - for (xout=0; xin<w; xin+=xstep) - { - pixel_copy(buffer, xout, imageRow, xin, pixel_size); - ++xout; - } -} - -#ifdef PNG_READ_SUPPORTED -static void -deinterlace_row(png_bytep buffer, png_const_bytep row, - unsigned int pixel_size, png_uint_32 w, int pass) -{ - /* The inverse of the above, 'row' is part of row 'y' of the output image, - * in 'buffer'. The image is 'w' wide and this is pass 'pass', distribute - * the pixels of row into buffer and return the number written (to allow - * this to be checked). - */ - png_uint_32 xin, xout, xstep; - - xout = PNG_PASS_START_COL(pass); - xstep = 1U<<PNG_PASS_COL_SHIFT(pass); - - for (xin=0; xout<w; xout+=xstep) - { - pixel_copy(buffer, xout, row, xin, pixel_size); - ++xin; - } -} -#endif /* PNG_READ_SUPPORTED */ - /* Build a single row for the 'size' test images; this fills in only the * first bit_width bits of the sample row. */ @@ -3781,17 +3868,13 @@ size_row(png_byte buffer[SIZE_ROWMAX], png_uint_32 bit_width, png_uint_32 y) } static void -make_size_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, - png_byte PNG_CONST bit_depth, int PNG_CONST interlace_type, - png_uint_32 PNG_CONST w, png_uint_32 PNG_CONST h, - int PNG_CONST do_interlace) +make_size_image(png_store* const ps, png_byte const colour_type, + png_byte const bit_depth, int const interlace_type, + png_uint_32 const w, png_uint_32 const h, + int const do_interlace) { context(ps, fault); - /* At present libpng does not support the write of an interlaced image unless - * PNG_WRITE_INTERLACING_SUPPORTED, even with do_interlace so the code here - * does the pixel interlace itself, so: - */ check_interlace_type(interlace_type); Try @@ -3802,7 +3885,7 @@ make_size_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, /* Make a name and get an appropriate id for the store: */ char name[FILE_NAME_SIZE]; - PNG_CONST png_uint_32 id = FILEID(colour_type, bit_depth, 0/*palette*/, + const png_uint_32 id = FILEID(colour_type, bit_depth, 0/*palette*/, interlace_type, w, h, do_interlace); standard_name_from_id(name, sizeof name, 0, id); @@ -3853,7 +3936,7 @@ make_size_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, */ pixel_size = bit_size(pp, colour_type, bit_depth); if (png_get_rowbytes(pp, pi) != ((w * pixel_size) + 7) / 8) - png_error(pp, "row size incorrect"); + png_error(pp, "size row size incorrect"); else { @@ -3870,7 +3953,8 @@ make_size_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, */ memset(image, 0xff, sizeof image); - if (!do_interlace && npasses != png_set_interlace_handling(pp)) + if (!do_interlace && + npasses != set_write_interlace_handling(pp, interlace_type)) png_error(pp, "write: png_set_interlace_handling failed"); /* Prepare the whole image first to avoid making it 7 times: */ @@ -3880,7 +3964,7 @@ make_size_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, for (pass=0; pass<npasses; ++pass) { /* The following two are for checking the macros: */ - PNG_CONST png_uint_32 wPass = PNG_PASS_COLS(w, pass); + const png_uint_32 wPass = PNG_PASS_COLS(w, pass); /* If do_interlace is set we don't call png_write_row for every * row because some of them are empty. In fact, for a 1x1 image, @@ -3909,7 +3993,8 @@ make_size_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, * set unset things to 0). */ memset(tempRow, 0xff, sizeof tempRow); - interlace_row(tempRow, row, pixel_size, w, pass); + interlace_row(tempRow, row, pixel_size, w, pass, + 0/*data always bigendian*/); row = tempRow; } else @@ -3979,8 +4064,8 @@ make_size_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, } static void -make_size(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, int bdlo, - int PNG_CONST bdhi) +make_size(png_store* const ps, png_byte const colour_type, int bdlo, + int const bdhi) { for (; bdlo <= bdhi; ++bdlo) { @@ -4003,6 +4088,11 @@ make_size(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, int bdlo, # ifdef PNG_WRITE_INTERLACING_SUPPORTED make_size_image(ps, colour_type, DEPTH(bdlo), PNG_INTERLACE_ADAM7, width, height, 0); +# endif +# if CAN_WRITE_INTERLACE + /* 1.7.0 removes the hack that prevented app write of an interlaced + * image if WRITE_INTERLACE was not supported + */ make_size_image(ps, colour_type, DEPTH(bdlo), PNG_INTERLACE_ADAM7, width, height, 1); # endif @@ -4076,41 +4166,45 @@ sBIT_error_fn(png_structp pp, png_infop pi) png_set_sBIT(pp, pi, &bad); } -static PNG_CONST struct +static const struct { void (*fn)(png_structp, png_infop); - PNG_CONST char *msg; + const char *msg; unsigned int warning :1; /* the error is a warning... */ } error_test[] = { - /* no warnings makes these errors undetectable. */ - { sBIT0_error_fn, "sBIT(0): failed to detect error", 1 }, - { sBIT_error_fn, "sBIT(too big): failed to detect error", 1 }, + /* no warnings makes these errors undetectable prior to 1.7.0 */ + { sBIT0_error_fn, "sBIT(0): failed to detect error", + PNG_LIBPNG_VER < 10700 }, + + { sBIT_error_fn, "sBIT(too big): failed to detect error", + PNG_LIBPNG_VER < 10700 }, }; static void -make_error(png_store* volatile psIn, png_byte PNG_CONST colour_type, +make_error(png_store* const ps, png_byte const colour_type, png_byte bit_depth, int interlace_type, int test, png_const_charp name) { - png_store * volatile ps = psIn; - context(ps, fault); check_interlace_type(interlace_type); Try { - volatile png_structp pp; png_infop pi; - - pp = set_store_for_write(ps, &pi, name); + const png_structp pp = set_store_for_write(ps, &pi, name); + png_uint_32 w, h; + gnu_volatile(pp) if (pp == NULL) Throw ps; - png_set_IHDR(pp, pi, transform_width(pp, colour_type, bit_depth), - transform_height(pp, colour_type, bit_depth), bit_depth, colour_type, - interlace_type, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); + w = transform_width(pp, colour_type, bit_depth); + gnu_volatile(w) + h = transform_height(pp, colour_type, bit_depth); + gnu_volatile(h) + png_set_IHDR(pp, pi, w, h, bit_depth, colour_type, interlace_type, + PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); if (colour_type == 3) /* palette */ init_standard_palette(ps, pp, pi, 1U << bit_depth, 0/*do tRNS*/); @@ -4122,6 +4216,8 @@ make_error(png_store* volatile psIn, png_byte PNG_CONST colour_type, # define exception__env exception_env_1 Try { + gnu_volatile(exception__prev) + /* Expect this to throw: */ ps->expect_error = !error_test[test].warning; ps->expect_warning = error_test[test].warning; @@ -4142,7 +4238,8 @@ make_error(png_store* volatile psIn, png_byte PNG_CONST colour_type, } Catch (fault) - ps = fault; /* expected exit, make sure ps is not clobbered */ + { /* expected exit */ + } #undef exception__prev #undef exception__env @@ -4159,8 +4256,7 @@ make_error(png_store* volatile psIn, png_byte PNG_CONST colour_type, else { - png_uint_32 h = transform_height(pp, colour_type, bit_depth); - int npasses = png_set_interlace_handling(pp); + int npasses = set_write_interlace_handling(pp, interlace_type); int pass; if (npasses != npasses_from_interlace_type(pp, interlace_type)) @@ -4175,6 +4271,29 @@ make_error(png_store* volatile psIn, png_byte PNG_CONST colour_type, png_byte buffer[TRANSFORM_ROWMAX]; transform_row(pp, buffer, colour_type, bit_depth, y); + +# if do_own_interlace + /* If do_own_interlace *and* the image is interlaced we need a + * reduced interlace row; this may be reduced to empty. + */ + if (interlace_type == PNG_INTERLACE_ADAM7) + { + /* The row must not be written if it doesn't exist, notice + * that there are two conditions here, either the row isn't + * ever in the pass or the row would be but isn't wide + * enough to contribute any pixels. In fact the wPass test + * can be used to skip the whole y loop in this case. + */ + if (PNG_ROW_IN_INTERLACE_PASS(y, pass) && + PNG_PASS_COLS(w, pass) > 0) + interlace_row(buffer, buffer, + bit_size(pp, colour_type, bit_depth), w, pass, + 0/*data always bigendian*/); + else + continue; + } +# endif /* do_own_interlace */ + png_write_row(pp, buffer); } } @@ -4193,8 +4312,8 @@ make_error(png_store* volatile psIn, png_byte PNG_CONST colour_type, } static int -make_errors(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type, - int bdlo, int PNG_CONST bdhi) +make_errors(png_modifier* const pm, png_byte const colour_type, + int bdlo, int const bdhi) { for (; bdlo <= bdhi; ++bdlo) { @@ -4207,7 +4326,7 @@ make_errors(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type, char name[FILE_NAME_SIZE]; standard_name(name, sizeof name, 0, colour_type, 1<<bdlo, 0, - interlace_type, 0, 0, 0); + interlace_type, 0, 0, do_own_interlace); for (test=0; test<ARRAY_SIZE(error_test); ++test) { @@ -4254,7 +4373,7 @@ perform_error_test(png_modifier *pm) * then the warning messages the library outputs will probably be garbage. */ static void -perform_formatting_test(png_store *volatile ps) +perform_formatting_test(png_store *ps) { #ifdef PNG_TIME_RFC1123_SUPPORTED /* The handle into the formatting code is the RFC1123 support; this test does @@ -4369,6 +4488,7 @@ typedef struct standard_display png_uint_32 bit_width; /* Width of output row in bits */ size_t cbRow; /* Bytes in a row of the output image */ int do_interlace; /* Do interlacing internally */ + int littleendian; /* App (row) data is little endian */ int is_transparent; /* Transparency information was present. */ int has_tRNS; /* color type GRAY or RGB with a tRNS chunk. */ int speed; /* Doing a speed test */ @@ -4411,6 +4531,7 @@ standard_display_init(standard_display *dp, png_store* ps, png_uint_32 id, dp->bit_width = 0; dp->cbRow = 0; dp->do_interlace = do_interlace; + dp->littleendian = 0; dp->is_transparent = 0; dp->speed = ps->speed; dp->use_update_info = use_update_info; @@ -4731,8 +4852,19 @@ standard_info_part1(standard_display *dp, png_structp pp, png_infop pi) * turning on interlace handling (if do_interlace is not set.) */ dp->npasses = npasses_from_interlace_type(pp, dp->interlace_type); - if (!dp->do_interlace && dp->npasses != png_set_interlace_handling(pp)) - png_error(pp, "validate: file changed interlace type"); + if (!dp->do_interlace) + { +# ifdef PNG_READ_INTERLACING_SUPPORTED + if (dp->npasses != png_set_interlace_handling(pp)) + png_error(pp, "validate: file changed interlace type"); +# else /* !READ_INTERLACING */ + /* This should never happen: the relevant tests (!do_interlace) should + * not be run. + */ + if (dp->npasses > 1) + png_error(pp, "validate: no libpng interlace support"); +# endif /* !READ_INTERLACING */ + } /* Caller calls png_read_update_info or png_start_read_image now, then calls * part2. @@ -4814,7 +4946,7 @@ static void PNGCBAPI progressive_row(png_structp ppIn, png_bytep new_row, png_uint_32 y, int pass) { png_const_structp pp = ppIn; - PNG_CONST standard_display *dp = voidcast(standard_display*, + const standard_display *dp = voidcast(standard_display*, png_get_progressive_ptr(pp)); /* When handling interlacing some rows will be absent in each pass, the @@ -4838,7 +4970,7 @@ progressive_row(png_structp ppIn, png_bytep new_row, png_uint_32 y, int pass) if (pass != png_get_current_pass_number(pp)) png_error(pp, "png_get_current_pass_number is broken"); -#endif +#endif /* USER_TRANSFORM_INFO */ y = PNG_ROW_FROM_PASS_ROW(y, pass); } @@ -4849,38 +4981,39 @@ progressive_row(png_structp ppIn, png_bytep new_row, png_uint_32 y, int pass) row = store_image_row(dp->ps, pp, 0, y); -#ifdef PNG_READ_INTERLACING_SUPPORTED /* Combine the new row into the old: */ +#ifdef PNG_READ_INTERLACING_SUPPORTED if (dp->do_interlace) +#endif /* READ_INTERLACING */ { if (dp->interlace_type == PNG_INTERLACE_ADAM7) - deinterlace_row(row, new_row, dp->pixel_size, dp->w, pass); + deinterlace_row(row, new_row, dp->pixel_size, dp->w, pass, + dp->littleendian); else - row_copy(row, new_row, dp->pixel_size * dp->w); + row_copy(row, new_row, dp->pixel_size * dp->w, dp->littleendian); } +#ifdef PNG_READ_INTERLACING_SUPPORTED else png_progressive_combine_row(pp, row, new_row); #endif /* PNG_READ_INTERLACING_SUPPORTED */ } -#ifdef PNG_READ_INTERLACING_SUPPORTED else if (dp->interlace_type == PNG_INTERLACE_ADAM7 && PNG_ROW_IN_INTERLACE_PASS(y, pass) && PNG_PASS_COLS(dp->w, pass) > 0) png_error(pp, "missing row in progressive de-interlacing"); -#endif /* PNG_READ_INTERLACING_SUPPORTED */ } static void sequential_row(standard_display *dp, png_structp pp, png_infop pi, - PNG_CONST int iImage, PNG_CONST int iDisplay) + const int iImage, const int iDisplay) { - PNG_CONST int npasses = dp->npasses; - PNG_CONST int do_interlace = dp->do_interlace && + const int npasses = dp->npasses; + const int do_interlace = dp->do_interlace && dp->interlace_type == PNG_INTERLACE_ADAM7; - PNG_CONST png_uint_32 height = standard_height(pp, dp->id); - PNG_CONST png_uint_32 width = standard_width(pp, dp->id); - PNG_CONST png_store* ps = dp->ps; + const png_uint_32 height = standard_height(pp, dp->id); + const png_uint_32 width = standard_width(pp, dp->id); + const png_store* ps = dp->ps; int pass; for (pass=0; pass<npasses; ++pass) @@ -4915,11 +5048,11 @@ sequential_row(standard_display *dp, png_structp pp, png_infop pi, if (iImage >= 0) deinterlace_row(store_image_row(ps, pp, iImage, y), row, - dp->pixel_size, dp->w, pass); + dp->pixel_size, dp->w, pass, dp->littleendian); if (iDisplay >= 0) deinterlace_row(store_image_row(ps, pp, iDisplay, y), display, - dp->pixel_size, dp->w, pass); + dp->pixel_size, dp->w, pass, dp->littleendian); } } else @@ -5066,14 +5199,6 @@ standard_row_validate(standard_display *dp, png_const_structp pp, * In earlier passes 'row' will be partially filled in, with only the pixels * that have been read so far, but 'display' will have those pixels * replicated to fill the unread pixels while reading an interlaced image. -#if PNG_LIBPNG_VER < 10506 - * The side effect inside the libpng sequential reader is that the 'row' - * array retains the correct values for unwritten pixels within the row - * bytes, while the 'display' array gets bits off the end of the image (in - * the last byte) trashed. Unfortunately in the progressive reader the - * row bytes are always trashed, so we always do a pixel_cmp here even though - * a memcmp of all cbRow bytes will succeed for the sequential reader. -#endif */ if (iImage >= 0 && (where = pixel_cmp(std, store_image_row(dp->ps, pp, iImage, y), @@ -5086,19 +5211,12 @@ standard_row_validate(standard_display *dp, png_const_structp pp, png_error(pp, msg); } -#if PNG_LIBPNG_VER < 10506 - /* In this case use pixel_cmp because we need to compare a partial - * byte at the end of the row if the row is not an exact multiple - * of 8 bits wide. (This is fixed in libpng-1.5.6 and pixel_cmp is - * changed to match!) - */ -#endif if (iDisplay >= 0 && (where = pixel_cmp(std, store_image_row(dp->ps, pp, iDisplay, y), dp->bit_width)) != 0) { char msg[64]; - sprintf(msg, "display row[%lu][%d] changed from %.2x to %.2x", + sprintf(msg, "display row[%lu][%d] changed from %.2x to %.2x", (unsigned long)y, where-1, std[where-1], store_image_row(dp->ps, pp, iDisplay, y)[where-1]); png_error(pp, msg); @@ -5143,7 +5261,7 @@ standard_end(png_structp ppIn, png_infop pi) /* A single test run checking the standard image to ensure it is not damaged. */ static void -standard_test(png_store* PNG_CONST psIn, png_uint_32 PNG_CONST id, +standard_test(png_store* const psIn, png_uint_32 const id, int do_interlace, int use_update_info) { standard_display d; @@ -5231,8 +5349,8 @@ standard_test(png_store* PNG_CONST psIn, png_uint_32 PNG_CONST id, } static int -test_standard(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type, - int bdlo, int PNG_CONST bdhi) +test_standard(png_modifier* const pm, png_byte const colour_type, + int bdlo, int const bdhi) { for (; bdlo <= bdhi; ++bdlo) { @@ -5242,7 +5360,7 @@ test_standard(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type, interlace_type < INTERLACE_LAST; ++interlace_type) { standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, - interlace_type, 0, 0, 0), 0/*do_interlace*/, pm->use_update_info); + interlace_type, 0, 0, 0), do_read_interlace, pm->use_update_info); if (fail(pm)) return 0; @@ -5277,8 +5395,8 @@ perform_standard_test(png_modifier *pm) /********************************** SIZE TESTS ********************************/ static int -test_size(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type, - int bdlo, int PNG_CONST bdhi) +test_size(png_modifier* const pm, png_byte const colour_type, + int bdlo, int const bdhi) { /* Run the tests on each combination. * @@ -5287,8 +5405,10 @@ test_size(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type, * width and height. This is a waste of time in practice, hence the * hinc and winc stuff: */ - static PNG_CONST png_byte hinc[] = {1, 3, 11, 1, 5}; - static PNG_CONST png_byte winc[] = {1, 9, 5, 7, 1}; + static const png_byte hinc[] = {1, 3, 11, 1, 5}; + static const png_byte winc[] = {1, 9, 5, 7, 1}; + const int save_bdlo = bdlo; + for (; bdlo <= bdhi; ++bdlo) { png_uint_32 h, w; @@ -5314,34 +5434,56 @@ test_size(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type, if (fail(pm)) return 0; -# ifdef PNG_WRITE_INTERLACING_SUPPORTED + /* Now validate the interlaced read side - do_interlace true, + * in the progressive case this does actually make a difference + * to the code used in the non-interlaced case too. + */ standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, - PNG_INTERLACE_ADAM7, w, h, 0), 0/*do_interlace*/, + PNG_INTERLACE_NONE, w, h, 0), 1/*do_interlace*/, pm->use_update_info); if (fail(pm)) return 0; +# if CAN_WRITE_INTERLACE + /* Validate the pngvalid code itself: */ standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, - PNG_INTERLACE_ADAM7, w, h, 1), 0/*do_interlace*/, + PNG_INTERLACE_ADAM7, w, h, 1), 1/*do_interlace*/, pm->use_update_info); if (fail(pm)) return 0; # endif + } + } - /* Now validate the interlaced read side - do_interlace true, - * in the progressive case this does actually make a difference - * to the code used in the non-interlaced case too. + /* Now do the tests of libpng interlace handling, after we have made sure + * that the pngvalid version works: + */ + for (bdlo = save_bdlo; bdlo <= bdhi; ++bdlo) + { + png_uint_32 h, w; + + for (h=1; h<=16; h+=hinc[bdlo]) for (w=1; w<=16; w+=winc[bdlo]) + { +# ifdef PNG_READ_INTERLACING_SUPPORTED + /* Test with pngvalid generated interlaced images first; we have + * already verify these are ok (unless pngvalid has self-consistent + * read/write errors, which is unlikely), so this detects errors in the + * read side first: */ +# if CAN_WRITE_INTERLACE standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, - PNG_INTERLACE_NONE, w, h, 0), 1/*do_interlace*/, + PNG_INTERLACE_ADAM7, w, h, 1), 0/*do_interlace*/, pm->use_update_info); if (fail(pm)) return 0; +# endif +# endif /* READ_INTERLACING */ # ifdef PNG_WRITE_INTERLACING_SUPPORTED + /* Test the libpng write side against the pngvalid read side: */ standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, PNG_INTERLACE_ADAM7, w, h, 0), 1/*do_interlace*/, pm->use_update_info); @@ -5349,6 +5491,18 @@ test_size(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type, if (fail(pm)) return 0; # endif + +# ifdef PNG_READ_INTERLACING_SUPPORTED +# ifdef PNG_WRITE_INTERLACING_SUPPORTED + /* Test both together: */ + standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, + PNG_INTERLACE_ADAM7, w, h, 0), 0/*do_interlace*/, + pm->use_update_info); + + if (fail(pm)) + return 0; +# endif +# endif /* READ_INTERLACING */ } } @@ -5459,14 +5613,14 @@ image_pixel_setf(image_pixel *this, unsigned int rMax, unsigned int gMax, static void image_pixel_init(image_pixel *this, png_const_bytep row, png_byte colour_type, png_byte bit_depth, png_uint_32 x, store_palette palette, - PNG_CONST image_pixel *format /*from pngvalid transform of input*/) + const image_pixel *format /*from pngvalid transform of input*/) { - PNG_CONST png_byte sample_depth = (png_byte)(colour_type == + const png_byte sample_depth = (png_byte)(colour_type == PNG_COLOR_TYPE_PALETTE ? 8 : bit_depth); - PNG_CONST unsigned int max = (1U<<sample_depth)-1; - PNG_CONST int swap16 = (format != 0 && format->swap16); - PNG_CONST int littleendian = (format != 0 && format->littleendian); - PNG_CONST int sig_bits = (format != 0 && format->sig_bits); + const unsigned int max = (1U<<sample_depth)-1; + const int swap16 = (format != 0 && format->swap16); + const int littleendian = (format != 0 && format->littleendian); + const int sig_bits = (format != 0 && format->sig_bits); /* Initially just set everything to the same number and the alpha to opaque. * Note that this currently assumes a simple palette where entry x has colour @@ -5484,7 +5638,7 @@ image_pixel_init(image_pixel *this, png_const_bytep row, png_byte colour_type, /* This permits the caller to default to the sample value. */ if (palette != 0) { - PNG_CONST unsigned int i = this->palette_index; + const unsigned int i = this->palette_index; this->red = palette[i].red; this->green = palette[i].green; @@ -5560,6 +5714,9 @@ image_pixel_init(image_pixel *this, png_const_bytep row, png_byte colour_type, this->sig_bits = 0; } +#if defined PNG_READ_EXPAND_SUPPORTED || defined PNG_READ_GRAY_TO_RGB_SUPPORTED\ + || defined PNG_READ_EXPAND_SUPPORTED || defined PNG_READ_EXPAND_16_SUPPORTED\ + || defined PNG_READ_BACKGROUND_SUPPORTED /* Convert a palette image to an rgb image. This necessarily converts the tRNS * chunk at the same time, because the tRNS will be in palette form. The way * palette validation works means that the original palette is never updated, @@ -5589,10 +5746,14 @@ image_pixel_convert_PLTE(image_pixel *this) /* Add an alpha channel; this will import the tRNS information because tRNS is * not valid in an alpha image. The bit depth will invariably be set to at - * least 8. Palette images will be converted to alpha (using the above API). + * least 8 prior to 1.7.0. Palette images will be converted to alpha (using + * the above API). With png_set_background the alpha channel is never expanded + * but this routine is used by pngvalid to simplify code; 'for_background' + * records this. */ static void -image_pixel_add_alpha(image_pixel *this, PNG_CONST standard_display *display) +image_pixel_add_alpha(image_pixel *this, const standard_display *display, + int for_background) { if (this->colour_type == PNG_COLOR_TYPE_PALETTE) image_pixel_convert_PLTE(this); @@ -5601,11 +5762,21 @@ image_pixel_add_alpha(image_pixel *this, PNG_CONST standard_display *display) { if (this->colour_type == PNG_COLOR_TYPE_GRAY) { - if (this->bit_depth < 8) - this->bit_depth = this->sample_depth = 8; +# if PNG_LIBPNG_VER < 10700 + if (!for_background && this->bit_depth < 8) + this->bit_depth = this->sample_depth = 8; +# endif if (this->have_tRNS) { + /* After 1.7 the expansion of bit depth only happens if there is a + * tRNS chunk to expand at this point. + */ +# if PNG_LIBPNG_VER >= 10700 + if (!for_background && this->bit_depth < 8) + this->bit_depth = this->sample_depth = 8; +# endif + this->have_tRNS = 0; /* Check the input, original, channel value here against the @@ -5651,18 +5822,19 @@ image_pixel_add_alpha(image_pixel *this, PNG_CONST standard_display *display) this->alpha_sBIT = display->alpha_sBIT; } } +#endif /* transforms that need image_pixel_add_alpha */ struct transform_display; typedef struct image_transform { /* The name of this transform: a string. */ - PNG_CONST char *name; + const char *name; /* Each transform can be disabled from the command line: */ int enable; /* The global list of transforms; read only. */ - struct image_transform *PNG_CONST list; + struct image_transform *const list; /* The global count of the number of times this transform has been set on an * image. @@ -5675,7 +5847,7 @@ typedef struct image_transform /* The next transform in the list, each transform must call its own next * transform after it has processed the pixel successfully. */ - PNG_CONST struct image_transform *next; + const struct image_transform *next; /* A single transform for the image, expressed as a series of function * callbacks and some space for values. @@ -5683,12 +5855,12 @@ typedef struct image_transform * First a callback to add any required modifications to the png_modifier; * this gets called just before the modifier is set up for read. */ - void (*ini)(PNG_CONST struct image_transform *this, + void (*ini)(const struct image_transform *this, struct transform_display *that); /* And a callback to set the transform on the current png_read_struct: */ - void (*set)(PNG_CONST struct image_transform *this, + void (*set)(const struct image_transform *this, struct transform_display *that, png_structp pp, png_infop pi); /* Then a transform that takes an input pixel in one PNG format or another @@ -5697,8 +5869,8 @@ typedef struct image_transform * in the libpng implementation!) The png_structp is solely to allow error * reporting via png_error and png_warning. */ - void (*mod)(PNG_CONST struct image_transform *this, image_pixel *that, - png_const_structp pp, PNG_CONST struct transform_display *display); + void (*mod)(const struct image_transform *this, image_pixel *that, + png_const_structp pp, const struct transform_display *display); /* Add this transform to the list and return true if the transform is * meaningful for this colour type and bit depth - if false then the @@ -5706,7 +5878,7 @@ typedef struct image_transform * point running it. */ int (*add)(struct image_transform *this, - PNG_CONST struct image_transform **that, png_byte colour_type, + const struct image_transform **that, png_byte colour_type, png_byte bit_depth); } image_transform; @@ -5716,7 +5888,8 @@ typedef struct transform_display /* Parameters */ png_modifier* pm; - PNG_CONST image_transform* transform_list; + const image_transform* transform_list; + unsigned int max_gamma_8; /* Local variables */ png_byte output_colour_type; @@ -5758,7 +5931,7 @@ transform_set_encoding(transform_display *this) /* Three functions to end the list: */ static void -image_transform_ini_end(PNG_CONST image_transform *this, +image_transform_ini_end(const image_transform *this, transform_display *that) { UNUSED(this) @@ -5766,7 +5939,7 @@ image_transform_ini_end(PNG_CONST image_transform *this, } static void -image_transform_set_end(PNG_CONST image_transform *this, +image_transform_set_end(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { UNUSED(this) @@ -5793,11 +5966,11 @@ sample_scale(double sample_value, unsigned int scale) } static void -image_transform_mod_end(PNG_CONST image_transform *this, image_pixel *that, - png_const_structp pp, PNG_CONST transform_display *display) +image_transform_mod_end(const image_transform *this, image_pixel *that, + png_const_structp pp, const transform_display *display) { - PNG_CONST unsigned int scale = (1U<<that->sample_depth)-1; - PNG_CONST int sig_bits = that->sig_bits; + const unsigned int scale = (1U<<that->sample_depth)-1; + const int sig_bits = that->sig_bits; UNUSED(this) UNUSED(pp) @@ -5888,17 +6061,18 @@ static image_transform image_transform_end = */ static void transform_display_init(transform_display *dp, png_modifier *pm, png_uint_32 id, - PNG_CONST image_transform *transform_list) + const image_transform *transform_list) { memset(dp, 0, sizeof *dp); /* Standard fields */ - standard_display_init(&dp->this, &pm->this, id, 0/*do_interlace*/, + standard_display_init(&dp->this, &pm->this, id, do_read_interlace, pm->use_update_info); /* Parameter fields */ dp->pm = pm; dp->transform_list = transform_list; + dp->max_gamma_8 = 16; /* Local variable fields */ dp->output_colour_type = 255; /* invalid */ @@ -6072,7 +6246,7 @@ static void transform_range_check(png_const_structp pp, unsigned int r, unsigned int g, unsigned int b, unsigned int a, unsigned int in_digitized, double in, unsigned int out, png_byte sample_depth, double err, double limit, - PNG_CONST char *name, double digitization_error) + const char *name, double digitization_error) { /* Compare the scaled, digitzed, values of our local calculation (in+-err) * with the digitized values libpng produced; 'sample_depth' is the actual @@ -6116,20 +6290,20 @@ transform_image_validate(transform_display *dp, png_const_structp pp, png_infop pi) { /* Constants for the loop below: */ - PNG_CONST png_store* PNG_CONST ps = dp->this.ps; - PNG_CONST png_byte in_ct = dp->this.colour_type; - PNG_CONST png_byte in_bd = dp->this.bit_depth; - PNG_CONST png_uint_32 w = dp->this.w; - PNG_CONST png_uint_32 h = dp->this.h; - PNG_CONST png_byte out_ct = dp->output_colour_type; - PNG_CONST png_byte out_bd = dp->output_bit_depth; - PNG_CONST png_byte sample_depth = (png_byte)(out_ct == + const png_store* const ps = dp->this.ps; + const png_byte in_ct = dp->this.colour_type; + const png_byte in_bd = dp->this.bit_depth; + const png_uint_32 w = dp->this.w; + const png_uint_32 h = dp->this.h; + const png_byte out_ct = dp->output_colour_type; + const png_byte out_bd = dp->output_bit_depth; + const png_byte sample_depth = (png_byte)(out_ct == PNG_COLOR_TYPE_PALETTE ? 8 : out_bd); - PNG_CONST png_byte red_sBIT = dp->this.red_sBIT; - PNG_CONST png_byte green_sBIT = dp->this.green_sBIT; - PNG_CONST png_byte blue_sBIT = dp->this.blue_sBIT; - PNG_CONST png_byte alpha_sBIT = dp->this.alpha_sBIT; - PNG_CONST int have_tRNS = dp->this.is_transparent; + const png_byte red_sBIT = dp->this.red_sBIT; + const png_byte green_sBIT = dp->this.green_sBIT; + const png_byte blue_sBIT = dp->this.blue_sBIT; + const png_byte alpha_sBIT = dp->this.alpha_sBIT; + const int have_tRNS = dp->this.is_transparent; double digitization_error; store_palette out_palette; @@ -6184,7 +6358,7 @@ transform_image_validate(transform_display *dp, png_const_structp pp, for (y=0; y<h; ++y) { - png_const_bytep PNG_CONST pRow = store_image_row(ps, pp, 0, y); + png_const_bytep const pRow = store_image_row(ps, pp, 0, y); png_uint_32 x; /* The original, standard, row pre-transforms. */ @@ -6216,7 +6390,7 @@ transform_image_validate(transform_display *dp, png_const_structp pp, b = in_pixel.blue; a = in_pixel.alpha; - /* This applies the transforms to the input date, including output + /* This applies the transforms to the input data, including output * format operations which must be used when reading the output * pixel that libpng produces. */ @@ -6290,8 +6464,8 @@ transform_end(png_structp ppIn, png_infop pi) /* A single test run. */ static void -transform_test(png_modifier *pmIn, PNG_CONST png_uint_32 idIn, - PNG_CONST image_transform* transform_listIn, PNG_CONST char * volatile name) +transform_test(png_modifier *pmIn, const png_uint_32 idIn, + const image_transform* transform_listIn, const char * const name) { transform_display d; context(&pmIn->this, fault); @@ -6392,8 +6566,11 @@ static image_transform ITSTRUCT(name) =\ #define PT ITSTRUCT(end) /* stores the previous transform */ /* To save code: */ -static void -image_transform_default_ini(PNG_CONST image_transform *this, +extern void image_transform_default_ini(const image_transform *this, + transform_display *that); /* silence GCC warnings */ + +void /* private, but almost always needed */ +image_transform_default_ini(const image_transform *this, transform_display *that) { this->next->ini(this->next, that); @@ -6402,7 +6579,7 @@ image_transform_default_ini(PNG_CONST image_transform *this, #ifdef PNG_READ_BACKGROUND_SUPPORTED static int image_transform_default_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { UNUSED(colour_type) UNUSED(bit_depth) @@ -6417,7 +6594,7 @@ image_transform_default_add(image_transform *this, #ifdef PNG_READ_EXPAND_SUPPORTED /* png_set_palette_to_rgb */ static void -image_transform_png_set_palette_to_rgb_set(PNG_CONST image_transform *this, +image_transform_png_set_palette_to_rgb_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_set_palette_to_rgb(pp); @@ -6425,9 +6602,9 @@ image_transform_png_set_palette_to_rgb_set(PNG_CONST image_transform *this, } static void -image_transform_png_set_palette_to_rgb_mod(PNG_CONST image_transform *this, +image_transform_png_set_palette_to_rgb_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { if (that->colour_type == PNG_COLOR_TYPE_PALETTE) image_pixel_convert_PLTE(that); @@ -6437,7 +6614,7 @@ image_transform_png_set_palette_to_rgb_mod(PNG_CONST image_transform *this, static int image_transform_png_set_palette_to_rgb_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { UNUSED(bit_depth) @@ -6455,7 +6632,7 @@ IT(palette_to_rgb); #ifdef PNG_READ_EXPAND_SUPPORTED /* png_set_tRNS_to_alpha */ static void -image_transform_png_set_tRNS_to_alpha_set(PNG_CONST image_transform *this, +image_transform_png_set_tRNS_to_alpha_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_set_tRNS_to_alpha(pp); @@ -6470,20 +6647,27 @@ image_transform_png_set_tRNS_to_alpha_set(PNG_CONST image_transform *this, } static void -image_transform_png_set_tRNS_to_alpha_mod(PNG_CONST image_transform *this, +image_transform_png_set_tRNS_to_alpha_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { +#if PNG_LIBPNG_VER < 10700 /* LIBPNG BUG: this always forces palette images to RGB. */ if (that->colour_type == PNG_COLOR_TYPE_PALETTE) image_pixel_convert_PLTE(that); +#endif /* This effectively does an 'expand' only if there is some transparency to * convert to an alpha channel. */ if (that->have_tRNS) - image_pixel_add_alpha(that, &display->this); +# if PNG_LIBPNG_VER >= 10700 + if (that->colour_type != PNG_COLOR_TYPE_PALETTE && + (that->colour_type & PNG_COLOR_MASK_ALPHA) == 0) +# endif + image_pixel_add_alpha(that, &display->this, 0/*!for background*/); +#if PNG_LIBPNG_VER < 10700 /* LIBPNG BUG: otherwise libpng still expands to 8 bits! */ else { @@ -6492,13 +6676,14 @@ image_transform_png_set_tRNS_to_alpha_mod(PNG_CONST image_transform *this, if (that->sample_depth < 8) that->sample_depth = 8; } +#endif this->next->mod(this->next, that, pp, display); } static int image_transform_png_set_tRNS_to_alpha_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { UNUSED(bit_depth) @@ -6507,9 +6692,14 @@ image_transform_png_set_tRNS_to_alpha_add(image_transform *this, /* We don't know yet whether there will be a tRNS chunk, but we know that * this transformation should do nothing if there already is an alpha - * channel. + * channel. In addition, after the bug fix in 1.7.0, there is no longer + * any action on a palette image. */ - return (colour_type & PNG_COLOR_MASK_ALPHA) == 0; + return +# if PNG_LIBPNG_VER >= 10700 + colour_type != PNG_COLOR_TYPE_PALETTE && +# endif + (colour_type & PNG_COLOR_MASK_ALPHA) == 0; } IT(tRNS_to_alpha); @@ -6520,7 +6710,7 @@ IT(tRNS_to_alpha); #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED /* png_set_gray_to_rgb */ static void -image_transform_png_set_gray_to_rgb_set(PNG_CONST image_transform *this, +image_transform_png_set_gray_to_rgb_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_set_gray_to_rgb(pp); @@ -6529,9 +6719,9 @@ image_transform_png_set_gray_to_rgb_set(PNG_CONST image_transform *this, } static void -image_transform_png_set_gray_to_rgb_mod(PNG_CONST image_transform *this, +image_transform_png_set_gray_to_rgb_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { /* NOTE: we can actually pend the tRNS processing at this point because we * can correctly recognize the original pixel value even though we have @@ -6539,7 +6729,7 @@ image_transform_png_set_gray_to_rgb_mod(PNG_CONST image_transform *this, * doesn't do this, so we don't either. */ if ((that->colour_type & PNG_COLOR_MASK_COLOR) == 0 && that->have_tRNS) - image_pixel_add_alpha(that, &display->this); + image_pixel_add_alpha(that, &display->this, 0/*!for background*/); /* Simply expand the bit depth and alter the colour type as required. */ if (that->colour_type == PNG_COLOR_TYPE_GRAY) @@ -6562,7 +6752,7 @@ image_transform_png_set_gray_to_rgb_mod(PNG_CONST image_transform *this, static int image_transform_png_set_gray_to_rgb_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { UNUSED(bit_depth) @@ -6580,7 +6770,7 @@ IT(gray_to_rgb); #ifdef PNG_READ_EXPAND_SUPPORTED /* png_set_expand */ static void -image_transform_png_set_expand_set(PNG_CONST image_transform *this, +image_transform_png_set_expand_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_set_expand(pp); @@ -6592,9 +6782,9 @@ image_transform_png_set_expand_set(PNG_CONST image_transform *this, } static void -image_transform_png_set_expand_mod(PNG_CONST image_transform *this, +image_transform_png_set_expand_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { /* The general expand case depends on what the colour type is: */ if (that->colour_type == PNG_COLOR_TYPE_PALETTE) @@ -6603,14 +6793,14 @@ image_transform_png_set_expand_mod(PNG_CONST image_transform *this, that->sample_depth = that->bit_depth = 8; if (that->have_tRNS) - image_pixel_add_alpha(that, &display->this); + image_pixel_add_alpha(that, &display->this, 0/*!for background*/); this->next->mod(this->next, that, pp, display); } static int image_transform_png_set_expand_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { UNUSED(bit_depth) @@ -6630,11 +6820,11 @@ IT(expand); #ifdef PNG_READ_EXPAND_SUPPORTED /* png_set_expand_gray_1_2_4_to_8 - * LIBPNG BUG: this just does an 'expand' + * Pre 1.7.0 LIBPNG BUG: this just does an 'expand' */ static void image_transform_png_set_expand_gray_1_2_4_to_8_set( - PNG_CONST image_transform *this, transform_display *that, png_structp pp, + const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_set_expand_gray_1_2_4_to_8(pp); @@ -6644,18 +6834,39 @@ image_transform_png_set_expand_gray_1_2_4_to_8_set( static void image_transform_png_set_expand_gray_1_2_4_to_8_mod( - PNG_CONST image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const image_transform *this, image_pixel *that, png_const_structp pp, + const transform_display *display) { +#if PNG_LIBPNG_VER < 10700 image_transform_png_set_expand_mod(this, that, pp, display); +#else + /* Only expand grayscale of bit depth less than 8: */ + if (that->colour_type == PNG_COLOR_TYPE_GRAY && + that->bit_depth < 8) + that->sample_depth = that->bit_depth = 8; + + this->next->mod(this->next, that, pp, display); +#endif /* 1.7 or later */ } static int image_transform_png_set_expand_gray_1_2_4_to_8_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { +#if PNG_LIBPNG_VER < 10700 return image_transform_png_set_expand_add(this, that, colour_type, bit_depth); +#else + UNUSED(bit_depth) + + this->next = *that; + *that = this; + + /* This should do nothing unless the color type is gray and the bit depth is + * less than 8: + */ + return colour_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8; +#endif /* 1.7 or later */ } IT(expand_gray_1_2_4_to_8); @@ -6666,22 +6877,24 @@ IT(expand_gray_1_2_4_to_8); #ifdef PNG_READ_EXPAND_16_SUPPORTED /* png_set_expand_16 */ static void -image_transform_png_set_expand_16_set(PNG_CONST image_transform *this, +image_transform_png_set_expand_16_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_set_expand_16(pp); - /* NOTE: at present libpng does SET_EXPAND as well, so tRNS is expanded. */ - if (that->this.has_tRNS) - that->this.is_transparent = 1; + /* NOTE: prior to 1.7 libpng does SET_EXPAND as well, so tRNS is expanded. */ +# if PNG_LIBPNG_VER < 10700 + if (that->this.has_tRNS) + that->this.is_transparent = 1; +# endif this->next->set(this->next, that, pp, pi); } static void -image_transform_png_set_expand_16_mod(PNG_CONST image_transform *this, +image_transform_png_set_expand_16_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { /* Expect expand_16 to expand everything to 16 bits as a result of also * causing 'expand' to happen. @@ -6690,7 +6903,7 @@ image_transform_png_set_expand_16_mod(PNG_CONST image_transform *this, image_pixel_convert_PLTE(that); if (that->have_tRNS) - image_pixel_add_alpha(that, &display->this); + image_pixel_add_alpha(that, &display->this, 0/*!for background*/); if (that->bit_depth < 16) that->sample_depth = that->bit_depth = 16; @@ -6700,7 +6913,7 @@ image_transform_png_set_expand_16_mod(PNG_CONST image_transform *this, static int image_transform_png_set_expand_16_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { UNUSED(colour_type) @@ -6719,17 +6932,21 @@ IT(expand_16); #ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED /* API added in 1.5.4 */ /* png_set_scale_16 */ static void -image_transform_png_set_scale_16_set(PNG_CONST image_transform *this, +image_transform_png_set_scale_16_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_set_scale_16(pp); +# if PNG_LIBPNG_VER < 10700 + /* libpng will limit the gamma table size: */ + that->max_gamma_8 = PNG_MAX_GAMMA_8; +# endif this->next->set(this->next, that, pp, pi); } static void -image_transform_png_set_scale_16_mod(PNG_CONST image_transform *this, +image_transform_png_set_scale_16_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { if (that->bit_depth == 16) { @@ -6745,7 +6962,7 @@ image_transform_png_set_scale_16_mod(PNG_CONST image_transform *this, static int image_transform_png_set_scale_16_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { UNUSED(colour_type) @@ -6763,17 +6980,21 @@ IT(scale_16); #ifdef PNG_READ_16_TO_8_SUPPORTED /* the default before 1.5.4 */ /* png_set_strip_16 */ static void -image_transform_png_set_strip_16_set(PNG_CONST image_transform *this, +image_transform_png_set_strip_16_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_set_strip_16(pp); +# if PNG_LIBPNG_VER < 10700 + /* libpng will limit the gamma table size: */ + that->max_gamma_8 = PNG_MAX_GAMMA_8; +# endif this->next->set(this->next, that, pp, pi); } static void -image_transform_png_set_strip_16_mod(PNG_CONST image_transform *this, +image_transform_png_set_strip_16_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { if (that->bit_depth == 16) { @@ -6798,7 +7019,7 @@ image_transform_png_set_strip_16_mod(PNG_CONST image_transform *this, * png_set_scale_16 API in 1.5.4 (but 1.5.4+ always defines the above!) */ { - PNG_CONST double d = (255-128.5)/65535; + const double d = (255-128.5)/65535; that->rede += d; that->greene += d; that->bluee += d; @@ -6812,7 +7033,7 @@ image_transform_png_set_strip_16_mod(PNG_CONST image_transform *this, static int image_transform_png_set_strip_16_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { UNUSED(colour_type) @@ -6830,7 +7051,7 @@ IT(strip_16); #ifdef PNG_READ_STRIP_ALPHA_SUPPORTED /* png_set_strip_alpha */ static void -image_transform_png_set_strip_alpha_set(PNG_CONST image_transform *this, +image_transform_png_set_strip_alpha_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_set_strip_alpha(pp); @@ -6838,9 +7059,9 @@ image_transform_png_set_strip_alpha_set(PNG_CONST image_transform *this, } static void -image_transform_png_set_strip_alpha_mod(PNG_CONST image_transform *this, +image_transform_png_set_strip_alpha_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { if (that->colour_type == PNG_COLOR_TYPE_GRAY_ALPHA) that->colour_type = PNG_COLOR_TYPE_GRAY; @@ -6855,7 +7076,7 @@ image_transform_png_set_strip_alpha_mod(PNG_CONST image_transform *this, static int image_transform_png_set_strip_alpha_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { UNUSED(bit_depth) @@ -6876,7 +7097,8 @@ IT(strip_alpha); * png_fixed_point green) * png_get_rgb_to_gray_status * - * The 'default' test here uses values known to be used inside libpng: + * The 'default' test here uses values known to be used inside libpng prior to + * 1.7.0: * * red: 6968 * green: 23434 @@ -6913,11 +7135,11 @@ static struct #undef image_transform_ini #define image_transform_ini image_transform_png_set_rgb_to_gray_ini static void -image_transform_png_set_rgb_to_gray_ini(PNG_CONST image_transform *this, +image_transform_png_set_rgb_to_gray_ini(const image_transform *this, transform_display *that) { png_modifier *pm = that->pm; - PNG_CONST color_encoding *e = pm->current_encoding; + const color_encoding *e = pm->current_encoding; UNUSED(this) @@ -6932,7 +7154,7 @@ image_transform_png_set_rgb_to_gray_ini(PNG_CONST image_transform *this, /* Coefficients come from the encoding, but may need to be normalized to a * white point Y of 1.0 */ - PNG_CONST double whiteY = e->red.Y + e->green.Y + e->blue.Y; + const double whiteY = e->red.Y + e->green.Y + e->blue.Y; data.red_coefficient = e->red.Y; data.green_coefficient = e->green.Y; @@ -6949,9 +7171,15 @@ image_transform_png_set_rgb_to_gray_ini(PNG_CONST image_transform *this, else { /* The default (built in) coeffcients, as above: */ - data.red_coefficient = 6968 / 32768.; - data.green_coefficient = 23434 / 32768.; - data.blue_coefficient = 2366 / 32768.; +# if PNG_LIBPNG_VER < 10700 + data.red_coefficient = 6968 / 32768.; + data.green_coefficient = 23434 / 32768.; + data.blue_coefficient = 2366 / 32768.; +# else + data.red_coefficient = .2126; + data.green_coefficient = .7152; + data.blue_coefficient = .0722; +# endif } data.gamma = pm->current_gamma; @@ -7026,14 +7254,15 @@ image_transform_png_set_rgb_to_gray_ini(PNG_CONST image_transform *this, * conversion adds another +/-2 in the 16-bit case and * +/-(1<<(15-PNG_MAX_GAMMA_8)) in the 8-bit case. */ +# if PNG_LIBPNG_VER < 10700 + if (that->this.bit_depth < 16) + that->max_gamma_8 = PNG_MAX_GAMMA_8; +# endif that->pm->limit += pow( -# if PNG_MAX_GAMMA_8 < 14 - (that->this.bit_depth == 16 ? 8. : - 6. + (1<<(15-PNG_MAX_GAMMA_8))) -# else - 8. -# endif - /65535, data.gamma); + (that->this.bit_depth == 16 || that->max_gamma_8 > 14 ? + 8. : + 6. + (1<<(15-that->max_gamma_8)) + )/65535, data.gamma); } else @@ -7071,10 +7300,10 @@ image_transform_png_set_rgb_to_gray_ini(PNG_CONST image_transform *this, } static void -image_transform_png_set_rgb_to_gray_set(PNG_CONST image_transform *this, +image_transform_png_set_rgb_to_gray_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { - PNG_CONST int error_action = 1; /* no error, no defines in png.h */ + const int error_action = 1; /* no error, no defines in png.h */ # ifdef PNG_FLOATING_POINT_SUPPORTED png_set_rgb_to_gray(pp, error_action, data.red_to_set, data.green_to_set); @@ -7111,7 +7340,7 @@ image_transform_png_set_rgb_to_gray_set(PNG_CONST image_transform *this, & PNG_INFO_cHRM) != 0) { double maxe; - PNG_CONST char *el; + const char *el; color_encoding e, o; /* Expect libpng to return a normalized result, but the original @@ -7198,27 +7427,32 @@ image_transform_png_set_rgb_to_gray_set(PNG_CONST image_transform *this, } static void -image_transform_png_set_rgb_to_gray_mod(PNG_CONST image_transform *this, +image_transform_png_set_rgb_to_gray_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { if ((that->colour_type & PNG_COLOR_MASK_COLOR) != 0) { double gray, err; - if (that->colour_type == PNG_COLOR_TYPE_PALETTE) - image_pixel_convert_PLTE(that); +# if PNG_LIBPNG_VER < 10700 + if (that->colour_type == PNG_COLOR_TYPE_PALETTE) + image_pixel_convert_PLTE(that); +# endif /* Image now has RGB channels... */ # if DIGITIZE { - PNG_CONST png_modifier *pm = display->pm; + const png_modifier *pm = display->pm; const unsigned int sample_depth = that->sample_depth; const unsigned int calc_depth = (pm->assume_16_bit_calculations ? 16 : sample_depth); - const unsigned int gamma_depth = (sample_depth == 16 ? - PNG_MAX_GAMMA_8 : - (pm->assume_16_bit_calculations ? PNG_MAX_GAMMA_8 : sample_depth)); + const unsigned int gamma_depth = + (sample_depth == 16 ? + display->max_gamma_8 : + (pm->assume_16_bit_calculations ? + display->max_gamma_8 : + sample_depth)); int isgray; double r, g, b; double rlo, rhi, glo, ghi, blo, bhi, graylo, grayhi; @@ -7255,15 +7489,15 @@ image_transform_png_set_rgb_to_gray_mod(PNG_CONST image_transform *this, b = blo = bhi = that->bluef; blo -= that->bluee; blo = DD(blo, calc_depth, 1/*round*/); - bhi += that->greene; + bhi += that->bluee; bhi = DU(bhi, calc_depth, 1/*round*/); isgray = r==g && g==b; if (data.gamma != 1) { - PNG_CONST double power = 1/data.gamma; - PNG_CONST double abse = .5/(sample_depth == 16 ? 65535 : 255); + const double power = 1/data.gamma; + const double abse = .5/(sample_depth == 16 ? 65535 : 255); /* If a gamma calculation is done it is done using lookup tables of * precision gamma_depth, so the already digitized value above may @@ -7307,8 +7541,8 @@ image_transform_png_set_rgb_to_gray_mod(PNG_CONST image_transform *this, b * data.blue_coefficient; { - PNG_CONST int do_round = data.gamma != 1 || calc_depth == 16; - PNG_CONST double ce = 2. / 32768; + const int do_round = data.gamma != 1 || calc_depth == 16; + const double ce = 2. / 32768; graylo = DD(rlo * (data.red_coefficient-ce) + glo * (data.green_coefficient-ce) + @@ -7326,7 +7560,7 @@ image_transform_png_set_rgb_to_gray_mod(PNG_CONST image_transform *this, /* And invert the gamma. */ if (data.gamma != 1) { - PNG_CONST double power = data.gamma; + const double power = data.gamma; /* And this happens yet again, shifting the values once more. */ if (gamma_depth != sample_depth) @@ -7384,16 +7618,21 @@ image_transform_png_set_rgb_to_gray_mod(PNG_CONST image_transform *this, double b = that->bluef; double be = that->bluee; - /* The true gray case involves no math. */ - if (r == g && r == b) - { - gray = r; - err = re; - if (err < ge) err = ge; - if (err < be) err = be; - } +# if PNG_LIBPNG_VER < 10700 + /* The true gray case involves no math in earlier versions (not + * true, there was some if gamma correction was happening too.) + */ + if (r == g && r == b) + { + gray = r; + err = re; + if (err < ge) err = ge; + if (err < be) err = be; + } - else if (data.gamma == 1) + else +# endif /* before 1.7 */ + if (data.gamma == 1) { /* There is no need to do the conversions to and from linear space, * so the calculation should be a lot more accurate. There is a @@ -7429,10 +7668,10 @@ image_transform_png_set_rgb_to_gray_mod(PNG_CONST image_transform *this, * lookups in the calculation and each introduces a quantization * error defined by the table size. */ - PNG_CONST png_modifier *pm = display->pm; + const png_modifier *pm = display->pm; double in_qe = (that->sample_depth > 8 ? .5/65535 : .5/255); double out_qe = (that->sample_depth > 8 ? .5/65535 : - (pm->assume_16_bit_calculations ? .5/(1<<PNG_MAX_GAMMA_8) : + (pm->assume_16_bit_calculations ? .5/(1<<display->max_gamma_8) : .5/255)); double rhi, ghi, bhi, grayhi; double g1 = 1/data.gamma; @@ -7519,7 +7758,7 @@ image_transform_png_set_rgb_to_gray_mod(PNG_CONST image_transform *this, static int image_transform_png_set_rgb_to_gray_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { UNUSED(bit_depth) @@ -7550,7 +7789,7 @@ IT(rgb_to_gray); static image_pixel data; static void -image_transform_png_set_background_set(PNG_CONST image_transform *this, +image_transform_png_set_background_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_byte colour_type, bit_depth; @@ -7613,13 +7852,13 @@ image_transform_png_set_background_set(PNG_CONST image_transform *this, } static void -image_transform_png_set_background_mod(PNG_CONST image_transform *this, +image_transform_png_set_background_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { /* Check for tRNS first: */ if (that->have_tRNS && that->colour_type != PNG_COLOR_TYPE_PALETTE) - image_pixel_add_alpha(that, &display->this); + image_pixel_add_alpha(that, &display->this, 1/*for background*/); /* This is only necessary if the alpha value is less than 1. */ if (that->alphaf < 1) @@ -7698,7 +7937,7 @@ IT(background); * png_set_invert_alpha(png_structrp png_ptr) */ static void -image_transform_png_set_invert_alpha_set(PNG_CONST image_transform *this, +image_transform_png_set_invert_alpha_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_set_invert_alpha(pp); @@ -7706,9 +7945,9 @@ image_transform_png_set_invert_alpha_set(PNG_CONST image_transform *this, } static void -image_transform_png_set_invert_alpha_mod(PNG_CONST image_transform *this, +image_transform_png_set_invert_alpha_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { if (that->colour_type & 4) that->alpha_inverted = 1; @@ -7718,7 +7957,7 @@ image_transform_png_set_invert_alpha_mod(PNG_CONST image_transform *this, static int image_transform_png_set_invert_alpha_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { UNUSED(bit_depth) @@ -7744,7 +7983,7 @@ IT(invert_alpha); * This only has an effect on RGB and RGBA pixels. */ static void -image_transform_png_set_bgr_set(PNG_CONST image_transform *this, +image_transform_png_set_bgr_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_set_bgr(pp); @@ -7752,9 +7991,9 @@ image_transform_png_set_bgr_set(PNG_CONST image_transform *this, } static void -image_transform_png_set_bgr_mod(PNG_CONST image_transform *this, +image_transform_png_set_bgr_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { if (that->colour_type == PNG_COLOR_TYPE_RGB || that->colour_type == PNG_COLOR_TYPE_RGBA) @@ -7765,7 +8004,7 @@ image_transform_png_set_bgr_mod(PNG_CONST image_transform *this, static int image_transform_png_set_bgr_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { UNUSED(bit_depth) @@ -7791,7 +8030,7 @@ IT(bgr); * This only has an effect on GA and RGBA pixels. */ static void -image_transform_png_set_swap_alpha_set(PNG_CONST image_transform *this, +image_transform_png_set_swap_alpha_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_set_swap_alpha(pp); @@ -7799,9 +8038,9 @@ image_transform_png_set_swap_alpha_set(PNG_CONST image_transform *this, } static void -image_transform_png_set_swap_alpha_mod(PNG_CONST image_transform *this, +image_transform_png_set_swap_alpha_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { if (that->colour_type == PNG_COLOR_TYPE_GA || that->colour_type == PNG_COLOR_TYPE_RGBA) @@ -7812,7 +8051,7 @@ image_transform_png_set_swap_alpha_mod(PNG_CONST image_transform *this, static int image_transform_png_set_swap_alpha_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { UNUSED(bit_depth) @@ -7836,7 +8075,7 @@ IT(swap_alpha); * png_set_swap(png_structrp png_ptr) */ static void -image_transform_png_set_swap_set(PNG_CONST image_transform *this, +image_transform_png_set_swap_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_set_swap(pp); @@ -7844,9 +8083,9 @@ image_transform_png_set_swap_set(PNG_CONST image_transform *this, } static void -image_transform_png_set_swap_mod(PNG_CONST image_transform *this, +image_transform_png_set_swap_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { if (that->bit_depth == 16) that->swap16 = 1; @@ -7856,7 +8095,7 @@ image_transform_png_set_swap_mod(PNG_CONST image_transform *this, static int image_transform_png_set_swap_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { UNUSED(colour_type) @@ -7890,7 +8129,7 @@ static struct } data; static void -image_transform_png_set_filler_set(PNG_CONST image_transform *this, +image_transform_png_set_filler_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { /* Need a random choice for 'before' and 'after' as well as for the @@ -7911,15 +8150,15 @@ image_transform_png_set_filler_set(PNG_CONST image_transform *this, } static void -image_transform_png_set_filler_mod(PNG_CONST image_transform *this, +image_transform_png_set_filler_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { if (that->bit_depth >= 8 && (that->colour_type == PNG_COLOR_TYPE_RGB || that->colour_type == PNG_COLOR_TYPE_GRAY)) { - PNG_CONST unsigned int max = (1U << that->bit_depth)-1; + const unsigned int max = (1U << that->bit_depth)-1; that->alpha = data.filler & max; that->alphaf = ((double)that->alpha) / max; that->alphae = 0; @@ -7939,7 +8178,7 @@ image_transform_png_set_filler_mod(PNG_CONST image_transform *this, static int image_transform_png_set_filler_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { this->next = *that; *that = this; @@ -7963,7 +8202,7 @@ static struct } data; static void -image_transform_png_set_add_alpha_set(PNG_CONST image_transform *this, +image_transform_png_set_add_alpha_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { /* Need a random choice for 'before' and 'after' as well as for the @@ -7978,15 +8217,15 @@ image_transform_png_set_add_alpha_set(PNG_CONST image_transform *this, } static void -image_transform_png_set_add_alpha_mod(PNG_CONST image_transform *this, +image_transform_png_set_add_alpha_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { if (that->bit_depth >= 8 && (that->colour_type == PNG_COLOR_TYPE_RGB || that->colour_type == PNG_COLOR_TYPE_GRAY)) { - PNG_CONST unsigned int max = (1U << that->bit_depth)-1; + const unsigned int max = (1U << that->bit_depth)-1; that->alpha = data.filler & max; that->alphaf = ((double)that->alpha) / max; that->alphae = 0; @@ -8000,7 +8239,7 @@ image_transform_png_set_add_alpha_mod(PNG_CONST image_transform *this, static int image_transform_png_set_add_alpha_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { this->next = *that; *that = this; @@ -8026,7 +8265,7 @@ IT(add_alpha); * per pixel. */ static void -image_transform_png_set_packing_set(PNG_CONST image_transform *this, +image_transform_png_set_packing_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_set_packing(pp); @@ -8035,9 +8274,9 @@ image_transform_png_set_packing_set(PNG_CONST image_transform *this, } static void -image_transform_png_set_packing_mod(PNG_CONST image_transform *this, +image_transform_png_set_packing_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { /* The general expand case depends on what the colour type is, * low bit-depth pixel values are unpacked into bytes without @@ -8051,7 +8290,7 @@ image_transform_png_set_packing_mod(PNG_CONST image_transform *this, static int image_transform_png_set_packing_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { UNUSED(colour_type) @@ -8076,17 +8315,18 @@ IT(packing); * png_set_packswap(png_structrp png_ptr) */ static void -image_transform_png_set_packswap_set(PNG_CONST image_transform *this, +image_transform_png_set_packswap_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_set_packswap(pp); + that->this.littleendian = 1; this->next->set(this->next, that, pp, pi); } static void -image_transform_png_set_packswap_mod(PNG_CONST image_transform *this, +image_transform_png_set_packswap_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { if (that->bit_depth < 8) that->littleendian = 1; @@ -8096,7 +8336,7 @@ image_transform_png_set_packswap_mod(PNG_CONST image_transform *this, static int image_transform_png_set_packswap_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { UNUSED(colour_type) @@ -8120,7 +8360,7 @@ IT(packswap); * png_set_invert_mono(png_structrp png_ptr) */ static void -image_transform_png_set_invert_mono_set(PNG_CONST image_transform *this, +image_transform_png_set_invert_mono_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_set_invert_mono(pp); @@ -8128,9 +8368,9 @@ image_transform_png_set_invert_mono_set(PNG_CONST image_transform *this, } static void -image_transform_png_set_invert_mono_mod(PNG_CONST image_transform *this, +image_transform_png_set_invert_mono_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { if (that->colour_type & 4) that->mono_inverted = 1; @@ -8140,7 +8380,7 @@ image_transform_png_set_invert_mono_mod(PNG_CONST image_transform *this, static int image_transform_png_set_invert_mono_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { UNUSED(bit_depth) @@ -8167,7 +8407,7 @@ IT(invert_mono); static png_color_8 data; static void -image_transform_png_set_shift_set(PNG_CONST image_transform *this, +image_transform_png_set_shift_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { /* Get a random set of shifts. The shifts need to do something @@ -8176,7 +8416,7 @@ image_transform_png_set_shift_set(PNG_CONST image_transform *this, * field is randomized independently. This acts as a check that * libpng does use the correct field. */ - PNG_CONST unsigned int depth = that->this.bit_depth; + const unsigned int depth = that->this.bit_depth; data.red = (png_byte)/*SAFE*/(random_mod(depth)+1); data.green = (png_byte)/*SAFE*/(random_mod(depth)+1); @@ -8189,9 +8429,9 @@ image_transform_png_set_shift_set(PNG_CONST image_transform *this, } static void -image_transform_png_set_shift_mod(PNG_CONST image_transform *this, +image_transform_png_set_shift_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { /* Copy the correct values into the sBIT fields, libpng does not do * anything to palette data: @@ -8222,7 +8462,7 @@ image_transform_png_set_shift_mod(PNG_CONST image_transform *this, static int image_transform_png_set_shift_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { UNUSED(bit_depth) @@ -8240,7 +8480,7 @@ IT(shift); #ifdef THIS_IS_THE_PROFORMA static void -image_transform_png_set_@_set(PNG_CONST image_transform *this, +image_transform_png_set_@_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_set_@(pp); @@ -8248,16 +8488,16 @@ image_transform_png_set_@_set(PNG_CONST image_transform *this, } static void -image_transform_png_set_@_mod(PNG_CONST image_transform *this, +image_transform_png_set_@_mod(const image_transform *this, image_pixel *that, png_const_structp pp, - PNG_CONST transform_display *display) + const transform_display *display) { this->next->mod(this->next, that, pp, display); } static int image_transform_png_set_@_add(image_transform *this, - PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) + const image_transform **that, png_byte colour_type, png_byte bit_depth) { this->next = *that; *that = this; @@ -8270,10 +8510,10 @@ IT(@); /* This may just be 'end' if all the transforms are disabled! */ -static image_transform *PNG_CONST image_transform_first = &PT; +static image_transform *const image_transform_first = &PT; static void -transform_enable(PNG_CONST char *name) +transform_enable(const char *name) { /* Everything starts out enabled, so if we see an 'enable' disabled * everything else the first time round. @@ -8306,7 +8546,7 @@ transform_enable(PNG_CONST char *name) } static void -transform_disable(PNG_CONST char *name) +transform_disable(const char *name) { image_transform *list = image_transform_first; @@ -8369,7 +8609,7 @@ image_transform_test_counter(png_uint_32 counter, unsigned int max) } static png_uint_32 -image_transform_add(PNG_CONST image_transform **this, unsigned int max, +image_transform_add(const image_transform **this, unsigned int max, png_uint_32 counter, char *name, size_t sizeof_name, size_t *pos, png_byte colour_type, png_byte bit_depth) { @@ -8465,7 +8705,7 @@ perform_transform_test(png_modifier *pm) for (;;) { size_t pos = base_pos; - PNG_CONST image_transform *list = 0; + const image_transform *list = 0; /* 'max' is currently hardwired to '1'; this should be settable on the * command line. @@ -8526,11 +8766,11 @@ static void gamma_display_init(gamma_display *dp, png_modifier *pm, png_uint_32 id, double file_gamma, double screen_gamma, png_byte sbit, int threshold_test, int use_input_precision, int scale16, int expand16, - int do_background, PNG_CONST png_color_16 *pointer_to_the_background_color, + int do_background, const png_color_16 *pointer_to_the_background_color, double background_gamma) { /* Standard fields */ - standard_display_init(&dp->this, &pm->this, id, 0/*do_interlace*/, + standard_display_init(&dp->this, &pm->this, id, do_read_interlace, pm->use_update_info); /* Parameter fields */ @@ -8562,7 +8802,7 @@ gamma_info_imp(gamma_display *dp, png_structp pp, png_infop pi) /* If requested strip 16 to 8 bits - this is handled automagically below * because the output bit depth is read from the library. Note that there * are interactions with sBIT but, internally, libpng makes sbit at most - * PNG_MAX_GAMMA_8 when doing the following. + * PNG_MAX_GAMMA_8 prior to 1.7 when doing the following. */ if (dp->scale16) # ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED @@ -8594,9 +8834,9 @@ gamma_info_imp(gamma_display *dp, png_structp pp, png_infop pi) * non-inverted, represenation. It provides a default for the PNG file * gamma, but since the file has a gAMA chunk this does not matter. */ - PNG_CONST double sg = dp->screen_gamma; + const double sg = dp->screen_gamma; # ifndef PNG_FLOATING_POINT_SUPPORTED - PNG_CONST png_fixed_point g = fix(sg); + const png_fixed_point g = fix(sg); # endif # ifdef PNG_FLOATING_POINT_SUPPORTED @@ -8642,9 +8882,9 @@ gamma_info_imp(gamma_display *dp, png_structp pp, png_infop pi) # ifdef PNG_READ_BACKGROUND_SUPPORTED /* NOTE: this assumes the caller provided the correct background gamma! */ - PNG_CONST double bg = dp->background_gamma; + const double bg = dp->background_gamma; # ifndef PNG_FLOATING_POINT_SUPPORTED - PNG_CONST png_fixed_point g = fix(bg); + const png_fixed_point g = fix(bg); # endif # ifdef PNG_FLOATING_POINT_SUPPORTED @@ -8718,7 +8958,7 @@ static void init_validate_info(validate_info *vi, gamma_display *dp, png_const_structp pp, int in_depth, int out_depth) { - PNG_CONST unsigned int outmax = (1U<<out_depth)-1; + const unsigned int outmax = (1U<<out_depth)-1; vi->pp = pp; vi->dp = dp; @@ -8765,7 +9005,7 @@ init_validate_info(validate_info *vi, gamma_display *dp, png_const_structp pp, if (vi->do_background != 0) { - PNG_CONST double bg_inverse = 1/dp->background_gamma; + const double bg_inverse = 1/dp->background_gamma; double r, g, b; /* Caller must at least put the gray value into the red channel */ @@ -8879,15 +9119,15 @@ gamma_component_compose(int do_background, double input_sample, double alpha, /* This API returns the encoded *input* component, in the range 0..1 */ static double -gamma_component_validate(PNG_CONST char *name, PNG_CONST validate_info *vi, - PNG_CONST unsigned int id, PNG_CONST unsigned int od, - PNG_CONST double alpha /* <0 for the alpha channel itself */, - PNG_CONST double background /* component background value */) +gamma_component_validate(const char *name, const validate_info *vi, + const unsigned int id, const unsigned int od, + const double alpha /* <0 for the alpha channel itself */, + const double background /* component background value */) { - PNG_CONST unsigned int isbit = id >> vi->isbit_shift; - PNG_CONST unsigned int sbit_max = vi->sbit_max; - PNG_CONST unsigned int outmax = vi->outmax; - PNG_CONST int do_background = vi->do_background; + const unsigned int isbit = id >> vi->isbit_shift; + const unsigned int sbit_max = vi->sbit_max; + const unsigned int outmax = vi->outmax; + const int do_background = vi->do_background; double i; @@ -9452,14 +9692,14 @@ gamma_image_validate(gamma_display *dp, png_const_structp pp, png_infop pi) { /* Get some constants derived from the input and output file formats: */ - PNG_CONST png_store* PNG_CONST ps = dp->this.ps; - PNG_CONST png_byte in_ct = dp->this.colour_type; - PNG_CONST png_byte in_bd = dp->this.bit_depth; - PNG_CONST png_uint_32 w = dp->this.w; - PNG_CONST png_uint_32 h = dp->this.h; - PNG_CONST size_t cbRow = dp->this.cbRow; - PNG_CONST png_byte out_ct = png_get_color_type(pp, pi); - PNG_CONST png_byte out_bd = png_get_bit_depth(pp, pi); + const png_store* const ps = dp->this.ps; + const png_byte in_ct = dp->this.colour_type; + const png_byte in_bd = dp->this.bit_depth; + const png_uint_32 w = dp->this.w; + const png_uint_32 h = dp->this.h; + const size_t cbRow = dp->this.cbRow; + const png_byte out_ct = png_get_color_type(pp, pi); + const png_byte out_bd = png_get_bit_depth(pp, pi); /* There are three sources of error, firstly the quantization in the * file encoding, determined by sbit and/or the file depth, secondly @@ -9500,11 +9740,11 @@ gamma_image_validate(gamma_display *dp, png_const_structp pp, * The basic tests below do not do this, however if 'use_input_precision' * is set a subsequent test is performed above. */ - PNG_CONST unsigned int samples_per_pixel = (out_ct & 2U) ? 3U : 1U; + const unsigned int samples_per_pixel = (out_ct & 2U) ? 3U : 1U; int processing; png_uint_32 y; - PNG_CONST store_palette_entry *in_palette = dp->this.palette; - PNG_CONST int in_is_transparent = dp->this.is_transparent; + const store_palette_entry *in_palette = dp->this.palette; + const int in_is_transparent = dp->this.is_transparent; int process_tRNS; int out_npalette = -1; int out_is_transparent = 0; /* Just refers to the palette case */ @@ -9552,9 +9792,9 @@ gamma_image_validate(gamma_display *dp, png_const_structp pp, double alpha = 1; /* serves as a flag value */ /* Record the palette index for index images. */ - PNG_CONST unsigned int in_index = + const unsigned int in_index = in_ct == 3 ? sample(std, 3, in_bd, x, 0, 0, 0) : 256; - PNG_CONST unsigned int out_index = + const unsigned int out_index = out_ct == 3 ? sample(std, 3, out_bd, x, 0, 0, 0) : 256; /* Handle input alpha - png_set_background will cause the output @@ -9563,7 +9803,7 @@ gamma_image_validate(gamma_display *dp, png_const_structp pp, if ((in_ct & PNG_COLOR_MASK_ALPHA) != 0 || (in_ct == 3 && in_is_transparent)) { - PNG_CONST unsigned int input_alpha = in_ct == 3 ? + const unsigned int input_alpha = in_ct == 3 ? dp->this.palette[in_index].alpha : sample(std, in_ct, in_bd, x, samples_per_pixel, 0, 0); @@ -9688,15 +9928,15 @@ gamma_end(png_structp ppIn, png_infop pi) * maxpc: maximum percentage error (as a percentage) */ static void -gamma_test(png_modifier *pmIn, PNG_CONST png_byte colour_typeIn, - PNG_CONST png_byte bit_depthIn, PNG_CONST int palette_numberIn, - PNG_CONST int interlace_typeIn, - PNG_CONST double file_gammaIn, PNG_CONST double screen_gammaIn, - PNG_CONST png_byte sbitIn, PNG_CONST int threshold_testIn, - PNG_CONST char *name, - PNG_CONST int use_input_precisionIn, PNG_CONST int scale16In, - PNG_CONST int expand16In, PNG_CONST int do_backgroundIn, - PNG_CONST png_color_16 *bkgd_colorIn, double bkgd_gammaIn) +gamma_test(png_modifier *pmIn, const png_byte colour_typeIn, + const png_byte bit_depthIn, const int palette_numberIn, + const int interlace_typeIn, + const double file_gammaIn, const double screen_gammaIn, + const png_byte sbitIn, const int threshold_testIn, + const char *name, + const int use_input_precisionIn, const int scale16In, + const int expand16In, const int do_backgroundIn, + const png_color_16 *bkgd_colorIn, double bkgd_gammaIn) { gamma_display d; context(&pmIn->this, fault); @@ -9899,11 +10139,11 @@ perform_gamma_threshold_tests(png_modifier *pm) } static void gamma_transform_test(png_modifier *pm, - PNG_CONST png_byte colour_type, PNG_CONST png_byte bit_depth, - PNG_CONST int palette_number, - PNG_CONST int interlace_type, PNG_CONST double file_gamma, - PNG_CONST double screen_gamma, PNG_CONST png_byte sbit, - PNG_CONST int use_input_precision, PNG_CONST int scale16) + const png_byte colour_type, const png_byte bit_depth, + const int palette_number, + const int interlace_type, const double file_gamma, + const double screen_gamma, const png_byte sbit, + const int use_input_precision, const int scale16) { size_t pos = 0; char name[64]; @@ -10003,7 +10243,11 @@ static void perform_gamma_scale16_tests(png_modifier *pm) # ifndef PNG_MAX_GAMMA_8 # define PNG_MAX_GAMMA_8 11 # endif -# define SBIT_16_TO_8 PNG_MAX_GAMMA_8 +# if defined PNG_MAX_GAMMA_8 || PNG_LIBPNG_VER < 10700 +# define SBIT_16_TO_8 PNG_MAX_GAMMA_8 +# else +# define SBIT_16_TO_8 16 +# endif /* Include the alpha cases here. Note that sbit matches the internal value * used by the library - otherwise we will get spurious errors from the * internal sbit style approximation. @@ -10056,12 +10300,12 @@ static void perform_gamma_scale16_tests(png_modifier *pm) #if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\ defined(PNG_READ_ALPHA_MODE_SUPPORTED) static void gamma_composition_test(png_modifier *pm, - PNG_CONST png_byte colour_type, PNG_CONST png_byte bit_depth, - PNG_CONST int palette_number, - PNG_CONST int interlace_type, PNG_CONST double file_gamma, - PNG_CONST double screen_gamma, - PNG_CONST int use_input_precision, PNG_CONST int do_background, - PNG_CONST int expand_16) + const png_byte colour_type, const png_byte bit_depth, + const int palette_number, + const int interlace_type, const double file_gamma, + const double screen_gamma, + const int use_input_precision, const int do_background, + const int expand_16) { size_t pos = 0; png_const_charp base; @@ -10448,7 +10692,7 @@ perform_gamma_test(png_modifier *pm, int summary) * be indexed adam7[y][x] and notice that the pass numbers are based at * 1, not 0 - the base libpng uses. */ -static PNG_CONST +static const png_byte adam7[8][8] = { { 1,6,4,6,2,6,4,6 }, @@ -10799,7 +11043,7 @@ perform_interlace_macro_validation(void) * The png_modifier code assumes that encodings[0] is sRGB and treats it * specially: do not change the first entry in this list! */ -static PNG_CONST color_encoding test_encodings[] = +static const color_encoding test_encodings[] = { /* sRGB: must be first in this list! */ /*gamma:*/ { 1/2.2, @@ -10821,6 +11065,11 @@ static PNG_CONST color_encoding test_encodings[] = /*red: */ { 0.716500716779386, 0.258728243040113, 0.000000000000000 }, /*green:*/ { 0.101020574397477, 0.724682314948566, 0.051211818965388 }, /*blue: */ { 0.146774385252705, 0.016589442011321, 0.773892783545073} }, +/* Fake encoding which selects just the green channel */ +/*gamma:*/ { 1.45/2.2, /* the 'Mac' gamma */ +/*red: */ { 0.716500716779386, 0.000000000000000, 0.000000000000000 }, +/*green:*/ { 0.101020574397477, 1.000000000000000, 0.051211818965388 }, +/*blue: */ { 0.146774385252705, 0.000000000000000, 0.773892783545073} }, }; /* signal handler @@ -10892,11 +11141,11 @@ static void signal_handler(int signum) /* main program */ int main(int argc, char **argv) { - volatile int summary = 1; /* Print the error summary at the end */ - volatile int memstats = 0; /* Print memory statistics at the end */ + int summary = 1; /* Print the error summary at the end */ + int memstats = 0; /* Print memory statistics at the end */ /* Create the given output file on success: */ - PNG_CONST char *volatile touch = NULL; + const char *touch = NULL; /* This is an array of standard gamma values (believe it or not I've seen * every one of these mentioned somewhere.) @@ -10912,6 +11161,10 @@ int main(int argc, char **argv) anon_context(&pm.this); + gnu_volatile(summary) + gnu_volatile(memstats) + gnu_volatile(touch) + /* Add appropriate signal handlers, just the ANSI specified ones: */ signal(SIGABRT, signal_handler); signal(SIGFPE, signal_handler); @@ -10967,17 +11220,21 @@ int main(int argc, char **argv) # ifdef PNG_WRITE_tRNS_SUPPORTED pm.test_tRNS = 1; # endif - pm.test_lbg = 0; + pm.test_lbg = PNG_LIBPNG_VER >= 10600; pm.test_lbg_gamma_threshold = 1; - pm.test_lbg_gamma_transform = 0/*PNG_LIBPNG_VER >= 10700*/; + pm.test_lbg_gamma_transform = PNG_LIBPNG_VER >= 10600; pm.test_lbg_gamma_sbit = 1; - pm.test_lbg_gamma_composition = 0; + pm.test_lbg_gamma_composition = PNG_LIBPNG_VER >= 10700; /* And the test encodings */ pm.encodings = test_encodings; pm.nencodings = ARRAY_SIZE(test_encodings); - pm.sbitlow = 8U; /* because libpng doesn't do sBIT below 8! */ +# if PNG_LIBPNG_VER < 10700 + pm.sbitlow = 8U; /* because libpng doesn't do sBIT below 8! */ +# else + pm.sbitlow = 1U; +# endif /* The following allows results to pass if they correspond to anything in the * transformed range [input-.5,input+.5]; this is is required because of the @@ -11003,7 +11260,11 @@ int main(int argc, char **argv) pm.maxout16 = .499; /* Error in *encoded* value */ pm.maxabs16 = .00005;/* 1/20000 */ pm.maxcalc16 =1./65535;/* +/-1 in 16 bits for compose errors */ - pm.maxcalcG = 1./((1<<PNG_MAX_GAMMA_8)-1); +# if PNG_LIBPNG_VER < 10700 + pm.maxcalcG = 1./((1<<PNG_MAX_GAMMA_8)-1); +# else + pm.maxcalcG = 1./((1<<16)-1); +# endif /* NOTE: this is a reasonable perceptual limit. We assume that humans can * perceive light level differences of 1% over a 100:1 range, so we need to @@ -11033,7 +11294,8 @@ int main(int argc, char **argv) else if (strcmp(*argv, "-q") == 0) summary = pm.this.verbose = pm.log = 0; - else if (strcmp(*argv, "-w") == 0) + else if (strcmp(*argv, "-w") == 0 || + strcmp(*argv, "--strict") == 0) pm.this.treat_warnings_as_errors = 0; else if (strcmp(*argv, "--speed") == 0) @@ -11166,12 +11428,12 @@ int main(int argc, char **argv) else if (strcmp(*argv, "--interlace") == 0) { -# ifdef PNG_WRITE_INTERLACING_SUPPORTED +# if CAN_WRITE_INTERLACE pm.interlace_type = PNG_INTERLACE_ADAM7; -# else +# else /* !CAN_WRITE_INTERLACE */ fprintf(stderr, "pngvalid: no write interlace support\n"); return SKIP; -# endif +# endif /* !CAN_WRITE_INTERLACE */ } else if (strcmp(*argv, "--use-input-precision") == 0) @@ -11249,12 +11511,18 @@ int main(int argc, char **argv) const char *arg = 9+*argv; unsigned char option=0, setting=0; -#ifdef PNG_ARM_NEON_API_SUPPORTED +#ifdef PNG_ARM_NEON if (strncmp(arg, "arm-neon:", 9) == 0) option = PNG_ARM_NEON, arg += 9; else #endif +#ifdef PNG_EXTENSIONS + if (strncmp(arg, "extensions:", 11) == 0) + option = PNG_EXTENSIONS, arg += 11; + + else +#endif #ifdef PNG_MAXIMUM_INFLATE_WINDOW if (strncmp(arg, "max-inflate-window:", 19) == 0) option = PNG_MAXIMUM_INFLATE_WINDOW, arg += 19; diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/readpng.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/readpng.c index 7ba46d0b96b..3336d4e2180 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/readpng.c +++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/readpng.c @@ -62,6 +62,7 @@ read_png(FILE *fp) { png_size_t rowbytes = png_get_rowbytes(png_ptr, info_ptr); + /* Failure to initialize these is harmless */ row = malloc(rowbytes); display = malloc(rowbytes); @@ -70,7 +71,12 @@ read_png(FILE *fp) { png_uint_32 height = png_get_image_height(png_ptr, info_ptr); - int passes = png_set_interlace_handling(png_ptr); +# ifdef PNG_READ_INTERLACING_SUPPORTED + int passes = png_set_interlace_handling(png_ptr); +# else /* !READ_INTERLACING */ + int passes = png_get_interlace_type(png_ptr, info_ptr) == + PNG_INTERLACE_ADAM7 ? PNG_INTERLACE_ADAM7_PASSES : 1; +# endif /* !READ_INTERLACING */ int pass; png_start_read_image(png_ptr); @@ -79,6 +85,11 @@ read_png(FILE *fp) { png_uint_32 y = height; +# ifndef PNG_READ_INTERLACING_SUPPORTED + if (passes == PNG_INTERLACE_ADAM7_PASSES) + y = PNG_PASS_ROWS(y, pass); +# endif /* READ_INTERLACING */ + /* NOTE: this trashes the row each time; interlace handling won't * work, but this avoids memory thrashing for speed testing. */ diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/tarith.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/tarith.c index cdb00dbf7e7..cb17ffa7641 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/tarith.c +++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/tarith.c @@ -634,7 +634,7 @@ int validation_muldiv(int count, int argc, char **argv) { png_fixed_point result; /* NOTE: your mileage may vary, a type is required below that can - * hold 64 bits or more, if floating point is used a 64 bit or + * hold 64 bits or more, if floating point is used a 64-bit or * better mantissa is required. */ long long int fp, fpround; @@ -721,7 +721,7 @@ int validation_muldiv(int count, int argc, char **argv) } while (--count > 0); - printf("%d tests including %d overflows, %d passed, %d failed (%d 64 bit " + printf("%d tests including %d overflows, %d passed, %d failed (%d 64-bit " "errors)\n", tested, overflow, passed, error, error64); return 0; } @@ -799,13 +799,13 @@ int validation_gamma(int argc, char **argv) if (i == 0 && png_log8bit(i) != 0xffffffff || i != 0 && png_log8bit(i) != floor(correct+.5)) { - fprintf(stderr, "8 bit log error: %d: got %u, expected %f\n", + fprintf(stderr, "8-bit log error: %d: got %u, expected %f\n", i, png_log8bit(i), correct); } } if (!silent) - printf("maximum 8 bit log error = %f\n", maxerr); + printf("maximum 8-bit log error = %f\n", maxerr); maxerr = 0; for (i=0; i<65536; ++i) @@ -821,14 +821,14 @@ int validation_gamma(int argc, char **argv) { if (error > .68) /* By experiment error is less than .68 */ { - fprintf(stderr, "16 bit log error: %d: got %u, expected %f" + fprintf(stderr, "16-bit log error: %d: got %u, expected %f" " error: %f\n", i, png_log16bit(i), correct, error); } } } if (!silent) - printf("maximum 16 bit log error = %f\n", maxerr); + printf("maximum 16-bit log error = %f\n", maxerr); /* Now exponentiations. */ maxerr = 0; @@ -841,13 +841,13 @@ int validation_gamma(int argc, char **argv) maxerr = fabs(error); if (fabs(error) > 1883) /* By experiment. */ { - fprintf(stderr, "32 bit exp error: %d: got %u, expected %f" + fprintf(stderr, "32-bit exp error: %d: got %u, expected %f" " error: %f\n", i, png_exp(i), correct, error); } } if (!silent) - printf("maximum 32 bit exp error = %f\n", maxerr); + printf("maximum 32-bit exp error = %f\n", maxerr); maxerr = 0; for (i=0; i<=0xfffff; ++i) @@ -859,13 +859,13 @@ int validation_gamma(int argc, char **argv) maxerr = fabs(error); if (fabs(error) > .50002) /* By experiment */ { - fprintf(stderr, "8 bit exp error: %d: got %u, expected %f" + fprintf(stderr, "8-bit exp error: %d: got %u, expected %f" " error: %f\n", i, png_exp8bit(i), correct, error); } } if (!silent) - printf("maximum 8 bit exp error = %f\n", maxerr); + printf("maximum 8-bit exp error = %f\n", maxerr); maxerr = 0; for (i=0; i<=0xfffff; ++i) @@ -877,13 +877,13 @@ int validation_gamma(int argc, char **argv) maxerr = fabs(error); if (fabs(error) > .524) /* By experiment */ { - fprintf(stderr, "16 bit exp error: %d: got %u, expected %f" + fprintf(stderr, "16-bit exp error: %d: got %u, expected %f" " error: %f\n", i, png_exp16bit(i), correct, error); } } if (!silent) - printf("maximum 16 bit exp error = %f\n", maxerr); + printf("maximum 16-bit exp error = %f\n", maxerr); } /* !onlygamma */ /* Test the overall gamma correction. */ @@ -913,7 +913,7 @@ int validation_gamma(int argc, char **argv) } if (!silent) - printf("gamma %f: maximum 8 bit error %f\n", g, maxerr); + printf("gamma %f: maximum 8-bit error %f\n", g, maxerr); maxerr = 0; for (j=0; j<65536; ++j) @@ -932,7 +932,7 @@ int validation_gamma(int argc, char **argv) } if (!silent) - printf("gamma %f: maximum 16 bit error %f\n", g, maxerr); + printf("gamma %f: maximum 16-bit error %f\n", g, maxerr); } return 0; diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/timepng.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/timepng.c index 7c937971cfd..7c937971cfd 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/libtests/timepng.c +++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/timepng.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/README b/Build/source/libs/libpng/libpng-src/contrib/pngminim/README index e17fe35b6a8..e17fe35b6a8 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/README +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminim/README diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/decoder/README b/Build/source/libs/libpng/libpng-src/contrib/pngminim/decoder/README index fa979fcb727..fa979fcb727 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/decoder/README +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminim/decoder/README diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/decoder/makefile b/Build/source/libs/libpng/libpng-src/contrib/pngminim/decoder/makefile index 4acf3c1779b..4acf3c1779b 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/decoder/makefile +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminim/decoder/makefile diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/decoder/pngusr.dfa b/Build/source/libs/libpng/libpng-src/contrib/pngminim/decoder/pngusr.dfa index 4f402721ab0..4f402721ab0 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/decoder/pngusr.dfa +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminim/decoder/pngusr.dfa diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/decoder/pngusr.h b/Build/source/libs/libpng/libpng-src/contrib/pngminim/decoder/pngusr.h index cbd7890c7d6..cbd7890c7d6 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/decoder/pngusr.h +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminim/decoder/pngusr.h diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/encoder/README b/Build/source/libs/libpng/libpng-src/contrib/pngminim/encoder/README index d8d9a6466e2..d8d9a6466e2 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/encoder/README +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminim/encoder/README diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/encoder/makefile b/Build/source/libs/libpng/libpng-src/contrib/pngminim/encoder/makefile index 41b205c284a..41b205c284a 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/encoder/makefile +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminim/encoder/makefile diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/encoder/pngusr.dfa b/Build/source/libs/libpng/libpng-src/contrib/pngminim/encoder/pngusr.dfa index 1fc24f3f2a8..1fc24f3f2a8 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/encoder/pngusr.dfa +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminim/encoder/pngusr.dfa diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/encoder/pngusr.h b/Build/source/libs/libpng/libpng-src/contrib/pngminim/encoder/pngusr.h index 997d44fe904..997d44fe904 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/encoder/pngusr.h +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminim/encoder/pngusr.h diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/preader/README b/Build/source/libs/libpng/libpng-src/contrib/pngminim/preader/README index faa83560a72..faa83560a72 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/preader/README +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminim/preader/README diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/preader/makefile b/Build/source/libs/libpng/libpng-src/contrib/pngminim/preader/makefile index b625199114c..b625199114c 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/preader/makefile +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminim/preader/makefile diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/preader/pngusr.dfa b/Build/source/libs/libpng/libpng-src/contrib/pngminim/preader/pngusr.dfa index ac297f41bd7..ac297f41bd7 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/preader/pngusr.dfa +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminim/preader/pngusr.dfa diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/preader/pngusr.h b/Build/source/libs/libpng/libpng-src/contrib/pngminim/preader/pngusr.h index 80db3bb1719..80db3bb1719 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminim/preader/pngusr.h +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminim/preader/pngusr.h diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/README b/Build/source/libs/libpng/libpng-src/contrib/pngminus/README index bbe7407ecce..bbe7407ecce 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/README +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminus/README diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/makefile.std b/Build/source/libs/libpng/libpng-src/contrib/pngminus/makefile.std index 14e25cd64ff..14e25cd64ff 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/makefile.std +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminus/makefile.std diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/makefile.tc3 b/Build/source/libs/libpng/libpng-src/contrib/pngminus/makefile.tc3 index 6a2f4b9853f..6a2f4b9853f 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/makefile.tc3 +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminus/makefile.tc3 diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/makevms.com b/Build/source/libs/libpng/libpng-src/contrib/pngminus/makevms.com index 00561bcd0d7..00561bcd0d7 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/makevms.com +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminus/makevms.com diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/png2pnm.bat b/Build/source/libs/libpng/libpng-src/contrib/pngminus/png2pnm.bat index 449cf36750b..449cf36750b 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/png2pnm.bat +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminus/png2pnm.bat diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/png2pnm.c b/Build/source/libs/libpng/libpng-src/contrib/pngminus/png2pnm.c index dff4d0b3d04..f68d7ff7281 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/png2pnm.c +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminus/png2pnm.c @@ -266,7 +266,7 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, png_set_expand (png_ptr); #ifdef NJET - /* downgrade 16-bit images to 8 bit */ + /* downgrade 16-bit images to 8-bit */ if (bit_depth == 16) png_set_strip_16 (png_ptr); /* transform grayscale images into full-color */ diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/png2pnm.sh b/Build/source/libs/libpng/libpng-src/contrib/pngminus/png2pnm.sh index b1c05370dff..b1c05370dff 100644..100755 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/png2pnm.sh +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminus/png2pnm.sh diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/pngminus.bat b/Build/source/libs/libpng/libpng-src/contrib/pngminus/pngminus.bat index 911bb8dff9e..911bb8dff9e 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/pngminus.bat +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminus/pngminus.bat diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/pngminus.sh b/Build/source/libs/libpng/libpng-src/contrib/pngminus/pngminus.sh index 2a0a9d8fbba..2a0a9d8fbba 100644..100755 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/pngminus.sh +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminus/pngminus.sh diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/pnm2png.bat b/Build/source/libs/libpng/libpng-src/contrib/pngminus/pnm2png.bat index f756cb84de4..f756cb84de4 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/pnm2png.bat +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminus/pnm2png.bat diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/pnm2png.c b/Build/source/libs/libpng/libpng-src/contrib/pngminus/pnm2png.c index 7bf720f6813..8fa64cd1faf 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/pnm2png.c +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminus/pnm2png.c @@ -3,6 +3,7 @@ * copyright (C) 1999 by Willem van Schaik <willem@schaik.com> * * version 1.0 - 1999.10.15 - First version. + * version 1.1 - 2015.07.29 - Fixed leaks (Glenn Randers-Pehrson) * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, @@ -200,17 +201,17 @@ BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace, char width_token[16]; char height_token[16]; char maxval_token[16]; - volatile int color_type; + volatile int color_type=1; unsigned long ul_width=0, ul_alpha_width=0; unsigned long ul_height=0, ul_alpha_height=0; unsigned long ul_maxval=0; - volatile png_uint_32 width, height; - volatile png_uint_32 alpha_width, alpha_height; + volatile png_uint_32 width=0, height=0; + volatile png_uint_32 alpha_width=0, alpha_height=0; png_uint_32 maxval; volatile int bit_depth = 0; - int channels; + int channels=0; int alpha_depth = 0; - int alpha_present; + int alpha_present=0; int row, col; BOOL raw, alpha_raw = FALSE; #if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) @@ -356,8 +357,10 @@ BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace, channels = 3; else if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) channels = 4; +#if 0 else - channels = 0; /* should not happen */ + channels = 0; /* cannot happen */ +#endif alpha_present = (channels - 1) % 2; @@ -429,12 +432,16 @@ BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace, NULL); if (!png_ptr) { + free (png_pixels); + png_pixels = NULL; return FALSE; } info_ptr = png_create_info_struct (png_ptr); if (!info_ptr) { png_destroy_write_struct (&png_ptr, (png_infopp) NULL); + free (png_pixels); + png_pixels = NULL; return FALSE; } @@ -449,7 +456,9 @@ BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace, /* setjmp() must be called in every function that calls a PNG-reading libpng function */ if (setjmp (png_jmpbuf(png_ptr))) { - png_destroy_write_struct (&png_ptr, (png_infopp) NULL); + png_destroy_write_struct (&png_ptr, &info_ptr); + free (png_pixels); + png_pixels = NULL; return FALSE; } @@ -470,7 +479,9 @@ BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace, if ((row_pointers = (png_byte **) malloc (height * sizeof (png_bytep))) == NULL) { - png_destroy_write_struct (&png_ptr, (png_infopp) NULL); + png_destroy_write_struct (&png_ptr, &info_ptr); + free (png_pixels); + png_pixels = NULL; return FALSE; } } @@ -486,7 +497,7 @@ BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace, png_write_end (png_ptr, info_ptr); /* clean up after the write, and free any memory allocated */ - png_destroy_write_struct (&png_ptr, (png_infopp) NULL); + png_destroy_write_struct (&png_ptr, &info_ptr); if (row_pointers != (unsigned char**) NULL) free (row_pointers); diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/pnm2png.sh b/Build/source/libs/libpng/libpng-src/contrib/pngminus/pnm2png.sh index d79df2fae08..d79df2fae08 100644..100755 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngminus/pnm2png.sh +++ b/Build/source/libs/libpng/libpng-src/contrib/pngminus/pnm2png.sh diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/README b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/README index ec4af9473f1..a7fde8f36d7 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/README +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/README @@ -1,8 +1,8 @@ pngsuite -------- -(c) Willem van Schaik, 1999, 2011, 2012 -Two images are by Glenn Randers-Pehrson, 2012 +Copyright (c) Willem van Schaik, 1999, 2011, 2012 +Two images (ftbbn0g01.png and ftbbn0g02.png) are by Glenn Randers-Pehrson, 2012 Permission to use, copy, modify, and distribute these images for any purpose and without fee is hereby granted. diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn0g01.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn0g01.png Binary files differindex e31e1c7a635..e31e1c7a635 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn0g01.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn0g01.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn0g02.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn0g02.png Binary files differindex 68809dd8fc0..68809dd8fc0 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn0g02.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn0g02.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn0g04.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn0g04.png Binary files differindex 6fa089cb8a4..6fa089cb8a4 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn0g04.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn0g04.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn0g08.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn0g08.png Binary files differindex bf522eef001..bf522eef001 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn0g08.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn0g08.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn0g16.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn0g16.png Binary files differindex 318ebcadf4f..318ebcadf4f 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn0g16.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn0g16.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn2c08.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn2c08.png Binary files differindex 21d2f91a868..21d2f91a868 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn2c08.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn2c08.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn2c16.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn2c16.png Binary files differindex 1bd4a4d0e2c..1bd4a4d0e2c 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn2c16.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn2c16.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn3p01.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn3p01.png Binary files differindex a21db597746..a21db597746 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn3p01.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn3p01.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn3p02.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn3p02.png Binary files differindex 1d0ab6197cc..1d0ab6197cc 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn3p02.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn3p02.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn3p04.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn3p04.png Binary files differindex 6dc6eac83f3..6dc6eac83f3 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn3p04.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn3p04.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn3p08.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn3p08.png Binary files differindex 0e07f483c0e..0e07f483c0e 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn3p08.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn3p08.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn4a08.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn4a08.png Binary files differindex 3bb0dd06b51..3bb0dd06b51 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn4a08.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn4a08.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn4a16.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn4a16.png Binary files differindex 6dbee9fbdb9..6dbee9fbdb9 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn4a16.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn4a16.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn6a08.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn6a08.png Binary files differindex 61062308548..61062308548 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn6a08.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn6a08.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn6a16.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn6a16.png Binary files differindex a9bf3cb4612..a9bf3cb4612 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/basn6a16.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/basn6a16.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbbn0g01.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbbn0g01.png Binary files differindex ba746ffb2f5..ba746ffb2f5 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbbn0g01.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbbn0g01.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbbn0g02.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbbn0g02.png Binary files differindex 3d83bd6900b..3d83bd6900b 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbbn0g02.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbbn0g02.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbbn0g04.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbbn0g04.png Binary files differindex 39a7050d27a..39a7050d27a 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbbn0g04.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbbn0g04.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbbn2c16.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbbn2c16.png Binary files differindex dd3168e5c86..dd3168e5c86 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbbn2c16.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbbn2c16.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbbn3p08.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbbn3p08.png Binary files differindex 0ede3574db0..0ede3574db0 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbbn3p08.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbbn3p08.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbgn2c16.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbgn2c16.png Binary files differindex 85cec395c01..85cec395c01 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbgn2c16.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbgn2c16.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbgn3p08.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbgn3p08.png Binary files differindex 8cf2e6fb6aa..8cf2e6fb6aa 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbgn3p08.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbgn3p08.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbrn2c08.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbrn2c08.png Binary files differindex 5cca0d62104..5cca0d62104 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbrn2c08.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbrn2c08.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbwn0g16.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbwn0g16.png Binary files differindex 99bdeed2b3b..99bdeed2b3b 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbwn0g16.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbwn0g16.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbwn3p08.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbwn3p08.png Binary files differindex eacab7a144c..eacab7a144c 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbwn3p08.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbwn3p08.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbyn3p08.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbyn3p08.png Binary files differindex 656db0989ad..656db0989ad 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftbyn3p08.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftbyn3p08.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftp0n0g08.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftp0n0g08.png Binary files differindex 333465fcdc9..333465fcdc9 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftp0n0g08.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftp0n0g08.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftp0n2c08.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftp0n2c08.png Binary files differindex fc6e42cb420..fc6e42cb420 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftp0n2c08.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftp0n2c08.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftp0n3p08.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftp0n3p08.png Binary files differindex 69a69e58722..69a69e58722 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftp0n3p08.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftp0n3p08.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftp1n3p08.png b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftp1n3p08.png Binary files differindex a6c9f35a862..a6c9f35a862 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/pngsuite/ftp1n3p08.png +++ b/Build/source/libs/libpng/libpng-src/contrib/pngsuite/ftp1n3p08.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-1.8-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-1.8-tRNS.png Binary files differnew file mode 100644 index 00000000000..0fc6cb7dba1 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-1.8-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-1.8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-1.8.png Binary files differnew file mode 100644 index 00000000000..5db4d7915c6 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-1.8.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-linear-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-linear-tRNS.png Binary files differnew file mode 100644 index 00000000000..5beb9d1df20 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-linear-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-linear.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-linear.png Binary files differnew file mode 100644 index 00000000000..36a89a5abb6 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-linear.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-sRGB-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-sRGB-tRNS.png Binary files differnew file mode 100644 index 00000000000..80cec4b5eda --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-sRGB-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-sRGB.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-sRGB.png Binary files differnew file mode 100644 index 00000000000..484fd18c4f6 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-sRGB.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-tRNS.png Binary files differnew file mode 100644 index 00000000000..a988db9686e --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1.png Binary files differnew file mode 100644 index 00000000000..71e37a33638 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-1.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-1.8-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-1.8-tRNS.png Binary files differnew file mode 100644 index 00000000000..06cc0c138e8 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-1.8-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-1.8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-1.8.png Binary files differnew file mode 100644 index 00000000000..06cc0c138e8 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-1.8.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-linear-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-linear-tRNS.png Binary files differnew file mode 100644 index 00000000000..beb4e96e25f --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-linear-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-linear.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-linear.png Binary files differnew file mode 100644 index 00000000000..beb4e96e25f --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-linear.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-sRGB-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-sRGB-tRNS.png Binary files differnew file mode 100644 index 00000000000..315db86a6ad --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-sRGB-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-sRGB.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-sRGB.png Binary files differnew file mode 100644 index 00000000000..315db86a6ad --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-sRGB.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-tRNS.png Binary files differnew file mode 100644 index 00000000000..4826d61eb7f --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16.png Binary files differnew file mode 100644 index 00000000000..4826d61eb7f --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-16.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-1.8-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-1.8-tRNS.png Binary files differnew file mode 100644 index 00000000000..a1c6854c96c --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-1.8-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-1.8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-1.8.png Binary files differnew file mode 100644 index 00000000000..4cc811cdf7e --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-1.8.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-linear-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-linear-tRNS.png Binary files differnew file mode 100644 index 00000000000..3c29ec6d97a --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-linear-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-linear.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-linear.png Binary files differnew file mode 100644 index 00000000000..6ca6fb74dd8 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-linear.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-sRGB-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-sRGB-tRNS.png Binary files differnew file mode 100644 index 00000000000..b418c8fbb60 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-sRGB-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-sRGB.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-sRGB.png Binary files differnew file mode 100644 index 00000000000..a6bde60afe4 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-sRGB.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-tRNS.png Binary files differnew file mode 100644 index 00000000000..8e04cb5020c --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2.png Binary files differnew file mode 100644 index 00000000000..9d85a2ace35 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-2.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-1.8-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-1.8-tRNS.png Binary files differnew file mode 100644 index 00000000000..402d699fbc5 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-1.8-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-1.8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-1.8.png Binary files differnew file mode 100644 index 00000000000..bc8da98761c --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-1.8.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-linear-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-linear-tRNS.png Binary files differnew file mode 100644 index 00000000000..45c063d8542 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-linear-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-linear.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-linear.png Binary files differnew file mode 100644 index 00000000000..0bd068d73fe --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-linear.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-sRGB-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-sRGB-tRNS.png Binary files differnew file mode 100644 index 00000000000..be8521049c4 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-sRGB-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-sRGB.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-sRGB.png Binary files differnew file mode 100644 index 00000000000..38a79228d93 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-sRGB.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-tRNS.png Binary files differnew file mode 100644 index 00000000000..14c4f1fb3aa --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4.png Binary files differnew file mode 100644 index 00000000000..16bcada820e --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-4.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-1.8-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-1.8-tRNS.png Binary files differnew file mode 100644 index 00000000000..2b3892458a4 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-1.8-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-1.8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-1.8.png Binary files differnew file mode 100644 index 00000000000..4bba74cfa63 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-1.8.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-linear-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-linear-tRNS.png Binary files differnew file mode 100644 index 00000000000..a801abdaaa7 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-linear-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-linear.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-linear.png Binary files differnew file mode 100644 index 00000000000..91be367ee5c --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-linear.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-sRGB-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-sRGB-tRNS.png Binary files differnew file mode 100644 index 00000000000..f54f23d6bc8 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-sRGB-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-sRGB.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-sRGB.png Binary files differnew file mode 100644 index 00000000000..2ae6377ff95 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-sRGB.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-tRNS.png Binary files differnew file mode 100644 index 00000000000..842245f1d9f --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8.png Binary files differnew file mode 100644 index 00000000000..23af27e141a --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-8.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-16-1.8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-16-1.8.png Binary files differnew file mode 100644 index 00000000000..e0d36b7f09c --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-16-1.8.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-16-linear.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-16-linear.png Binary files differnew file mode 100644 index 00000000000..26aa32cee15 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-16-linear.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-16-sRGB.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-16-sRGB.png Binary files differnew file mode 100644 index 00000000000..f1e811ba342 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-16-sRGB.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-16.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-16.png Binary files differnew file mode 100644 index 00000000000..689879737fc --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-16.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-8-1.8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-8-1.8.png Binary files differnew file mode 100644 index 00000000000..68883a52d5c --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-8-1.8.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-8-linear.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-8-linear.png Binary files differnew file mode 100644 index 00000000000..cdc07031d7f --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-8-linear.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-8-sRGB.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-8-sRGB.png Binary files differnew file mode 100644 index 00000000000..7c37c88836f --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-8-sRGB.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-8.png Binary files differnew file mode 100644 index 00000000000..eb0a9249981 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/gray-alpha-8.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/makepngs.sh b/Build/source/libs/libpng/libpng-src/contrib/testpngs/makepngs.sh new file mode 100755 index 00000000000..81875871592 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/makepngs.sh @@ -0,0 +1,94 @@ +#!/bin/sh +# +# Make a set of test PNG files, MAKEPNG is the name of the makepng executable +# built from contrib/libtests/makepng.c + +# Copyright (c) 2015 John Cunningham Bowler + +# Last changed in libpng 1.7.0 [(PENDING RELEASE)] + +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# The arguments say whether to build all the files or whether just to build the +# ones that extend the code-coverage of libpng from the existing test files in +# contrib/pngsuite. +test -n "$MAKEPNG" || MAKEPNG=./makepng +opts= + +mp(){ + ${MAKEPNG} $opts $1 "$3" "$4" "$3-$4$2.png" +} + +mpg(){ + if test "$1" = "none" + then + mp "" "" "$2" "$3" + else + mp "--$1" "-$1" "$2" "$3" + fi +} + +mptrans(){ + if test "$1" = "none" + then + mp "--tRNS" "-tRNS" "$2" "$3" + else + mp "--tRNS --$1" "-$1-tRNS" "$2" "$3" + fi +} + +case "$1" in + --small) + opts="--small";;& + + --all|--small) + for g in none sRGB linear 1.8 + do + for c in gray palette + do + for b in 1 2 4 + do + mpg "$g" "$c" "$b" + mptrans "$g" "$c" "$b" + done + done + + mpg "$g" palette 8 + mptrans "$g" palette 8 + + for b in 8 16 + do + for c in gray gray-alpha rgb rgb-alpha + do + mpg "$g" "$c" "$b" + done + for c in gray rgb + do + mptrans "$g" "$c" "$b" + done + done + done;; + + --coverage) + # Comments below indicate cases known to be required and not duplicated + # in other (required) cases; the aim is to get a minimal set that gives + # the maxium code coverage. + mpg none gray-alpha 8 # required: code coverage, sRGB opaque component + mpg none palette 8 # required: basic palette read + mpg 1.8 gray 2 # required: tests gamma threshold code + mpg 1.8 palette 2 # required: code coverage + mpg 1.8 palette 4 # required: code coverage + mpg 1.8 palette 8 # error limits only + mpg linear palette 8 # error limits only + mpg linear rgb-alpha 16 # error limits only + mpg sRGB palette 1 # required: code coverage + mpg sRGB rgb-alpha 16 # required: code coverage: pngread.c:2422 untested + :;; + + *) + echo "$0 $1: unknown argument, usage:" >&2 + echo " $0 [--all|--coverage|--small]" >&2 + exit 1 +esac diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-1.8-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-1.8-tRNS.png Binary files differnew file mode 100644 index 00000000000..7bf60410d52 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-1.8-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-1.8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-1.8.png Binary files differnew file mode 100644 index 00000000000..73965b724e4 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-1.8.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-linear-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-linear-tRNS.png Binary files differnew file mode 100644 index 00000000000..9b0133dc9f5 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-linear-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-linear.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-linear.png Binary files differnew file mode 100644 index 00000000000..bf232fd33cf --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-linear.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-sRGB-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-sRGB-tRNS.png Binary files differnew file mode 100644 index 00000000000..1c6f262b336 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-sRGB-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-sRGB.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-sRGB.png Binary files differnew file mode 100644 index 00000000000..fbadc097fff --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-sRGB.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-tRNS.png Binary files differnew file mode 100644 index 00000000000..8f1642b7b01 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1.png Binary files differnew file mode 100644 index 00000000000..a27d1362a2b --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-1.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-1.8-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-1.8-tRNS.png Binary files differnew file mode 100644 index 00000000000..9d2ab16564a --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-1.8-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-1.8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-1.8.png Binary files differnew file mode 100644 index 00000000000..cdcf28329b9 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-1.8.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-linear-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-linear-tRNS.png Binary files differnew file mode 100644 index 00000000000..d346d40071c --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-linear-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-linear.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-linear.png Binary files differnew file mode 100644 index 00000000000..5c2f6d335df --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-linear.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-sRGB-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-sRGB-tRNS.png Binary files differnew file mode 100644 index 00000000000..e5a491a7139 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-sRGB-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-sRGB.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-sRGB.png Binary files differnew file mode 100644 index 00000000000..a3bf9a2f3b0 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-sRGB.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-tRNS.png Binary files differnew file mode 100644 index 00000000000..c34a6986d00 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2.png Binary files differnew file mode 100644 index 00000000000..eaf4536e09b --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-2.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-1.8-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-1.8-tRNS.png Binary files differnew file mode 100644 index 00000000000..20cb465cece --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-1.8-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-1.8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-1.8.png Binary files differnew file mode 100644 index 00000000000..c2318ff82ed --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-1.8.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-linear-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-linear-tRNS.png Binary files differnew file mode 100644 index 00000000000..4d96a472413 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-linear-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-linear.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-linear.png Binary files differnew file mode 100644 index 00000000000..dfc5a868ee2 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-linear.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-sRGB-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-sRGB-tRNS.png Binary files differnew file mode 100644 index 00000000000..92d23e7ddab --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-sRGB-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-sRGB.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-sRGB.png Binary files differnew file mode 100644 index 00000000000..26ea9e5ab14 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-sRGB.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-tRNS.png Binary files differnew file mode 100644 index 00000000000..429f6b95394 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4.png Binary files differnew file mode 100644 index 00000000000..82f3489940e --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-4.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-1.8-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-1.8-tRNS.png Binary files differnew file mode 100644 index 00000000000..c10bb569739 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-1.8-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-1.8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-1.8.png Binary files differnew file mode 100644 index 00000000000..cc09ee60f1e --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-1.8.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-linear-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-linear-tRNS.png Binary files differnew file mode 100644 index 00000000000..27f5a3336cf --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-linear-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-linear.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-linear.png Binary files differnew file mode 100644 index 00000000000..40d413cd660 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-linear.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-sRGB-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-sRGB-tRNS.png Binary files differnew file mode 100644 index 00000000000..b8863ec2b8f --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-sRGB-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-sRGB.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-sRGB.png Binary files differnew file mode 100644 index 00000000000..90f89120431 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-sRGB.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-tRNS.png Binary files differnew file mode 100644 index 00000000000..9660e67765d --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8.png Binary files differnew file mode 100644 index 00000000000..2502d305b57 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/palette-8.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-1.8-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-1.8-tRNS.png Binary files differnew file mode 100644 index 00000000000..03251b12ef0 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-1.8-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-1.8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-1.8.png Binary files differnew file mode 100644 index 00000000000..03251b12ef0 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-1.8.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-linear-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-linear-tRNS.png Binary files differnew file mode 100644 index 00000000000..3dfa6a6ad04 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-linear-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-linear.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-linear.png Binary files differnew file mode 100644 index 00000000000..3dfa6a6ad04 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-linear.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-sRGB-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-sRGB-tRNS.png Binary files differnew file mode 100644 index 00000000000..2cf2209e01d --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-sRGB-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-sRGB.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-sRGB.png Binary files differnew file mode 100644 index 00000000000..2cf2209e01d --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-sRGB.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-tRNS.png Binary files differnew file mode 100644 index 00000000000..28643528d6b --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16.png Binary files differnew file mode 100644 index 00000000000..28643528d6b --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-16.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-1.8-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-1.8-tRNS.png Binary files differnew file mode 100644 index 00000000000..afff9df2266 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-1.8-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-1.8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-1.8.png Binary files differnew file mode 100644 index 00000000000..d4bb12afa11 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-1.8.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-linear-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-linear-tRNS.png Binary files differnew file mode 100644 index 00000000000..5a2ed9f009a --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-linear-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-linear.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-linear.png Binary files differnew file mode 100644 index 00000000000..7c42b084083 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-linear.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-sRGB-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-sRGB-tRNS.png Binary files differnew file mode 100644 index 00000000000..f8b4ecbdc69 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-sRGB-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-sRGB.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-sRGB.png Binary files differnew file mode 100644 index 00000000000..4acae649d38 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-sRGB.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-tRNS.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-tRNS.png Binary files differnew file mode 100644 index 00000000000..cdb1642ebad --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8-tRNS.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8.png Binary files differnew file mode 100644 index 00000000000..e69c71bfd57 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-8.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-16-1.8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-16-1.8.png Binary files differnew file mode 100644 index 00000000000..ad65d150e23 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-16-1.8.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-16-linear.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-16-linear.png Binary files differnew file mode 100644 index 00000000000..1f399003173 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-16-linear.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-16-sRGB.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-16-sRGB.png Binary files differnew file mode 100644 index 00000000000..d9cea633a5e --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-16-sRGB.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-16.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-16.png Binary files differnew file mode 100644 index 00000000000..59262397eb5 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-16.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-8-1.8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-8-1.8.png Binary files differnew file mode 100644 index 00000000000..f4d08ec0471 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-8-1.8.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-8-linear.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-8-linear.png Binary files differnew file mode 100644 index 00000000000..b4f8bc82941 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-8-linear.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-8-sRGB.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-8-sRGB.png Binary files differnew file mode 100644 index 00000000000..f06e7f837cb --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-8-sRGB.png diff --git a/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-8.png b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-8.png Binary files differnew file mode 100644 index 00000000000..e15d4913f2d --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/contrib/testpngs/rgb-alpha-8.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/README.txt b/Build/source/libs/libpng/libpng-src/contrib/tools/README.txt index 5ddae02ce9b..5ddae02ce9b 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/README.txt +++ b/Build/source/libs/libpng/libpng-src/contrib/tools/README.txt diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/checksum-icc.c b/Build/source/libs/libpng/libpng-src/contrib/tools/checksum-icc.c index 581e7088a62..581e7088a62 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/checksum-icc.c +++ b/Build/source/libs/libpng/libpng-src/contrib/tools/checksum-icc.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/chkfmt b/Build/source/libs/libpng/libpng-src/contrib/tools/chkfmt index 9da6475fd4e..9da6475fd4e 100755..100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/chkfmt +++ b/Build/source/libs/libpng/libpng-src/contrib/tools/chkfmt diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/cvtcolor.c b/Build/source/libs/libpng/libpng-src/contrib/tools/cvtcolor.c index e6793c7d596..e6793c7d596 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/cvtcolor.c +++ b/Build/source/libs/libpng/libpng-src/contrib/tools/cvtcolor.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/genpng.c b/Build/source/libs/libpng/libpng-src/contrib/tools/genpng.c index 44102b4d69b..ce43260cb4c 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/genpng.c +++ b/Build/source/libs/libpng/libpng-src/contrib/tools/genpng.c @@ -324,7 +324,7 @@ alpha_calc(const struct arg *arg, double x, double y) { double wx = bicubic[abs(dx)][0]; - if (wx != 0 && arg->inside_fn(arg, x+dx/16, y+dy/16)) + if (wx != 0 && arg->inside_fn(arg, x+dx/16, y+dy/16)) alphay += wx; } @@ -565,7 +565,7 @@ line_check(double x, double y, double x1, double y1, double x2, double y2, /* The dot product is the distance down the line, the cross product is * the distance away from the line: * - * distance = |cross| / sqrt(len2) + * distance = |cross| / sqrt(len2) */ cross = x * ly - y * lx; @@ -722,7 +722,7 @@ pixel(png_uint_16p p, struct arg *args, int nargs, double x, double y) /* 'a' may be negative or greater than 1; if it is, negative clamp the * pixel to 0 if >1 clamp r/g/b: */ - if (a > 0) + if (a > 0) { if (a > 1) { diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/intgamma.sh b/Build/source/libs/libpng/libpng-src/contrib/tools/intgamma.sh index 41c5d6dd278..41c5d6dd278 100644..100755 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/intgamma.sh +++ b/Build/source/libs/libpng/libpng-src/contrib/tools/intgamma.sh diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/makesRGB.c b/Build/source/libs/libpng/libpng-src/contrib/tools/makesRGB.c index e66c9f1576b..e66c9f1576b 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/makesRGB.c +++ b/Build/source/libs/libpng/libpng-src/contrib/tools/makesRGB.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/png-fix-itxt.c b/Build/source/libs/libpng/libpng-src/contrib/tools/png-fix-itxt.c index 5730d9f792d..c7654c11363 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/png-fix-itxt.c +++ b/Build/source/libs/libpng/libpng-src/contrib/tools/png-fix-itxt.c @@ -8,7 +8,7 @@ * For conditions of distribution and use, see the disclaimer * and license in png.h * - * Usage: + * Usage: * * png-fix-itxt.exe < bad.png > good.png * diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/pngfix.c b/Build/source/libs/libpng/libpng-src/contrib/tools/pngfix.c index 2489ac374f7..7fde31c6ed1 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/pngfix.c +++ b/Build/source/libs/libpng/libpng-src/contrib/tools/pngfix.c @@ -2,7 +2,7 @@ * * Copyright (c) 2014-2015 John Cunningham Bowler * - * Last changed in libpng 1.6.18 [July 23, 2015] + * Last changed in libpng 1.6.20 [December 3, 2015] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer @@ -52,7 +52,10 @@ #ifdef PNG_SETJMP_SUPPORTED #include <setjmp.h> -#if defined(PNG_READ_SUPPORTED) && defined(PNG_EASY_ACCESS_SUPPORTED) +#if defined(PNG_READ_SUPPORTED) && defined(PNG_EASY_ACCESS_SUPPORTED) &&\ + (defined(PNG_READ_DEINTERLACE_SUPPORTED) ||\ + defined(PNG_READ_INTERLACING_SUPPORTED)) + /* zlib.h defines the structure z_stream, an instance of which is included * in this structure and is required for decompressing the LZ compressed * data in PNG files. @@ -134,7 +137,7 @@ #define png_zTXt PNG_U32(122, 84, 88, 116) #endif -/* The 8 byte signature as a pair of 32 bit quantities */ +/* The 8-byte signature as a pair of 32-bit quantities */ #define sig1 PNG_U32(137, 80, 78, 71) #define sig2 PNG_U32( 13, 10, 26, 10) @@ -156,7 +159,7 @@ */ #define UNREACHED 0 -/* 80-bit number handling - a PNG image can be up to (2^31-1)x(2^31-1) 8 byte +/* 80-bit number handling - a PNG image can be up to (2^31-1)x(2^31-1) 8-byte * (16-bit RGBA) pixels in size; that's less than 2^65 bytes or 2^68 bits, so * arithmetic of 80-bit numbers is sufficient. This representation uses an * arbitrary length array of png_uint_16 digits (0..65535). The representation @@ -584,7 +587,7 @@ chunk_type_valid(png_uint_32 c) c &= ~PNG_U32(32,32,0,32); t = (c & ~0x1f1f1f1f) ^ 0x40404040; - /* Subtract 65 for each 8 bit quantity, this must not overflow + /* Subtract 65 for each 8-bit quantity, this must not overflow * and each byte must then be in the range 0-25. */ c -= PNG_U32(65,65,65,65); @@ -667,7 +670,7 @@ IDAT_list_extend(struct IDAT_list *tail) if (length < tail->length) /* arithmetic overflow */ length = tail->length; - + next = voidcast(IDAT_list*, malloc(IDAT_list_size(NULL, length))); CLEAR(*next); @@ -921,7 +924,7 @@ emit_string(const char *str, FILE *out) else if (isspace(UCHAR_MAX & *str)) putc('_', out); - + else fprintf(out, "\\%.3o", *str); } @@ -1945,7 +1948,7 @@ process_IDAT(struct file *file) list->count = 0; file->idat->idat_list_tail = list; } - + /* And fill in the next IDAT information buffer. */ list->lengths[(list->count)++] = file->chunk->chunk_length; @@ -2218,7 +2221,7 @@ zlib_init(struct zlib *zlib, struct IDAT *idat, struct chunk *chunk, /* These values are sticky across reset (in addition to the stuff in the * first block, which is actually constant.) */ - zlib->file_bits = 16; + zlib->file_bits = 24; zlib->ok_bits = 16; /* unset */ zlib->cksum = 0; /* set when a checksum error is detected */ @@ -2301,10 +2304,12 @@ zlib_advance(struct zlib *zlib, png_uint_32 nbytes) zlib->file_bits = file_bits; /* Check against the existing value - it may not need to be - * changed. + * changed. Note that a bogus file_bits is allowed through once, + * to see if it works, but the window_bits value is set to 15, + * the maximum. */ if (new_bits == 0) /* no change */ - zlib->window_bits = file_bits; + zlib->window_bits = ((file_bits > 15) ? 15 : file_bits); else if (new_bits != file_bits) /* rewrite required */ bIn = (png_byte)((bIn & 0xf) + ((new_bits-8) << 4)); @@ -2325,8 +2330,7 @@ zlib_advance(struct zlib *zlib, png_uint_32 nbytes) if (bIn != b2) { /* If the first byte wasn't changed this indicates an error in - * the checksum calculation; signal this by setting file_bits - * (not window_bits) to 0. + * the checksum calculation; signal this by setting 'cksum'. */ if (zlib->file_bits == zlib->window_bits) zlib->cksum = 1; @@ -2585,7 +2589,7 @@ zlib_run(struct zlib *zlib) { struct chunk *chunk = zlib->chunk; int rc; - + assert(zlib->rewrite_offset < chunk->chunk_length); rc = zlib_advance(zlib, chunk->chunk_length - zlib->rewrite_offset); @@ -4030,7 +4034,7 @@ main(void) int main(void) { - fprintf(stderr, "pngfix does not work without read support\n"); + fprintf(stderr, "pngfix does not work without read deinterlace support\n"); return 77; } #endif /* PNG_READ_SUPPORTED && PNG_EASY_ACCESS_SUPPORTED */ diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/sRGB.h b/Build/source/libs/libpng/libpng-src/contrib/tools/sRGB.h index 22c8f7c0e3d..22c8f7c0e3d 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/tools/sRGB.h +++ b/Build/source/libs/libpng/libpng-src/contrib/tools/sRGB.h diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/PngFile.c b/Build/source/libs/libpng/libpng-src/contrib/visupng/PngFile.c index e563e929274..dcde18a3af4 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/PngFile.c +++ b/Build/source/libs/libpng/libpng-src/contrib/visupng/PngFile.c @@ -136,7 +136,7 @@ BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData, /* create the two png(-info) structures */ - png_ptr = png_create_read_struct(png_get_libpng_ver(NULL), NULL, + png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, (png_error_ptr)png_cexcept_error, (png_error_ptr)NULL); if (!png_ptr) { @@ -313,7 +313,7 @@ BOOL PngSaveImage (PTSTR pstrFileName, png_byte *pDiData, /* prepare the standard PNG structures */ - png_ptr = png_create_write_struct(png_get_libpng_ver(NULL), NULL, + png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, (png_error_ptr)png_cexcept_error, (png_error_ptr)NULL); if (!png_ptr) { diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/PngFile.h b/Build/source/libs/libpng/libpng-src/contrib/visupng/PngFile.h index 474426c22ea..474426c22ea 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/PngFile.h +++ b/Build/source/libs/libpng/libpng-src/contrib/visupng/PngFile.h diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/README.txt b/Build/source/libs/libpng/libpng-src/contrib/visupng/README.txt index 72c5cba1790..72c5cba1790 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/README.txt +++ b/Build/source/libs/libpng/libpng-src/contrib/visupng/README.txt diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/VisualPng.c b/Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.c index 236525a59fe..236525a59fe 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/VisualPng.c +++ b/Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/VisualPng.dsp b/Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.dsp index 741ef6ce76f..741ef6ce76f 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/VisualPng.dsp +++ b/Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.dsp diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/VisualPng.dsw b/Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.dsw index a30e1cc1cdb..a30e1cc1cdb 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/VisualPng.dsw +++ b/Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.dsw diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/VisualPng.ico b/Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.ico Binary files differindex 68aa3719fb5..68aa3719fb5 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/VisualPng.ico +++ b/Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.ico diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/VisualPng.png b/Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.png Binary files differindex c6aa80a9bfa..c6aa80a9bfa 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/VisualPng.png +++ b/Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/VisualPng.rc b/Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.rc index 6e0623a73cf..6e0623a73cf 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/VisualPng.rc +++ b/Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.rc diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/cexcept.h b/Build/source/libs/libpng/libpng-src/contrib/visupng/cexcept.h index e28f3e9e460..5f45d769758 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/cexcept.h +++ b/Build/source/libs/libpng/libpng-src/contrib/visupng/cexcept.h @@ -1,12 +1,11 @@ /*=== -cexcept.h 2.0.1 (2008-Jul-19-Sat, modified 2015-Jun-03-Mon) +cexcept.h 2.0.1 (2008-Jul-19-Sat) http://www.nicemice.net/cexcept/ Adam M. Costello http://www.nicemice.net/amc/ An interface for exception-handling in ANSI C (C89 and subsequent ISO -standards), developed jointly with Cosmin Truta. Revised by John Bowler, -June 2015, to declare exception_env and exception_prev "volatile". +standards), developed jointly with Cosmin Truta. Copyright (c) 2000-2008 Adam M. Costello and Cosmin Truta. This software may be modified only if its author and version @@ -211,7 +210,7 @@ struct exception_context { \ #define Try \ { \ - jmp_buf * volatile exception__prev, exception__env; \ + jmp_buf *exception__prev, exception__env; \ exception__prev = the_exception_context->penv; \ the_exception_context->penv = &exception__env; \ if (setjmp(exception__env) == 0) { \ diff --git a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/resource.h b/Build/source/libs/libpng/libpng-src/contrib/visupng/resource.h index b62176d1dca..b62176d1dca 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/contrib/visupng/resource.h +++ b/Build/source/libs/libpng/libpng-src/contrib/visupng/resource.h diff --git a/Build/source/libs/libpng/libpng-1.6.18/example.c b/Build/source/libs/libpng/libpng-src/example.c index 945546c259a..f8591e668af 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/example.c +++ b/Build/source/libs/libpng/libpng-src/example.c @@ -271,7 +271,7 @@ void read_png(char *file_name) /* We need to open the file */ { png_structp png_ptr; png_infop info_ptr; - unsigned int sig_read = 0; + int sig_read = 0; png_uint_32 width, height; int bit_depth, color_type, interlace_type; FILE *fp; @@ -280,7 +280,7 @@ void read_png(char *file_name) /* We need to open the file */ return (ERROR); #else no_open_file /* prototype 2 */ -void read_png(FILE *fp, unsigned int sig_read) /* File is already open */ +void read_png(FILE *fp, int sig_read) /* File is already open */ { png_structp png_ptr; png_infop info_ptr; @@ -370,7 +370,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */ * are mutually exclusive. */ - /* Tell libpng to strip 16 bit/color files down to 8 bits/color. + /* Tell libpng to strip 16 bits/color files down to 8 bits/color. * Use accurate scaling if it's available, otherwise just chop off the * low byte. */ @@ -466,7 +466,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */ } #ifdef PNG_READ_QUANTIZE_SUPPORTED - /* Quantize RGB files down to 8 bit palette or reduce palettes + /* Quantize RGB files down to 8-bit palette or reduce palettes * to the number of colors available on your screen. */ if ((color_type & PNG_COLOR_MASK_COLOR) != 0) @@ -518,11 +518,11 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */ /* Swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */ png_set_swap_alpha(png_ptr); - /* Swap bytes of 16 bit files to least significant byte first */ + /* Swap bytes of 16-bit files to least significant byte first */ png_set_swap(png_ptr); /* Add filler (or alpha) byte (before/after each RGB triplet) */ - png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER); + png_set_filler(png_ptr, 0xffff, PNG_FILLER_AFTER); #ifdef PNG_READ_INTERLACING_SUPPORTED /* Turn on interlace handling. REQUIRED if you are not using @@ -966,7 +966,7 @@ void write_png(char *file_name /* , ... other image information ... */) /* Swap bytes of 16-bit files to most significant byte first */ png_set_swap(png_ptr); - /* Swap bits of 1, 2, 4 bit packed pixel formats */ + /* Swap bits of 1-bit, 2-bit, 4-bit packed pixel formats */ png_set_packswap(png_ptr); /* Turn on interlace handling if you are not using png_write_image() */ diff --git a/Build/source/libs/libpng/libpng-1.6.18/libpng-config.in b/Build/source/libs/libpng/libpng-src/libpng-config.in index 69bf8e33f0b..69bf8e33f0b 100755..100644 --- a/Build/source/libs/libpng/libpng-1.6.18/libpng-config.in +++ b/Build/source/libs/libpng/libpng-src/libpng-config.in diff --git a/Build/source/libs/libpng/libpng-1.6.18/libpng-manual.txt b/Build/source/libs/libpng/libpng-src/libpng-manual.txt index da247cf84c5..87eeb2b5837 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/libpng-manual.txt +++ b/Build/source/libs/libpng/libpng-src/libpng-manual.txt @@ -1,6 +1,6 @@ libpng-manual.txt - A description on how to use and modify libpng - libpng version 1.6.18 - July 23, 2015 + libpng version 1.6.20 - December 3, 2015 Updated and distributed by Glenn Randers-Pehrson <glennrp at users.sourceforge.net> Copyright (c) 1998-2015 Glenn Randers-Pehrson @@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.6.18 - July 23, 2015 + libpng versions 0.97, January 1998, through 1.6.20 - December 3, 2015 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2015 Glenn Randers-Pehrson @@ -70,15 +70,16 @@ a W3C Recommendation and as an ISO Standard (ISO/IEC 15948:2004 (E)) at The W3C and ISO documents have identical technical content. The PNG-1.2 specification is available at -<http://www.libpng.org/pub/png/documents/>. It is technically equivalent +<http://png-mng.sourceforge.net/pub/png/spec/1.2/>. +It is technically equivalent to the PNG specification (second edition) but has some additional material. -The PNG-1.0 specification is available -as RFC 2083 <http://www.libpng.org/pub/png/documents/> and as a -W3C Recommendation <http://www.w3.org/TR/REC.png.html>. +The PNG-1.0 specification is available as RFC 2083 +<http://png-mng.sourceforge.net/pub/png/spec/1.0/> and as a +W3C Recommendation <http://www.w3.org/TR/REC-png-961001>. Some additional chunks are described in the special-purpose public chunks -documents at <http://www.libpng.org/pub/png/documents/>. +documents at <http://www.libpng.org/pub/png/spec/register/> Other information about PNG, and the latest version of libpng, can be found at the PNG home @@ -100,7 +101,7 @@ majority of the needs of its users. Libpng uses zlib for its compression and decompression of PNG files. Further information about zlib, and the latest version of zlib, can -be found at the zlib home page, <http://www.info-zip.org/pub/infozip/zlib/>. +be found at the zlib home page, <http://zlib.net/>. The zlib compression utility is a general purpose utility that is useful for more than PNG files, and can be used without libpng. See the documentation delivered with zlib for more details. @@ -649,6 +650,7 @@ User limits The PNG specification allows the width and height of an image to be as large as 2^31-1 (0x7fffffff), or about 2.147 billion rows and columns. +For safety, libpng imposes a default limit of 1 million rows and columns. Larger images will be rejected immediately with a png_error() call. If you wish to change these limits, you can use @@ -669,8 +671,11 @@ If you need to retrieve the limits that are being applied, use height_max = png_get_user_height_max(png_ptr); The PNG specification sets no limit on the number of ancillary chunks -allowed in a PNG datastream. You can impose a limit on the total number -of sPLT, tEXt, iTXt, zTXt, and unknown chunks that will be stored, with +allowed in a PNG datastream. By default, libpng imposes a limit of +a total of 1000 sPLT, tEXt, iTXt, zTXt, and unknown chunks to be stored. +If you have set up both info_ptr and end_info_ptr, the limit applies +separately to each. You can change the limit on the total number of such +chunks that will be stored, with png_set_chunk_cache_max(png_ptr, user_chunk_cache_max); @@ -678,8 +683,9 @@ where 0x7fffffffL means unlimited. You can retrieve this limit with chunk_cache_max = png_get_chunk_cache_max(png_ptr); -You can also set a limit on the amount of memory that a compressed chunk -other than IDAT can occupy, with +Libpng imposes a limit of 8 Megabytes (8,000,000 bytes) on the amount of +memory that a compressed chunk other than IDAT can occupy, when decompressed. +You can change this limit with png_set_chunk_malloc_max(png_ptr, user_chunk_malloc_max); @@ -1679,15 +1685,16 @@ described below. Data will be decoded into the supplied row buffers packed into bytes unless the library has been told to transform it into another format. For example, 4 bit/pixel paletted or grayscale data will be returned -2 pixels/byte with the leftmost pixel in the high-order bits of the -byte, unless png_set_packing() is called. 8-bit RGB data will be stored +2 pixels/byte with the leftmost pixel in the high-order bits of the byte, +unless png_set_packing() is called. 8-bit RGB data will be stored in RGB RGB RGB format unless png_set_filler() or png_set_add_alpha() is called to insert filler bytes, either before or after each RGB triplet. + 16-bit RGB data will be returned RRGGBB RRGGBB, with the most significant byte of the color value first, unless png_set_scale_16() is called to transform it to regular RGB RGB triplets, or png_set_filler() or -png_set_add alpha() is called to insert filler bytes, either before or -after each RRGGBB triplet. Similarly, 8-bit or 16-bit grayscale data can +png_set_add alpha() is called to insert two filler bytes, either before +or after each RRGGBB triplet. Similarly, 8-bit or 16-bit grayscale data can be modified with png_set_filler(), png_set_add_alpha(), png_set_strip_16(), or png_set_scale_16(). @@ -1844,12 +1851,13 @@ into 4 or 8 bytes for windowing systems that need them in this format: if (color_type == PNG_COLOR_TYPE_RGB) png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE); -where "filler" is the 8 or 16-bit number to fill with, and the location is -either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether -you want the filler before the RGB or after. This transformation -does not affect images that already have full alpha channels. To add an -opaque alpha channel, use filler=0xff or 0xffff and PNG_FILLER_AFTER which -will generate RGBA pixels. +where "filler" is the 8-bit or 16-bit number to fill with, and the location +is either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether +you want the filler before the RGB or after. When filling an 8-bit pixel, +the least significant 8 bits of the number are used, if a 16-bit number is +supplied. This transformation does not affect images that already have full +alpha channels. To add an opaque alpha channel, use filler=0xffff and +PNG_FILLER_AFTER which will generate RGBA pixels. Note that png_set_filler() does not change the color type. If you want to do that, you can add a true alpha channel with @@ -1859,7 +1867,7 @@ to do that, you can add a true alpha channel with png_set_add_alpha(png_ptr, filler, PNG_FILLER_AFTER); where "filler" contains the alpha value to assign to each pixel. -This function was added in libpng-1.2.7. +The png_set_add_alpha() function was added in libpng-1.2.7. If you are reading an image with an alpha channel, and you need the data as ARGB instead of the normal PNG format RGBA: @@ -1917,9 +1925,9 @@ data for sBIT, regardless of the error_action setting. The default values come from the PNG file cHRM chunk if present; otherwise, the defaults correspond to the ITU-R recommendation 709, and also the sRGB color space, as recommended in the Charles Poynton's Colour FAQ, -<http://www.poynton.com/>, in section 9: +Copyright (c) 2006-11-28 Charles Poynton, in section 9: - <http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC9> +<http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC9> Y = 0.2126 * R + 0.7152 * G + 0.0722 * B @@ -2952,6 +2960,7 @@ width, height, bit_depth, and color_type must be the same in each call. (array of png_color) num_palette - number of entries in the palette + png_set_gAMA(png_ptr, info_ptr, file_gamma); png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma); @@ -3716,21 +3725,26 @@ as a wide variety of APIs to manipulate ancilliary information. To read a PNG file using the simplified API: - 1) Declare a 'png_image' structure (see below) on the - stack and memset() it to all zero. + 1) Declare a 'png_image' structure (see below) on the stack, set the + version field to PNG_IMAGE_VERSION and the 'opaque' pointer to NULL + (this is REQUIRED, your program may crash if you don't do it.) 2) Call the appropriate png_image_begin_read... function. - 3) Set the png_image 'format' member to the required - format and allocate a buffer for the image. + 3) Set the png_image 'format' member to the required sample format. - 4) Call png_image_finish_read to read the image into - your buffer. + 4) Allocate a buffer for the image and, if required, the color-map. + + 5) Call png_image_finish_read to read the image and, if required, the + color-map into your buffers. There are no restrictions on the format of the PNG input itself; all valid color types, bit depths, and interlace methods are acceptable, and the input image is transformed as necessary to the requested in-memory format -during the png_image_finish_read() step. +during the png_image_finish_read() step. The only caveat is that if you +request a color-mapped image from a PNG that is full-color or makes +complex use of an alpha channel the transformation is extremely lossy and the +result may look terrible. To write a PNG file using the simplified API: @@ -3739,34 +3753,35 @@ To write a PNG file using the simplified API: 2) Initialize the members of the structure that describe the image, setting the 'format' member to the format of the - image in memory. + image samples. 3) Call the appropriate png_image_write... function with a - pointer to the image to write the PNG data. + pointer to the image and, if necessary, the color-map to write + the PNG data. png_image is a structure that describes the in-memory format of an image -when it is being read or define the in-memory format of an image that you +when it is being read or defines the in-memory format of an image that you need to write. The "png_image" structure contains the following members: + png_controlp opaque Initialize to NULL, free with png_image_free png_uint_32 version Set to PNG_IMAGE_VERSION png_uint_32 width Image width in pixels (columns) png_uint_32 height Image height in pixels (rows) png_uint_32 format Image format as defined below png_uint_32 flags A bit mask containing informational flags - png_controlp opaque Initialize to NULL, free with png_image_free png_uint_32 colormap_entries; Number of entries in the color-map png_uint_32 warning_or_error; char message[64]; -In the event of an error or warning the following field warning_or_error +In the event of an error or warning the "warning_or_error" field will be set to a non-zero value and the 'message' field will contain a '\0' terminated string with the libpng error or warning message. If both warnings and an error were encountered, only the error is recorded. If there are multiple warnings, only the first one is recorded. -The upper 30 bits of this value are reserved; the low two bits contain -a two bit code such that a value more than 1 indicates a failure in the API -just called: +The upper 30 bits of the "warning_or_error" value are reserved; the low two +bits contain a two bit code such that a value more than 1 indicates a failure +in the API just called: 0 - no warning or error 1 - warning @@ -3798,64 +3813,72 @@ channels are linear. Color channels use the RGB encoding (RGB end-points) of the sRGB specification. This encoding is identified by the PNG_FORMAT_FLAG_LINEAR flag below. +When the simplified API needs to convert between sRGB and linear colorspaces, +the actual sRGB transfer curve defined in the sRGB specification (see the +article at http://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2 +approximation used elsewhere in libpng. + When an alpha channel is present it is expected to denote pixel coverage of the color or luminance channels and is returned as an associated alpha channel: the color/gray channels are scaled (pre-multiplied) by the alpha value. -When a color-mapped image is used as a result of calling -png_image_read_colormap or png_image_write_colormap the channels are encoded -in the color-map and the descriptions above apply to the color-map entries. -The image data is encoded as small integers, value 0..255, that index the -entries in the color-map. One integer (one byte) is stored for each pixel. +The samples are either contained directly in the image data, between 1 and 8 +bytes per pixel according to the encoding, or are held in a color-map indexed +by bytes in the image data. In the case of a color-map the color-map entries +are individual samples, encoded as above, and the image data has one byte per +pixel to select the relevant sample from the color-map. PNG_FORMAT_* The #defines to be used in png_image::format. Each #define identifies a particular layout of channel data and, if present, alpha values. There are -separate defines for each of the two channel encodings. +separate defines for each of the two component encodings. -A format is built up using single bit flag values. Not all combinations are -valid: use the bit flag values below for testing a format returned by the -read APIs, but set formats from the derived values. +A format is built up using single bit flag values. All combinations are +valid. Formats can be built up from the flag values or you can use one of +the predefined values below. When testing formats always use the FORMAT_FLAG +macros to test for individual features - future versions of the library may +add new flags. When reading or writing color-mapped images the format should be set to the format of the entries in the color-map then png_image_{read,write}_colormap called to read or write the color-map and set the format correctly for the image data. Do not set the PNG_FORMAT_FLAG_COLORMAP bit directly! -NOTE: libpng can be built with particular features disabled, if you see +NOTE: libpng can be built with particular features disabled. If you see compiler errors because the definition of one of the following flags has been compiled out it is because libpng does not have the required support. It is possible, however, for the libpng configuration to enable the format on just -read or just write; in that case you may see an error at run time. You can -guard against this by checking for the definition of: +read or just write; in that case you may see an error at run time. +You can guard against this by checking for the definition of the +appropriate "_SUPPORTED" macro, one of: PNG_SIMPLIFIED_{READ,WRITE}_{BGR,AFIRST}_SUPPORTED - PNG_FORMAT_FLAG_ALPHA 0x01 format with an alpha channel - PNG_FORMAT_FLAG_COLOR 0x02 color format: otherwise grayscale - PNG_FORMAT_FLAG_LINEAR 0x04 png_uint_16 channels else png_byte - PNG_FORMAT_FLAG_COLORMAP 0x08 libpng use only - PNG_FORMAT_FLAG_BGR 0x10 BGR colors, else order is RGB - PNG_FORMAT_FLAG_AFIRST 0x20 alpha channel comes first + PNG_FORMAT_FLAG_ALPHA format with an alpha channel + PNG_FORMAT_FLAG_COLOR color format: otherwise grayscale + PNG_FORMAT_FLAG_LINEAR 2-byte channels else 1-byte + PNG_FORMAT_FLAG_COLORMAP image data is color-mapped + PNG_FORMAT_FLAG_BGR BGR colors, else order is RGB + PNG_FORMAT_FLAG_AFIRST alpha channel comes first Supported formats are as follows. Future versions of libpng may support more formats; for compatibility with older versions simply check if the format macro is defined using #ifdef. These defines describe the in-memory layout of the components of the pixels of the image. -First the single byte formats: +First the single byte (sRGB) formats: - PNG_FORMAT_GRAY 0 - PNG_FORMAT_GA PNG_FORMAT_FLAG_ALPHA - PNG_FORMAT_AG (PNG_FORMAT_GA|PNG_FORMAT_FLAG_AFIRST) - PNG_FORMAT_RGB PNG_FORMAT_FLAG_COLOR - PNG_FORMAT_BGR (PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_BGR) - PNG_FORMAT_RGBA (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_ALPHA) - PNG_FORMAT_ARGB (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_AFIRST) - PNG_FORMAT_BGRA (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_ALPHA) - PNG_FORMAT_ABGR (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_AFIRST) + PNG_FORMAT_GRAY + PNG_FORMAT_GA + PNG_FORMAT_AG + PNG_FORMAT_RGB + PNG_FORMAT_BGR + PNG_FORMAT_RGBA + PNG_FORMAT_ARGB + PNG_FORMAT_BGRA + PNG_FORMAT_ABGR Then the linear 2-byte formats. When naming these "Y" is used to indicate a luminance (gray) channel. The component order within the pixel @@ -3864,22 +3887,22 @@ components in the linear format. The components are 16-bit integers in the native byte order for your platform, and there is no provision for swapping the bytes to a different endian condition. - PNG_FORMAT_LINEAR_Y PNG_FORMAT_FLAG_LINEAR + PNG_FORMAT_LINEAR_Y PNG_FORMAT_LINEAR_Y_ALPHA - (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_ALPHA) PNG_FORMAT_LINEAR_RGB - (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR) PNG_FORMAT_LINEAR_RGB_ALPHA - (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR| - PNG_FORMAT_FLAG_ALPHA) -Color-mapped formats are obtained by calling png_image_{read,write}_colormap, -as appropriate after setting png_image::format to the format of the color-map -to be read or written. Applications may check the value of -PNG_FORMAT_FLAG_COLORMAP to see if they have called the colormap API. The -format of the color-map may be extracted using the following macro. +With color-mapped formats the image data is one byte for each pixel. The byte +is an index into the color-map which is formatted as above. To obtain a +color-mapped format it is sufficient just to add the PNG_FOMAT_FLAG_COLORMAP +to one of the above definitions, or you can use one of the definitions below. - PNG_FORMAT_OF_COLORMAP(fmt) ((fmt) & ~PNG_FORMAT_FLAG_COLORMAP) + PNG_FORMAT_RGB_COLORMAP + PNG_FORMAT_BGR_COLORMAP + PNG_FORMAT_RGBA_COLORMAP + PNG_FORMAT_ARGB_COLORMAP + PNG_FORMAT_BGRA_COLORMAP + PNG_FORMAT_ABGR_COLORMAP PNG_IMAGE macros @@ -3887,9 +3910,9 @@ These are convenience macros to derive information from a png_image structure. The PNG_IMAGE_SAMPLE_ macros return values appropriate to the actual image sample values - either the entries in the color-map or the pixels in the image. The PNG_IMAGE_PIXEL_ macros return corresponding values -for the pixels and will always return 1 after a call to -png_image_{read,write}_colormap. The remaining macros return information -about the rows in the image and the complete image. +for the pixels and will always return 1 for color-mapped formats. The +remaining macros return information about the rows in the image and the +complete image. NOTE: All the macros that take a png_image::format parameter are compile time constants if the format parameter is, itself, a constant. Therefore these @@ -3897,46 +3920,39 @@ macros can be used in array declarations and case labels where required. Similarly the macros are also pre-processor constants (sizeof is not used) so they can be used in #if tests. -First the information about the samples. - PNG_IMAGE_SAMPLE_CHANNELS(fmt) Returns the total number of channels in a given format: 1..4 PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt) Returns the size in bytes of a single component of a pixel or color-map - entry (as appropriate) in the image. + entry (as appropriate) in the image: 1 or 2. PNG_IMAGE_SAMPLE_SIZE(fmt) This is the size of the sample data for one sample. If the image is color-mapped it is the size of one color-map entry (and image pixels are one byte in size), otherwise it is the size of one image pixel. + PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(fmt) + The maximum size of the color-map required by the format expressed in a + count of components. This can be used to compile-time allocate a + color-map: + + png_uint_16 colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(linear_fmt)]; + + png_byte colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(sRGB_fmt)]; + + Alternatively use the PNG_IMAGE_COLORMAP_SIZE macro below to use the + information from one of the png_image_begin_read_ APIs and dynamically + allocate the required memory. + PNG_IMAGE_COLORMAP_SIZE(fmt) The size of the color-map required by the format; this is the size of the - color-map buffer passed to the png_image_{read,write}_colormap APIs, it is + color-map buffer passed to the png_image_{read,write}_colormap APIs. It is a fixed number determined by the format so can easily be allocated on the stack if necessary. -#define PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(fmt)\ - (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * 256) - /* The maximum size of the color-map required by the format expressed in a - * count of components. This can be used to compile-time allocate a - * color-map: - * - * png_uint_16 colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(linear_fmt)]; - * - * png_byte colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(sRGB_fmt)]; - * - * Alternatively, use the PNG_IMAGE_COLORMAP_SIZE macro below to use the - * information from one of the png_image_begin_read_ APIs and dynamically - * allocate the required memory. - */ - - Corresponding information about the pixels - PNG_IMAGE_PIXEL_(test,fmt) - PNG_IMAGE_PIXEL_CHANNELS(fmt) The number of separate channels (components) in a pixel; 1 for a color-mapped image. @@ -3962,19 +3978,54 @@ Information about the whole row, or whole image to start the next row on a 4-byte boundary. PNG_IMAGE_BUFFER_SIZE(image, row_stride) - Returns the size, in bytes, of an image buffer given a png_image and a row - stride - the number of components to leave space for in each row. This - macro takes care of multiplying row_stride by PNG_IMAGE_PIXEL_COMONENT_SIZE - when the image has 2-byte components. + Return the size, in bytes, of an image buffer given a png_image and a row + stride - the number of components to leave space for in each row. + + PNG_IMAGE_SIZE(image) + Return the size, in bytes, of the image in memory given just a png_image; + the row stride is the minimum stride required for the image. + + PNG_IMAGE_COLORMAP_SIZE(image) + Return the size, in bytes, of the color-map of this image. If the image + format is not a color-map format this will return a size sufficient for + 256 entries in the given format; check PNG_FORMAT_FLAG_COLORMAP if + you don't want to allocate a color-map in this case. + +PNG_IMAGE_FLAG_* + +Flags containing additional information about the image are held in +the 'flags' field of png_image. PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB == 0x01 This indicates the the RGB values of the in-memory bitmap do not correspond to the red, green and blue end-points defined by sRGB. - PNG_IMAGE_FLAG_COLORMAP == 0x02 - The PNG is color-mapped. If this flag is set png_image_read_colormap - can be used without further loss of image information. If it is not set - png_image_read_colormap will cause significant loss if the image has any + PNG_IMAGE_FLAG_FAST == 0x02 + On write emphasise speed over compression; the resultant PNG file will be + larger but will be produced significantly faster, particular for large + images. Do not use this option for images which will be distributed, only + used it when producing intermediate files that will be read back in + repeatedly. For a typical 24-bit image the option will double the read + speed at the cost of increasing the image size by 25%, however for many + more compressible images the PNG file can be 10 times larger with only a + slight speed gain. + + PNG_IMAGE_FLAG_16BIT_sRGB == 0x04 + On read if the image is a 16-bit per component image and there is no gAMA + or sRGB chunk assume that the components are sRGB encoded. Notice that + images output by the simplified API always have gamma information; setting + this flag only affects the interpretation of 16-bit images from an + external source. It is recommended that the application expose this flag + to the user; the user can normally easily recognize the difference between + linear and sRGB encoding. This flag has no effect on write - the data + passed to the write APIs must have the correct encoding (as defined + above.) + + If the flag is not set (the default) input 16-bit per component data is + assumed to be linear. + + NOTE: the flag can only be set after the png_image_begin_read_ call, + because that call initializes the 'flags' field. READ APIs @@ -4847,7 +4898,7 @@ a set of "safe" limits is applied in pngpriv.h. These can be overridden by application calls to png_set_user_limits(), png_set_user_chunk_cache_max(), and/or png_set_user_malloc_max() that increase or decrease the limits. Also, in libpng-1.5.10 the default width and height limits were increased -from 1,000,000 to 0x7ffffff (i.e., made unlimited). Therefore, the +from 1,000,000 to 0x7fffffff (i.e., made unlimited). Therefore, the limits are now default safe png_user_width_max 0x7fffffff 1,000,000 @@ -4856,7 +4907,7 @@ limits are now png_user_chunk_malloc_max 0 (unlimited) 8,000,000 The png_set_option() function (and the "options" member of the png struct) was -added to libpng-1.5.15. +added to libpng-1.5.15, with option PNG_ARM_NEON. The library now supports a complete fixed point implementation and can thus be used on systems that have no floating point support or very @@ -4998,9 +5049,9 @@ The signatures of many exported functions were changed, such that png_infop became png_inforp or png_const_inforp where "rp" indicates a "restricted pointer". -The support for FAR/far types has been eliminated and the definition of -png_alloc_size_t is now controlled by a flag so that 'small size_t' systems -can select it if necessary. +Dropped support for 16-bit platforms. The support for FAR/far types has +been eliminated and the definition of png_alloc_size_t is now controlled +by a flag so that 'small size_t' systems can select it if necessary. Error detection in some chunks has improved; in particular the iCCP chunk reader now does pretty complete validation of the basic format. Some bad @@ -5092,6 +5143,11 @@ It can be set for testing debug or beta builds to ensure that they will compile when the build type is switched to RC or STABLE. In essence this overrides the PNG_LIBPNG_BUILD_BASE_TYPE definition which is not directly user controllable. +Starting with libpng-1.6.19, attempting to set an over-length PLTE chunk +is an error. Previously this requirement of the PNG specification was not +enforced, and the palette was always limited to 256 entries. An over-length +PLTE chunk found in an input PNG is silently truncated. + XIII. Detecting libpng The png_get_io_ptr() function has been present since libpng-0.88, has never @@ -5245,10 +5301,12 @@ We prefer #ifdef and #ifndef to #if defined() and #if !defined() when there is only one macro being tested. We always use parentheses with "defined". -We prefer to express integers that are used as bit masks in hex format, -with an even number of lower-case hex digits (e.g., 0x00, 0xff, 0x0100). +We express integer constants that are used as bit masks in hex format, +with an even number of lower-case hex digits, and to make them unsigned +(e.g., 0x00U, 0xffU, 0x0100U) and long if they are greater than 0x7fff +(e.g., 0xffffUL). -We prefer to use underscores in variable names rather than camelCase, except +We prefer to use underscores rather than camelCase in names, except for a few type names that we inherit from zlib.h. We prefer "if (something != 0)" and "if (something == 0)" @@ -5262,13 +5320,11 @@ Other rules can be inferred by inspecting the libpng source. XVI. Y2K Compliance in libpng -July 23, 2015 - Since the PNG Development group is an ad-hoc body, we can't make an official declaration. This is your unofficial assurance that libpng from version 0.71 and -upward through 1.6.18 are Y2K compliant. It is my belief that earlier +upward through 1.6.20 are Y2K compliant. It is my belief that earlier versions were also Y2K compliant. Libpng only has two year fields. One is a 2-byte unsigned integer diff --git a/Build/source/libs/libpng/libpng-1.6.18/libpng.3 b/Build/source/libs/libpng/libpng-src/libpng.3 index bb079d43e0c..357d0ec5a8b 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/libpng.3 +++ b/Build/source/libs/libpng/libpng-src/libpng.3 @@ -1,6 +1,6 @@ -.TH LIBPNG 3 "July 23, 2015" +.TH LIBPNG 3 "December 3, 2015" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.6.18 +libpng \- Portable Network Graphics (PNG) Reference Library 1.6.20 .SH SYNOPSIS \fB #include <png.h>\fP @@ -508,7 +508,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng. .SH LIBPNG.TXT libpng-manual.txt - A description on how to use and modify libpng - libpng version 1.6.18 - July 23, 2015 + libpng version 1.6.20 - December 3, 2015 Updated and distributed by Glenn Randers-Pehrson <glennrp at users.sourceforge.net> Copyright (c) 1998-2015 Glenn Randers-Pehrson @@ -519,7 +519,7 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.6.18 - July 23, 2015 + libpng versions 0.97, January 1998, through 1.6.20 - December 3, 2015 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2015 Glenn Randers-Pehrson @@ -578,15 +578,16 @@ a W3C Recommendation and as an ISO Standard (ISO/IEC 15948:2004 (E)) at The W3C and ISO documents have identical technical content. The PNG-1.2 specification is available at -<http://www.libpng.org/pub/png/documents/>. It is technically equivalent +<http://png-mng.sourceforge.net/pub/png/spec/1.2/>. +It is technically equivalent to the PNG specification (second edition) but has some additional material. -The PNG-1.0 specification is available -as RFC 2083 <http://www.libpng.org/pub/png/documents/> and as a -W3C Recommendation <http://www.w3.org/TR/REC.png.html>. +The PNG-1.0 specification is available as RFC 2083 +<http://png-mng.sourceforge.net/pub/png/spec/1.0/> and as a +W3C Recommendation <http://www.w3.org/TR/REC-png-961001>. Some additional chunks are described in the special-purpose public chunks -documents at <http://www.libpng.org/pub/png/documents/>. +documents at <http://www.libpng.org/pub/png/spec/register/> Other information about PNG, and the latest version of libpng, can be found at the PNG home @@ -608,7 +609,7 @@ majority of the needs of its users. Libpng uses zlib for its compression and decompression of PNG files. Further information about zlib, and the latest version of zlib, can -be found at the zlib home page, <http://www.info-zip.org/pub/infozip/zlib/>. +be found at the zlib home page, <http://zlib.net/>. The zlib compression utility is a general purpose utility that is useful for more than PNG files, and can be used without libpng. See the documentation delivered with zlib for more details. @@ -1157,6 +1158,7 @@ callback function: The PNG specification allows the width and height of an image to be as large as 2^(31\-1 (0x7fffffff), or about 2.147 billion rows and columns. +For safety, libpng imposes a default limit of 1 million rows and columns. Larger images will be rejected immediately with a png_error() call. If you wish to change these limits, you can use @@ -1177,8 +1179,11 @@ If you need to retrieve the limits that are being applied, use height_max = png_get_user_height_max(png_ptr); The PNG specification sets no limit on the number of ancillary chunks -allowed in a PNG datastream. You can impose a limit on the total number -of sPLT, tEXt, iTXt, zTXt, and unknown chunks that will be stored, with +allowed in a PNG datastream. By default, libpng imposes a limit of +a total of 1000 sPLT, tEXt, iTXt, zTXt, and unknown chunks to be stored. +If you have set up both info_ptr and end_info_ptr, the limit applies +separately to each. You can change the limit on the total number of such +chunks that will be stored, with png_set_chunk_cache_max(png_ptr, user_chunk_cache_max); @@ -1186,8 +1191,9 @@ where 0x7fffffffL means unlimited. You can retrieve this limit with chunk_cache_max = png_get_chunk_cache_max(png_ptr); -You can also set a limit on the amount of memory that a compressed chunk -other than IDAT can occupy, with +Libpng imposes a limit of 8 Megabytes (8,000,000 bytes) on the amount of +memory that a compressed chunk other than IDAT can occupy, when decompressed. +You can change this limit with png_set_chunk_malloc_max(png_ptr, user_chunk_malloc_max); @@ -2187,15 +2193,16 @@ described below. Data will be decoded into the supplied row buffers packed into bytes unless the library has been told to transform it into another format. For example, 4 bit/pixel paletted or grayscale data will be returned -2 pixels/byte with the leftmost pixel in the high-order bits of the -byte, unless png_set_packing() is called. 8-bit RGB data will be stored +2 pixels/byte with the leftmost pixel in the high-order bits of the byte, +unless png_set_packing() is called. 8-bit RGB data will be stored in RGB RGB RGB format unless png_set_filler() or png_set_add_alpha() is called to insert filler bytes, either before or after each RGB triplet. + 16-bit RGB data will be returned RRGGBB RRGGBB, with the most significant byte of the color value first, unless png_set_scale_16() is called to transform it to regular RGB RGB triplets, or png_set_filler() or -png_set_add alpha() is called to insert filler bytes, either before or -after each RRGGBB triplet. Similarly, 8-bit or 16-bit grayscale data can +png_set_add alpha() is called to insert two filler bytes, either before +or after each RRGGBB triplet. Similarly, 8-bit or 16-bit grayscale data can be modified with png_set_filler(), png_set_add_alpha(), png_set_strip_16(), or png_set_scale_16(). @@ -2352,12 +2359,13 @@ into 4 or 8 bytes for windowing systems that need them in this format: if (color_type == PNG_COLOR_TYPE_RGB) png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE); -where "filler" is the 8 or 16-bit number to fill with, and the location is -either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether -you want the filler before the RGB or after. This transformation -does not affect images that already have full alpha channels. To add an -opaque alpha channel, use filler=0xff or 0xffff and PNG_FILLER_AFTER which -will generate RGBA pixels. +where "filler" is the 8-bit or 16-bit number to fill with, and the location +is either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether +you want the filler before the RGB or after. When filling an 8-bit pixel, +the least significant 8 bits of the number are used, if a 16-bit number is +supplied. This transformation does not affect images that already have full +alpha channels. To add an opaque alpha channel, use filler=0xffff and +PNG_FILLER_AFTER which will generate RGBA pixels. Note that png_set_filler() does not change the color type. If you want to do that, you can add a true alpha channel with @@ -2367,7 +2375,7 @@ to do that, you can add a true alpha channel with png_set_add_alpha(png_ptr, filler, PNG_FILLER_AFTER); where "filler" contains the alpha value to assign to each pixel. -This function was added in libpng-1.2.7. +The png_set_add_alpha() function was added in libpng-1.2.7. If you are reading an image with an alpha channel, and you need the data as ARGB instead of the normal PNG format RGBA: @@ -2425,9 +2433,9 @@ data for sBIT, regardless of the error_action setting. The default values come from the PNG file cHRM chunk if present; otherwise, the defaults correspond to the ITU-R recommendation 709, and also the sRGB color space, as recommended in the Charles Poynton's Colour FAQ, -<http://www.poynton.com/>, in section 9: +Copyright (c) 2006-11-28 Charles Poynton, in section 9: - <http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC9> +<http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC9> Y = 0.2126 * R + 0.7152 * G + 0.0722 * B @@ -3460,6 +3468,7 @@ width, height, bit_depth, and color_type must be the same in each call. (array of png_color) num_palette - number of entries in the palette + png_set_gAMA(png_ptr, info_ptr, file_gamma); png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma); @@ -4224,21 +4233,26 @@ as a wide variety of APIs to manipulate ancilliary information. To read a PNG file using the simplified API: - 1) Declare a 'png_image' structure (see below) on the - stack and memset() it to all zero. + 1) Declare a 'png_image' structure (see below) on the stack, set the + version field to PNG_IMAGE_VERSION and the 'opaque' pointer to NULL + (this is REQUIRED, your program may crash if you don't do it.) 2) Call the appropriate png_image_begin_read... function. - 3) Set the png_image 'format' member to the required - format and allocate a buffer for the image. + 3) Set the png_image 'format' member to the required sample format. - 4) Call png_image_finish_read to read the image into - your buffer. + 4) Allocate a buffer for the image and, if required, the color-map. + + 5) Call png_image_finish_read to read the image and, if required, the + color-map into your buffers. There are no restrictions on the format of the PNG input itself; all valid color types, bit depths, and interlace methods are acceptable, and the input image is transformed as necessary to the requested in-memory format -during the png_image_finish_read() step. +during the png_image_finish_read() step. The only caveat is that if you +request a color-mapped image from a PNG that is full-color or makes +complex use of an alpha channel the transformation is extremely lossy and the +result may look terrible. To write a PNG file using the simplified API: @@ -4247,34 +4261,35 @@ To write a PNG file using the simplified API: 2) Initialize the members of the structure that describe the image, setting the 'format' member to the format of the - image in memory. + image samples. 3) Call the appropriate png_image_write... function with a - pointer to the image to write the PNG data. + pointer to the image and, if necessary, the color-map to write + the PNG data. png_image is a structure that describes the in-memory format of an image -when it is being read or define the in-memory format of an image that you +when it is being read or defines the in-memory format of an image that you need to write. The "png_image" structure contains the following members: + png_controlp opaque Initialize to NULL, free with png_image_free png_uint_32 version Set to PNG_IMAGE_VERSION png_uint_32 width Image width in pixels (columns) png_uint_32 height Image height in pixels (rows) png_uint_32 format Image format as defined below png_uint_32 flags A bit mask containing informational flags - png_controlp opaque Initialize to NULL, free with png_image_free png_uint_32 colormap_entries; Number of entries in the color-map png_uint_32 warning_or_error; char message[64]; -In the event of an error or warning the following field warning_or_error +In the event of an error or warning the "warning_or_error" field will be set to a non-zero value and the 'message' field will contain a '\0' terminated string with the libpng error or warning message. If both warnings and an error were encountered, only the error is recorded. If there are multiple warnings, only the first one is recorded. -The upper 30 bits of this value are reserved; the low two bits contain -a two bit code such that a value more than 1 indicates a failure in the API -just called: +The upper 30 bits of the "warning_or_error" value are reserved; the low two +bits contain a two bit code such that a value more than 1 indicates a failure +in the API just called: 0 - no warning or error 1 - warning @@ -4306,64 +4321,72 @@ channels are linear. Color channels use the RGB encoding (RGB end-points) of the sRGB specification. This encoding is identified by the PNG_FORMAT_FLAG_LINEAR flag below. +When the simplified API needs to convert between sRGB and linear colorspaces, +the actual sRGB transfer curve defined in the sRGB specification (see the +article at http://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2 +approximation used elsewhere in libpng. + When an alpha channel is present it is expected to denote pixel coverage of the color or luminance channels and is returned as an associated alpha channel: the color/gray channels are scaled (pre-multiplied) by the alpha value. -When a color-mapped image is used as a result of calling -png_image_read_colormap or png_image_write_colormap the channels are encoded -in the color-map and the descriptions above apply to the color-map entries. -The image data is encoded as small integers, value 0..255, that index the -entries in the color-map. One integer (one byte) is stored for each pixel. +The samples are either contained directly in the image data, between 1 and 8 +bytes per pixel according to the encoding, or are held in a color-map indexed +by bytes in the image data. In the case of a color-map the color-map entries +are individual samples, encoded as above, and the image data has one byte per +pixel to select the relevant sample from the color-map. PNG_FORMAT_* The #defines to be used in png_image::format. Each #define identifies a particular layout of channel data and, if present, alpha values. There are -separate defines for each of the two channel encodings. +separate defines for each of the two component encodings. -A format is built up using single bit flag values. Not all combinations are -valid: use the bit flag values below for testing a format returned by the -read APIs, but set formats from the derived values. +A format is built up using single bit flag values. All combinations are +valid. Formats can be built up from the flag values or you can use one of +the predefined values below. When testing formats always use the FORMAT_FLAG +macros to test for individual features - future versions of the library may +add new flags. When reading or writing color-mapped images the format should be set to the format of the entries in the color-map then png_image_{read,write}_colormap called to read or write the color-map and set the format correctly for the image data. Do not set the PNG_FORMAT_FLAG_COLORMAP bit directly! -NOTE: libpng can be built with particular features disabled, if you see +NOTE: libpng can be built with particular features disabled. If you see compiler errors because the definition of one of the following flags has been compiled out it is because libpng does not have the required support. It is possible, however, for the libpng configuration to enable the format on just -read or just write; in that case you may see an error at run time. You can -guard against this by checking for the definition of: +read or just write; in that case you may see an error at run time. +You can guard against this by checking for the definition of the +appropriate "_SUPPORTED" macro, one of: PNG_SIMPLIFIED_{READ,WRITE}_{BGR,AFIRST}_SUPPORTED - PNG_FORMAT_FLAG_ALPHA 0x01 format with an alpha channel - PNG_FORMAT_FLAG_COLOR 0x02 color format: otherwise grayscale - PNG_FORMAT_FLAG_LINEAR 0x04 png_uint_16 channels else png_byte - PNG_FORMAT_FLAG_COLORMAP 0x08 libpng use only - PNG_FORMAT_FLAG_BGR 0x10 BGR colors, else order is RGB - PNG_FORMAT_FLAG_AFIRST 0x20 alpha channel comes first + PNG_FORMAT_FLAG_ALPHA format with an alpha channel + PNG_FORMAT_FLAG_COLOR color format: otherwise grayscale + PNG_FORMAT_FLAG_LINEAR 2-byte channels else 1-byte + PNG_FORMAT_FLAG_COLORMAP image data is color-mapped + PNG_FORMAT_FLAG_BGR BGR colors, else order is RGB + PNG_FORMAT_FLAG_AFIRST alpha channel comes first Supported formats are as follows. Future versions of libpng may support more formats; for compatibility with older versions simply check if the format macro is defined using #ifdef. These defines describe the in-memory layout of the components of the pixels of the image. -First the single byte formats: +First the single byte (sRGB) formats: - PNG_FORMAT_GRAY 0 - PNG_FORMAT_GA PNG_FORMAT_FLAG_ALPHA - PNG_FORMAT_AG (PNG_FORMAT_GA|PNG_FORMAT_FLAG_AFIRST) - PNG_FORMAT_RGB PNG_FORMAT_FLAG_COLOR - PNG_FORMAT_BGR (PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_BGR) - PNG_FORMAT_RGBA (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_ALPHA) - PNG_FORMAT_ARGB (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_AFIRST) - PNG_FORMAT_BGRA (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_ALPHA) - PNG_FORMAT_ABGR (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_AFIRST) + PNG_FORMAT_GRAY + PNG_FORMAT_GA + PNG_FORMAT_AG + PNG_FORMAT_RGB + PNG_FORMAT_BGR + PNG_FORMAT_RGBA + PNG_FORMAT_ARGB + PNG_FORMAT_BGRA + PNG_FORMAT_ABGR Then the linear 2-byte formats. When naming these "Y" is used to indicate a luminance (gray) channel. The component order within the pixel @@ -4372,22 +4395,22 @@ components in the linear format. The components are 16-bit integers in the native byte order for your platform, and there is no provision for swapping the bytes to a different endian condition. - PNG_FORMAT_LINEAR_Y PNG_FORMAT_FLAG_LINEAR + PNG_FORMAT_LINEAR_Y PNG_FORMAT_LINEAR_Y_ALPHA - (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_ALPHA) PNG_FORMAT_LINEAR_RGB - (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR) PNG_FORMAT_LINEAR_RGB_ALPHA - (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR| - PNG_FORMAT_FLAG_ALPHA) -Color-mapped formats are obtained by calling png_image_{read,write}_colormap, -as appropriate after setting png_image::format to the format of the color-map -to be read or written. Applications may check the value of -PNG_FORMAT_FLAG_COLORMAP to see if they have called the colormap API. The -format of the color-map may be extracted using the following macro. +With color-mapped formats the image data is one byte for each pixel. The byte +is an index into the color-map which is formatted as above. To obtain a +color-mapped format it is sufficient just to add the PNG_FOMAT_FLAG_COLORMAP +to one of the above definitions, or you can use one of the definitions below. - PNG_FORMAT_OF_COLORMAP(fmt) ((fmt) & ~PNG_FORMAT_FLAG_COLORMAP) + PNG_FORMAT_RGB_COLORMAP + PNG_FORMAT_BGR_COLORMAP + PNG_FORMAT_RGBA_COLORMAP + PNG_FORMAT_ARGB_COLORMAP + PNG_FORMAT_BGRA_COLORMAP + PNG_FORMAT_ABGR_COLORMAP PNG_IMAGE macros @@ -4395,9 +4418,9 @@ These are convenience macros to derive information from a png_image structure. The PNG_IMAGE_SAMPLE_ macros return values appropriate to the actual image sample values - either the entries in the color-map or the pixels in the image. The PNG_IMAGE_PIXEL_ macros return corresponding values -for the pixels and will always return 1 after a call to -png_image_{read,write}_colormap. The remaining macros return information -about the rows in the image and the complete image. +for the pixels and will always return 1 for color-mapped formats. The +remaining macros return information about the rows in the image and the +complete image. NOTE: All the macros that take a png_image::format parameter are compile time constants if the format parameter is, itself, a constant. Therefore these @@ -4405,46 +4428,39 @@ macros can be used in array declarations and case labels where required. Similarly the macros are also pre-processor constants (sizeof is not used) so they can be used in #if tests. -First the information about the samples. - PNG_IMAGE_SAMPLE_CHANNELS(fmt) Returns the total number of channels in a given format: 1..4 PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt) Returns the size in bytes of a single component of a pixel or color-map - entry (as appropriate) in the image. + entry (as appropriate) in the image: 1 or 2. PNG_IMAGE_SAMPLE_SIZE(fmt) This is the size of the sample data for one sample. If the image is color-mapped it is the size of one color-map entry (and image pixels are one byte in size), otherwise it is the size of one image pixel. + PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(fmt) + The maximum size of the color-map required by the format expressed in a + count of components. This can be used to compile-time allocate a + color-map: + + png_uint_16 colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(linear_fmt)]; + + png_byte colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(sRGB_fmt)]; + + Alternatively use the PNG_IMAGE_COLORMAP_SIZE macro below to use the + information from one of the png_image_begin_read_ APIs and dynamically + allocate the required memory. + PNG_IMAGE_COLORMAP_SIZE(fmt) The size of the color-map required by the format; this is the size of the - color-map buffer passed to the png_image_{read,write}_colormap APIs, it is + color-map buffer passed to the png_image_{read,write}_colormap APIs. It is a fixed number determined by the format so can easily be allocated on the stack if necessary. -#define PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(fmt)\ - (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * 256) - /* The maximum size of the color-map required by the format expressed in a - * count of components. This can be used to compile-time allocate a - * color-map: - * - * png_uint_16 colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(linear_fmt)]; - * - * png_byte colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(sRGB_fmt)]; - * - * Alternatively, use the PNG_IMAGE_COLORMAP_SIZE macro below to use the - * information from one of the png_image_begin_read_ APIs and dynamically - * allocate the required memory. - */ - - Corresponding information about the pixels - PNG_IMAGE_PIXEL_(test,fmt) - PNG_IMAGE_PIXEL_CHANNELS(fmt) The number of separate channels (components) in a pixel; 1 for a color-mapped image. @@ -4470,19 +4486,54 @@ Information about the whole row, or whole image to start the next row on a 4-byte boundary. PNG_IMAGE_BUFFER_SIZE(image, row_stride) - Returns the size, in bytes, of an image buffer given a png_image and a row - stride - the number of components to leave space for in each row. This - macro takes care of multiplying row_stride by PNG_IMAGE_PIXEL_COMONENT_SIZE - when the image has 2-byte components. + Return the size, in bytes, of an image buffer given a png_image and a row + stride - the number of components to leave space for in each row. + + PNG_IMAGE_SIZE(image) + Return the size, in bytes, of the image in memory given just a png_image; + the row stride is the minimum stride required for the image. + + PNG_IMAGE_COLORMAP_SIZE(image) + Return the size, in bytes, of the color-map of this image. If the image + format is not a color-map format this will return a size sufficient for + 256 entries in the given format; check PNG_FORMAT_FLAG_COLORMAP if + you don't want to allocate a color-map in this case. + +PNG_IMAGE_FLAG_* + +Flags containing additional information about the image are held in +the 'flags' field of png_image. PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB == 0x01 This indicates the the RGB values of the in-memory bitmap do not correspond to the red, green and blue end-points defined by sRGB. - PNG_IMAGE_FLAG_COLORMAP == 0x02 - The PNG is color-mapped. If this flag is set png_image_read_colormap - can be used without further loss of image information. If it is not set - png_image_read_colormap will cause significant loss if the image has any + PNG_IMAGE_FLAG_FAST == 0x02 + On write emphasise speed over compression; the resultant PNG file will be + larger but will be produced significantly faster, particular for large + images. Do not use this option for images which will be distributed, only + used it when producing intermediate files that will be read back in + repeatedly. For a typical 24-bit image the option will double the read + speed at the cost of increasing the image size by 25%, however for many + more compressible images the PNG file can be 10 times larger with only a + slight speed gain. + + PNG_IMAGE_FLAG_16BIT_sRGB == 0x04 + On read if the image is a 16-bit per component image and there is no gAMA + or sRGB chunk assume that the components are sRGB encoded. Notice that + images output by the simplified API always have gamma information; setting + this flag only affects the interpretation of 16-bit images from an + external source. It is recommended that the application expose this flag + to the user; the user can normally easily recognize the difference between + linear and sRGB encoding. This flag has no effect on write - the data + passed to the write APIs must have the correct encoding (as defined + above.) + + If the flag is not set (the default) input 16-bit per component data is + assumed to be linear. + + NOTE: the flag can only be set after the png_image_begin_read_ call, + because that call initializes the 'flags' field. READ APIs @@ -5355,7 +5406,7 @@ a set of "safe" limits is applied in pngpriv.h. These can be overridden by application calls to png_set_user_limits(), png_set_user_chunk_cache_max(), and/or png_set_user_malloc_max() that increase or decrease the limits. Also, in libpng-1.5.10 the default width and height limits were increased -from 1,000,000 to 0x7ffffff (i.e., made unlimited). Therefore, the +from 1,000,000 to 0x7fffffff (i.e., made unlimited). Therefore, the limits are now default safe png_user_width_max 0x7fffffff 1,000,000 @@ -5364,7 +5415,7 @@ limits are now png_user_chunk_malloc_max 0 (unlimited) 8,000,000 The png_set_option() function (and the "options" member of the png struct) was -added to libpng-1.5.15. +added to libpng-1.5.15, with option PNG_ARM_NEON. The library now supports a complete fixed point implementation and can thus be used on systems that have no floating point support or very @@ -5506,9 +5557,9 @@ The signatures of many exported functions were changed, such that png_infop became png_inforp or png_const_inforp where "rp" indicates a "restricted pointer". -The support for FAR/far types has been eliminated and the definition of -png_alloc_size_t is now controlled by a flag so that 'small size_t' systems -can select it if necessary. +Dropped support for 16-bit platforms. The support for FAR/far types has +been eliminated and the definition of png_alloc_size_t is now controlled +by a flag so that 'small size_t' systems can select it if necessary. Error detection in some chunks has improved; in particular the iCCP chunk reader now does pretty complete validation of the basic format. Some bad @@ -5600,6 +5651,11 @@ It can be set for testing debug or beta builds to ensure that they will compile when the build type is switched to RC or STABLE. In essence this overrides the PNG_LIBPNG_BUILD_BASE_TYPE definition which is not directly user controllable. +Starting with libpng-1.6.19, attempting to set an over-length PLTE chunk +is an error. Previously this requirement of the PNG specification was not +enforced, and the palette was always limited to 256 entries. An over-length +PLTE chunk found in an input PNG is silently truncated. + .SH XIII. Detecting libpng The png_get_io_ptr() function has been present since libpng-0.88, has never @@ -5753,10 +5809,12 @@ We prefer #ifdef and #ifndef to #if defined() and #if !defined() when there is only one macro being tested. We always use parentheses with "defined". -We prefer to express integers that are used as bit masks in hex format, -with an even number of lower-case hex digits (e.g., 0x00, 0xff, 0x0100). +We express integer constants that are used as bit masks in hex format, +with an even number of lower-case hex digits, and to make them unsigned +(e.g., 0x00U, 0xffU, 0x0100U) and long if they are greater than 0x7fff +(e.g., 0xffffUL). -We prefer to use underscores in variable names rather than camelCase, except +We prefer to use underscores rather than camelCase in names, except for a few type names that we inherit from zlib.h. We prefer "if (something != 0)" and "if (something == 0)" @@ -5770,13 +5828,11 @@ Other rules can be inferred by inspecting the libpng source. .SH XVI. Y2K Compliance in libpng -July 23, 2015 - Since the PNG Development group is an ad-hoc body, we can't make an official declaration. This is your unofficial assurance that libpng from version 0.71 and -upward through 1.6.18 are Y2K compliant. It is my belief that earlier +upward through 1.6.20 are Y2K compliant. It is my belief that earlier versions were also Y2K compliant. Libpng only has two year fields. One is a 2-byte unsigned integer @@ -5838,202 +5894,47 @@ the first widely used release: source png.h png.h shared-lib version string int version ------- ------ ----- ---------- - 0.89c ("beta 3") 0.89 89 1.0.89 - 0.90 ("beta 4") 0.90 90 0.90 - 0.95 ("beta 5") 0.95 95 0.95 - 0.96 ("beta 6") 0.96 96 0.96 - 0.97b ("beta 7") 1.00.97 97 1.0.1 - 0.97c 0.97 97 2.0.97 - 0.98 0.98 98 2.0.98 - 0.99 0.99 98 2.0.99 - 0.99a-m 0.99 99 2.0.99 - 1.00 1.00 100 2.1.0 - 1.0.0 1.0.0 100 2.1.0 - 1.0.0 (from here on, the 100 2.1.0 - 1.0.1 png.h string is 10001 2.1.0 - 1.0.1a-e identical to the 10002 from here on, the - 1.0.2 source version) 10002 shared library is 2.V - 1.0.2a-b 10003 where V is the source - 1.0.1 10001 code version except as - 1.0.1a-e 10002 2.1.0.1a-e noted. - 1.0.2 10002 2.1.0.2 - 1.0.2a-b 10003 2.1.0.2a-b - 1.0.3 10003 2.1.0.3 - 1.0.3a-d 10004 2.1.0.3a-d - 1.0.4 10004 2.1.0.4 - 1.0.4a-f 10005 2.1.0.4a-f - 1.0.5 (+ 2 patches) 10005 2.1.0.5 - 1.0.5a-d 10006 2.1.0.5a-d - 1.0.5e-r 10100 2.1.0.5e-r - 1.0.5s-v 10006 2.1.0.5s-v - 1.0.6 (+ 3 patches) 10006 2.1.0.6 - 1.0.6d-g 10007 2.1.0.6d-g - 1.0.6h 10007 10.6h - 1.0.6i 10007 10.6i - 1.0.6j 10007 2.1.0.6j - 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 - 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 - 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 - 1.0.7 1 10007 2.1.0.7 - 1.0.8beta1-4 1 10008 2.1.0.8beta1-4 - 1.0.8rc1 1 10008 2.1.0.8rc1 - 1.0.8 1 10008 2.1.0.8 - 1.0.9beta1-6 1 10009 2.1.0.9beta1-6 - 1.0.9rc1 1 10009 2.1.0.9rc1 - 1.0.9beta7-10 1 10009 2.1.0.9beta7-10 - 1.0.9rc2 1 10009 2.1.0.9rc2 - 1.0.9 1 10009 2.1.0.9 - 1.0.10beta1 1 10010 2.1.0.10beta1 - 1.0.10rc1 1 10010 2.1.0.10rc1 - 1.0.10 1 10010 2.1.0.10 - 1.0.11beta1-3 1 10011 2.1.0.11beta1-3 - 1.0.11rc1 1 10011 2.1.0.11rc1 - 1.0.11 1 10011 2.1.0.11 - 1.0.12beta1-2 2 10012 2.1.0.12beta1-2 - 1.0.12rc1 2 10012 2.1.0.12rc1 - 1.0.12 2 10012 2.1.0.12 - 1.1.0a-f - 10100 2.1.1.0a-f abandoned - 1.2.0beta1-2 2 10200 2.1.2.0beta1-2 - 1.2.0beta3-5 3 10200 3.1.2.0beta3-5 - 1.2.0rc1 3 10200 3.1.2.0rc1 - 1.2.0 3 10200 3.1.2.0 - 1.2.1beta-4 3 10201 3.1.2.1beta1-4 - 1.2.1rc1-2 3 10201 3.1.2.1rc1-2 - 1.2.1 3 10201 3.1.2.1 - 1.2.2beta1-6 12 10202 12.so.0.1.2.2beta1-6 - 1.0.13beta1 10 10013 10.so.0.1.0.13beta1 - 1.0.13rc1 10 10013 10.so.0.1.0.13rc1 - 1.2.2rc1 12 10202 12.so.0.1.2.2rc1 - 1.0.13 10 10013 10.so.0.1.0.13 - 1.2.2 12 10202 12.so.0.1.2.2 - 1.2.3rc1-6 12 10203 12.so.0.1.2.3rc1-6 - 1.2.3 12 10203 12.so.0.1.2.3 - 1.2.4beta1-3 13 10204 12.so.0.1.2.4beta1-3 - 1.2.4rc1 13 10204 12.so.0.1.2.4rc1 - 1.0.14 10 10014 10.so.0.1.0.14 - 1.2.4 13 10204 12.so.0.1.2.4 - 1.2.5beta1-2 13 10205 12.so.0.1.2.5beta1-2 - 1.0.15rc1 10 10015 10.so.0.1.0.15rc1 - 1.0.15 10 10015 10.so.0.1.0.15 - 1.2.5 13 10205 12.so.0.1.2.5 - 1.2.6beta1-4 13 10206 12.so.0.1.2.6beta1-4 - 1.2.6rc1-5 13 10206 12.so.0.1.2.6rc1-5 - 1.0.16 10 10016 10.so.0.1.0.16 - 1.2.6 13 10206 12.so.0.1.2.6 - 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2 - 1.0.17rc1 10 10017 12.so.0.1.0.17rc1 - 1.2.7rc1 13 10207 12.so.0.1.2.7rc1 - 1.0.17 10 10017 12.so.0.1.0.17 - 1.2.7 13 10207 12.so.0.1.2.7 - 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5 - 1.0.18rc1-5 10 10018 12.so.0.1.0.18rc1-5 - 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5 - 1.0.18 10 10018 12.so.0.1.0.18 - 1.2.8 13 10208 12.so.0.1.2.8 - 1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3 - 1.2.9beta4-11 13 10209 12.so.0.9[.0] - 1.2.9rc1 13 10209 12.so.0.9[.0] - 1.2.9 13 10209 12.so.0.9[.0] - 1.2.10beta1-7 13 10210 12.so.0.10[.0] - 1.2.10rc1-2 13 10210 12.so.0.10[.0] - 1.2.10 13 10210 12.so.0.10[.0] - 1.4.0beta1-6 14 10400 14.so.0.0[.0] - 1.2.11beta1-4 13 10210 12.so.0.11[.0] - 1.4.0beta7-8 14 10400 14.so.0.0[.0] - 1.2.11 13 10211 12.so.0.11[.0] - 1.2.12 13 10212 12.so.0.12[.0] - 1.4.0beta9-14 14 10400 14.so.0.0[.0] - 1.2.13 13 10213 12.so.0.13[.0] - 1.4.0beta15-36 14 10400 14.so.0.0[.0] - 1.4.0beta37-87 14 10400 14.so.14.0[.0] - 1.4.0rc01 14 10400 14.so.14.0[.0] - 1.4.0beta88-109 14 10400 14.so.14.0[.0] - 1.4.0rc02-08 14 10400 14.so.14.0[.0] - 1.4.0 14 10400 14.so.14.0[.0] - 1.4.1beta01-03 14 10401 14.so.14.1[.0] - 1.4.1rc01 14 10401 14.so.14.1[.0] - 1.4.1beta04-12 14 10401 14.so.14.1[.0] - 1.4.1 14 10401 14.so.14.1[.0] - 1.4.2 14 10402 14.so.14.2[.0] - 1.4.3 14 10403 14.so.14.3[.0] - 1.4.4 14 10404 14.so.14.4[.0] - 1.5.0beta01-58 15 10500 15.so.15.0[.0] - 1.5.0rc01-07 15 10500 15.so.15.0[.0] - 1.5.0 15 10500 15.so.15.0[.0] - 1.5.1beta01-11 15 10501 15.so.15.1[.0] - 1.5.1rc01-02 15 10501 15.so.15.1[.0] - 1.5.1 15 10501 15.so.15.1[.0] - 1.5.2beta01-03 15 10502 15.so.15.2[.0] - 1.5.2rc01-03 15 10502 15.so.15.2[.0] - 1.5.2 15 10502 15.so.15.2[.0] - 1.5.3beta01-10 15 10503 15.so.15.3[.0] - 1.5.3rc01-02 15 10503 15.so.15.3[.0] - 1.5.3beta11 15 10503 15.so.15.3[.0] - 1.5.3 [omitted] - 1.5.4beta01-08 15 10504 15.so.15.4[.0] - 1.5.4rc01 15 10504 15.so.15.4[.0] - 1.5.4 15 10504 15.so.15.4[.0] - 1.5.5beta01-08 15 10505 15.so.15.5[.0] - 1.5.5rc01 15 10505 15.so.15.5[.0] - 1.5.5 15 10505 15.so.15.5[.0] - 1.5.6beta01-07 15 10506 15.so.15.6[.0] - 1.5.6rc01-03 15 10506 15.so.15.6[.0] - 1.5.6 15 10506 15.so.15.6[.0] - 1.5.7beta01-05 15 10507 15.so.15.7[.0] - 1.5.7rc01-03 15 10507 15.so.15.7[.0] - 1.5.7 15 10507 15.so.15.7[.0] - 1.6.0beta01-40 16 10600 16.so.16.0[.0] - 1.6.0rc01-08 16 10600 16.so.16.0[.0] - 1.6.0 16 10600 16.so.16.0[.0] - 1.6.1beta01-09 16 10601 16.so.16.1[.0] - 1.6.1rc01 16 10601 16.so.16.1[.0] - 1.6.1 16 10601 16.so.16.1[.0] - 1.6.2beta01 16 10602 16.so.16.2[.0] - 1.6.2rc01-06 16 10602 16.so.16.2[.0] - 1.6.2 16 10602 16.so.16.2[.0] - 1.6.3beta01-11 16 10603 16.so.16.3[.0] - 1.6.3rc01 16 10603 16.so.16.3[.0] - 1.6.3 16 10603 16.so.16.3[.0] - 1.6.4beta01-02 16 10604 16.so.16.4[.0] - 1.6.4rc01 16 10604 16.so.16.4[.0] - 1.6.4 16 10604 16.so.16.4[.0] - 1.6.5 16 10605 16.so.16.5[.0] - 1.6.6 16 10606 16.so.16.6[.0] - 1.6.7beta01-04 16 10607 16.so.16.7[.0] - 1.6.7rc01-02 16 10607 16.so.16.7[.0] - 1.6.7 16 10607 16.so.16.7[.0] - 1.6.8beta01-02 16 10608 16.so.16.8[.0] - 1.6.8rc01-02 16 10608 16.so.16.8[.0] - 1.6.8 16 10608 16.so.16.8[.0] - 1.6.9beta01-04 16 10609 16.so.16.9[.0] - 1.6.9rc01-02 16 10609 16.so.16.9[.0] - 1.6.9 16 10609 16.so.16.9[.0] - 1.6.10beta01-03 16 10610 16.so.16.10[.0] - 1.6.10rc01-03 16 10610 16.so.16.10[.0] - 1.6.10 16 10610 16.so.16.10[.0] - 1.6.11beta01-06 16 10611 16.so.16.11[.0] - 1.6.11rc01-02 16 10611 16.so.16.11[.0] - 1.6.11 16 10611 16.so.16.11[.0] - 1.6.12rc01 16 10612 16.so.16.12[.0] - 1.6.12 16 10612 16.so.16.12[.0] - 1.6.13beta01-04 16 10613 16.so.16.13[.0] - 1.6.13rc01-02 16 10613 16.so.16.13[.0] - 1.6.13 16 10613 16.so.16.13[.0] - 1.6.14beta01-07 16 10614 16.so.16.14[.0] - 1.6.14rc01-02 16 10614 16.so.16.14[.0] - 1.6.14 16 10614 16.so.16.14[.0] - 1.6.15beta01-08 16 10615 16.so.16.15[.0] - 1.6.15rc01-03 16 10615 16.so.16.15[.0] - 1.6.15 16 10615 16.so.16.15[.0] - 1.6.16beta01-03 16 10616 16.so.16.16[.0] - 1.6.16rc01-02 16 10616 16.so.16.16[.0] - 1.6.16 16 10616 16.so.16.16[.0] - 1.6.17beta01-06 16 10617 16.so.16.17[.0] - 1.6.17rc01-06 16 10617 16.so.16.17[.0] - 1.6.17 16 10617 16.so.16.17[.0] - 1.6.18beta01-09 16 10618 16.so.16.18[.0] - 1.6.18rc01-03 16 10618 16.so.16.18[.0] - 1.6.18 16 10618 16.so.16.18[.0] + 0.89c "1.0 beta 3" 0.89 89 1.0.89 + 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90] + 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95] + 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96] + 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97] + 0.97c 0.97 97 2.0.97 + 0.98 0.98 98 2.0.98 + 0.99 0.99 98 2.0.99 + 0.99a-m 0.99 99 2.0.99 + 1.00 1.00 100 2.1.0 [100 should be 10000] + 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000] + 1.0.1 png.h string is 10001 2.1.0 + 1.0.1a-e identical to the 10002 from here on, the shared library + 1.0.2 source version) 10002 is 2.V where V is the source code + 1.0.2a-b 10003 version, except as noted. + 1.0.3 10003 + 1.0.3a-d 10004 + 1.0.4 10004 + 1.0.4a-f 10005 + 1.0.5 (+ 2 patches) 10005 + 1.0.5a-d 10006 + 1.0.5e-r 10100 (not source compatible) + 1.0.5s-v 10006 (not binary compatible) + 1.0.6 (+ 3 patches) 10006 (still binary incompatible) + 1.0.6d-f 10007 (still binary incompatible) + 1.0.6g 10007 + 1.0.6h 10007 10.6h (testing xy.z so-numbering) + 1.0.6i 10007 10.6i + 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0) + 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible) + 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible) + 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible) + 1.0.7 1 10007 (still compatible) + ... + 1.0.19 10 10019 10.so.0.19[.0] + ... + 1.2.53 13 10253 12.so.0.53[.0] + ... + 1.5.23 15 10523 15.so.15.23[.0] + ... + 1.6.20 16 10620 16.so.16.20[.0] Henceforth the source version will match the shared-library minor and patch numbers; the shared-library major version number will be @@ -6043,11 +5944,10 @@ for applications, is an unsigned integer of the form xyyzz corresponding to the source version x.y.z (leading zeros in y and z). Beta versions were given the previous public release number plus a letter, until version 1.0.6j; from then on they were given the upcoming public -release number plus "betaNN" or "rcN". +release number plus "betaNN" or "rcNN". .SH "SEE ALSO" -.BR "png"(5), " libpngpf"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5) - +.IR libpngpf(3) ", " png(5) .LP .IR libpng : .IP @@ -6070,7 +5970,7 @@ ftp://ftp.info-zip.org/pub/infozip/zlib .I libpng or at .br -ftp://ds.internic.net/rfc/rfc2083.txt +ftp://ftp.rfc-editor.org:/in-notes/rfc2083.txt .br or (as a W3C Recommendation) at .br @@ -6090,7 +5990,7 @@ possible without all of you. Thanks to Frank J. T. Wojcik for helping with the documentation. -Libpng version 1.6.18 - July 23, 2015: +Libpng version 1.6.20 - December 3, 2015: Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). @@ -6102,21 +6002,24 @@ png-mng-implement at lists.sourceforge.net (subscription required; visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement to subscribe). -.SH COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: +.SH NOTICES: -(This copy of the libpng notices is provided for your convenience. In case of +This copy of the libpng notices is provided for your convenience. In case of any discrepancy between this copy and the notices in the file png.h that is -included in the libpng distribution, the latter shall prevail.) +included in the libpng distribution, the latter shall prevail. + +COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: If you modify libpng you may insert additional notices immediately following this sentence. This code is released under the libpng license. -libpng versions 1.0.7, July 1, 2000, through 1.6.18, July 23, 2015, are -Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, and are -distributed according to the same disclaimer and license as libpng-1.0.6 -with the following individuals added to the list of Contributing Authors: +libpng versions 1.0.7, July 1, 2000, through 1.6.20, December 3, 2015, are +Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, are +derived from libpng-1.0.6, and are distributed according to the same +disclaimer and license as libpng-1.0.6 with the following individuals +added to the list of Contributing Authors: Simon-Pierre Cadieux Eric S. Raymond @@ -6135,18 +6038,20 @@ and with the following additions to the disclaimer: the user. libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are -Copyright (c) 1998-2000 Glenn Randers-Pehrson, and are distributed according -to the same disclaimer and license as libpng-0.96, with the following -individuals added to the list of Contributing Authors: +Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from +libpng-0.96, and are distributed according to the same disclaimer and +license as libpng-0.96, with the following individuals added to the list +of Contributing Authors: Tom Lane Glenn Randers-Pehrson Willem van Schaik libpng versions 0.89, June 1996, through 0.96, May 1997, are -Copyright (c) 1996-1997 Andreas Dilger, and are -distributed according to the same disclaimer and license as libpng-0.88, -with the following individuals added to the list of Contributing Authors: +Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, +and are distributed according to the same disclaimer and license as +libpng-0.88, with the following individuals added to the list of +Contributing Authors: John Bowler Kevin Bracey @@ -6193,6 +6098,8 @@ supporting the PNG file format in commercial products. If you use this source code in a product, acknowledgment is not required but would be appreciated. +END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE. + A "png_get_copyright" function is available, for convenient use in "about" boxes and the like: @@ -6207,7 +6114,7 @@ the additional disclaimers inserted at version 1.0.7. Glenn Randers-Pehrson glennrp at users.sourceforge.net -July 23, 2015 +December 3, 2015 .\" end of man page diff --git a/Build/source/libs/libpng/libpng-1.6.18/libpng.pc.in b/Build/source/libs/libpng/libpng-src/libpng.pc.in index 3e7e2c58a7e..3e7e2c58a7e 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/libpng.pc.in +++ b/Build/source/libs/libpng/libpng-src/libpng.pc.in diff --git a/Build/source/libs/libpng/libpng-1.6.18/libpngpf.3 b/Build/source/libs/libpng/libpng-src/libpngpf.3 index f5511dd2a00..4da0843fcbf 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/libpngpf.3 +++ b/Build/source/libs/libpng/libpng-src/libpngpf.3 @@ -1,6 +1,6 @@ -.TH LIBPNGPF 3 "July 23, 2015" +.TH LIBPNGPF 3 "December 3, 2015" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.6.18 +libpng \- Portable Network Graphics (PNG) Reference Library 1.6.20 (private functions) .SH SYNOPSIS \fB#include \fI"pngpriv.h" diff --git a/Build/source/libs/libpng/libpng-1.6.18/png.5 b/Build/source/libs/libpng/libpng-src/png.5 index 37a8525c6e7..76a327ba68a 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/png.5 +++ b/Build/source/libs/libpng/libpng-src/png.5 @@ -1,4 +1,4 @@ -.TH PNG 5 "July 23, 2015" +.TH PNG 5 "December 3, 2015" .SH NAME png \- Portable Network Graphics (PNG) format .SH DESCRIPTION @@ -27,7 +27,7 @@ PNG specification (second edition), November 2003: PNG 1.2 specification, July 1999: .IP .br -http://www.libpng.org/pub/png +http://png-mng.sourceforge.net/pub/png/spec/1.2/ .LP PNG 1.0 specification, October 1996: .IP @@ -39,7 +39,7 @@ ftp://ds.internic.net/rfc/rfc2083.txt .br or (as a W3C Recommendation) at .br -http://www.w3.org/TR/REC-png.html +http://www.w3.org/TR/REC-png-961001 .SH AUTHORS This man page: Glenn Randers-Pehrson .LP diff --git a/Build/source/libs/libpng/libpng-1.6.18/png.c b/Build/source/libs/libpng/libpng-src/png.c index f6e353ace0f..c183e3f8faf 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/png.c +++ b/Build/source/libs/libpng/libpng-src/png.c @@ -1,7 +1,7 @@ /* png.c - location for general purpose libpng functions * - * Last changed in libpng 1.6.18 [July 23, 2015] + * Last changed in libpng 1.6.19 [November 12, 2015] * Copyright (c) 1998-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -14,7 +14,7 @@ #include "pngpriv.h" /* Generate a compiler error if there is an old png.h in the search path. */ -typedef png_libpng_version_1_6_18 Your_png_h_is_not_version_1_6_18; +typedef png_libpng_version_1_6_20 Your_png_h_is_not_version_1_6_20; /* Tells libpng that we have already handled the first "num_bytes" bytes * of the PNG file signature. If the PNG data is embedded into another @@ -26,15 +26,20 @@ typedef png_libpng_version_1_6_18 Your_png_h_is_not_version_1_6_18; void PNGAPI png_set_sig_bytes(png_structrp png_ptr, int num_bytes) { + unsigned int nb = (unsigned int)num_bytes; + png_debug(1, "in png_set_sig_bytes"); if (png_ptr == NULL) return; - if (num_bytes > 8) + if (num_bytes < 0) + nb = 0; + + if (nb > 8) png_error(png_ptr, "Too many bytes for PNG signature"); - png_ptr->sig_bytes = (png_byte)((num_bytes < 0 ? 0 : num_bytes) & 0xff); + png_ptr->sig_bytes = (png_byte)nb; } /* Checks whether the supplied bytes match the PNG signature. We allow @@ -413,6 +418,8 @@ png_info_init_3,(png_infopp ptr_ptr, png_size_t png_info_struct_size), free(info_ptr); info_ptr = png_voidcast(png_inforp, png_malloc_base(NULL, (sizeof *info_ptr))); + if (info_ptr == NULL) + return; *ptr_ptr = info_ptr; } @@ -664,19 +671,20 @@ png_init_io(png_structrp png_ptr, png_FILE_p fp) # endif # ifdef PNG_SAVE_INT_32_SUPPORTED -/* The png_save_int_32 function assumes integers are stored in two's - * complement format. If this isn't the case, then this routine needs to - * be modified to write data in two's complement format. Note that, - * the following works correctly even if png_int_32 has more than 32 bits - * (compare the more complex code required on read for sign extension.) +/* PNG signed integers are saved in 32-bit 2's complement format. ANSI C-90 + * defines a cast of a signed integer to an unsigned integer either to preserve + * the value, if it is positive, or to calculate: + * + * (UNSIGNED_MAX+1) + integer + * + * Where UNSIGNED_MAX is the appropriate maximum unsigned value, so when the + * negative integral value is added the result will be an unsigned value + * correspnding to the 2's complement representation. */ void PNGAPI png_save_int_32(png_bytep buf, png_int_32 i) { - buf[0] = (png_byte)((i >> 24) & 0xff); - buf[1] = (png_byte)((i >> 16) & 0xff); - buf[2] = (png_byte)((i >> 8) & 0xff); - buf[3] = (png_byte)(i & 0xff); + png_save_uint_32(buf, i); } # endif @@ -722,6 +730,7 @@ png_convert_to_rfc1123_buffer(char out[29], png_const_timep ptime) APPEND(':'); APPEND_NUMBER(PNG_NUMBER_FORMAT_02u, (unsigned)ptime->second); APPEND_STRING(" +0000"); /* This reliably terminates the buffer */ + PNG_UNUSED (pos) # undef APPEND # undef APPEND_NUMBER @@ -766,13 +775,13 @@ png_get_copyright(png_const_structrp png_ptr) #else # ifdef __STDC__ return PNG_STRING_NEWLINE \ - "libpng version 1.6.18 - July 23, 2015" PNG_STRING_NEWLINE \ + "libpng version 1.6.20 - December 3, 2015" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2015 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \ "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \ "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \ PNG_STRING_NEWLINE; # else - return "libpng version 1.6.18 - July 23, 2015\ + return "libpng version 1.6.20 - December 3, 2015\ Copyright (c) 1998-2015 Glenn Randers-Pehrson\ Copyright (c) 1996-1997 Andreas Dilger\ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."; @@ -1703,7 +1712,6 @@ png_colorspace_set_chromaticities(png_const_structrp png_ptr, */ colorspace->flags |= PNG_COLORSPACE_INVALID; png_error(png_ptr, "internal error checking chromaticities"); - break; } return 0; /* failed */ @@ -1731,7 +1739,6 @@ png_colorspace_set_endpoints(png_const_structrp png_ptr, default: colorspace->flags |= PNG_COLORSPACE_INVALID; png_error(png_ptr, "internal error checking chromaticities"); - break; } return 0; /* failed */ @@ -2057,8 +2064,8 @@ png_icc_check_header(png_const_structrp png_ptr, png_colorspacerp colorspace, temp = png_get_uint_32(profile+12); /* profile/device class */ switch (temp) { - case 0x73636E72: /* 'scnr' */ - case 0x6D6E7472: /* 'mntr' */ + case 0x73636e72: /* 'scnr' */ + case 0x6d6e7472: /* 'mntr' */ case 0x70727472: /* 'prtr' */ case 0x73706163: /* 'spac' */ /* All supported */ @@ -2069,7 +2076,7 @@ png_icc_check_header(png_const_structrp png_ptr, png_colorspacerp colorspace, return png_icc_profile_error(png_ptr, colorspace, name, temp, "invalid embedded Abstract ICC profile"); - case 0x6C696E6B: /* 'link' */ + case 0x6c696e6b: /* 'link' */ /* DeviceLink profiles cannot be interpreted in a non-device specific * fashion, if an app uses the AToB0Tag in the profile the results are * undefined unless the result is sent to the intended device, @@ -2079,7 +2086,7 @@ png_icc_check_header(png_const_structrp png_ptr, png_colorspacerp colorspace, return png_icc_profile_error(png_ptr, colorspace, name, temp, "unexpected DeviceLink ICC profile class"); - case 0x6E6D636C: /* 'nmcl' */ + case 0x6e6d636c: /* 'nmcl' */ /* A NamedColor profile is also device specific, however it doesn't * contain an AToB0 tag that is open to misinterpretation. Almost * certainly it will fail the tests below. @@ -2105,8 +2112,8 @@ png_icc_check_header(png_const_structrp png_ptr, png_colorspacerp colorspace, temp = png_get_uint_32(profile+20); switch (temp) { - case 0x58595A20: /* 'XYZ ' */ - case 0x4C616220: /* 'Lab ' */ + case 0x58595a20: /* 'XYZ ' */ + case 0x4c616220: /* 'Lab ' */ break; default: @@ -2276,7 +2283,7 @@ png_compare_ICC_profile_with_sRGB(png_const_structrp png_ptr, } /* Length *and* intent must match */ - if (length == png_sRGB_checks[i].length && + if (length == (png_uint_32) png_sRGB_checks[i].length && intent == (png_uint_32) png_sRGB_checks[i].intent) { /* Now calculate the adler32 if not done already. */ @@ -2336,7 +2343,7 @@ png_compare_ICC_profile_with_sRGB(png_const_structrp png_ptr, * Fall through to "no match". */ png_chunk_report(png_ptr, - "Not recognizing known sRGB profile that has been edited", + "Not recognizing known sRGB profile that has been edited", PNG_CHUNK_WARNING); break; # endif @@ -3144,7 +3151,7 @@ png_ascii_from_fixed(png_const_structrp png_ptr, png_charp ascii, /* Avoid overflow here on the minimum integer. */ if (fp < 0) - *ascii++ = 45, --size, num = -fp; + *ascii++ = 45, num = -fp; else num = fp; @@ -3675,7 +3682,7 @@ png_exp(png_fixed_point x) if (x > 0 && x <= 0xfffff) /* Else overflow or zero (underflow) */ { /* Obtain a 4-bit approximation */ - png_uint_32 e = png_32bit_exp[(x >> 12) & 0xf]; + png_uint_32 e = png_32bit_exp[(x >> 12) & 0x0f]; /* Incorporate the low 12 bits - these decrease the returned value by * multiplying by a number less than 1 if the bit is set. The multiplier diff --git a/Build/source/libs/libpng/libpng-1.6.18/png.h b/Build/source/libs/libpng/libpng-src/png.h index f2013cf758d..4d03dfc136c 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/png.h +++ b/Build/source/libs/libpng/libpng-src/png.h @@ -1,7 +1,7 @@ /* png.h - header file for PNG reference library * - * libpng version 1.6.18, July 23, 2015 + * libpng version 1.6.20, December 3, 2015 * * Copyright (c) 1998-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -12,234 +12,9 @@ * Authors and maintainers: * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger - * libpng versions 0.97, January 1998, through 1.6.18, July 23, 2015: Glenn + * libpng versions 0.97, January 1998, through 1.6.20, December 3, 2015: + * Glenn Randers-Pehrson. * See also "Contributing Authors", below. - * - * Note about libpng version numbers: - * - * Due to various miscommunications, unforeseen code incompatibilities - * and occasional factors outside the authors' control, version numbering - * on the library has not always been consistent and straightforward. - * The following table summarizes matters since version 0.89c, which was - * the first widely used release: - * - * source png.h png.h shared-lib - * version string int version - * ------- ------ ----- ---------- - * 0.89c "1.0 beta 3" 0.89 89 1.0.89 - * 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90] - * 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95] - * 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96] - * 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97] - * 0.97c 0.97 97 2.0.97 - * 0.98 0.98 98 2.0.98 - * 0.99 0.99 98 2.0.99 - * 0.99a-m 0.99 99 2.0.99 - * 1.00 1.00 100 2.1.0 [100 should be 10000] - * 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000] - * 1.0.1 png.h string is 10001 2.1.0 - * 1.0.1a-e identical to the 10002 from here on, the shared library - * 1.0.2 source version) 10002 is 2.V where V is the source code - * 1.0.2a-b 10003 version, except as noted. - * 1.0.3 10003 - * 1.0.3a-d 10004 - * 1.0.4 10004 - * 1.0.4a-f 10005 - * 1.0.5 (+ 2 patches) 10005 - * 1.0.5a-d 10006 - * 1.0.5e-r 10100 (not source compatible) - * 1.0.5s-v 10006 (not binary compatible) - * 1.0.6 (+ 3 patches) 10006 (still binary incompatible) - * 1.0.6d-f 10007 (still binary incompatible) - * 1.0.6g 10007 - * 1.0.6h 10007 10.6h (testing xy.z so-numbering) - * 1.0.6i 10007 10.6i - * 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0) - * 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible) - * 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible) - * 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible) - * 1.0.7 1 10007 (still compatible) - * 1.0.8beta1-4 1 10008 2.1.0.8beta1-4 - * 1.0.8rc1 1 10008 2.1.0.8rc1 - * 1.0.8 1 10008 2.1.0.8 - * 1.0.9beta1-6 1 10009 2.1.0.9beta1-6 - * 1.0.9rc1 1 10009 2.1.0.9rc1 - * 1.0.9beta7-10 1 10009 2.1.0.9beta7-10 - * 1.0.9rc2 1 10009 2.1.0.9rc2 - * 1.0.9 1 10009 2.1.0.9 - * 1.0.10beta1 1 10010 2.1.0.10beta1 - * 1.0.10rc1 1 10010 2.1.0.10rc1 - * 1.0.10 1 10010 2.1.0.10 - * 1.0.11beta1-3 1 10011 2.1.0.11beta1-3 - * 1.0.11rc1 1 10011 2.1.0.11rc1 - * 1.0.11 1 10011 2.1.0.11 - * 1.0.12beta1-2 2 10012 2.1.0.12beta1-2 - * 1.0.12rc1 2 10012 2.1.0.12rc1 - * 1.0.12 2 10012 2.1.0.12 - * 1.1.0a-f - 10100 2.1.1.0a-f (branch abandoned) - * 1.2.0beta1-2 2 10200 2.1.2.0beta1-2 - * 1.2.0beta3-5 3 10200 3.1.2.0beta3-5 - * 1.2.0rc1 3 10200 3.1.2.0rc1 - * 1.2.0 3 10200 3.1.2.0 - * 1.2.1beta1-4 3 10201 3.1.2.1beta1-4 - * 1.2.1rc1-2 3 10201 3.1.2.1rc1-2 - * 1.2.1 3 10201 3.1.2.1 - * 1.2.2beta1-6 12 10202 12.so.0.1.2.2beta1-6 - * 1.0.13beta1 10 10013 10.so.0.1.0.13beta1 - * 1.0.13rc1 10 10013 10.so.0.1.0.13rc1 - * 1.2.2rc1 12 10202 12.so.0.1.2.2rc1 - * 1.0.13 10 10013 10.so.0.1.0.13 - * 1.2.2 12 10202 12.so.0.1.2.2 - * 1.2.3rc1-6 12 10203 12.so.0.1.2.3rc1-6 - * 1.2.3 12 10203 12.so.0.1.2.3 - * 1.2.4beta1-3 13 10204 12.so.0.1.2.4beta1-3 - * 1.0.14rc1 13 10014 10.so.0.1.0.14rc1 - * 1.2.4rc1 13 10204 12.so.0.1.2.4rc1 - * 1.0.14 10 10014 10.so.0.1.0.14 - * 1.2.4 13 10204 12.so.0.1.2.4 - * 1.2.5beta1-2 13 10205 12.so.0.1.2.5beta1-2 - * 1.0.15rc1-3 10 10015 10.so.0.1.0.15rc1-3 - * 1.2.5rc1-3 13 10205 12.so.0.1.2.5rc1-3 - * 1.0.15 10 10015 10.so.0.1.0.15 - * 1.2.5 13 10205 12.so.0.1.2.5 - * 1.2.6beta1-4 13 10206 12.so.0.1.2.6beta1-4 - * 1.0.16 10 10016 10.so.0.1.0.16 - * 1.2.6 13 10206 12.so.0.1.2.6 - * 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2 - * 1.0.17rc1 10 10017 12.so.0.1.0.17rc1 - * 1.2.7rc1 13 10207 12.so.0.1.2.7rc1 - * 1.0.17 10 10017 12.so.0.1.0.17 - * 1.2.7 13 10207 12.so.0.1.2.7 - * 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5 - * 1.0.18rc1-5 10 10018 12.so.0.1.0.18rc1-5 - * 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5 - * 1.0.18 10 10018 12.so.0.1.0.18 - * 1.2.8 13 10208 12.so.0.1.2.8 - * 1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3 - * 1.2.9beta4-11 13 10209 12.so.0.9[.0] - * 1.2.9rc1 13 10209 12.so.0.9[.0] - * 1.2.9 13 10209 12.so.0.9[.0] - * 1.2.10beta1-7 13 10210 12.so.0.10[.0] - * 1.2.10rc1-2 13 10210 12.so.0.10[.0] - * 1.2.10 13 10210 12.so.0.10[.0] - * 1.4.0beta1-5 14 10400 14.so.0.0[.0] - * 1.2.11beta1-4 13 10211 12.so.0.11[.0] - * 1.4.0beta7-8 14 10400 14.so.0.0[.0] - * 1.2.11 13 10211 12.so.0.11[.0] - * 1.2.12 13 10212 12.so.0.12[.0] - * 1.4.0beta9-14 14 10400 14.so.0.0[.0] - * 1.2.13 13 10213 12.so.0.13[.0] - * 1.4.0beta15-36 14 10400 14.so.0.0[.0] - * 1.4.0beta37-87 14 10400 14.so.14.0[.0] - * 1.4.0rc01 14 10400 14.so.14.0[.0] - * 1.4.0beta88-109 14 10400 14.so.14.0[.0] - * 1.4.0rc02-08 14 10400 14.so.14.0[.0] - * 1.4.0 14 10400 14.so.14.0[.0] - * 1.4.1beta01-03 14 10401 14.so.14.1[.0] - * 1.4.1rc01 14 10401 14.so.14.1[.0] - * 1.4.1beta04-12 14 10401 14.so.14.1[.0] - * 1.4.1 14 10401 14.so.14.1[.0] - * 1.4.2 14 10402 14.so.14.2[.0] - * 1.4.3 14 10403 14.so.14.3[.0] - * 1.4.4 14 10404 14.so.14.4[.0] - * 1.5.0beta01-58 15 10500 15.so.15.0[.0] - * 1.5.0rc01-07 15 10500 15.so.15.0[.0] - * 1.5.0 15 10500 15.so.15.0[.0] - * 1.5.1beta01-11 15 10501 15.so.15.1[.0] - * 1.5.1rc01-02 15 10501 15.so.15.1[.0] - * 1.5.1 15 10501 15.so.15.1[.0] - * 1.5.2beta01-03 15 10502 15.so.15.2[.0] - * 1.5.2rc01-03 15 10502 15.so.15.2[.0] - * 1.5.2 15 10502 15.so.15.2[.0] - * 1.5.3beta01-10 15 10503 15.so.15.3[.0] - * 1.5.3rc01-02 15 10503 15.so.15.3[.0] - * 1.5.3beta11 15 10503 15.so.15.3[.0] - * 1.5.3 [omitted] - * 1.5.4beta01-08 15 10504 15.so.15.4[.0] - * 1.5.4rc01 15 10504 15.so.15.4[.0] - * 1.5.4 15 10504 15.so.15.4[.0] - * 1.5.5beta01-08 15 10505 15.so.15.5[.0] - * 1.5.5rc01 15 10505 15.so.15.5[.0] - * 1.5.5 15 10505 15.so.15.5[.0] - * 1.5.6beta01-07 15 10506 15.so.15.6[.0] - * 1.5.6rc01-03 15 10506 15.so.15.6[.0] - * 1.5.6 15 10506 15.so.15.6[.0] - * 1.5.7beta01-05 15 10507 15.so.15.7[.0] - * 1.5.7rc01-03 15 10507 15.so.15.7[.0] - * 1.5.7 15 10507 15.so.15.7[.0] - * 1.6.0beta01-40 16 10600 16.so.16.0[.0] - * 1.6.0rc01-08 16 10600 16.so.16.0[.0] - * 1.6.0 16 10600 16.so.16.0[.0] - * 1.6.1beta01-09 16 10601 16.so.16.1[.0] - * 1.6.1rc01 16 10601 16.so.16.1[.0] - * 1.6.1 16 10601 16.so.16.1[.0] - * 1.6.2beta01 16 10602 16.so.16.2[.0] - * 1.6.2rc01-06 16 10602 16.so.16.2[.0] - * 1.6.2 16 10602 16.so.16.2[.0] - * 1.6.3beta01-11 16 10603 16.so.16.3[.0] - * 1.6.3rc01 16 10603 16.so.16.3[.0] - * 1.6.3 16 10603 16.so.16.3[.0] - * 1.6.4beta01-02 16 10604 16.so.16.4[.0] - * 1.6.4rc01 16 10604 16.so.16.4[.0] - * 1.6.4 16 10604 16.so.16.4[.0] - * 1.6.5 16 10605 16.so.16.5[.0] - * 1.6.6 16 10606 16.so.16.6[.0] - * 1.6.7beta01-04 16 10607 16.so.16.7[.0] - * 1.6.7rc01-03 16 10607 16.so.16.7[.0] - * 1.6.7 16 10607 16.so.16.7[.0] - * 1.6.8beta01-02 16 10608 16.so.16.8[.0] - * 1.6.8rc01-02 16 10608 16.so.16.8[.0] - * 1.6.8 16 10608 16.so.16.8[.0] - * 1.6.9beta01-04 16 10609 16.so.16.9[.0] - * 1.6.9rc01-02 16 10609 16.so.16.9[.0] - * 1.6.9 16 10609 16.so.16.9[.0] - * 1.6.10beta01-03 16 10610 16.so.16.10[.0] - * 1.6.10rc01-03 16 10610 16.so.16.10[.0] - * 1.6.10 16 10610 16.so.16.10[.0] - * 1.6.11beta01-06 16 10611 16.so.16.11[.0] - * 1.6.11rc01-02 16 10611 16.so.16.11[.0] - * 1.6.11 16 10611 16.so.16.11[.0] - * 1.6.12rc01-03 16 10612 16.so.16.12[.0] - * 1.6.12 16 10612 16.so.16.12[.0] - * 1.6.13beta01-04 16 10613 16.so.16.13[.0] - * 1.6.13rc01-02 16 10613 16.so.16.13[.0] - * 1.6.13 16 10613 16.so.16.13[.0] - * 1.6.14beta01-07 16 10614 16.so.16.14[.0] - * 1.6.14rc01-02 16 10614 16.so.16.14[.0] - * 1.6.14 16 10614 16.so.16.14[.0] - * 1.6.15beta01-08 16 10615 16.so.16.15[.0] - * 1.6.15rc01-03 16 10615 16.so.16.15[.0] - * 1.6.15 16 10615 16.so.16.15[.0] - * 1.6.16beta01-03 16 10616 16.so.16.16[.0] - * 1.6.16rc01-02 16 10616 16.so.16.16[.0] - * 1.6.16 16 10616 16.so.16.16[.0] - * 1.6.17beta01-06 16 10617 16.so.16.17[.0] - * 1.6.17rc01-06 16 10617 16.so.16.17[.0] - * 1.6.17 16 10617 16.so.16.17[.0] - * 1.6.18beta01-09 16 10618 16.so.16.18[.0] - * 1.6.18rc01-03 16 10618 16.so.16.18[.0] - * 1.6.18 16 10618 16.so.16.18[.0] - * - * Henceforth the source version will match the shared-library major - * and minor numbers; the shared-library major version number will be - * used for changes in backward compatibility, as it is intended. The - * PNG_LIBPNG_VER macro, which is not used within libpng but is available - * for applications, is an unsigned integer of the form xyyzz corresponding - * to the source version x.y.z (leading zeros in y and z). Beta versions - * were given the previous public release number plus a letter, until - * version 1.0.6j; from then on they were given the upcoming public - * release number plus "betaNN" or "rcNN". - * - * Binary incompatibility exists only when applications make direct access - * to the info_ptr or png_ptr members through png.h, and the compiled - * application is loaded with a different version of the library. - * - * DLLNUM will change each time there are forward or backward changes - * in binary compatibility (e.g., when a new feature is added). - * - * See libpng-manual.txt or libpng.3 for more information. The PNG - * specification is available as a W3C Recommendation and as an ISO - * Specification, <http://www.w3.org/TR/2003/REC-PNG-20031110/ */ /* @@ -250,12 +25,14 @@ * * This code is released under the libpng license. * - * libpng versions 1.0.7, July 1, 2000, through 1.6.18, July 23, 2015, are - * Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, and are - * distributed according to the same disclaimer and license as libpng-1.0.6 - * with the following individuals added to the list of Contributing Authors: + * libpng versions 1.0.7, July 1, 2000, through 1.6.20, December 3, 2015, are + * Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, are + * derived from libpng-1.0.6, and are distributed according to the same + * disclaimer and license as libpng-1.0.6 with the following individuals + * added to the list of Contributing Authors: * * Simon-Pierre Cadieux + * Eric S. Raymond * Mans Rullgard * Cosmin Truta * Gilles Vollant @@ -271,19 +48,20 @@ * the user. * * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are - * Copyright (c) 1998-2000 Glenn Randers-Pehrson, and are distributed according - * to the same disclaimer and license as libpng-0.96, with the following - * individuals added to the list of Contributing Authors: + * Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from + * libpng-0.96, and are distributed according to the same disclaimer and + * license as libpng-0.96, with the following individuals added to the list + * of Contributing Authors: * * Tom Lane * Glenn Randers-Pehrson - * Eric S. Raymond * Willem van Schaik * * libpng versions 0.89, June 1996, through 0.96, May 1997, are - * Copyright (c) 1996-1997 Andreas Dilger, and are - * distributed according to the same disclaimer and license as libpng-0.88, - * with the following individuals added to the list of Contributing Authors: + * Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, + * and are distributed according to the same disclaimer and license as + * libpng-0.88, with the following individuals added to the list of + * Contributing Authors: * * John Bowler * Kevin Bracey @@ -329,6 +107,8 @@ * supporting the PNG file format in commercial products. If you use this * source code in a product, acknowledgment is not required but would be * appreciated. + * + * END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE. */ /* @@ -355,17 +135,92 @@ * Thanks to Frank J. T. Wojcik for helping with the documentation. */ +/* Note about libpng version numbers: + * + * Due to various miscommunications, unforeseen code incompatibilities + * and occasional factors outside the authors' control, version numbering + * on the library has not always been consistent and straightforward. + * The following table summarizes matters since version 0.89c, which was + * the first widely used release: + * + * source png.h png.h shared-lib + * version string int version + * ------- ------ ----- ---------- + * 0.89c "1.0 beta 3" 0.89 89 1.0.89 + * 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90] + * 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95] + * 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96] + * 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97] + * 0.97c 0.97 97 2.0.97 + * 0.98 0.98 98 2.0.98 + * 0.99 0.99 98 2.0.99 + * 0.99a-m 0.99 99 2.0.99 + * 1.00 1.00 100 2.1.0 [100 should be 10000] + * 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000] + * 1.0.1 png.h string is 10001 2.1.0 + * 1.0.1a-e identical to the 10002 from here on, the shared library + * 1.0.2 source version) 10002 is 2.V where V is the source code + * 1.0.2a-b 10003 version, except as noted. + * 1.0.3 10003 + * 1.0.3a-d 10004 + * 1.0.4 10004 + * 1.0.4a-f 10005 + * 1.0.5 (+ 2 patches) 10005 + * 1.0.5a-d 10006 + * 1.0.5e-r 10100 (not source compatible) + * 1.0.5s-v 10006 (not binary compatible) + * 1.0.6 (+ 3 patches) 10006 (still binary incompatible) + * 1.0.6d-f 10007 (still binary incompatible) + * 1.0.6g 10007 + * 1.0.6h 10007 10.6h (testing xy.z so-numbering) + * 1.0.6i 10007 10.6i + * 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0) + * 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible) + * 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible) + * 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible) + * 1.0.7 1 10007 (still compatible) + * ... + * 1.0.19 10 10019 10.so.0.19[.0] + * ... + * 1.2.53 13 10253 12.so.0.53[.0] + * ... + * 1.5.23 15 10523 15.so.15.23[.0] + * ... + * 1.6.20 16 10620 16.so.16.20[.0] + * + * Henceforth the source version will match the shared-library major + * and minor numbers; the shared-library major version number will be + * used for changes in backward compatibility, as it is intended. The + * PNG_LIBPNG_VER macro, which is not used within libpng but is available + * for applications, is an unsigned integer of the form xyyzz corresponding + * to the source version x.y.z (leading zeros in y and z). Beta versions + * were given the previous public release number plus a letter, until + * version 1.0.6j; from then on they were given the upcoming public + * release number plus "betaNN" or "rcNN". + * + * Binary incompatibility exists only when applications make direct access + * to the info_ptr or png_ptr members through png.h, and the compiled + * application is loaded with a different version of the library. + * + * DLLNUM will change each time there are forward or backward changes + * in binary compatibility (e.g., when a new feature is added). + * + * See libpng.txt or libpng.3 for more information. The PNG specification + * is available as a W3C Recommendation and as an ISO Specification, + * <http://www.w3.org/TR/2003/REC-PNG-20031110/ + */ + /* * Y2K compliance in libpng: * ========================= * - * July 23, 2015 + * December 3, 2015 * * Since the PNG Development group is an ad-hoc body, we can't make * an official declaration. * * This is your unofficial assurance that libpng from version 0.71 and - * upward through 1.6.18 are Y2K compliant. It is my belief that + * upward through 1.6.20 are Y2K compliant. It is my belief that * earlier versions were also Y2K compliant. * * Libpng only has two year fields. One is a 2-byte unsigned integer @@ -427,9 +282,9 @@ */ /* Version information for png.h - this should match the version in png.c */ -#define PNG_LIBPNG_VER_STRING "1.6.18" +#define PNG_LIBPNG_VER_STRING "1.6.20" #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.6.18 - July 23, 2015\n" + " libpng version 1.6.20 - December 3, 2015\n" #define PNG_LIBPNG_VER_SONUM 16 #define PNG_LIBPNG_VER_DLLNUM 16 @@ -437,7 +292,7 @@ /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ #define PNG_LIBPNG_VER_MAJOR 1 #define PNG_LIBPNG_VER_MINOR 6 -#define PNG_LIBPNG_VER_RELEASE 18 +#define PNG_LIBPNG_VER_RELEASE 20 /* This should match the numeric part of the final component of * PNG_LIBPNG_VER_STRING, omitting any leading zero: @@ -468,7 +323,7 @@ * version 1.0.0 was mis-numbered 100 instead of 10000). From * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */ -#define PNG_LIBPNG_VER 10618 /* 1.6.18 */ +#define PNG_LIBPNG_VER 10620 /* 1.6.20 */ /* Library configuration: these options cannot be changed after * the library has been built. @@ -525,17 +380,22 @@ extern "C" { /* This file is arranged in several sections: * - * 1. Any configuration options that can be specified by for the application + * 1. [omitted] + * 2. Any configuration options that can be specified by for the application * code when it is built. (Build time configuration is in pnglibconf.h) - * 2. Type definitions (base types are defined in pngconf.h), structure + * 3. Type definitions (base types are defined in pngconf.h), structure * definitions. - * 3. Exported library functions. - * 4. Simplified API. + * 4. Exported library functions. + * 5. Simplified API. + * 6. Implementation options. * * The library source code has additional files (principally pngpriv.h) that * allow configuration of the library. */ -/* Section 1: run time configuration + +/* Section 1: [omitted] */ + +/* Section 2: run time configuration * See pnglibconf.h for build time configuration * * Run time configuration allows the application to choose between @@ -565,7 +425,7 @@ extern "C" { * Otherwise the calls are mapped to png_error. */ -/* Section 2: type definitions, including structures and compile time +/* Section 3: type definitions, including structures and compile time * constants. * See pngconf.h for base types that vary by machine/system */ @@ -573,7 +433,7 @@ extern "C" { /* This triggers a compiler error in png.c, if png.c and png.h * do not agree upon the version number. */ -typedef char* png_libpng_version_1_6_18; +typedef char* png_libpng_version_1_6_20; /* Basic control structions. Read libpng-manual.txt or libpng.3 for more info. * @@ -889,7 +749,9 @@ typedef png_unknown_chunk * * png_unknown_chunkpp; #define PNG_INFO_iCCP 0x1000 /* ESR, 1.0.6 */ #define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */ #define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */ +#if INT_MAX >= 0x8000 /* else this might break */ #define PNG_INFO_IDAT 0x8000 /* ESR, 1.0.6 */ +#endif /* This is used for the transformation routines, as some of them * change these values for the row. It also should enable using @@ -993,7 +855,9 @@ PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), typedef); #define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */ /* Added to libpng-1.5.4 */ #define PNG_TRANSFORM_EXPAND_16 0x4000 /* read only */ +#if INT_MAX >= 0x8000 /* else this might break */ #define PNG_TRANSFORM_SCALE_16 0x8000 /* read only */ +#endif /* Flags for MNG supported features */ #define PNG_FLAG_MNG_EMPTY_PLTE 0x01 @@ -1010,7 +874,7 @@ typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr, (png_structp, png_alloc_size_t)); typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp)); -/* Section 3: exported functions +/* Section 4: exported functions * Here are the function definitions most commonly used. This is not * the place to find out how to use libpng. See libpng-manual.txt for the * full explanation, see example.c for the summary. This just provides @@ -1383,13 +1247,13 @@ PNG_EXPORT(38, void, png_set_invert_alpha, (png_structrp png_ptr)); #endif #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) -/* Add a filler byte to 8-bit Gray or 24-bit RGB images. */ +/* Add a filler byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */ PNG_EXPORT(39, void, png_set_filler, (png_structrp png_ptr, png_uint_32 filler, int flags)); /* The values of the PNG_FILLER_ defines should NOT be changed */ # define PNG_FILLER_BEFORE 0 # define PNG_FILLER_AFTER 1 -/* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */ +/* Add an alpha byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */ PNG_EXPORT(40, void, png_set_add_alpha, (png_structrp png_ptr, png_uint_32 filler, int flags)); #endif /* READ_FILLER || WRITE_FILLER */ @@ -2714,7 +2578,7 @@ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i)); # define PNG_get_int_32(buf) \ ((png_int_32)((*(buf) & 0x80) \ - ? -((png_int_32)((png_get_uint_32(buf) ^ 0xffffffffL) + 1)) \ + ? -((png_int_32)(((png_get_uint_32(buf)^0xffffffffU)+1U)&0x7fffffffU)) \ : (png_int_32)png_get_uint_32(buf))) /* If PNG_PREFIX is defined the same thing as below happens in pnglibconf.h, @@ -2734,10 +2598,17 @@ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i)); # endif #endif -#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) || \ - defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) +#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED +PNG_EXPORT(242, void, png_set_check_for_invalid_index, + (png_structrp png_ptr, int allowed)); +# ifdef PNG_GET_PALETTE_MAX_SUPPORTED +PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr, + png_const_infop info_ptr)); +# endif +#endif /* CHECK_FOR_INVALID_INDEX */ + /******************************************************************************* - * SIMPLIFIED API + * Section 5: SIMPLIFIED API ******************************************************************************* * * Please read the documentation in libpng-manual.txt (TODO: write said @@ -2782,6 +2653,9 @@ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i)); * when it is being read or defines the in-memory format of an image that you * need to write: */ +#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) || \ + defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) + #define PNG_IMAGE_VERSION 1 typedef struct png_control *png_controlp; @@ -2881,7 +2755,7 @@ typedef struct * called to read or write the color-map and set the format correctly for the * image data. Do not set the PNG_FORMAT_FLAG_COLORMAP bit directly! * - * NOTE: libpng can be built with particular features disabled, if you see + * NOTE: libpng can be built with particular features disabled. If you see * compiler errors because the definition of one of the following flags has been * compiled out it is because libpng does not have the required support. It is * possible, however, for the libpng configuration to enable the format on just @@ -2893,7 +2767,7 @@ typedef struct */ #define PNG_FORMAT_FLAG_ALPHA 0x01U /* format with an alpha channel */ #define PNG_FORMAT_FLAG_COLOR 0x02U /* color format: otherwise grayscale */ -#define PNG_FORMAT_FLAG_LINEAR 0x04U /* 2 byte channels else 1 byte */ +#define PNG_FORMAT_FLAG_LINEAR 0x04U /* 2-byte channels else 1-byte */ #define PNG_FORMAT_FLAG_COLORMAP 0x08U /* image data is color-mapped */ #ifdef PNG_FORMAT_BGR_SUPPORTED @@ -3193,17 +3067,8 @@ PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file, ******************************************************************************/ #endif /* SIMPLIFIED_{READ|WRITE} */ -#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED -PNG_EXPORT(242, void, png_set_check_for_invalid_index, - (png_structrp png_ptr, int allowed)); -# ifdef PNG_GET_PALETTE_MAX_SUPPORTED -PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr, - png_const_infop info_ptr)); -# endif -#endif /* CHECK_FOR_INVALID_INDEX */ - /******************************************************************************* - * IMPLEMENTATION OPTIONS + * Section 6: IMPLEMENTATION OPTIONS ******************************************************************************* * * Support for arbitrary implementation-specific optimizations. The API allows diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngbar.jpg b/Build/source/libs/libpng/libpng-src/pngbar.jpg Binary files differindex 70ba8d817ce..70ba8d817ce 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngbar.jpg +++ b/Build/source/libs/libpng/libpng-src/pngbar.jpg diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngbar.png b/Build/source/libs/libpng/libpng-src/pngbar.png Binary files differindex 49798c8ed95..49798c8ed95 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngbar.png +++ b/Build/source/libs/libpng/libpng-src/pngbar.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngconf.h b/Build/source/libs/libpng/libpng-src/pngconf.h index 62e37cf2b5a..92f250000ce 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngconf.h +++ b/Build/source/libs/libpng/libpng-src/pngconf.h @@ -1,7 +1,7 @@ /* pngconf.h - machine configurable file for libpng * - * libpng version 1.6.18, July 23, 2015 + * libpng version 1.6.20, December 3, 2015 * * Copyright (c) 1998-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -63,7 +63,7 @@ */ #define PNG_CONST const /* backward compatibility only */ -/* This controls optimization of the reading of 16 and 32 bit values +/* This controls optimization of the reading of 16-bit and 32-bit values * from PNG files. It can be set on a per-app-file basis - it * just changes whether a macro is used when the function is called. * The library builder sets the default; if read functions are not @@ -480,7 +480,7 @@ #if CHAR_BIT == 8 && UCHAR_MAX == 255 typedef unsigned char png_byte; #else -# error "libpng requires 8 bit bytes" +# error "libpng requires 8-bit bytes" #endif #if INT_MIN == -32768 && INT_MAX == 32767 @@ -488,7 +488,7 @@ #elif SHRT_MIN == -32768 && SHRT_MAX == 32767 typedef short png_int_16; #else -# error "libpng requires a signed 16 bit type" +# error "libpng requires a signed 16-bit type" #endif #if UINT_MAX == 65535 @@ -496,7 +496,7 @@ #elif USHRT_MAX == 65535 typedef unsigned short png_uint_16; #else -# error "libpng requires an unsigned 16 bit type" +# error "libpng requires an unsigned 16-bit type" #endif #if INT_MIN < -2147483646 && INT_MAX > 2147483646 @@ -504,7 +504,7 @@ #elif LONG_MIN < -2147483646 && LONG_MAX > 2147483646 typedef long int png_int_32; #else -# error "libpng requires a signed 32 bit (or more) type" +# error "libpng requires a signed 32-bit (or more) type" #endif #if UINT_MAX > 4294967294 @@ -512,7 +512,7 @@ #elif ULONG_MAX > 4294967294 typedef unsigned long int png_uint_32; #else -# error "libpng requires an unsigned 32 bit (or more) type" +# error "libpng requires an unsigned 32-bit (or more) type" #endif /* Prior to 1.6.0 it was possible to disable the use of size_t, 1.6.0, however, diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngdebug.h b/Build/source/libs/libpng/libpng-src/pngdebug.h index 6a01b106ede..6a01b106ede 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngdebug.h +++ b/Build/source/libs/libpng/libpng-src/pngdebug.h diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngerror.c b/Build/source/libs/libpng/libpng-src/pngerror.c index 0781866a893..bdb959ee517 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngerror.c +++ b/Build/source/libs/libpng/libpng-src/pngerror.c @@ -768,7 +768,7 @@ png_longjmp,(png_const_structrp png_ptr, int val),PNG_NORETURN) /* If control reaches this point, png_longjmp() must not return. The only * choice is to terminate the whole process (or maybe the thread); to do - * this the ANSI-C abort() function is used unless a different method is + * this the ANSI-C abort() function is used unless a different method is * implemented by overriding the default configuration setting for * PNG_ABORT(). */ diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngget.c b/Build/source/libs/libpng/libpng-src/pngget.c index 743a6a9bbcc..743a6a9bbcc 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngget.c +++ b/Build/source/libs/libpng/libpng-src/pngget.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/pnginfo.h b/Build/source/libs/libpng/libpng-src/pnginfo.h index c8c874dd1ea..4bd264b8690 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pnginfo.h +++ b/Build/source/libs/libpng/libpng-src/pnginfo.h @@ -223,7 +223,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED) /* Storage for unknown chunks that the library doesn't recognize. */ png_unknown_chunkp unknown_chunks; - /* The type of this field is limited by the type of + /* The type of this field is limited by the type of * png_struct::user_chunk_cache_max, else overflow can occur. */ int unknown_chunks_num; diff --git a/Build/source/libs/libpng/libpng-1.6.18/pnglibconf.h b/Build/source/libs/libpng/libpng-src/pnglibconf.h index 2719f0098d1..adf4238ff78 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pnglibconf.h +++ b/Build/source/libs/libpng/libpng-src/pnglibconf.h @@ -1,10 +1,10 @@ -/* libpng 1.6.18 STANDARD API DEFINITION */ +/* libpng 1.6.20 STANDARD API DEFINITION */ /* pnglibconf.h - library build configuration */ -/* Libpng version 1.6.18 - July 23, 2015 */ +/* Libpng version 1.6.20 - December 3, 2015 */ -/* Copyright (c) 1998-2014 Glenn Randers-Pehrson */ +/* Copyright (c) 1998-2015 Glenn Randers-Pehrson */ /* This code is released under the libpng license. */ /* For conditions of distribution and use, see the disclaimer */ @@ -185,7 +185,6 @@ /* end of options */ /* settings */ #define PNG_API_RULE 0 -#define PNG_COST_SHIFT 3 #define PNG_DEFAULT_READ_MACROS 1 #define PNG_GAMMA_THRESHOLD_FIXED 5000 #define PNG_IDAT_READ_SIZE PNG_ZBUF_SIZE @@ -204,7 +203,6 @@ #define PNG_USER_CHUNK_MALLOC_MAX 8000000 #define PNG_USER_HEIGHT_MAX 1000000 #define PNG_USER_WIDTH_MAX 1000000 -#define PNG_WEIGHT_SHIFT 8 #define PNG_ZBUF_SIZE 8192 #define PNG_ZLIB_VERNUM 0 /* unknown */ #define PNG_Z_DEFAULT_COMPRESSION (-1) diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngmem.c b/Build/source/libs/libpng/libpng-src/pngmem.c index 45ac5579b21..45ac5579b21 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngmem.c +++ b/Build/source/libs/libpng/libpng-src/pngmem.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngnow.png b/Build/source/libs/libpng/libpng-src/pngnow.png Binary files differindex 82793ebddb7..82793ebddb7 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngnow.png +++ b/Build/source/libs/libpng/libpng-src/pngnow.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngpread.c b/Build/source/libs/libpng/libpng-src/pngpread.c index 2d4a86269f6..89ffc4018f6 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngpread.c +++ b/Build/source/libs/libpng/libpng-src/pngpread.c @@ -133,7 +133,7 @@ png_process_some_data(png_structrp png_ptr, png_inforp info_ptr) void /* PRIVATE */ png_push_read_sig(png_structrp png_ptr, png_inforp info_ptr) { - png_size_t num_checked = png_ptr->sig_bytes, /* SAFE, does not exceed 8 */ + png_size_t num_checked = png_ptr->sig_bytes, /* SAFE, does not exceed 8 */ num_to_check = 8 - num_checked; if (png_ptr->buffer_size < num_to_check) @@ -563,7 +563,7 @@ png_push_read_IDAT(png_structrp png_ptr) * are of different types and we don't know which variable has the fewest * bits. Carefully select the smaller and cast it to the type of the * larger - this cannot overflow. Do not cast in the following test - it - * will break on either 16 or 64 bit platforms. + * will break on either 16-bit or 64-bit platforms. */ if (idat_size < save_size) save_size = (png_size_t)idat_size; @@ -662,7 +662,7 @@ png_process_IDAT_data(png_structrp png_ptr, png_bytep buffer, * change the current behavior (see comments in inflate.c * for why this doesn't happen at present with zlib 1.2.5). */ - ret = inflate(&png_ptr->zstream, Z_SYNC_FLUSH); + ret = PNG_INFLATE(png_ptr, Z_SYNC_FLUSH); /* Check for any failure before proceeding. */ if (ret != Z_OK && ret != Z_STREAM_END) diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngpriv.h b/Build/source/libs/libpng/libpng-src/pngpriv.h index 1997503284e..e53fb0e5a3d 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngpriv.h +++ b/Build/source/libs/libpng/libpng-src/pngpriv.h @@ -575,10 +575,6 @@ #define PNG_STRUCT_PNG 0x0001 #define PNG_STRUCT_INFO 0x0002 -/* Scaling factor for filter heuristic weighting calculations */ -#define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT)) -#define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT)) - /* Flags for the png_ptr->flags rather than declaring a byte for each one */ #define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001 #define PNG_FLAG_ZSTREAM_INITIALIZED 0x0002 /* Added to libpng-1.6.0 */ @@ -669,7 +665,7 @@ /* The fixed point conversion performs range checking and evaluates * its argument multiple times, so must be used with care. The * range checking uses the PNG specification values for a signed - * 32 bit fixed point value except that the values are deliberately + * 32-bit fixed point value except that the values are deliberately * rounded-to-zero to an integral value - 21474 (21474.83 is roughly * (2^31-1) * 100000). 's' is a string that describes the value being * converted. @@ -816,7 +812,7 @@ */ #endif -/* This is used for 16 bit gamma tables -- only the top level pointers are +/* This is used for 16-bit gamma tables -- only the top level pointers are * const; this could be changed: */ typedef const png_uint_16p * png_const_uint_16pp; @@ -1219,6 +1215,14 @@ PNG_INTERNAL_FUNCTION(void,png_read_finish_row,(png_structrp png_ptr), /* Initialize the row buffers, etc. */ PNG_INTERNAL_FUNCTION(void,png_read_start_row,(png_structrp png_ptr),PNG_EMPTY); +#if PNG_ZLIB_VERNUM >= 0x1240 +PNG_INTERNAL_FUNCTION(int,png_zlib_inflate,(png_structrp png_ptr, int flush), + PNG_EMPTY); +# define PNG_INFLATE(pp, flush) png_zlib_inflate(pp, flush) +#else /* Zlib < 1.2.4 */ +# define PNG_INFLATE(pp, flush) inflate(&(pp)->zstream, flush) +#endif /* Zlib < 1.2.4 */ + #ifdef PNG_READ_TRANSFORMS_SUPPORTED /* Optional call to update the users info structure */ PNG_INTERNAL_FUNCTION(void,png_read_transform_info,(png_structrp png_ptr, diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngread.c b/Build/source/libs/libpng/libpng-src/pngread.c index e88151c20bb..9cb4d2e41d2 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngread.c +++ b/Build/source/libs/libpng/libpng-src/pngread.c @@ -1683,10 +1683,11 @@ decode_gamma(png_image_read_control *display, png_uint_32 value, int encoding) value *= 257; break; +#ifdef __GNUC__ default: png_error(display->image->opaque->png_ptr, "unexpected encoding (internal error)"); - break; +#endif } return value; @@ -2837,7 +2838,6 @@ png_image_read_colormap(png_voidp argument) default: png_error(png_ptr, "invalid PNG color type"); /*NOT REACHED*/ - break; } /* Now deal with the output processing */ @@ -2847,10 +2847,6 @@ png_image_read_colormap(png_voidp argument) switch (data_encoding) { - default: - png_error(png_ptr, "bad data option (internal error)"); - break; - case P_sRGB: /* Change to 8-bit sRGB */ png_set_alpha_mode_fixed(png_ptr, PNG_ALPHA_PNG, PNG_GAMMA_sRGB); @@ -2860,6 +2856,11 @@ png_image_read_colormap(png_voidp argument) if (png_ptr->bit_depth > 8) png_set_scale_16(png_ptr); break; + +#ifdef __GNUC__ + default: + png_error(png_ptr, "bad data option (internal error)"); +#endif } if (cmap_entries > 256 || cmap_entries > image->colormap_entries) @@ -3410,10 +3411,6 @@ png_image_read_background(png_voidp argument) */ switch (info_ptr->bit_depth) { - default: - png_error(png_ptr, "unexpected bit depth"); - break; - case 8: /* 8-bit sRGB gray values with an alpha channel; the alpha channel is * to be removed by composing on a background: either the row if @@ -3631,6 +3628,11 @@ png_image_read_background(png_voidp argument) } } break; + +#ifdef __GNUC__ + default: + png_error(png_ptr, "unexpected bit depth"); +#endif } return 1; diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngrio.c b/Build/source/libs/libpng/libpng-src/pngrio.c index bb5c825109c..38f7fd49d68 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngrio.c +++ b/Build/source/libs/libpng/libpng-src/pngrio.c @@ -26,7 +26,7 @@ * reads from a file pointer. Note that this routine sometimes gets called * with very small lengths, so you should implement some kind of simple * buffering if you are using unbuffered reads. This should never be asked - * to read more than 64K on a 16 bit machine. + * to read more than 64K on a 16-bit machine. */ void /* PRIVATE */ png_read_data(png_structrp png_ptr, png_bytep data, png_size_t length) diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngrtran.c b/Build/source/libs/libpng/libpng-src/pngrtran.c index 4c84d30f27e..f129ef129c0 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngrtran.c +++ b/Build/source/libs/libpng/libpng-src/pngrtran.c @@ -1,7 +1,7 @@ /* pngrtran.c - transforms the data in a row for PNG readers * - * Last changed in libpng 1.6.18 [July 23, 2015] + * Last changed in libpng 1.6.19 [November 12, 2015] * Copyright (c) 1998-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -976,7 +976,6 @@ png_set_rgb_to_gray_fixed(png_structrp png_ptr, int error_action, default: png_error(png_ptr, "invalid error action to rgb_to_gray"); - break; } if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) @@ -1997,7 +1996,7 @@ png_read_transform_info(png_structrp png_ptr, png_inforp info_ptr) # endif # else - /* No 16 bit support: force chopping 16-bit input down to 8, in this case + /* No 16-bit support: force chopping 16-bit input down to 8, in this case * the app program can chose if both APIs are available by setting the * correct scaling to use. */ @@ -2098,10 +2097,10 @@ png_read_transform_info(png_structrp png_ptr, png_inforp info_ptr) defined(PNG_READ_USER_TRANSFORM_SUPPORTED) if ((png_ptr->transformations & PNG_USER_TRANSFORM) != 0) { - if (info_ptr->bit_depth < png_ptr->user_transform_depth) + if (png_ptr->user_transform_depth != 0) info_ptr->bit_depth = png_ptr->user_transform_depth; - if (info_ptr->channels < png_ptr->user_transform_channels) + if (png_ptr->user_transform_channels != 0) info_ptr->channels = png_ptr->user_transform_channels; } #endif @@ -2382,8 +2381,8 @@ png_do_scale_16_to_8(png_row_infop row_info, png_bytep row) while (sp < ep) { - /* The input is an array of 16 bit components, these must be scaled to - * 8 bits each. For a 16 bit value V the required value (from the PNG + /* The input is an array of 16-bit components, these must be scaled to + * 8 bits each. For a 16-bit value V the required value (from the PNG * specification) is: * * (V * 255) / 65535 @@ -2404,7 +2403,7 @@ png_do_scale_16_to_8(png_row_infop row_info, png_bytep row) * * The approximate differs from the exact answer only when (vlo-vhi) is * 128; it then gives a correction of +1 when the exact correction is - * 0. This gives 128 errors. The exact answer (correct for all 16 bit + * 0. This gives 128 errors. The exact answer (correct for all 16-bit * input values) is: * * error = (vlo-vhi+128)*65535 >> 24; @@ -3148,9 +3147,9 @@ png_do_rgb_to_gray(png_structrp png_ptr, png_row_infop row_info, png_bytep row) if (red != green || red != blue) rgb_error |= 1; - /* From 1.5.5 in the 16 bit case do the accurate conversion even + /* From 1.5.5 in the 16-bit case do the accurate conversion even * in the 'fast' case - this is because this is where the code - * ends up when handling linear 16 bit data. + * ends up when handling linear 16-bit data. */ gray16 = (png_uint_16)((rc*red + gc*green + bc*blue + 16384) >> 15); @@ -3315,7 +3314,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structrp png_ptr) if ((png_uint_16)((*sp >> shift) & 0x0f) == png_ptr->trans_color.gray) { - unsigned int tmp = *sp & (0xf0f >> (4 - shift)); + unsigned int tmp = *sp & (0x0f0f >> (4 - shift)); tmp |= png_ptr->background.gray << shift; *sp = (png_byte)(tmp & 0xff); } @@ -3325,7 +3324,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structrp png_ptr) unsigned int p = (*sp >> shift) & 0x0f; unsigned int g = (gamma_table[p | (p << 4)] >> 4) & 0x0f; - unsigned int tmp = *sp & (0xf0f >> (4 - shift)); + unsigned int tmp = *sp & (0x0f0f >> (4 - shift)); tmp |= g << shift; *sp = (png_byte)(tmp & 0xff); } @@ -3351,7 +3350,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structrp png_ptr) if ((png_uint_16)((*sp >> shift) & 0x0f) == png_ptr->trans_color.gray) { - unsigned int tmp = *sp & (0xf0f >> (4 - shift)); + unsigned int tmp = *sp & (0x0f0f >> (4 - shift)); tmp |= png_ptr->background.gray << shift; *sp = (png_byte)(tmp & 0xff); } diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngrutil.c b/Build/source/libs/libpng/libpng-src/pngrutil.c index 8f8edbc5807..61892513521 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngrutil.c +++ b/Build/source/libs/libpng/libpng-src/pngrutil.c @@ -1,7 +1,7 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.6.18 [July 23, 2015] + * Last changed in libpng 1.6.20 [December 3, 2015] * Copyright (c) 1998-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -89,7 +89,13 @@ png_get_int_32)(png_const_bytep buf) return uval; uval = (uval ^ 0xffffffff) + 1; /* 2's complement: -x = ~x+1 */ - return -(png_int_32)uval; + if ((uval & 0x80000000) == 0) /* no overflow */ + return -(png_int_32)uval; + /* The following has to be safe; this function only gets called on PNG data + * and if we get here that data is invalid. 0 is the most safe value and + * if not then an attacker would surely just generate a PNG with 0 instead. + */ + return 0; } /* Grab an unsigned 16-bit integer from a buffer in big-endian format. */ @@ -98,7 +104,7 @@ png_get_uint_16)(png_const_bytep buf) { /* ANSI-C requires an int value to accomodate at least 16 bits so this * works and allows the compiler not to worry about possible narrowing - * on 32 bit systems. (Pre-ANSI systems did not make integers smaller + * on 32-bit systems. (Pre-ANSI systems did not make integers smaller * than 16 bits either.) */ unsigned int val = @@ -371,10 +377,16 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner) if (((png_ptr->options >> PNG_MAXIMUM_INFLATE_WINDOW) & 3) == PNG_OPTION_ON) + { window_bits = 15; + png_ptr->zstream_start = 0; /* fixed window size */ + } else + { window_bits = 0; + png_ptr->zstream_start = 1; + } # else # define window_bits 0 # endif @@ -423,6 +435,31 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner) #endif } +#if PNG_ZLIB_VERNUM >= 0x1240 +/* Handle the start of the inflate stream if we called inflateInit2(strm,0); + * in this case some zlib versions skip validation of the CINFO field and, in + * certain circumstances, libpng may end up displaying an invalid image, in + * contrast to implementations that call zlib in the normal way (e.g. libpng + * 1.5). + */ +int /* PRIVATE */ +png_zlib_inflate(png_structrp png_ptr, int flush) +{ + if (png_ptr->zstream_start && png_ptr->zstream.avail_in > 0) + { + if ((*png_ptr->zstream.next_in >> 4) > 7) + { + png_ptr->zstream.msg = "invalid window size (libpng)"; + return Z_DATA_ERROR; + } + + png_ptr->zstream_start = 0; + } + + return inflate(&png_ptr->zstream, flush); +} +#endif /* Zlib >= 1.2.4 */ + #ifdef PNG_READ_COMPRESSED_TEXT_SUPPORTED /* png_inflate now returns zlib error codes including Z_OK and Z_STREAM_END to * allow the caller to do multiple calls if required. If the 'finish' flag is @@ -516,7 +553,7 @@ png_inflate(png_structrp png_ptr, png_uint_32 owner, int finish, * the previous chunk of input data. Tell zlib if we have reached the * end of the output buffer. */ - ret = inflate(&png_ptr->zstream, avail_out > 0 ? Z_NO_FLUSH : + ret = PNG_INFLATE(png_ptr, avail_out > 0 ? Z_NO_FLUSH : (finish ? Z_FINISH : Z_SYNC_FLUSH)); } while (ret == Z_OK); @@ -765,7 +802,7 @@ png_inflate_read(png_structrp png_ptr, png_bytep read_buffer, uInt read_size, * the available output is produced; this allows reading of truncated * streams. */ - ret = inflate(&png_ptr->zstream, + ret = PNG_INFLATE(png_ptr, *chunk_bytes > 0 ? Z_NO_FLUSH : (finish ? Z_FINISH : Z_SYNC_FLUSH)); } while (ret == Z_OK && (*out_size > 0 || png_ptr->zstream.avail_out > 0)); @@ -866,7 +903,7 @@ void /* PRIVATE */ png_handle_PLTE(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) { png_color palette[PNG_MAX_PALETTE_LENGTH]; - int num, i; + int max_palette_length, num, i; #ifdef PNG_POINTER_INDEXING_SUPPORTED png_colorp pal_ptr; #endif @@ -927,6 +964,19 @@ png_handle_PLTE(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) /* The cast is safe because 'length' is less than 3*PNG_MAX_PALETTE_LENGTH */ num = (int)length / 3; + /* If the palette has 256 or fewer entries but is too large for the bit + * depth, we don't issue an error, to preserve the behavior of previous + * libpng versions. We silently truncate the unused extra palette entries + * here. + */ + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + max_palette_length = (1 << png_ptr->bit_depth); + else + max_palette_length = PNG_MAX_PALETTE_LENGTH; + + if (num > max_palette_length) + num = max_palette_length; + #ifdef PNG_POINTER_INDEXING_SUPPORTED for (i = 0, pal_ptr = palette; i < num; i++, pal_ptr++) { @@ -959,7 +1009,7 @@ png_handle_PLTE(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) #endif { - png_crc_finish(png_ptr, 0); + png_crc_finish(png_ptr, (int) length - num * 3); } #ifndef PNG_READ_OPT_PLTE_SUPPORTED @@ -1651,7 +1701,7 @@ png_handle_sPLT(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) ++entry_start; /* A sample depth should follow the separator, and we should be on it */ - if (entry_start > buffer + length - 2) + if (length < 2U || entry_start > buffer + (length - 2U)) { png_warning(png_ptr, "malformed sPLT chunk"); return; @@ -1818,7 +1868,7 @@ png_handle_tRNS(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) return; } - if (length > png_ptr->num_palette || + if (length > (unsigned int) png_ptr->num_palette || length > (unsigned int) PNG_MAX_PALETTE_LENGTH || length == 0) { @@ -1982,7 +2032,8 @@ png_handle_hIST(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) num = length / 2 ; - if (num != png_ptr->num_palette || num > (unsigned int) PNG_MAX_PALETTE_LENGTH) + if (num != (unsigned int) png_ptr->num_palette || + num > (unsigned int) PNG_MAX_PALETTE_LENGTH) { png_crc_finish(png_ptr, length); png_chunk_benign_error(png_ptr, "invalid"); @@ -2154,7 +2205,7 @@ png_handle_pCAL(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) /* We need to have at least 12 bytes after the purpose string * in order to get the parameter information. */ - if (endptr <= buf + 12) + if (endptr - buf <= 12) { png_chunk_benign_error(png_ptr, "invalid"); return; @@ -4019,7 +4070,7 @@ png_read_IDAT_data(png_structrp png_ptr, png_bytep output, * * TODO: deal more elegantly with truncated IDAT lists. */ - ret = inflate(&png_ptr->zstream, Z_NO_FLUSH); + ret = PNG_INFLATE(png_ptr, Z_NO_FLUSH); /* Take the unconsumed output back. */ if (output != NULL) diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngset.c b/Build/source/libs/libpng/libpng-src/pngset.c index 5f62af168c1..8fd7965fca5 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngset.c +++ b/Build/source/libs/libpng/libpng-src/pngset.c @@ -1,7 +1,7 @@ /* pngset.c - storage of image information into info struct * - * Last changed in libpng 1.6.18 [July 23, 2015] + * Last changed in libpng 1.6.19 [November 12, 2015] * Copyright (c) 1998-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -123,12 +123,12 @@ png_set_cHRM_XYZ(png_const_structrp png_ptr, png_inforp info_ptr, double red_X, png_fixed(png_ptr, red_X, "cHRM Red X"), png_fixed(png_ptr, red_Y, "cHRM Red Y"), png_fixed(png_ptr, red_Z, "cHRM Red Z"), - png_fixed(png_ptr, green_X, "cHRM Red X"), - png_fixed(png_ptr, green_Y, "cHRM Red Y"), - png_fixed(png_ptr, green_Z, "cHRM Red Z"), - png_fixed(png_ptr, blue_X, "cHRM Red X"), - png_fixed(png_ptr, blue_Y, "cHRM Red Y"), - png_fixed(png_ptr, blue_Z, "cHRM Red Z")); + png_fixed(png_ptr, green_X, "cHRM Green X"), + png_fixed(png_ptr, green_Y, "cHRM Green Y"), + png_fixed(png_ptr, green_Z, "cHRM Green Z"), + png_fixed(png_ptr, blue_X, "cHRM Blue X"), + png_fixed(png_ptr, blue_Y, "cHRM Blue Y"), + png_fixed(png_ptr, blue_Z, "cHRM Blue Z")); } # endif /* FLOATING_POINT */ @@ -513,12 +513,17 @@ png_set_PLTE(png_structrp png_ptr, png_inforp info_ptr, png_const_colorp palette, int num_palette) { + png_uint_32 max_palette_length; + png_debug1(1, "in %s storage function", "PLTE"); if (png_ptr == NULL || info_ptr == NULL) return; - if (num_palette < 0 || num_palette > PNG_MAX_PALETTE_LENGTH) + max_palette_length = (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ? + (1 << info_ptr->bit_depth) : PNG_MAX_PALETTE_LENGTH; + + if (num_palette < 0 || num_palette > (int) max_palette_length) { if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) png_error(png_ptr, "Invalid palette length"); @@ -551,8 +556,8 @@ png_set_PLTE(png_structrp png_ptr, png_inforp info_ptr, png_free_data(png_ptr, info_ptr, PNG_FREE_PLTE, 0); /* Changed in libpng-1.2.1 to allocate PNG_MAX_PALETTE_LENGTH instead - * of num_palette entries, in case of an invalid PNG file that has - * too-large sample values. + * of num_palette entries, in case of an invalid PNG file or incorrect + * call to png_set_PLTE() with too-large sample values. */ png_ptr->palette = png_voidcast(png_colorp, png_calloc(png_ptr, PNG_MAX_PALETTE_LENGTH * (sizeof (png_color)))); @@ -709,7 +714,7 @@ png_set_text_2(png_const_structrp png_ptr, png_inforp info_ptr, { int i; - png_debug1(1, "in %lx storage function", png_ptr == NULL ? 0xabadca11 : + png_debug1(1, "in %lx storage function", png_ptr == NULL ? 0xabadca11U : (unsigned long)png_ptr->chunk_name); if (png_ptr == NULL || info_ptr == NULL || num_text <= 0 || text_ptr == NULL) @@ -1568,7 +1573,7 @@ png_set_user_limits (png_structrp png_ptr, png_uint_32 user_width_max, { /* Images with dimensions larger than these limits will be * rejected by png_set_IHDR(). To accept any PNG datastream - * regardless of dimensions, set both limits to 0x7ffffffL. + * regardless of dimensions, set both limits to 0x7fffffff. */ if (png_ptr == NULL) return; diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngstruct.h b/Build/source/libs/libpng/libpng-src/pngstruct.h index c8c0e46e8b0..d0bcc7914a5 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngstruct.h +++ b/Build/source/libs/libpng/libpng-src/pngstruct.h @@ -263,6 +263,9 @@ struct png_struct_def /* pixel depth used for the row buffers */ png_byte transformed_pixel_depth; /* pixel depth after read/write transforms */ +#if PNG_ZLIB_VERNUM >= 0x1240 + png_byte zstream_start; /* at start of an input zlib stream */ +#endif /* Zlib >= 1.2.4 */ #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) png_uint_16 filler; /* filler bytes for pixel expansion */ #endif diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngtest.c b/Build/source/libs/libpng/libpng-src/pngtest.c index 84745b6d44a..5d50e66059b 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngtest.c +++ b/Build/source/libs/libpng/libpng-src/pngtest.c @@ -1,7 +1,7 @@ /* pngtest.c - a simple test program to test libpng * - * Last changed in libpng 1.6.18 [July 23, 2015] + * Last changed in libpng 1.5.25 [December 3, 2015] * Copyright (c) 1998-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -61,10 +61,11 @@ defined PNG_READ_sBIT_SUPPORTED &&\ defined PNG_READ_sCAL_SUPPORTED &&\ defined PNG_READ_sRGB_SUPPORTED &&\ + defined PNG_READ_sPLT_SUPPORTED &&\ defined PNG_READ_tEXt_SUPPORTED &&\ defined PNG_READ_tIME_SUPPORTED &&\ defined PNG_READ_zTXt_SUPPORTED &&\ - defined PNG_WRITE_INTERLACING_SUPPORTED + (defined PNG_WRITE_INTERLACING_SUPPORTED || PNG_LIBPNG_VER >= 10700) #ifdef PNG_ZLIB_HEADER # include PNG_ZLIB_HEADER /* defined by pnglibconf.h from 1.7 */ @@ -101,6 +102,10 @@ typedef FILE * png_FILE_p; # define SINGLE_ROWBUF_ALLOC /* Makes buffer overruns easier to nail */ #endif +#ifndef PNG_UNUSED +# define PNG_UNUSED(param) (void)param; +#endif + /* Turn on CPU timing #define PNGTEST_TIMING */ @@ -118,6 +123,22 @@ static float t_start, t_stop, t_decode, t_encode, t_misc; #define PNG_tIME_STRING_LENGTH 29 static int tIME_chunk_present = 0; static char tIME_string[PNG_tIME_STRING_LENGTH] = "tIME chunk is not present"; + +#if PNG_LIBPNG_VER < 10619 +#define png_convert_to_rfc1123_buffer(ts, t) tIME_to_str(read_ptr, ts, t) + +static int +tIME_to_str(png_structp png_ptr, png_charp ts, png_const_timep t) +{ + png_const_charp str = png_convert_to_rfc1123(png_ptr, t); + + if (str == NULL) + return 0; + + strcpy(ts, str); + return 1; +} +#endif /* older libpng */ #endif static int verbose = 0; @@ -185,16 +206,14 @@ write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED -/* Example of using user transform callback (we don't transform anything, - * but merely examine the row filters. We set this to 256 rather than - * 5 in case illegal filter values are present.) +/* Example of using a user transform callback (doesn't do anything at present). */ -static png_uint_32 filters_used[256]; static void PNGCBAPI -count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data) +read_user_callback(png_structp png_ptr, png_row_infop row_info, png_bytep data) { - if (png_ptr != NULL && row_info != NULL) - ++filters_used[*(data - 1)]; + PNG_UNUSED(png_ptr) + PNG_UNUSED(row_info) + PNG_UNUSED(data) } #endif @@ -792,7 +811,7 @@ write_chunks(png_structp write_ptr, int location) */ #ifdef PNG_TEXT_SUPPORTED static void -pngtest_check_text_support(png_const_structp png_ptr, png_textp text_ptr, +pngtest_check_text_support(png_structp png_ptr, png_textp text_ptr, int num_text) { while (num_text > 0) @@ -805,6 +824,8 @@ pngtest_check_text_support(png_const_structp png_ptr, png_textp text_ptr, case PNG_TEXT_COMPRESSION_zTXt: # ifndef PNG_WRITE_zTXt_SUPPORTED ++unsupported_chunks; + /* In libpng 1.7 this now does an app-error, so stop it: */ + text_ptr[num_text].compression = PNG_TEXT_COMPRESSION_NONE; # endif break; @@ -812,6 +833,7 @@ pngtest_check_text_support(png_const_structp png_ptr, png_textp text_ptr, case PNG_ITXT_COMPRESSION_zTXt: # ifndef PNG_WRITE_iTXt_SUPPORTED ++unsupported_chunks; + text_ptr[num_text].compression = PNG_TEXT_COMPRESSION_NONE; # endif break; @@ -838,16 +860,19 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) png_structp write_ptr; png_infop write_info_ptr; png_infop write_end_info_ptr; +#ifdef PNG_WRITE_FILTER_SUPPORTED int interlace_preserved = 1; -#else +#endif /* WRITE_FILTER */ +#else /* !WRITE */ png_structp write_ptr = NULL; png_infop write_info_ptr = NULL; png_infop write_end_info_ptr = NULL; -#endif +#endif /* !WRITE */ png_bytep row_buf; png_uint_32 y; png_uint_32 width, height; - int num_pass = 1, pass; + volatile int num_passes; + int pass; int bit_depth, color_type; row_buf = NULL; @@ -1000,14 +1025,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) } #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED - { - int i; - - for (i = 0; i<256; i++) - filters_used[i] = 0; - - png_set_read_user_transform_fn(read_ptr, count_filters); - } + png_set_read_user_transform_fn(read_ptr, read_user_callback); #endif #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED zero_samples = 0; @@ -1054,27 +1072,27 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) { png_set_IHDR(write_ptr, write_info_ptr, width, height, bit_depth, color_type, interlace_type, compression_type, filter_type); -#ifndef PNG_READ_INTERLACING_SUPPORTED - /* num_pass will not be set below, set it here if the image is - * interlaced: what happens is that write interlacing is *not* turned - * on an the partial interlaced rows are written directly. + /* num_passes may not be available below if interlace support is not + * provided by libpng for both read and write. */ switch (interlace_type) { case PNG_INTERLACE_NONE: - num_pass = 1; + num_passes = 1; break; case PNG_INTERLACE_ADAM7: - num_pass = 7; - break; + num_passes = 7; + break; default: - png_error(read_ptr, "invalid interlace type"); - /*NOT REACHED*/ + png_error(read_ptr, "invalid interlace type"); + /*NOT REACHED*/ } -#endif } + + else + png_error(read_ptr, "png_get_IHDR failed"); } #ifdef PNG_FIXED_POINT_SUPPORTED #ifdef PNG_cHRM_SUPPORTED @@ -1245,6 +1263,19 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) #endif #endif #endif + +#ifdef PNG_sPLT_SUPPORTED + { + png_sPLT_tp entries; + + int num_entries = (int) png_get_sPLT(read_ptr, read_info_ptr, &entries); + if (num_entries) + { + png_set_sPLT(write_ptr, write_info_ptr, entries, num_entries); + } + } +#endif + #ifdef PNG_TEXT_SUPPORTED { png_textp text_ptr; @@ -1366,21 +1397,49 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) #endif /* SINGLE_ROWBUF_ALLOC */ pngtest_debug("Writing row data"); -#ifdef PNG_READ_INTERLACING_SUPPORTED - num_pass = png_set_interlace_handling(read_ptr); - if (png_set_interlace_handling(write_ptr) != num_pass) - png_error(write_ptr, "png_set_interlace_handling: inconsistent num_pass"); -#endif +#if defined(PNG_READ_INTERLACING_SUPPORTED) &&\ + defined(PNG_WRITE_INTERLACING_SUPPORTED) + /* Both must be defined for libpng to be able to handle the interlace, + * otherwise it gets handled below by simply reading and writing the passes + * directly. + */ + if (png_set_interlace_handling(read_ptr) != num_passes) + png_error(write_ptr, + "png_set_interlace_handling(read): wrong pass count "); + if (png_set_interlace_handling(write_ptr) != num_passes) + png_error(write_ptr, + "png_set_interlace_handling(write): wrong pass count "); +#else /* png_set_interlace_handling not called on either read or write */ +# define calc_pass_height +#endif /* not using libpng interlace handling */ #ifdef PNGTEST_TIMING t_stop = (float)clock(); t_misc += (t_stop - t_start); t_start = t_stop; #endif - for (pass = 0; pass < num_pass; pass++) + for (pass = 0; pass < num_passes; pass++) { +# ifdef calc_pass_height + png_uint_32 pass_height; + + if (num_passes == 7) /* interlaced */ + { + if (PNG_PASS_COLS(width, pass) > 0) + pass_height = PNG_PASS_ROWS(height, pass); + + else + pass_height = 0; + } + + else /* not interlaced */ + pass_height = height; +# else +# define pass_height height +# endif + pngtest_debug1("Writing row data for pass %d", pass); - for (y = 0; y < height; y++) + for (y = 0; y < pass_height; y++) { #ifndef SINGLE_ROWBUF_ALLOC pngtest_debug2("Allocating row buffer (pass %d, y = %u)...", pass, y); @@ -1570,7 +1629,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) } # ifdef PNG_WRITE_SUPPORTED - /* If there we no write support nothing was written! */ + /* If there is no write support nothing was written! */ else if (unsupported_chunks > 0) { fprintf(STDERR, "\n %s: unsupported chunks (%d)%s", @@ -1601,7 +1660,8 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) return (1); } -#ifdef PNG_WRITE_SUPPORTED /* else nothing was written */ +#if defined (PNG_WRITE_SUPPORTED) /* else nothing was written */ &&\ + defined (PNG_WRITE_FILTER_SUPPORTED) if (interlace_preserved != 0) /* else the files will be changed */ { for (;;) @@ -1678,7 +1738,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) } } } -#endif /* WRITE */ +#endif /* WRITE && WRITE_FILTER */ FCLOSE(fpin); FCLOSE(fpout); @@ -1817,21 +1877,12 @@ main(int argc, char *argv[]) kerror = test_one_file(argv[i], outname); if (kerror == 0) { -#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED - int k; -#endif #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED fprintf(STDERR, "\n PASS (%lu zero samples)\n", (unsigned long)zero_samples); #else fprintf(STDERR, " PASS\n"); #endif -#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED - for (k = 0; k<256; k++) - if (filters_used[k] != 0) - fprintf(STDERR, " Filter %d was used %lu times\n", - k, (unsigned long)filters_used[k]); -#endif #ifdef PNG_TIME_RFC1123_SUPPORTED if (tIME_chunk_present != 0) fprintf(STDERR, " tIME = %s\n", tIME_string); @@ -1908,21 +1959,12 @@ main(int argc, char *argv[]) { if (verbose == 1 || i == 2) { -#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED - int k; -#endif #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED fprintf(STDERR, "\n PASS (%lu zero samples)\n", (unsigned long)zero_samples); #else fprintf(STDERR, " PASS\n"); #endif -#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED - for (k = 0; k<256; k++) - if (filters_used[k] != 0) - fprintf(STDERR, " Filter %d was used %lu times\n", - k, (unsigned long)filters_used[k]); -#endif #ifdef PNG_TIME_RFC1123_SUPPORTED if (tIME_chunk_present != 0) fprintf(STDERR, " tIME = %s\n", tIME_string); @@ -2028,4 +2070,4 @@ main(void) #endif /* Generate a compiler error if there is an old png.h in the search path. */ -typedef png_libpng_version_1_6_18 Your_png_h_is_not_version_1_6_18; +typedef png_libpng_version_1_6_20 Your_png_h_is_not_version_1_6_20; diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngtest.png b/Build/source/libs/libpng/libpng-src/pngtest.png Binary files differindex cb3fef4cf84..cb3fef4cf84 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngtest.png +++ b/Build/source/libs/libpng/libpng-src/pngtest.png diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngtrans.c b/Build/source/libs/libpng/libpng-src/pngtrans.c index 43920174457..0c0d92d8fd6 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngtrans.c +++ b/Build/source/libs/libpng/libpng-src/pngtrans.c @@ -30,7 +30,7 @@ png_set_bgr(png_structrp png_ptr) #endif #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) -/* Turn on 16 bit byte swapping */ +/* Turn on 16-bit byte swapping */ void PNGAPI png_set_swap(png_structrp png_ptr) { @@ -313,7 +313,7 @@ png_do_invert(png_row_infop row_info, png_bytep row) #ifdef PNG_16BIT_SUPPORTED #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) -/* Swaps byte order on 16 bit depth images */ +/* Swaps byte order on 16-bit depth images */ void /* PRIVATE */ png_do_swap(png_row_infop row_info, png_bytep row) { diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngusr.dfa b/Build/source/libs/libpng/libpng-src/pngusr.dfa index 83067c38c07..83067c38c07 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngusr.dfa +++ b/Build/source/libs/libpng/libpng-src/pngusr.dfa diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngwio.c b/Build/source/libs/libpng/libpng-src/pngwio.c index 0a40948aab5..db76e6b8d78 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngwio.c +++ b/Build/source/libs/libpng/libpng-src/pngwio.c @@ -26,7 +26,7 @@ * writes to a file pointer. Note that this routine sometimes gets called * with very small lengths, so you should implement some kind of simple * buffering if you are using unbuffered writes. This should never be asked - * to write more than 64K on a 16 bit machine. + * to write more than 64K on a 16-bit machine. */ void /* PRIVATE */ diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngwrite.c b/Build/source/libs/libpng/libpng-src/pngwrite.c index 3c8cbbe5e8a..0d4ee9f7ae0 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngwrite.c +++ b/Build/source/libs/libpng/libpng-src/pngwrite.c @@ -1,7 +1,7 @@ /* pngwrite.c - general routines to write a PNG file * - * Last changed in libpng 1.6.18 [July 23, 2015] + * Last changed in libpng 1.6.19 [November 12, 2015] * Copyright (c) 1998-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -206,7 +206,7 @@ png_write_info(png_structrp png_ptr, png_const_inforp info_ptr) png_write_PLTE(png_ptr, info_ptr->palette, (png_uint_32)info_ptr->num_palette); - else if ((info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) !=0) + else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) png_error(png_ptr, "Valid palette required for paletted images"); #ifdef PNG_WRITE_tRNS_SUPPORTED @@ -1422,7 +1422,7 @@ png_write_png(png_structrp png_ptr, png_inforp info_ptr, png_app_error(png_ptr, "PNG_TRANSFORM_SWAP_ENDIAN not supported"); #endif - /* Swap bits of 1, 2, 4 bit packed pixel formats */ + /* Swap bits of 1-bit, 2-bit, 4-bit packed pixel formats */ if ((transforms & PNG_TRANSFORM_PACKSWAP) != 0) #ifdef PNG_WRITE_PACKSWAP_SUPPORTED png_set_packswap(png_ptr); @@ -1998,7 +1998,7 @@ png_image_write_main(png_voidp argument) /* Now set up the data transformations (*after* the header is written), * remove the handled transformations from the 'format' flags for checking. * - * First check for a little endian system if writing 16 bit files. + * First check for a little endian system if writing 16-bit files. */ if (write_16bit != 0) { diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngwtran.c b/Build/source/libs/libpng/libpng-src/pngwtran.c index 5dc949157d4..5dc949157d4 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngwtran.c +++ b/Build/source/libs/libpng/libpng-src/pngwtran.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/pngwutil.c b/Build/source/libs/libpng/libpng-src/pngwutil.c index 9e6019e5520..0ee102b5fba 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/pngwutil.c +++ b/Build/source/libs/libpng/libpng-src/pngwutil.c @@ -1,7 +1,7 @@ /* pngwutil.c - utilities to write a PNG file * - * Last changed in libpng 1.6.18 [July 23, 2015] + * Last changed in libpng 1.6.19 [November 12, 2015] * Copyright (c) 1998-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -179,7 +179,7 @@ png_write_complete_chunk(png_structrp png_ptr, png_uint_32 chunk_name, if (png_ptr == NULL) return; - /* On 64 bit architectures 'length' may not fit in a png_uint_32. */ + /* On 64-bit architectures 'length' may not fit in a png_uint_32. */ if (length > PNG_UINT_31_MAX) png_error(png_ptr, "length exceeds PNG maximum"); @@ -922,17 +922,20 @@ void /* PRIVATE */ png_write_PLTE(png_structrp png_ptr, png_const_colorp palette, png_uint_32 num_pal) { - png_uint_32 i; + png_uint_32 max_palette_length, i; png_const_colorp pal_ptr; png_byte buf[3]; png_debug(1, "in png_write_PLTE"); + max_palette_length = (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ? + (1 << png_ptr->bit_depth) : PNG_MAX_PALETTE_LENGTH; + if (( #ifdef PNG_MNG_FEATURES_SUPPORTED (png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) == 0 && #endif - num_pal == 0) || num_pal > 256) + num_pal == 0) || num_pal > max_palette_length) { if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) { @@ -1444,7 +1447,7 @@ png_write_tRNS(png_structrp png_ptr, png_const_bytep trans_alpha, else if (color_type == PNG_COLOR_TYPE_GRAY) { - /* One 16 bit value */ + /* One 16-bit value */ if (tran->gray >= (1 << png_ptr->bit_depth)) { png_app_warning(png_ptr, @@ -1459,7 +1462,7 @@ png_write_tRNS(png_structrp png_ptr, png_const_bytep trans_alpha, else if (color_type == PNG_COLOR_TYPE_RGB) { - /* Three 16 bit values */ + /* Three 16-bit values */ png_save_uint_16(buf, tran->red); png_save_uint_16(buf + 2, tran->green); png_save_uint_16(buf + 4, tran->blue); @@ -2560,7 +2563,7 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info) if (filter_to_do == PNG_FILTER_SUB) /* It's the only filter so no testing is needed */ { - (void) png_setup_sub_row(png_ptr, bpp, row_bytes, mins); + (void) png_setup_sub_row(png_ptr, bpp, row_bytes, mins); best_row = png_ptr->try_row; } @@ -2569,7 +2572,7 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info) png_size_t sum; png_size_t lmins = mins; - sum = png_setup_sub_row(png_ptr, bpp, row_bytes, lmins); + sum = png_setup_sub_row(png_ptr, bpp, row_bytes, lmins); if (sum < mins) { @@ -2595,7 +2598,7 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info) png_size_t sum; png_size_t lmins = mins; - sum = png_setup_up_row(png_ptr, row_bytes, lmins); + sum = png_setup_up_row(png_ptr, row_bytes, lmins); if (sum < mins) { @@ -2651,7 +2654,6 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info) if (sum < mins) { - mins = sum; best_row = png_ptr->try_row; if (png_ptr->tst_row != NULL) { diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/owatcom/libpng.tgt b/Build/source/libs/libpng/libpng-src/projects/owatcom/libpng.tgt index 4a9622e68cf..4a9622e68cf 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/owatcom/libpng.tgt +++ b/Build/source/libs/libpng/libpng-src/projects/owatcom/libpng.tgt diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/owatcom/libpng.wpj b/Build/source/libs/libpng/libpng-src/projects/owatcom/libpng.wpj index a70d95f96b3..a70d95f96b3 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/owatcom/libpng.wpj +++ b/Build/source/libs/libpng/libpng-src/projects/owatcom/libpng.wpj diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/owatcom/pngconfig.mak b/Build/source/libs/libpng/libpng-src/projects/owatcom/pngconfig.mak index 0f988780513..054a3fc2071 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/owatcom/pngconfig.mak +++ b/Build/source/libs/libpng/libpng-src/projects/owatcom/pngconfig.mak @@ -1,160 +1,160 @@ -# This is an OpenWatcom make file which builds pnglibconf.h - the libpng -# configuration header. You can ignore this file if you don't need to -# configure libpng; a default configuration will be built. -# -# For more information build libpng.wpj under the IDE and then read the -# generated files: -# -# config.inf: Basic configuration information for a standard build. -# pngconfig.dfa: Advanced configuration for non-standard libpng builds. -# -DELETE=rm -f -ECHO=echo -COPY=copy -# -# If your configuration needs to test compiler flags when building -# pnglibconf.h you may need to override the following on the wmake command -# line: -CFLAGS= -CC=wcl386 -CPP=$(CC) -pw0 -# -# Read awk from the environment if set, else it can be set on the command -# line (the default approach is to set the %awk% environment variable in the -# IDE libpng.wpj 'before' rule - this setting is local.) -!ifdef %awk -AWK=$(%awk) -!endif -# -# pnglibconf.h must exist in the source directory, this is the final rule -# which copies the local built version (and this is the default target for -# this makefile.) -..\..\pnglibconf.h: pnglibconf.h - $(COPY) pnglibconf.h $@ - -!ifdef AWK -# CPPFLAGS should contain the options to control the result, -# but DEFS and CFLAGS are also supported here, override -# as appropriate -DFNFLAGS = $(DEFS) $(CPPFLAGS) $(CFLAGS) - -pnglibconf.h: pnglibconf.dfn - $(DELETE) $@ dfn.c dfn1.out dfn2.out - $(ECHO) $#include "pnglibconf.dfn" >dfn.c - $(CPP) $(DFNFLAGS) dfn.c >dfn1.out - $(AWK) -f << dfn1.out >dfn2.out -/^.*PNG_DEFN_MAGIC-.*-PNG_DEFN_END.*$$/{ - sub(/^.*PNG_DEFN_MAGIC-/, "") - sub(/ *-PNG_DEFN_END.*$$/, "") - gsub(/ *@@@ */, "") - print -} -<< - $(COPY) dfn2.out $@ - @type << >pngconfig.inf -This is a locally configurable build of libpng.lib; for configuration -instructions consult and edit projects/openwatcom/pngconfig.dfa -<< - $(DELETE) dfn.c dfn1.out dfn2.out - -pnglibconf.dfn: ..\..\scripts\pnglibconf.dfa ..\..\scripts\options.awk pngconfig.dfa ..\..\pngconf.h - $(DELETE) $@ dfn1.out dfn2.out - $(AWK) -f ..\..\scripts\options.awk out=dfn1.out version=search ..\..\pngconf.h ..\..\scripts\pnglibconf.dfa pngconfig.dfa $(DFA_XTRA) 1>&2 - $(AWK) -f ..\..\scripts\options.awk out=dfn2.out dfn1.out 1>&2 - $(COPY) dfn2.out $@ - $(DELETE) dfn1.out dfn2.out - -!else -# The following lines are used to copy scripts\pnglibconf.h.prebuilt and make -# the required change to the calling convention. -# -# By default libpng is built to use the __cdecl calling convention on -# Windows. This gives compatibility with MSVC and GCC. Unfortunately it -# does not work with OpenWatcom because OpenWatcom implements longjmp using -# the __watcall convention (compared with both MSVC and GCC which use __cdecl -# for library functions.) -# -# Thus the default must be changed to build on OpenWatcom and, once changed, -# the result will not be compatible with applications built using other -# compilers (in fact attempts to build will fail at compile time.) -# -pnglibconf.h: ..\..\scripts\pnglibconf.h.prebuilt .existsonly - @$(ECHO) . - @$(ECHO) . - @$(ECHO) $$(AWK) NOT AVAILABLE: COPYING scripts\pnglibconf.h.prebuilt - @$(ECHO) . - @$(ECHO) . - vi -q -k ":1,$$s/PNG_API_RULE 0$$/PNG_API_RULE 2/\n:w! $@\n:q!\n" ..\..\scripts\pnglibconf.h.prebuilt - @$(ECHO) . - @$(ECHO) . - @$(ECHO) YOU HAVE A DEFAULT CONFIGURATION BECAUSE YOU DO NOT HAVE AWK! - @$(ECHO) . - @$(ECHO) . - @type << >pngconfig.inf -This is the default configuration of libpng.lib, if you wish to -change the configuration please consult the instructions in -projects/owatcom/pngconfig.dfa. -<< - -!endif - -# Make the default files -defaults: .symbolic - @$(COPY) << config.inf -$# The libpng project is incompletely configured. To complete configuration -$# please complete the following steps: -$# -$# 1) Edit the 'before' rule of libpng.wpj (from the IDE) to define the -$# locations of the zlib include file zlib.h and the built zlib library, -$# zlib.lib. -$# -$# 2) If you want to change libpng to a non-standard configuration also -$# change the definition of 'awk' in the before rule to the name of your -$# awk command. For more instructions on configuration read -$# pngconfig.dfa. -$# -$# 3) Delete this file (config.inf). -<< - @$(COPY) << pngconfig.dfa -$# pngconfig.dfa: this file contains configuration options for libpng. -$# If emtpy the standard configuration will be built. For this file to be -$# used a working version of the program 'awk' is required and the program -$# must be identified in the 'before' rule of the project. -$# -$# If you don't already have 'awk', or the version of awk you have seems not -$# to work, download Brian Kernighan's awk (Brian Kernighan is the author of -$# awk.) You can find source code and a built executable (called awk95.exe) -$# here: -$# -$# http://www.cs.princeton.edu/~bwk/btl.mirror/ -$# -$# The executable works just fine. -$# -$# If build issues errors after a change to pngconfig.dfa you have entered -$# inconsistent feature requests, or even malformed requests, in -$# pngconfig.dfa. The error messages from awk should be comprehensible, but -$# if not simply go back to the start (nothing but comments in this file) and -$# enter configuration lines one by one until one produces an error. (Or, of -$# course, do the standard binary chop.) -$# -$# You need to rebuild everything after a change to pnglibconf.dfa - i.e. you -$# must do Actions/Mark All Targets for Remake. This is because the compiler -$# generated dependency information (as of OpenWatcom 1.9) does not record the -$# dependency on pnglibconf.h correctly. -$# -$# If awk isn't set then this file is bypassed. If you just want the standard -$# configuration it is automatically produced from the distributed version -$# (scripts\pnglibconf.h.prebuilt) by editting PNG_API_RULE to 2 (to force use -$# of the OpenWatcom library calling convention.) -$# -<< - -clean:: .symbolic - $(DELETE) ..\..\pnglibconf.h pnglibconf.* dfn.c *.out pngconfig.inf - $(DELETE) *.obj *.mbr *.sym *.err *.pch libpng.mk - $(DELETE) libpng.lib libpng.lbr libpng.lb1 libpng.cbr libpng.mk1 - $(DELETE) pngtest.exe pngtest.map pngtest.lk1 pngtest.mk1 - $(DELETE) pngvalid.exe pngvalid.map pngvalid.lk1 pngvalid.mk1 - -distclean:: clean .symbolic - $(DELETE) zlib.inf awk.inf config.inf pngconfig.dfa +# This is an OpenWatcom make file which builds pnglibconf.h - the libpng
+# configuration header. You can ignore this file if you don't need to
+# configure libpng; a default configuration will be built.
+#
+# For more information build libpng.wpj under the IDE and then read the
+# generated files:
+#
+# config.inf: Basic configuration information for a standard build.
+# pngconfig.dfa: Advanced configuration for non-standard libpng builds.
+#
+DELETE=rm -f
+ECHO=echo
+COPY=copy
+#
+# If your configuration needs to test compiler flags when building
+# pnglibconf.h you may need to override the following on the wmake command
+# line:
+CFLAGS=
+CC=wcl386
+CPP=$(CC) -pw0
+#
+# Read awk from the environment if set, else it can be set on the command
+# line (the default approach is to set the %awk% environment variable in the
+# IDE libpng.wpj 'before' rule - this setting is local.)
+!ifdef %awk
+AWK=$(%awk)
+!endif
+#
+# pnglibconf.h must exist in the source directory, this is the final rule
+# which copies the local built version (and this is the default target for
+# this makefile.)
+..\..\pnglibconf.h: pnglibconf.h
+ $(COPY) pnglibconf.h $@
+
+!ifdef AWK
+# CPPFLAGS should contain the options to control the result,
+# but DEFS and CFLAGS are also supported here, override
+# as appropriate
+DFNFLAGS = $(DEFS) $(CPPFLAGS) $(CFLAGS)
+
+pnglibconf.h: pnglibconf.dfn
+ $(DELETE) $@ dfn.c dfn1.out dfn2.out
+ $(ECHO) $#include "pnglibconf.dfn" >dfn.c
+ $(CPP) $(DFNFLAGS) dfn.c >dfn1.out
+ $(AWK) -f << dfn1.out >dfn2.out
+/^.*PNG_DEFN_MAGIC-.*-PNG_DEFN_END.*$$/{
+ sub(/^.*PNG_DEFN_MAGIC-/, "")
+ sub(/ *-PNG_DEFN_END.*$$/, "")
+ gsub(/ *@@@ */, "")
+ print
+}
+<<
+ $(COPY) dfn2.out $@
+ @type << >pngconfig.inf
+This is a locally configurable build of libpng.lib; for configuration
+instructions consult and edit projects/openwatcom/pngconfig.dfa
+<<
+ $(DELETE) dfn.c dfn1.out dfn2.out
+
+pnglibconf.dfn: ..\..\scripts\pnglibconf.dfa ..\..\scripts\options.awk pngconfig.dfa ..\..\pngconf.h
+ $(DELETE) $@ dfn1.out dfn2.out
+ $(AWK) -f ..\..\scripts\options.awk out=dfn1.out version=search ..\..\pngconf.h ..\..\scripts\pnglibconf.dfa pngconfig.dfa $(DFA_XTRA) 1>&2
+ $(AWK) -f ..\..\scripts\options.awk out=dfn2.out dfn1.out 1>&2
+ $(COPY) dfn2.out $@
+ $(DELETE) dfn1.out dfn2.out
+
+!else
+# The following lines are used to copy scripts\pnglibconf.h.prebuilt and make
+# the required change to the calling convention.
+#
+# By default libpng is built to use the __cdecl calling convention on
+# Windows. This gives compatibility with MSVC and GCC. Unfortunately it
+# does not work with OpenWatcom because OpenWatcom implements longjmp using
+# the __watcall convention (compared with both MSVC and GCC which use __cdecl
+# for library functions.)
+#
+# Thus the default must be changed to build on OpenWatcom and, once changed,
+# the result will not be compatible with applications built using other
+# compilers (in fact attempts to build will fail at compile time.)
+#
+pnglibconf.h: ..\..\scripts\pnglibconf.h.prebuilt .existsonly
+ @$(ECHO) .
+ @$(ECHO) .
+ @$(ECHO) $$(AWK) NOT AVAILABLE: COPYING scripts\pnglibconf.h.prebuilt
+ @$(ECHO) .
+ @$(ECHO) .
+ vi -q -k ":1,$$s/PNG_API_RULE 0$$/PNG_API_RULE 2/\n:w! $@\n:q!\n" ..\..\scripts\pnglibconf.h.prebuilt
+ @$(ECHO) .
+ @$(ECHO) .
+ @$(ECHO) YOU HAVE A DEFAULT CONFIGURATION BECAUSE YOU DO NOT HAVE AWK!
+ @$(ECHO) .
+ @$(ECHO) .
+ @type << >pngconfig.inf
+This is the default configuration of libpng.lib, if you wish to
+change the configuration please consult the instructions in
+projects/owatcom/pngconfig.dfa.
+<<
+
+!endif
+
+# Make the default files
+defaults: .symbolic
+ @$(COPY) << config.inf
+$# The libpng project is incompletely configured. To complete configuration
+$# please complete the following steps:
+$#
+$# 1) Edit the 'before' rule of libpng.wpj (from the IDE) to define the
+$# locations of the zlib include file zlib.h and the built zlib library,
+$# zlib.lib.
+$#
+$# 2) If you want to change libpng to a non-standard configuration also
+$# change the definition of 'awk' in the before rule to the name of your
+$# awk command. For more instructions on configuration read
+$# pngconfig.dfa.
+$#
+$# 3) Delete this file (config.inf).
+<<
+ @$(COPY) << pngconfig.dfa
+$# pngconfig.dfa: this file contains configuration options for libpng.
+$# If emtpy the standard configuration will be built. For this file to be
+$# used a working version of the program 'awk' is required and the program
+$# must be identified in the 'before' rule of the project.
+$#
+$# If you don't already have 'awk', or the version of awk you have seems not
+$# to work, download Brian Kernighan's awk (Brian Kernighan is the author of
+$# awk.) You can find source code and a built executable (called awk95.exe)
+$# here:
+$#
+$# http://www.cs.princeton.edu/~bwk/btl.mirror/
+$#
+$# The executable works just fine.
+$#
+$# If build issues errors after a change to pngconfig.dfa you have entered
+$# inconsistent feature requests, or even malformed requests, in
+$# pngconfig.dfa. The error messages from awk should be comprehensible, but
+$# if not simply go back to the start (nothing but comments in this file) and
+$# enter configuration lines one by one until one produces an error. (Or, of
+$# course, do the standard binary chop.)
+$#
+$# You need to rebuild everything after a change to pnglibconf.dfa - i.e. you
+$# must do Actions/Mark All Targets for Remake. This is because the compiler
+$# generated dependency information (as of OpenWatcom 1.9) does not record the
+$# dependency on pnglibconf.h correctly.
+$#
+$# If awk isn't set then this file is bypassed. If you just want the standard
+$# configuration it is automatically produced from the distributed version
+$# (scripts\pnglibconf.h.prebuilt) by editting PNG_API_RULE to 2 (to force use
+$# of the OpenWatcom library calling convention.)
+$#
+<<
+
+clean:: .symbolic
+ $(DELETE) ..\..\pnglibconf.h pnglibconf.* dfn.c *.out pngconfig.inf
+ $(DELETE) *.obj *.mbr *.sym *.err *.pch libpng.mk
+ $(DELETE) libpng.lib libpng.lbr libpng.lb1 libpng.cbr libpng.mk1
+ $(DELETE) pngtest.exe pngtest.map pngtest.lk1 pngtest.mk1
+ $(DELETE) pngvalid.exe pngvalid.map pngvalid.lk1 pngvalid.mk1
+
+distclean:: clean .symbolic
+ $(DELETE) zlib.inf awk.inf config.inf pngconfig.dfa
diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/owatcom/pngstest.tgt b/Build/source/libs/libpng/libpng-src/projects/owatcom/pngstest.tgt index f5d024518f1..f5d024518f1 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/owatcom/pngstest.tgt +++ b/Build/source/libs/libpng/libpng-src/projects/owatcom/pngstest.tgt diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/owatcom/pngtest.tgt b/Build/source/libs/libpng/libpng-src/projects/owatcom/pngtest.tgt index 211f1a74886..211f1a74886 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/owatcom/pngtest.tgt +++ b/Build/source/libs/libpng/libpng-src/projects/owatcom/pngtest.tgt diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/owatcom/pngvalid.tgt b/Build/source/libs/libpng/libpng-src/projects/owatcom/pngvalid.tgt index 1e78e75cb6c..1e78e75cb6c 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/owatcom/pngvalid.tgt +++ b/Build/source/libs/libpng/libpng-src/projects/owatcom/pngvalid.tgt diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/PRJ0041.mak b/Build/source/libs/libpng/libpng-src/projects/visualc71/PRJ0041.mak index c7a68b503e7..c7a68b503e7 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/PRJ0041.mak +++ b/Build/source/libs/libpng/libpng-src/projects/visualc71/PRJ0041.mak diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/README.txt b/Build/source/libs/libpng/libpng-src/projects/visualc71/README.txt index 34565e4d005..34565e4d005 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/README.txt +++ b/Build/source/libs/libpng/libpng-src/projects/visualc71/README.txt diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/README_zlib.txt b/Build/source/libs/libpng/libpng-src/projects/visualc71/README_zlib.txt index 81d11cbb577..81d11cbb577 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/README_zlib.txt +++ b/Build/source/libs/libpng/libpng-src/projects/visualc71/README_zlib.txt diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/libpng.sln b/Build/source/libs/libpng/libpng-src/projects/visualc71/libpng.sln index eeb101f2e31..eeb101f2e31 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/libpng.sln +++ b/Build/source/libs/libpng/libpng-src/projects/visualc71/libpng.sln diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/libpng.vcproj b/Build/source/libs/libpng/libpng-src/projects/visualc71/libpng.vcproj index 608ec4e6b4d..608ec4e6b4d 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/libpng.vcproj +++ b/Build/source/libs/libpng/libpng-src/projects/visualc71/libpng.vcproj diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/pngtest.vcproj b/Build/source/libs/libpng/libpng-src/projects/visualc71/pngtest.vcproj index 3b48f1cf6f6..3b48f1cf6f6 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/pngtest.vcproj +++ b/Build/source/libs/libpng/libpng-src/projects/visualc71/pngtest.vcproj diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/zlib.vcproj b/Build/source/libs/libpng/libpng-src/projects/visualc71/zlib.vcproj index eb218488dcf..eb218488dcf 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/visualc71/zlib.vcproj +++ b/Build/source/libs/libpng/libpng-src/projects/visualc71/zlib.vcproj diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/WARNING b/Build/source/libs/libpng/libpng-src/projects/vstudio/WARNING index da002c937df..da002c937df 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/WARNING +++ b/Build/source/libs/libpng/libpng-src/projects/vstudio/WARNING diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/libpng/libpng.vcxproj b/Build/source/libs/libpng/libpng-src/projects/vstudio/libpng/libpng.vcxproj index de7fc3c4137..de7fc3c4137 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/libpng/libpng.vcxproj +++ b/Build/source/libs/libpng/libpng-src/projects/vstudio/libpng/libpng.vcxproj diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/pnglibconf/pnglibconf.vcxproj b/Build/source/libs/libpng/libpng-src/projects/vstudio/pnglibconf/pnglibconf.vcxproj index e2a232cb631..e2a232cb631 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/pnglibconf/pnglibconf.vcxproj +++ b/Build/source/libs/libpng/libpng-src/projects/vstudio/pnglibconf/pnglibconf.vcxproj diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/pngstest/pngstest.vcxproj b/Build/source/libs/libpng/libpng-src/projects/vstudio/pngstest/pngstest.vcxproj index 0d2980dd8aa..0d2980dd8aa 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/pngstest/pngstest.vcxproj +++ b/Build/source/libs/libpng/libpng-src/projects/vstudio/pngstest/pngstest.vcxproj diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/pngtest/pngtest.vcxproj b/Build/source/libs/libpng/libpng-src/projects/vstudio/pngtest/pngtest.vcxproj index bf9266f7588..bf9266f7588 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/pngtest/pngtest.vcxproj +++ b/Build/source/libs/libpng/libpng-src/projects/vstudio/pngtest/pngtest.vcxproj diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/pngunknown/pngunknown.vcxproj b/Build/source/libs/libpng/libpng-src/projects/vstudio/pngunknown/pngunknown.vcxproj index a30cc7a21a2..a30cc7a21a2 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/pngunknown/pngunknown.vcxproj +++ b/Build/source/libs/libpng/libpng-src/projects/vstudio/pngunknown/pngunknown.vcxproj diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/pngvalid/pngvalid.vcxproj b/Build/source/libs/libpng/libpng-src/projects/vstudio/pngvalid/pngvalid.vcxproj index 07cf241193f..07cf241193f 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/pngvalid/pngvalid.vcxproj +++ b/Build/source/libs/libpng/libpng-src/projects/vstudio/pngvalid/pngvalid.vcxproj diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/readme.txt b/Build/source/libs/libpng/libpng-src/projects/vstudio/readme.txt index 096e86fb1dc..38664638862 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/readme.txt +++ b/Build/source/libs/libpng/libpng-src/projects/vstudio/readme.txt @@ -1,7 +1,7 @@ VisualStudio instructions -libpng version 1.6.18 - July 23, 2015 +libpng version 1.6.20 - December 3, 2015 Copyright (c) 1998-2010 Glenn Randers-Pehrson diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/vstudio.sln b/Build/source/libs/libpng/libpng-src/projects/vstudio/vstudio.sln index af0b1bab592..af0b1bab592 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/vstudio.sln +++ b/Build/source/libs/libpng/libpng-src/projects/vstudio/vstudio.sln diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/zlib.props b/Build/source/libs/libpng/libpng-src/projects/vstudio/zlib.props index 89c38f3e1ad..7faf359435f 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/zlib.props +++ b/Build/source/libs/libpng/libpng-src/projects/vstudio/zlib.props @@ -2,7 +2,7 @@ <!-- * zlib.props - location of zlib source * - * libpng version 1.6.18 - July 23, 2015 + * libpng version 1.6.20 - December 3, 2015 * * Copyright (c) 1998-2011 Glenn Randers-Pehrson * diff --git a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/zlib/zlib.vcxproj b/Build/source/libs/libpng/libpng-src/projects/vstudio/zlib/zlib.vcxproj index 6e5b94a61cc..6e5b94a61cc 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/projects/vstudio/zlib/zlib.vcxproj +++ b/Build/source/libs/libpng/libpng-src/projects/vstudio/zlib/zlib.vcxproj diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/README.txt b/Build/source/libs/libpng/libpng-src/scripts/README.txt index 7d98b6629a4..68245f0c859 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/README.txt +++ b/Build/source/libs/libpng/libpng-src/scripts/README.txt @@ -1,9 +1,9 @@ -Makefiles for libpng version 1.6.18 - July 23, 2015 +Makefiles for libpng version 1.6.20 - December 3, 2015 pnglibconf.h.prebuilt => Stores configuration settings makefile.linux => Linux/ELF makefile - (gcc, creates libpng16.so.16.1.6.18) + (gcc, creates libpng16.so.16.1.6.20) makefile.gcc => Generic makefile (gcc, creates static libpng.a) makefile.knr => Archaic UNIX Makefile that converts files with ansi2knr (Requires ansi2knr.c from @@ -33,12 +33,12 @@ pnglibconf.h.prebuilt => Stores configuration settings makefile.os2 => OS/2 Makefile (gcc and emx, requires libpng.def) makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc makefile.sggcc => Silicon Graphics (gcc, - creates libpng16.so.16.1.6.18) + creates libpng16.so.16.1.6.20) makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib) makefile.solaris => Solaris 2.X makefile (gcc, - creates libpng16.so.16.1.6.18) + creates libpng16.so.16.1.6.20) makefile.so9 => Solaris 9 makefile (gcc, - creates libpng16.so.16.1.6.18) + creates libpng16.so.16.1.6.20) makefile.std => Generic UNIX makefile (cc, creates static libpng.a) makefile.sunos => Sun makefile makefile.32sunu => Sun Ultra 32-bit makefile diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/SCOPTIONS.ppc b/Build/source/libs/libpng/libpng-src/scripts/SCOPTIONS.ppc index 2c3503e9eb2..2c3503e9eb2 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/SCOPTIONS.ppc +++ b/Build/source/libs/libpng/libpng-src/scripts/SCOPTIONS.ppc diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/checksym.awk b/Build/source/libs/libpng/libpng-src/scripts/checksym.awk index fe3af55e05e..fe3af55e05e 100755..100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/checksym.awk +++ b/Build/source/libs/libpng/libpng-src/scripts/checksym.awk diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/def.c b/Build/source/libs/libpng/libpng-src/scripts/def.c index ad68d3b0c4c..c3e424df77d 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/def.c +++ b/Build/source/libs/libpng/libpng-src/scripts/def.c @@ -21,7 +21,7 @@ PNG_DFN "OS2 DESCRIPTION "PNG image compression library"" PNG_DFN "OS2 CODE PRELOAD MOVEABLE DISCARDABLE" PNG_DFN "" PNG_DFN "EXPORTS" -PNG_DFN ";Version 1.6.18" +PNG_DFN ";Version 1.6.20" #define PNG_EXPORTA(ordinal, type, name, args, attributes)\ PNG_DFN "@" SYMBOL_PREFIX "@@" name "@" diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/descrip.mms b/Build/source/libs/libpng/libpng-src/scripts/descrip.mms index 463c4251e7e..463c4251e7e 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/descrip.mms +++ b/Build/source/libs/libpng/libpng-src/scripts/descrip.mms diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/dfn.awk b/Build/source/libs/libpng/libpng-src/scripts/dfn.awk index 346b9db7d59..346b9db7d59 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/dfn.awk +++ b/Build/source/libs/libpng/libpng-src/scripts/dfn.awk diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/intprefix.c b/Build/source/libs/libpng/libpng-src/scripts/intprefix.c index 254f8e94b45..254f8e94b45 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/intprefix.c +++ b/Build/source/libs/libpng/libpng-src/scripts/intprefix.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/libpng-config-body.in b/Build/source/libs/libpng/libpng-src/scripts/libpng-config-body.in index b466432d546..b466432d546 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/libpng-config-body.in +++ b/Build/source/libs/libpng/libpng-src/scripts/libpng-config-body.in diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/libpng-config-head.in b/Build/source/libs/libpng/libpng-src/scripts/libpng-config-head.in index 77fab38035f..8e25732058b 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/libpng-config-head.in +++ b/Build/source/libs/libpng/libpng-src/scripts/libpng-config-head.in @@ -11,7 +11,7 @@ # Modeled after libxml-config. -version=1.6.18 +version=1.6.20 prefix="" libdir="" libs="" diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/libpng.pc.in b/Build/source/libs/libpng/libpng-src/scripts/libpng.pc.in index d4536c564a8..83f7accf12a 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/libpng.pc.in +++ b/Build/source/libs/libpng/libpng-src/scripts/libpng.pc.in @@ -5,6 +5,6 @@ includedir=@includedir@/libpng16 Name: libpng Description: Loads and saves PNG files -Version: 1.6.18 +Version: 1.6.20 Libs: -L${libdir} -lpng16 Cflags: -I${includedir} diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/libtool.m4 b/Build/source/libs/libpng/libpng-src/scripts/libtool.m4 index a3bc337b79a..a3bc337b79a 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/libtool.m4 +++ b/Build/source/libs/libpng/libpng-src/scripts/libtool.m4 diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/ltoptions.m4 b/Build/source/libs/libpng/libpng-src/scripts/ltoptions.m4 index 94b08297666..94b08297666 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/ltoptions.m4 +++ b/Build/source/libs/libpng/libpng-src/scripts/ltoptions.m4 diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/ltsugar.m4 b/Build/source/libs/libpng/libpng-src/scripts/ltsugar.m4 index 48bc9344a4d..48bc9344a4d 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/ltsugar.m4 +++ b/Build/source/libs/libpng/libpng-src/scripts/ltsugar.m4 diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/ltversion.m4 b/Build/source/libs/libpng/libpng-src/scripts/ltversion.m4 index fa04b52a3bf..fa04b52a3bf 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/ltversion.m4 +++ b/Build/source/libs/libpng/libpng-src/scripts/ltversion.m4 diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/lt~obsolete.m4 b/Build/source/libs/libpng/libpng-src/scripts/lt~obsolete.m4 index c6b26f88f6c..c6b26f88f6c 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/lt~obsolete.m4 +++ b/Build/source/libs/libpng/libpng-src/scripts/lt~obsolete.m4 diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/macro.lst b/Build/source/libs/libpng/libpng-src/scripts/macro.lst index 57124b76a01..57124b76a01 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/macro.lst +++ b/Build/source/libs/libpng/libpng-src/scripts/macro.lst diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.32sunu b/Build/source/libs/libpng/libpng-src/scripts/makefile.32sunu index 7d4b7c53a07..7d4b7c53a07 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.32sunu +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.32sunu diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.64sunu b/Build/source/libs/libpng/libpng-src/scripts/makefile.64sunu index 341fce969b9..341fce969b9 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.64sunu +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.64sunu diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.acorn b/Build/source/libs/libpng/libpng-src/scripts/makefile.acorn index 00b8fb5b35c..00b8fb5b35c 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.acorn +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.acorn diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.aix b/Build/source/libs/libpng/libpng-src/scripts/makefile.aix index 5f62d50afb9..5f62d50afb9 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.aix +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.aix diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.amiga b/Build/source/libs/libpng/libpng-src/scripts/makefile.amiga index 16a4bd5d331..16a4bd5d331 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.amiga +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.amiga diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.atari b/Build/source/libs/libpng/libpng-src/scripts/makefile.atari index b5dbd4934ac..b5dbd4934ac 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.atari +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.atari diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.bc32 b/Build/source/libs/libpng/libpng-src/scripts/makefile.bc32 index bdbc4cb2f91..bdbc4cb2f91 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.bc32 +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.bc32 diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.beos b/Build/source/libs/libpng/libpng-src/scripts/makefile.beos index 01346f190a5..01346f190a5 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.beos +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.beos diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.bor b/Build/source/libs/libpng/libpng-src/scripts/makefile.bor index 6693772dbe6..6693772dbe6 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.bor +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.bor diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.cegcc b/Build/source/libs/libpng/libpng-src/scripts/makefile.cegcc index 98ec5b4f9b8..45eea776b8f 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.cegcc +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.cegcc @@ -23,7 +23,7 @@ VERMAJ = 1 VERMIN = 6 -VERMIC = 18 +VERMIC = 20 VER = $(VERMAJ).$(VERMIN).$(VERMIC) NAME = libpng PACKAGE = $(NAME)-$(VER) diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.darwin b/Build/source/libs/libpng/libpng-src/scripts/makefile.darwin index be3f92c54b4..be3f92c54b4 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.darwin +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.darwin diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.dec b/Build/source/libs/libpng/libpng-src/scripts/makefile.dec index 8566a0297b5..8566a0297b5 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.dec +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.dec diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.dj2 b/Build/source/libs/libpng/libpng-src/scripts/makefile.dj2 index e59c432b44b..e59c432b44b 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.dj2 +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.dj2 diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.freebsd b/Build/source/libs/libpng/libpng-src/scripts/makefile.freebsd index cad1a5aa873..cad1a5aa873 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.freebsd +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.freebsd diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.gcc b/Build/source/libs/libpng/libpng-src/scripts/makefile.gcc index ba92d150931..ba92d150931 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.gcc +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.gcc diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.hp64 b/Build/source/libs/libpng/libpng-src/scripts/makefile.hp64 index 5948be8ecf2..5948be8ecf2 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.hp64 +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.hp64 diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.hpgcc b/Build/source/libs/libpng/libpng-src/scripts/makefile.hpgcc index 5c8791b1337..5c8791b1337 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.hpgcc +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.hpgcc diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.hpux b/Build/source/libs/libpng/libpng-src/scripts/makefile.hpux index b07612dc7de..b07612dc7de 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.hpux +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.hpux diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.ibmc b/Build/source/libs/libpng/libpng-src/scripts/makefile.ibmc index 89b11966b0d..89b11966b0d 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.ibmc +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.ibmc diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.intel b/Build/source/libs/libpng/libpng-src/scripts/makefile.intel index 418726159d3..418726159d3 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.intel +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.intel diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.knr b/Build/source/libs/libpng/libpng-src/scripts/makefile.knr index d8de064c4df..d8de064c4df 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.knr +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.knr diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.linux b/Build/source/libs/libpng/libpng-src/scripts/makefile.linux index 20193af69e0..27dda8517c5 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.linux +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.linux @@ -10,7 +10,7 @@ # Library name: LIBNAME = libpng16 PNGMAJ = 16 -RELEASE = 18 +RELEASE = 20 # Shared library names: LIBSO=$(LIBNAME).so diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.mips b/Build/source/libs/libpng/libpng-src/scripts/makefile.mips index 5633608c8b8..5633608c8b8 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.mips +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.mips diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.msc b/Build/source/libs/libpng/libpng-src/scripts/makefile.msc index 539d62e94ee..539d62e94ee 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.msc +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.msc diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.msys b/Build/source/libs/libpng/libpng-src/scripts/makefile.msys index c16ec4039a5..fea7427fe66 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.msys +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.msys @@ -18,7 +18,7 @@ exec_prefix=$(prefix) # Library name: LIBNAME = libpng16 PNGMAJ = 16 -RELEASE = 18 +RELEASE = 20 # Shared library names: LIBSO=$(LIBNAME).dll diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.ne12bsd b/Build/source/libs/libpng/libpng-src/scripts/makefile.ne12bsd index cfcfcd3f2de..58f4bda701c 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.ne12bsd +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.ne12bsd @@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng16 LIB= png16 SHLIB_MAJOR= 0 -SHLIB_MINOR= 1.6.18 +SHLIB_MINOR= 1.6.20 SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ pngwtran.c pngmem.c pngerror.c pngpread.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.netbsd b/Build/source/libs/libpng/libpng-src/scripts/makefile.netbsd index 079f708f105..407290e591e 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.netbsd +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.netbsd @@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include LIB= png SHLIB_MAJOR= 16 -SHLIB_MINOR= 1.6.18 +SHLIB_MINOR= 1.6.20 SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ pngwtran.c pngmem.c pngerror.c pngpread.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.openbsd b/Build/source/libs/libpng/libpng-src/scripts/makefile.openbsd index 360efd1051f..ef5be815488 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.openbsd +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.openbsd @@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib MANDIR= ${PREFIX}/man/cat SHLIB_MAJOR= 16 -SHLIB_MINOR= 1.6.18 +SHLIB_MINOR= 1.6.20 LIB= png SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \ diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.sco b/Build/source/libs/libpng/libpng-src/scripts/makefile.sco index b9c7c402ba4..b9c7c402ba4 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.sco +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.sco diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.sggcc b/Build/source/libs/libpng/libpng-src/scripts/makefile.sggcc index a0d051dbda8..a0d051dbda8 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.sggcc +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.sggcc diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.sgi b/Build/source/libs/libpng/libpng-src/scripts/makefile.sgi index 7df09022208..7df09022208 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.sgi +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.sgi diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.so9 b/Build/source/libs/libpng/libpng-src/scripts/makefile.so9 index ba9308c8a0e..ba9308c8a0e 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.so9 +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.so9 diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.solaris b/Build/source/libs/libpng/libpng-src/scripts/makefile.solaris index 8a450d37157..8a450d37157 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.solaris +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.solaris diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.solaris-x86 b/Build/source/libs/libpng/libpng-src/scripts/makefile.solaris-x86 index b6d24375d4d..b6d24375d4d 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.solaris-x86 +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.solaris-x86 diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.std b/Build/source/libs/libpng/libpng-src/scripts/makefile.std index ee6a8683545..ee6a8683545 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.std +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.std diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.sunos b/Build/source/libs/libpng/libpng-src/scripts/makefile.sunos index efe308c4781..efe308c4781 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.sunos +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.sunos diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.tc3 b/Build/source/libs/libpng/libpng-src/scripts/makefile.tc3 index 1d015026cbc..1d015026cbc 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.tc3 +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.tc3 diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.vcwin32 b/Build/source/libs/libpng/libpng-src/scripts/makefile.vcwin32 index 2bd143cc0ae..2bd143cc0ae 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makefile.vcwin32 +++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.vcwin32 diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/makevms.com b/Build/source/libs/libpng/libpng-src/scripts/makevms.com index f6c326103c2..f6c326103c2 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/makevms.com +++ b/Build/source/libs/libpng/libpng-src/scripts/makevms.com diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/options.awk b/Build/source/libs/libpng/libpng-src/scripts/options.awk index 81b82ff09c5..81b82ff09c5 100755..100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/options.awk +++ b/Build/source/libs/libpng/libpng-src/scripts/options.awk diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/pnglibconf.dfa b/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.dfa index 07293ae64ca..b2b7b430950 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/pnglibconf.dfa +++ b/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.dfa @@ -515,9 +515,7 @@ option WRITE_USER_TRANSFORM requires WRITE_TRANSFORMS option WRITE_INTERLACING requires WRITE -# The following depends, internally, on WEIGHT_SHIFT and COST_SHIFT -# where are set below. - +# Deprecated, will be removed. option WRITE_WEIGHTED_FILTER requires WRITE option WRITE_FLUSH requires WRITE @@ -668,11 +666,6 @@ setting MAX_GAMMA_8 default 11 setting GAMMA_THRESHOLD_FIXED default 5000 -# Scaling factor for filter heuristic weighting calculations - -setting WEIGHT_SHIFT default 8 -setting COST_SHIFT default 3 - # Precision to use when converting a floating point value to a PNG # extension format string in an sCAL chunk (only relevant if the # floating point API is enabled) diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/pnglibconf.h.prebuilt b/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt index 2719f0098d1..adf4238ff78 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/pnglibconf.h.prebuilt +++ b/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt @@ -1,10 +1,10 @@ -/* libpng 1.6.18 STANDARD API DEFINITION */ +/* libpng 1.6.20 STANDARD API DEFINITION */ /* pnglibconf.h - library build configuration */ -/* Libpng version 1.6.18 - July 23, 2015 */ +/* Libpng version 1.6.20 - December 3, 2015 */ -/* Copyright (c) 1998-2014 Glenn Randers-Pehrson */ +/* Copyright (c) 1998-2015 Glenn Randers-Pehrson */ /* This code is released under the libpng license. */ /* For conditions of distribution and use, see the disclaimer */ @@ -185,7 +185,6 @@ /* end of options */ /* settings */ #define PNG_API_RULE 0 -#define PNG_COST_SHIFT 3 #define PNG_DEFAULT_READ_MACROS 1 #define PNG_GAMMA_THRESHOLD_FIXED 5000 #define PNG_IDAT_READ_SIZE PNG_ZBUF_SIZE @@ -204,7 +203,6 @@ #define PNG_USER_CHUNK_MALLOC_MAX 8000000 #define PNG_USER_HEIGHT_MAX 1000000 #define PNG_USER_WIDTH_MAX 1000000 -#define PNG_WEIGHT_SHIFT 8 #define PNG_ZBUF_SIZE 8192 #define PNG_ZLIB_VERNUM 0 /* unknown */ #define PNG_Z_DEFAULT_COMPRESSION (-1) diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/pnglibconf.mak b/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.mak index c125ca2c977..c125ca2c977 100755..100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/pnglibconf.mak +++ b/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.mak diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/pngwin.rc b/Build/source/libs/libpng/libpng-src/scripts/pngwin.rc index 9335cbbe03b..9335cbbe03b 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/pngwin.rc +++ b/Build/source/libs/libpng/libpng-src/scripts/pngwin.rc diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/prefix.c b/Build/source/libs/libpng/libpng-src/scripts/prefix.c index 8b604a09195..8b604a09195 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/prefix.c +++ b/Build/source/libs/libpng/libpng-src/scripts/prefix.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/smakefile.ppc b/Build/source/libs/libpng/libpng-src/scripts/smakefile.ppc index 2e7380b1f98..2e7380b1f98 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/smakefile.ppc +++ b/Build/source/libs/libpng/libpng-src/scripts/smakefile.ppc diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/sym.c b/Build/source/libs/libpng/libpng-src/scripts/sym.c index ea9e4c50705..ea9e4c50705 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/sym.c +++ b/Build/source/libs/libpng/libpng-src/scripts/sym.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/symbols.c b/Build/source/libs/libpng/libpng-src/scripts/symbols.c index 28b841d8b6e..28b841d8b6e 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/symbols.c +++ b/Build/source/libs/libpng/libpng-src/scripts/symbols.c diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/symbols.def b/Build/source/libs/libpng/libpng-src/scripts/symbols.def index 2ec46051424..a4b806b3c88 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/symbols.def +++ b/Build/source/libs/libpng/libpng-src/scripts/symbols.def @@ -1,4 +1,4 @@ -;Version 1.6.18 +;Version 1.6.20 ;-------------------------------------------------------------- ; LIBPNG symbol list as a Win32 DEF file ; Contains all the symbols that can be exported from libpng diff --git a/Build/source/libs/libpng/libpng-1.6.18/scripts/vers.c b/Build/source/libs/libpng/libpng-src/scripts/vers.c index de7319716f3..de7319716f3 100644 --- a/Build/source/libs/libpng/libpng-1.6.18/scripts/vers.c +++ b/Build/source/libs/libpng/libpng-src/scripts/vers.c diff --git a/Build/source/libs/libpng/libpng-src/tests/pngimage-full b/Build/source/libs/libpng/libpng-src/tests/pngimage-full new file mode 100644 index 00000000000..1198ed05c08 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngimage-full @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngimage --exhaustive --list-combos --log "${srcdir}/contrib/pngsuite/"*.png diff --git a/Build/source/libs/libpng/libpng-src/tests/pngimage-quick b/Build/source/libs/libpng/libpng-src/tests/pngimage-quick new file mode 100644 index 00000000000..328dc27b5d5 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngimage-quick @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngimage --list-combos --log "${srcdir}/contrib/pngsuite/"*.png diff --git a/Build/source/libs/libpng/libpng-src/tests/pngstest b/Build/source/libs/libpng/libpng-src/tests/pngstest new file mode 100644 index 00000000000..255ed098f17 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngstest @@ -0,0 +1,52 @@ +#!/bin/sh +# +# Usage: +# +# tests/pngstest gamma alpha +# +# Run ./pngstest on the PNG files in $srcdir/contrib/testpngs which have the +# given gamma and opacity: +# +# gamma: one of; linear, 1.8, sRGB, none. +# alpha: one of; opaque, tRNS, alpha, none. 'none' is equivalent to !alpha +# +# NOTE: the temporary files pngstest generates have the base name gamma-alpha to +# avoid issues with make -j +# +gamma="$1" +shift +alpha="$1" +shift +exec ./pngstest --tmpfile "${gamma}-${alpha}-" --log ${1+"$@"} $( + for f in "${srcdir}/contrib/testpngs/"*.png + do + g= + case "$f" in + *-linear[.-]*) + test "$gamma" = "linear" && g="$f";; + + *-sRGB[.-]*) + test "$gamma" = "sRGB" && g="$f";; + + *-1.8[.-]*) + test "$gamma" = "1.8" && g="$f";; + + *) + test "$gamma" = "none" && g="$f";; + esac + + case "$g" in + "") + :;; + + *-alpha[-.]*) + test "$alpha" = "alpha" && echo "$g";; + + *-tRNS[-.]*) + test "$alpha" = "tRNS" -o "$alpha" = "none" && echo "$g";; + + *) + test "$alpha" = "opaque" -o "$alpha" = "none" && echo "$g";; + esac + done +) diff --git a/Build/source/libs/libpng/libpng-src/tests/pngstest-1.8 b/Build/source/libs/libpng/libpng-src/tests/pngstest-1.8 new file mode 100644 index 00000000000..b2ec21bf64b --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngstest-1.8 @@ -0,0 +1,2 @@ +#!/bin/sh +exec "${srcdir}/tests/pngstest" 1.8 none diff --git a/Build/source/libs/libpng/libpng-src/tests/pngstest-1.8-alpha b/Build/source/libs/libpng/libpng-src/tests/pngstest-1.8-alpha new file mode 100644 index 00000000000..d00596d5582 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngstest-1.8-alpha @@ -0,0 +1,2 @@ +#!/bin/sh +exec "${srcdir}/tests/pngstest" 1.8 alpha diff --git a/Build/source/libs/libpng/libpng-src/tests/pngstest-linear b/Build/source/libs/libpng/libpng-src/tests/pngstest-linear new file mode 100644 index 00000000000..4a5b3fe8c31 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngstest-linear @@ -0,0 +1,2 @@ +#!/bin/sh +exec "${srcdir}/tests/pngstest" linear none diff --git a/Build/source/libs/libpng/libpng-src/tests/pngstest-linear-alpha b/Build/source/libs/libpng/libpng-src/tests/pngstest-linear-alpha new file mode 100644 index 00000000000..4114210363d --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngstest-linear-alpha @@ -0,0 +1,2 @@ +#!/bin/sh +exec "${srcdir}/tests/pngstest" linear alpha diff --git a/Build/source/libs/libpng/libpng-src/tests/pngstest-none b/Build/source/libs/libpng/libpng-src/tests/pngstest-none new file mode 100644 index 00000000000..09ad740b582 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngstest-none @@ -0,0 +1,2 @@ +#!/bin/sh +exec "${srcdir}/tests/pngstest" none none diff --git a/Build/source/libs/libpng/libpng-src/tests/pngstest-none-alpha b/Build/source/libs/libpng/libpng-src/tests/pngstest-none-alpha new file mode 100644 index 00000000000..af6083ff839 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngstest-none-alpha @@ -0,0 +1,2 @@ +#!/bin/sh +exec "${srcdir}/tests/pngstest" none alpha diff --git a/Build/source/libs/libpng/libpng-src/tests/pngstest-sRGB b/Build/source/libs/libpng/libpng-src/tests/pngstest-sRGB new file mode 100644 index 00000000000..d8460812c2b --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngstest-sRGB @@ -0,0 +1,2 @@ +#!/bin/sh +exec "${srcdir}/tests/pngstest" sRGB none diff --git a/Build/source/libs/libpng/libpng-src/tests/pngstest-sRGB-alpha b/Build/source/libs/libpng/libpng-src/tests/pngstest-sRGB-alpha new file mode 100644 index 00000000000..f1e57d339cc --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngstest-sRGB-alpha @@ -0,0 +1,2 @@ +#!/bin/sh +exec "${srcdir}/tests/pngstest" sRGB alpha diff --git a/Build/source/libs/libpng/libpng-1.6.18/tests/pngtest b/Build/source/libs/libpng/libpng-src/tests/pngtest index 813973b23ed..813973b23ed 100755..100644 --- a/Build/source/libs/libpng/libpng-1.6.18/tests/pngtest +++ b/Build/source/libs/libpng/libpng-src/tests/pngtest diff --git a/Build/source/libs/libpng/libpng-src/tests/pngunknown-IDAT b/Build/source/libs/libpng/libpng-src/tests/pngunknown-IDAT new file mode 100644 index 00000000000..8e7281aa84a --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngunknown-IDAT @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngunknown --strict default=discard IDAT=save "${srcdir}/pngtest.png" diff --git a/Build/source/libs/libpng/libpng-src/tests/pngunknown-discard b/Build/source/libs/libpng/libpng-src/tests/pngunknown-discard new file mode 100644 index 00000000000..c96dab370c3 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngunknown-discard @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngunknown --strict default=discard "${srcdir}/pngtest.png" diff --git a/Build/source/libs/libpng/libpng-src/tests/pngunknown-if-safe b/Build/source/libs/libpng/libpng-src/tests/pngunknown-if-safe new file mode 100644 index 00000000000..31a4954fbb4 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngunknown-if-safe @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngunknown --strict default=if-safe "${srcdir}/pngtest.png" diff --git a/Build/source/libs/libpng/libpng-src/tests/pngunknown-sAPI b/Build/source/libs/libpng/libpng-src/tests/pngunknown-sAPI new file mode 100644 index 00000000000..4317b1847d0 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngunknown-sAPI @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngunknown --strict bKGD=save cHRM=save gAMA=save all=discard iCCP=save sBIT=save sRGB=save "${srcdir}/pngtest.png" diff --git a/Build/source/libs/libpng/libpng-src/tests/pngunknown-sTER b/Build/source/libs/libpng/libpng-src/tests/pngunknown-sTER new file mode 100644 index 00000000000..59c5ecd54fe --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngunknown-sTER @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngunknown --strict sTER=if-safe "${srcdir}/pngtest.png" diff --git a/Build/source/libs/libpng/libpng-src/tests/pngunknown-save b/Build/source/libs/libpng/libpng-src/tests/pngunknown-save new file mode 100644 index 00000000000..21412c42a65 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngunknown-save @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngunknown --strict default=save "${srcdir}/pngtest.png" diff --git a/Build/source/libs/libpng/libpng-src/tests/pngunknown-vpAg b/Build/source/libs/libpng/libpng-src/tests/pngunknown-vpAg new file mode 100644 index 00000000000..04f07b69a32 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngunknown-vpAg @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngunknown --strict vpAg=if-safe "${srcdir}/pngtest.png" diff --git a/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-16-to-8 b/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-16-to-8 new file mode 100644 index 00000000000..074945d3103 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-16-to-8 @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngvalid --strict --gamma-16-to-8 diff --git a/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-alpha-mode b/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-alpha-mode new file mode 100644 index 00000000000..b16e8abc4e3 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-alpha-mode @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngvalid --strict --gamma-alpha-mode diff --git a/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-background b/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-background new file mode 100644 index 00000000000..3dbf58d8a05 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-background @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngvalid --strict --gamma-background diff --git a/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-expand16-alpha-mode b/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-expand16-alpha-mode new file mode 100644 index 00000000000..4fa10bde27e --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-expand16-alpha-mode @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngvalid --strict --gamma-alpha-mode --expand16 diff --git a/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-expand16-background b/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-expand16-background new file mode 100644 index 00000000000..ad9a91762ba --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-expand16-background @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngvalid --strict --gamma-background --expand16 diff --git a/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-expand16-transform b/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-expand16-transform new file mode 100644 index 00000000000..5fd1f280baf --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-expand16-transform @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngvalid --strict --gamma-transform --expand16 diff --git a/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-sbit b/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-sbit new file mode 100644 index 00000000000..6ca08e9e348 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-sbit @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngvalid --strict --gamma-sbit diff --git a/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-threshold b/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-threshold new file mode 100644 index 00000000000..3fe4edf77a9 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-threshold @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngvalid --strict --gamma-threshold diff --git a/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-transform b/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-transform new file mode 100644 index 00000000000..3fa62c688ac --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngvalid-gamma-transform @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngvalid --strict --gamma-transform diff --git a/Build/source/libs/libpng/libpng-src/tests/pngvalid-progressive-interlace-standard b/Build/source/libs/libpng/libpng-src/tests/pngvalid-progressive-interlace-standard new file mode 100644 index 00000000000..a8cdf9e1a38 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngvalid-progressive-interlace-standard @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngvalid --strict --standard --progressive-read --interlace diff --git a/Build/source/libs/libpng/libpng-src/tests/pngvalid-progressive-size b/Build/source/libs/libpng/libpng-src/tests/pngvalid-progressive-size new file mode 100644 index 00000000000..868d6dcc324 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngvalid-progressive-size @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngvalid --strict --size --progressive-read diff --git a/Build/source/libs/libpng/libpng-src/tests/pngvalid-progressive-standard b/Build/source/libs/libpng/libpng-src/tests/pngvalid-progressive-standard new file mode 100644 index 00000000000..bf7e5c1c2c0 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngvalid-progressive-standard @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngvalid --strict --standard --progressive-read diff --git a/Build/source/libs/libpng/libpng-src/tests/pngvalid-standard b/Build/source/libs/libpng/libpng-src/tests/pngvalid-standard new file mode 100644 index 00000000000..a89b884245d --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngvalid-standard @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngvalid --strict --standard diff --git a/Build/source/libs/libpng/libpng-src/tests/pngvalid-transform b/Build/source/libs/libpng/libpng-src/tests/pngvalid-transform new file mode 100644 index 00000000000..c7536aeb897 --- /dev/null +++ b/Build/source/libs/libpng/libpng-src/tests/pngvalid-transform @@ -0,0 +1,2 @@ +#!/bin/sh +exec ./pngvalid --strict --transform diff --git a/Build/source/libs/libpng/version.ac b/Build/source/libs/libpng/version.ac index c0c8326516d..11b029e294e 100644 --- a/Build/source/libs/libpng/version.ac +++ b/Build/source/libs/libpng/version.ac @@ -8,4 +8,4 @@ dnl dnl -------------------------------------------------------- dnl dnl m4-include this file to define the current libpng version -m4_define([libpng_version], [1.6.18]) +m4_define([libpng_version], [1.6.20]) |