diff --git a/ANNOUNCE b/ANNOUNCE index 29a66182f..0bc74e7c5 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.6.0alpha01 - November 28, 2011 +Libpng 1.6.0alpha01 - November 29, 2011 This is not intended to be a public release. It will be replaced within a few weeks by a public version or by another test version. @@ -107,7 +107,7 @@ Version 1.5.7beta05 [(PENDING RELEASE)] Added MINGW support to CMakeLists.txt Reject invalid compression flag or method when reading the iTXt chunk. -Version 1.6.0alpha01 [November 28, 2011] +Version 1.6.0alpha01 [November 29, 2011] Removed machine-generated configure files from the GIT repository (they will continue to appear in the tarball distributions). Restored the new 'simplified' API, which was deleted from libpng-1.5.7. @@ -130,7 +130,7 @@ Version 1.6.0alpha01 [November 28, 2011] image that has a sufficiently large row size (rather than simply failing to read such images). Replaced an "#if" with "ifdef" in pngrtran.c - Revised #if PNG_DO_BC blocks in png.c (use #ifdef and add #else) + New tools directory containing tools used to generate libpng code. Send comments/corrections/commendations to png-mng-implement at lists.sf.net: (subscription required; visit diff --git a/CHANGES b/CHANGES index 1327a9017..ffd07f69e 100644 --- a/CHANGES +++ b/CHANGES @@ -3752,7 +3752,7 @@ Version 1.5.7beta05 [(PENDING RELEASE)] Added MINGW support to CMakeLists.txt Reject invalid compression flag or method when reading the iTXt chunk. -Version 1.6.0alpha01 [November 28, 2011] +Version 1.6.0alpha01 [November 29, 2011] Removed machine-generated configure files from the GIT repository (they will continue to appear in the tarball distributions). Restored the new 'simplified' API, which was deleted from libpng-1.5.7. @@ -3775,7 +3775,7 @@ Version 1.6.0alpha01 [November 28, 2011] image that has a sufficiently large row size (rather than simply failing to read such images). Replaced an "#if" with "ifdef" in pngrtran.c - Revised #if PNG_DO_BC blocks in png.c (use #ifdef and add #else) + New tools directory containing tools used to generate libpng code. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/contrib/libtests/pngstest.c b/contrib/libtests/pngstest.c index 0b5a6bf70..bfc5d99cb 100644 --- a/contrib/libtests/pngstest.c +++ b/contrib/libtests/pngstest.c @@ -28,7 +28,7 @@ #include "../../png.h" -#include "../sRGBtables/sRGB.h" +#include "../tools/sRGB.h" /* The following is to support direct compilation of this file as C++ */ #ifdef __cplusplus diff --git a/contrib/tools/README.txt b/contrib/tools/README.txt new file mode 100644 index 000000000..25c68352c --- /dev/null +++ b/contrib/tools/README.txt @@ -0,0 +1,26 @@ +This directory (contrib/tools) contains tools used by the authors of libpng. + +Code and data placed in this directory is not required to build libpng, +however the code in this directory has been used to generate data or code in +the body of the libpng source. The source code idenftifies where this has +been done. Code in this directory may not compile on all operating systems +that libpng supports. + +NO COPYRIGHT RIGHTS ARE CLAIMED TO ANY OF THE FILES IN THIS DIRECTORY. + +To the extent possible under law, the authors have waived all copyright and +related or neighboring rights to this work. This work is published from: +United States. + +The files may be used freely in any way. + +The source code and comments in this directory are the original work of the +people named below. No other person or organization has made contributions to +the work in this directory. + +ORIGINAL AUTHORS + The following people have contributed to the code in this directory. None + of the people below claim any rights with regard to the contents of this + directory. + + John Bowler diff --git a/contrib/sRGBtables/cvtcolor.c b/contrib/tools/cvtcolor.c similarity index 92% rename from contrib/sRGBtables/cvtcolor.c rename to contrib/tools/cvtcolor.c index a7a2e3d7d..b657af4db 100644 --- a/contrib/sRGBtables/cvtcolor.c +++ b/contrib/tools/cvtcolor.c @@ -1,14 +1,14 @@ /*- * convert.c * + * Last changed in libpng 1.6.0 [(PENDING RELEASE)] + * + * COPYRIGHT: Written by John Cunningham Bowler, 2011. + * 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. + * * Convert 8-bit sRGB or 16-bit linear values to another format. - * - * Last changed in libpng 1.5.7 [(PENDING RELEASE)] - * Copyright (c) 2011 Written by John Cunningham Bowler - * - * This code is released under the libpng license. - * For conditions of distribution and use, see the disclaimer - * and license in png.h */ #define _ISOC99_SOURCE 1 diff --git a/contrib/tools/intgamma.sh b/contrib/tools/intgamma.sh new file mode 100644 index 000000000..d2e8ac731 --- /dev/null +++ b/contrib/tools/intgamma.sh @@ -0,0 +1,110 @@ +#!/bin/sh +# +# intgamma.sh +# +# Last changed in libpng 1.6.0 [(PENDING RELEASE)] +# +# COPYRIGHT: Written by John Cunningham Bowler, 2011. +# 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. +# +# Shell script to generate png.c 8 and 16 bit log tables (see the code in png.c +# for details). +# +# This script uses the "bc" arbitrary precision calculator to calculate 32 bit +# fixed point values of logarithms appropriate to finding the log of an 8-bit +# (0..255) value and a similar table for the exponent calculation. +# +# "bc" must be on the path when the script is executed, the math library (-l) +# must be available +# +# function to print out a list of numbers as integers; the function truncates +# the integers which must be one-per-line +function print(){ + awk 'BEGIN{ + str = "" + } + { + sub("\\.[0-9]*$", "") + if ($0 == "") + $0 = "0" + + if (str == "") + t = " " $0 "U" + else + t = str ", " $0 "U" + + if (length(t) >= 80) { + print str "," + str = " " $0 "U" + } else + str = t + } + END{ + print str + }' +} +# +# The logarithm table. +cat <= 2^32) x = 2^32-1; + x; +} +END +echo '};' +echo +# +# And the table of adjustment values. +cat <=0;--i){ + (1 - e(-(2^i)/65536*l(2))) * 2^(32-i) +} +END +echo '#endif' diff --git a/contrib/sRGBtables/makesRGB.c b/contrib/tools/makesRGB.c similarity index 97% rename from contrib/sRGBtables/makesRGB.c rename to contrib/tools/makesRGB.c index 9f75b68bf..f15c06e54 100644 --- a/contrib/sRGBtables/makesRGB.c +++ b/contrib/tools/makesRGB.c @@ -1,11 +1,11 @@ /* makesRGB.c -- build sRGB-to-linear and linear-to-sRGB conversion tables * - * Last changed in libpng 1.5.7 [(PENDING RELEASE)] - * Copyright (c) 2011 John Cunningham Bowler + * Last changed in libpng 1.6.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 + * COPYRIGHT: Written by John Cunningham Bowler, 2011. + * 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. * * Make a table to convert 8-bit sRGB encoding values into the closest 16-bit * linear value. diff --git a/contrib/sRGBtables/sRGB.h b/contrib/tools/sRGB.h similarity index 77% rename from contrib/sRGBtables/sRGB.h rename to contrib/tools/sRGB.h index ce28953eb..77c8105b5 100644 --- a/contrib/sRGBtables/sRGB.h +++ b/contrib/tools/sRGB.h @@ -1,12 +1,12 @@ /*- * sRGB.h * - * Last changed in libpng 1.5.7 [(PENDING RELEASE)] - * Copyright (c) 2011 John Cunningham Bowler + * Last changed in libpng 1.6.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 + * COPYRIGHT: Written by John Cunningham Bowler, 2011. + * 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. * * Utility file; not actually a header, this contains definitions of sRGB * calculation functions for inclusion in those test programs that need them.