Commit Graph

1171 Commits

Author SHA1 Message Date
Glenn Randers-Pehrson
b57c1c9e6e [libpng16] Bump version to 1.6.0beta17 2012-03-05 21:35:40 -06:00
John Bowler
6225b0e61e [libpng16] Added code to validate the windowBits value passed to deflateInit2().
If the call to deflateInit2() is wrong a png_warning will be issued
(in fact this is harmless, but the PNG data produced may be sub-optimal).
2012-03-05 21:26:57 -06:00
John Bowler
7d4fbb2fbb [libpng16] Validate the zTXt strings in pngvalid. 2012-03-05 21:02:49 -06:00
John Bowler
42a2b556e9 [libpng16] Made read 'inflate' handling like write 'deflate' handling. The
read code now claims and releases png_ptr->zstream, like the write code.
The bug whereby the progressive reader failed to release the zstream
is now fixed, all initialization is delayed, and the code checks for
changed parameters on deflate rather than always calling
deflatedEnd/deflateInit.
2012-03-05 20:57:40 -06:00
John Bowler
e741cd592e [libpng16] Added contrib/libtests/tarith.c to test internal arithmetic
functions from png.c. This is a libpng maintainer program used to validate
changes to the internal arithmetic functions.
2012-03-04 20:48:57 -06:00
John Bowler
0ae4f7b705 [libpng16] Changed png_inflate() and calling routines to avoid overflow
problems.  This is an intermediate check-in that solves the immediate problems
and introduces one performance improvement (avoiding a copy via png_ptr->zbuf.)
Further changes will be made to make ICC profile handling more secure.
2012-03-03 21:10:26 -06:00
John Bowler
29a6ba01a7 [libpng16] Fixed build warnings (MSVC, GCC, GCC v3). Cygwin GCC with default
options declares 'index' as a global, causing a warning if it is used as a
local variable.  GCC 64-bit warns about assigning a (size_t) (unsigned 64-bit)
to an (int) (signed 32-bit).  MSVC, however, warns about using the
unary '-' operator on an unsigned value (even though it is well defined
by ANSI-C to be ~x+1).  The padding calculation was changed to use a
different method.  Removed the tests on png_ptr->pass.
2012-03-03 20:49:03 -06:00
Glenn Randers-Pehrson
eeb1bb678d [libng16] Added palette-index checking while writing.
Relocated palette-index checking function from pngrutil.c to pngtrans.c
2012-03-02 22:10:15 -06:00
Glenn Randers-Pehrson
8e92cd51c6 [libpng16] Bump version to 1.6.0beta16 2012-03-02 14:04:36 -06:00
Glenn Randers-Pehrson
363387c9c0 [libpng16] Imported from libpng-1.6.0beta15.tar 2012-03-02 13:45:00 -06:00
John Bowler
6f237b6bf0 [libpng16] Remove whitespace at end of lines 2012-03-02 13:20:52 -06:00
John Bowler
cf49919686 [libpng16] Fixed some bugs in ICC profile writing. The code should now accept
all potentially valid ICC profiles and reject obviously invalid ones.
It now uses png_error() to do so rather than casually writing a PNG
without the necessary color data.
2012-03-01 21:54:07 -06:00
Glenn Randers-Pehrson
363ae65e2b [libpng16] Added tests for invalid palette index while reading and writing
(work in progress, the latter isn't finished).
2012-03-01 21:39:29 -06:00
John Bowler
cb129a6234 [libpng16] Improved pngstest fine tuning of error numbers, new test file
generator.  The generator generates images that test the full range of sample
values, allow the error numbers in pngstest to be tuned and checked.  makepng
also allows generation of images with extra chunks, although this is
still work-in-progress.
2012-03-01 21:26:54 -06:00
John Bowler
dee7577330 [libpng16] Added PNG_IMAGE_FLAG_FAST for the benefit of applications that
store intermediate files, or intermediate in-memory data, while processing
image data with the simplified API.  The option makes the files larger
but faster to write and read.  pngstest now uses this by default; this
can be disabled with the --slow option.
2012-03-01 18:55:54 -06:00
John Bowler
1c25b9b06b [libpng16] Fixed transparent pixel and 16-bit rgb tests in pngstest and removed
a spurious check in pngwrite.c
2012-02-29 10:49:28 -06:00
John Bowler
0a92b23c4b [libpng16] Rewrote pngstest.c for substantial speed improvement. 2012-02-29 06:47:55 -06:00
Glenn Randers-Pehrson
5408b613f8 [libpng16] Removed unused "current_text" members of png_struct
and the png_free() of png_ptr->current_text from pngread.c
2012-02-27 08:09:42 -06:00
Glenn Randers-Pehrson
b7e32059d3 [libpng16] Bump version to 1.6.0beta15 2012-02-26 21:38:19 -06:00
Glenn Randers-Pehrson
faf38eea03 [libpng16] Imported from libpng-1.6.0beta14.tar 2012-02-26 21:38:09 -06:00
Glenn Randers-Pehrson
9eb125e927 [libpng16] Updated Makefile.in
Added information about the new limits in the manual.
2012-02-24 22:04:53 -06:00
Glenn Randers-Pehrson
16bb03b8b4 [libpng16] Bump version to 1.6.0beta14 2012-02-24 11:52:56 -06:00
Glenn Randers-Pehrson
4690b89eaa [libpng16] Added PNG_SAFE_LIMITS feature to pnglibconf.dfa, pngpriv.h, and new pngusr.dfa
to reset the user limits to safe ones if PNG_SAFE_LIMITS is defined.
To enable, use CPPFLAGS=-DPNG_SAFE_LIMITS on the configure command
or put #define PNG_SAFE_LIMITS_SUPPORTED in pnglibconf.h.prebuilt.
(Reverted previous implementation of PNG_SECURE.)
2012-02-24 11:43:31 -06:00
Glenn Randers-Pehrson
10c0693210 [libpng16] Added PNG_SECURE feature to pnglibconf.dfa and new pngusr.dfa file
to reset the user limits to safe ones if PNG_SECURE is defined.
2012-02-23 18:41:13 -06:00
Glenn Randers-Pehrson
17ba5de88f [libpng16] Eliminated redundant png_push_read_tEXt|zTXt|iTXt|unknown code from
pngpread.c and use the sequential png_handle_tEXt, etc., in pngrutil.c;
    now that png_ptr->buffer is inaccessible to applications, the special
    handling is no longer useful.
2012-02-21 14:49:56 -06:00
Glenn Randers-Pehrson
7d5bf79d88 [libpng16] Bump version to 1.6.0beta13 2012-02-18 22:54:56 -06:00
Glenn Randers-Pehrson
a4badc4b50 [libpng16] Imported from libpng-1.6.0beta12.tar 2012-02-17 17:07:54 -06:00
Glenn Randers-Pehrson
b0606ea043 [libpng16] Increase num_palette to invalid_index + 1, not to invalid_index. 2012-02-16 20:48:28 -06:00
Glenn Randers-Pehrson
566fb611b6 [libpng16] Bump version to 1.6.0beta12 2012-02-16 20:24:39 -06:00
Glenn Randers-Pehrson
67dba43998 [libpng16] Check for invalid palette index while reading paletted PNG. When
one is found, issue a warning and increase png_ptr->num_palette accordingly.
Apps are responsible for checking to see if that happened.
2012-02-16 20:15:13 -06:00
John Bowler
bce7988230 [libpng16] Fixed fixed/float API export conditionals. 1) If FIXED_POINT or
FLOATING_POINT options were switched off, png.h ended up with lone ';'
    characters.  This is not valid ANSI-C outside a function.  The ';'
    characters have been moved inside the definition of PNG_FP_EXPORT and
    PNG_FIXED_EXPORT. 2) If either option was switched off, the declaration
    of the corresponding functions were completely omitted, even though some
    of them are still used internally.  The result is still valid, but
    produces warnings from gcc with some warning options (including -Wall). The
    fix is to cause png.h to declare the functions with PNG_INTERNAL_FUNCTION
    when png.h is included from pngpriv.h.
2012-02-13 11:45:22 -06:00
Glenn Randers-Pehrson
864270e18f [libpng16] Fixed a memory overwrite bug in simplified read of RGB PNG with
Fixed a memory overwrite bug in simplified read of RGB PNG with
non-linear gamma Also bugs in the error checking in pngread.c and changed
quite a lot of the checks in pngstest.c to be correct; either correctly
written or not over-optimistic.  The pngstest changes are insufficient to
allow all possible RGB transforms to be passed; pngstest cmppixel needs
to be rewritten to make it clearer which errors it allows and then changed
to permit known inaccuracies.
2012-02-10 17:13:13 -06:00
John Bowler
aa725a375c [libpng16] Corrected estimate of error in libpng png_set_rgb_to_gray API.
The API is extremely inaccurate for sRGB conversions because it uses an 8-bit
intermediate linear value and it does not use the sRGB transform, so it
suffers from the known instability in gamma transforms for values close
to 0 (see Poynton).  The net result is that the calculation has a maximum
error of 14.99/255; 0.5/255^(1/2.2).  pngstest now uses 15 for the
permitted 8-bit error. This may still not be enough because of arithmetic
error.
2012-02-04 15:11:16 -06:00
Glenn Randers-Pehrson
5578c3719e [libpng16] Updated documentation about the simplified API. 2012-02-04 10:31:38 -06:00
Glenn Randers-Pehrson
ce3c7330ba [libpng16] Revised test-pngstest.sh to report PASS/FAIL for each image. 2012-02-04 07:35:34 -06:00
John Bowler
c8348f80d5 [libpng16] Fix character count in pngstest command in
projects/owatcom/pngstest.tgt
2012-02-03 21:40:07 -06:00
Glenn Randers-Pehrson
3449169622 [libpng16] Bump version to 1.6.0beta11 2012-02-03 02:01:02 -06:00
Glenn Randers-Pehrson
ead660ae1e [libpng16] Imported from libpng-1.6.0beta10.tar 2012-02-03 01:56:26 -06:00
Glenn Randers-Pehrson
04afaab56a [libpng16] Bump version to 1.6.0beta10 2012-02-03 00:39:02 -06:00
Glenn Randers-Pehrson
781a90b358 [libpng16] Updated list of test images in CMakeLists.txt 2012-02-02 15:48:55 -06:00
John Bowler
61d7058b5b [libpng16] Added Z_SOLO for zlib-1.2.6+ and correct pngstest tests 2012-02-02 08:37:11 -06:00
Glenn Randers-Pehrson
db6850b389 [libpng16] Bump version to 1.6.0beta10 2012-02-01 15:41:43 -06:00
Glenn Randers-Pehrson
eda298bc01 [libpng] Note in CHANGES that Makefile.in and configure were reverted
to libpng-1.6.0beta05 versions.
2012-02-01 15:27:17 -06:00
Glenn Randers-Pehrson
0d4d0b4d32 [libpng16] Bump version to libpng-1.6.0beta09.tar 2012-01-31 22:58:08 -06:00
Glenn Randers-Pehrson
816ff328d2 [libpng16] Updated CHANGES and ANNOUNCE with new information about autogen.sh 2012-01-31 22:26:34 -06:00
John Bowler
3167541570 [libpng16] Fixed 'prefix' builds on clean systems. The generation of pngprefix.h
should not require itself.
2012-01-31 21:01:49 -06:00
John Bowler
42369ccd85 [libpng16] Added symbol prefixing that allows all the libpng external symbols
to be prefixed (suggested by Reuben Hawkins).  This is work in progress that
breaks some non-configure builds.
2012-01-31 07:28:13 -06:00
John Bowler
572b078d8c [libpng16] Cleaned up pngpriv.h to consistently declare all functions and data.
Also eliminated PNG_CONST_DATA, which is apparently not needed but we
can't be sure until it is gone.
2012-01-31 07:09:34 -06:00
John Bowler
40ca77a721 [libpng16] Improved pngstest speed by not doing redundant tests and add const
to the background parameter of png_image_finish_read. The --background
option is now done automagically only when required, so that commandline
option no longer exists.
2012-01-28 23:19:42 -06:00
John Bowler
05cbe5ae28 [libpng16] Moved automake options to AM_INIT_AUTOMAKE in configure.ac
Added color-tests, silent-rules (Not yet implemented in Makefile.am) and
version checking to configure.ac
2012-01-28 18:06:55 -06:00
Glenn Randers-Pehrson
5cdff4144e [libpng16] Divide pngstest into separate runs for basic and transparent images. 2012-01-28 01:07:34 -06:00
John Bowler
feecc898d9 [libpng16] Check libtool/libtoolize version number (2.4.2) in configure.ac 2012-01-28 00:48:08 -06:00
John Bowler
3a1d63dc69 [libpng16] Fixed Image::colormap misalignment in pngstest.c 2012-01-28 00:11:53 -06:00
Glenn Randers-Pehrson
573a51143a [libpng16] bump version to 1.6.0beta08 2012-01-27 22:37:58 -06:00
Glenn Randers-Pehrson
aaf1179ec1 [libpng16] Added two images to contrib/pngsuite (1-bit and 2-bit transparent
grayscale), and renamed three whose names were inconsistent with those in
pngsuite/README.txt.
2012-01-27 20:07:00 -06:00
John Bowler
a23f3dbcb6 [libpng16] Freeze libtool files in the 'scripts' directory.
This version of autogen.sh attempts to dissuade people from running it when
it is not, or should not, be necessary.
2012-01-27 10:24:21 -06:00
Glenn Randers-Pehrson
a12d2328b4 [libpng16] Set CMAKE_LIBRARY_OUTPUT_DIRECTORY to "lib" on all platforms
(C. Yapp).
2012-01-26 17:39:05 -06:00
Glenn Randers-Pehrson
95a8a665e4 [libpng16] Conditionalize the install rules for MINGW and CYGWIN
in CMakeLists.txt
2012-01-25 16:46:05 -06:00
John Bowler
da2194c0d5 [libpng16] Rewrote autogen.sh to run autoreconf
instead of running tools one-by-one.
2012-01-25 08:30:24 -06:00
John Bowler
1eb2c48458 [libpng16] Updated configure.ac from autoupdate: added --enable-werror option.
Also some layout regularization and removal of introduced tab characters
(replaced with 3-character indentation).  Obsolete macros identified by
autoupdate have been removed; the replacements are all in 2.59 so
the pre-req hasn't been changed.  --enable-werror checks for support
for -Werror (or the given argument) in the compiler.  This mimics the
gcc configure option by allowing -Werror to be turned on safely; without
the option the tests written in configure itself fail compilation because
they cause compiler warnings.
2012-01-25 08:07:29 -06:00
John Bowler
8fb6c6a9b3 [libpng16] Eliminated Intel icc/icl compiler warnings. The Intel (GCC derived)
compiler issues slightly different warnings from those issued by the
current vesions of GCC. This eliminates those warnings by
adding/removing casts and small code rewrites.
2012-01-25 07:47:44 -06:00
Glenn Randers-Pehrson
99c7ad2904 [libpng16] bump version to 1.6.0beta07 2012-01-24 08:06:01 -06:00
John Bowler
5635573cfc [libpng16] Fixed Min/GW uninstall to remove libpng.dll.a 2012-01-23 23:01:27 -06:00
John Bowler
5bc90389bf [libpng16] Added color-map support to simplified API.
This is an initial version for review; the documentation has not yet been
updated.
2012-01-23 22:43:22 -06:00
Glenn Randers-Pehrson
2312167d51 [libpng16] Increased warning buffer in pngerror.c from 128 to 192. 2012-01-23 22:34:15 -06:00
John Bowler
04336ba10f [libpng16] Add palette support to the simplified APIs. This commit
changes some of the macro definitions in png.h, app code may need
corresponding changes.
2012-01-16 07:48:36 -06:00
John Bowler
00c6a9a62c [libpng16] Fix bug in pngerror.c: some long warnings were being improperly
truncated (bug introduced in libpng-1.5.3beta05).
2012-01-14 19:44:43 -06:00
Glenn Randers-Pehrson
0501c1c570 [libpng16] Describe new simplified API in the manual pages
and cleaned up some indentation problems.
2012-01-11 14:00:52 -06:00
Glenn Randers-Pehrson
d9fc0622a1 [libpng16] bump version to 1.6.0beta05 2011-12-29 21:13:53 -06:00
Glenn Randers-Pehrson
6e4184249c [libpng16] Imported from libpng-1.6.0beta04.tar 2011-12-29 21:01:01 -06:00
Glenn Randers-Pehrson
04ab33560f [libpng16] Revised contrib/pngminus/pnm2png.c to avoid warnings
when png_uint_32 and unsigned long are of different sizes.
2011-12-29 10:24:50 -06:00
John Bowler
fcd301daed [libpng16] Changed png_memcpy to C assignment where appropriate. Changed all
those uses of png_memcpy that were doing a simple assignment to assignments
(all those cases where the thing being copied is a non-array C L-value.)
Added some error checking to png_set_*() routines and removed the
reference to the non-exported function png_memcpy() from example.c. Fixed
the Visual C 64-bit build - it requires jmp_buf to be aligned, but it had
become misaligned.
2011-12-28 21:34:27 -06:00
Gilles Espinasse
f87ef8bcb5 [ibpng16] Moved AC_MSG_CHECKING([if libraries can be versioned]) later
to the proper location in configure.ac (Gilles Espinasse).
2011-12-26 13:10:01 -06:00
John Bowler
5d56786eff [libpng16] Implemented 'restrict' for png_info and png_struct.
Added new "png_structrp" typedef. Because of the
way libpng works both png_info and png_struct are always accessed via a
single pointer.  This means adding C99 'restrict' to the pointer gives
the compiler some opportunity to optimize the code.  This change allows that.
2011-12-24 09:12:00 -06:00
Glenn Randers-Pehrson
939310bac1 [libpng16] Update CHANGES and ANNOUNCE 2011-12-24 08:27:41 -06:00
John Bowler
29fca0d497 [libpng16] Enabled png_get_sCAL_fixed() if floating point APIs are enabled.
Previously it was disabled whenever internal fixed point arithmetic was
selected, which meant it didn't exist even on systems where FP was available
but not preferred.
2011-12-24 07:57:43 -06:00
John Bowler
df477e4652 [libpng16] Eliminated png_info_destroy. It is now used only in png.c
and only calls one other internal function and memset.
2011-12-24 07:47:02 -06:00
Glenn Randers-Pehrson
67ee8cee39 [libpng16] bump version to 1.6.0beta04 2011-12-22 08:34:26 -06:00
Glenn Randers-Pehrson
28d9339777 [libpng16] Imported from libpng-1.6.0beta03.tar 2011-12-22 08:14:43 -06:00
John Bowler
d332c67da7 [libpng16] Start-up code size improvements, error handler flexibility.
These changes alter how the tricky allocation of the initial png_struct and
png_info structures are handled. png_info is now handled in pretty much the
same way as everything else, except that the allocations handle NULL return
silently.  png_struct is changed in a similar way on allocation and on
deallocation a 'safety' error handler is put in place (which should never
be required).  The error handler itself is changed to permit mismatches
in the application and libpng error buffer size; however, this means a
silent change to the API to return the jmp_buf if the size doesn't match
the size from the libpng compilation; libpng now allocates the memory and
this may fail.  Overall these changes result in slight code size
reductions; however, this is a reduction in code that is always executed
so is particularly valuable.  Overall on a 64-bit system the libpng DLL
decreases in code size by 1733 bytes.  pngerror.o increases in size by
about 465 bytes because of the new functionality.
2011-12-21 17:36:12 -06:00
Glenn Randers-Pehrson
b74fb4e49c [libpng15] Bump version to libpng-1.6.0beta03 2011-12-21 08:43:21 -06:00
Glenn Randers-Pehrson
a6f369b150 [libpng16] Imported from libpng-1.6.0beta02.tar 2011-12-21 08:29:30 -06:00
John Bowler
681c1fc02a [libpng16] Correct configure builds where build and source directories are
separate.  The include path of 'config.h' was erroneously made relative in
pngvalid.c in libpng 1.5.7.
2011-12-18 06:20:22 -06:00
John Bowler
ba6fbc57ba [libpng16] Revised config.h handling; added bsconfig.h, deleted pngconfig.h 2011-12-17 14:21:54 -06:00
Glenn Randers-Pehrson
0b3634bcc4 [libpng16] Reverted install of pngconfig.h 2011-12-17 09:57:00 -06:00
Glenn Randers-Pehrson
efaeadaa86 [libpng16] Added pngconfig.h file. This indirect reference to config.h avoids
problems with build scripts that search for config.h and find an
inappropriate one in the standard paths.
2011-12-17 09:06:34 -06:00
Glenn Randers-Pehrson
c4f94cbd08 [libpng15] Bump version to libpng-1.6.0beta02 2011-12-15 13:11:25 -06:00
Glenn Randers-Pehrson
26aad85204 [libpng16] Imported from libpng-1.6.0beta01.tar 2011-12-15 10:31:17 -06:00
John Bowler
c4081f05c8 [libpng16] Updated CMakeLists.txt to account for relocated and new test programs. 2011-12-08 09:53:00 -06:00
John Bowler
eb26ee6602 [libpng16] Fixed race conditions in parallel make builds. With higher degrees
of parallelism during 'make' the use of the same temporary file names such
as 'dfn*' can result in a race where a temporary file from one arm of the
build is deleted or overwritten in another arm.  This changes the
temporary files for suffix rules to always use $* and ensures that the
non-suffix rules use unique file names.
2011-12-08 09:37:24 -06:00
John Bowler
12924f33bd [libpng16] Fixed minor memset/sizeof errors in pngvalid.c. 2011-12-05 12:36:04 -06:00
Glenn Randers-Pehrson
ec6d6fa51b [libpng16] Put CRLF line endings in the owatcom project files. 2011-12-03 20:26:27 -06:00
Glenn Randers-Pehrson
1f0eaa046c [libpng16] Revised pngconf.h to use " __declspec(restrict)" if MSC_VER >= 1400. 2011-12-01 21:45:34 -06:00
John Bowler
405a398b3e [libpng16] New 'tools' directory containing tools used to generate libpng code. 2011-11-28 23:57:45 -06:00
Glenn Randers-Pehrson
8888ea4479 [libpng16] Revised #if PNG_DO_BC blocks in png.c (use #ifdef and add #else) 2011-11-28 11:29:10 -06:00
Glenn Randers-Pehrson
0b26ac5dee [libpng16] Replaced an "#if" with "ifdef" in pngrtran.c 2011-11-28 10:38:41 -06:00
Glenn Randers-Pehrson
b72bc15e22 [libpng16] Added entry in CHANGES and ANNOUNCE about removing configure files. 2011-11-26 21:17:55 -06:00
John Bowler
baeb6d1e92 [libpng16] Added ANSI-C (C90) headers; eliminated the use of FAR/far. 2011-11-26 18:21:02 -06:00
Glenn Randers-Pehrson
7455cbf47e [libpng16] Update internal version numbering and SO-numbers 2011-11-24 14:49:01 -06:00
Glenn Randers-Pehrson
87fadd5eee [libpng16] Updated version numbering in png.h 2011-11-24 14:35:13 -06:00
Glenn Randers-Pehrson
5b79cd52f4 [libpng16] Moved pngvalid.c into contrib/libtests
and rebuilt Makefile.in and configure, etc., with autoconf-2.68
2011-11-24 10:56:20 -06:00
John Bowler
36082cffcd [libpng16] Added example programs for the new 'simplified' API. 2011-11-24 08:22:24 -06:00
Glenn Randers-Pehrson
15ea1fa337 [libpng15] Bump version to libpng-1.6.0alpha01 2011-11-23 15:34:03 -06:00
Glenn Randers-Pehrson
12fb29f951 [libpng15] Reject invalid compression flag, method when reading the iTXt chunk. 2011-11-22 11:53:49 -06:00
Glenn Randers-Pehrson
e7ad104ac3 [libpng15] Reject invalid compression flag when reading the iTXt chunk. 2011-11-22 11:03:20 -06:00
Glenn Randers-Pehrson
8e83631361 [libpng15] Added MINGW support to CMakeLists.txt 2011-11-21 12:37:13 -06:00
John Bowler
3706d730d1 [libpng15] Allow row_stride==0 to indicate default stride in simplified API 2011-11-21 10:28:06 -06:00
Glenn Randers-Pehrson
29fca795b9 [libpng15] Validate time settings passed to pngset()
and png_convert_to_rfc1123(). (Frank Busse).
2011-11-19 15:08:04 -06:00
Glenn Randers-Pehrson
bd2fa5def6 [libpng15] Removed "zTXt" from warning in generic chunk decompression function.
Bug report by Franke Busse
2011-11-19 13:28:08 -06:00
Glenn Randers-Pehrson
36251d3f76 [libpng15] Bump version to libpng-1.5.7beta05 2011-11-17 21:39:58 -06:00
Glenn Randers-Pehrson
d92c1fcd55 [libpng15] Imported from libpng-1.5.7beta04.tar 2011-11-17 21:39:49 -06:00
Glenn Randers-Pehrson
7e97c182a8 [libpng15] Bump version to libpng-1.5.7beta04 2011-11-16 23:27:38 -06:00
John Bowler
17878c6e65 [libpng15] Work around compilers that don't support declaration of const data.
Some compilers fault 'extern const' data declarations (because the data is
not initialized); this turns on const-ness only for compilers where
this is known to work.
2011-11-16 22:37:46 -06:00
Glenn Randers-Pehrson
c4253c4683 [libpng15] Updated CHANGES and ANNOUNCE with latest changes 2011-11-16 22:23:30 -06:00
John Bowler
4fa96a42f7 [libpng15] Fixes for C++ compilation using g++ When libpng source is compiled
using g++. The compiler imposes C++ rules on the C source; thus it
    is desireable to make the source work with either C or C++ rules
    without throwing away useful error information.  This change adds
    png_voidcast to allow C semantic (void*) cases or the corresponding
    C++ static_cast operation, as appropriate.
2011-11-16 16:39:16 -06:00
John Bowler
18c5cfafeb [libpng15] Multiple transform bug fixes plus a work-round for double gamma
correction.
2011-11-16 14:26:34 -06:00
John Bowler
ed9f84475d [libpng15] Update pngstest to remove compiler warnings, add to libpng tests 2011-11-16 11:52:27 -06:00
John Bowler
1eb188932b [libpng15] Added contrib/pngtests 2011-11-16 11:40:59 -06:00
Glenn Randers-Pehrson
8596468e51 [libpng15] Removed PNG_CONST from the sRGB table declarations
in pngpriv.h and png.c
2011-11-16 08:52:36 -06:00
Glenn Randers-Pehrson
c32de8c64d [libpng15] Bump version to libpng-1.5.7beta03 2011-11-11 20:28:21 -06:00
John Bowler
0a521d3785 [libpng15] Installed more accurate linear to sRGB conversion tables.
The slightly modified tables reduce the number of 16-bit values that
convert to an off-by-one 8-bit value.  The "makesRGB.c" code that was used
to generate the tables is now in a contrib/sRGBtables sub-directory.
2011-11-11 18:14:59 -06:00
John Bowler
7875d534cb [libpng15] Simplified read/write API initial version; basic read/write tested
on a variety of images, limited documentation (in the header file.)
2011-11-07 22:33:49 -06:00
John Bowler
92a1d46c8d [libpng15] Added versioning to pnglibconf.h comments. 2011-11-07 22:19:30 -06:00
John Bowler
61bd4f76ad [libpng15] Updated scripts/pnglibconf.mak and scripts/makefile.std
to handle the new PNG_JOIN macro.
2011-11-05 12:24:53 -05:00
Glenn Randers-Pehrson
8b67ee5d3d [libpng15] Updated scripts/pnglibconf.mak to handle the new PNG_JOIN macro. 2011-11-05 09:27:55 -05:00
John Bowler
a004e23a4c [libpng15] Fixed FP division by zero in pngvalid.c; the 'test_pixel' code left
the sBIT fields in the test pixel as 0, which resulted in a floating
point division by zero which was irrelevant but causes systems where
FP exceptions cause a crash. Added code to pngvalid to turn on FP
exceptions if the appropriate glibc support is there to ensure this is
tested in the future.
2011-11-04 20:24:56 -05:00
John Bowler
88bcdc269b [libpng] Check compression_type parameter in png_get_iCCP and remove spurious
casts. The compression_type parameter is always assigned to, so must
be non-NULL. The cast of the profile length potentially truncated the
value unnecessarily on a 16-bit int system, so the cast of the (byte)
compression type to (int) is specified by ANSI-C anyway.
2011-11-04 20:12:03 -05:00
Glenn Randers-Pehrson
aad7c828b2 [libpng15] Removed a stray sentence fragment from CHANGES/ANNOUNCE 2011-11-04 14:12:04 -05:00
Glenn Randers-Pehrson
5a9aca17df [libpng15] Bump version to libpng-1.5.7beta02 2011-11-04 13:47:57 -05:00
Glenn Randers-Pehrson
55e85c24b4 [libpng15] Imported from libpng-1.5.7beta01.tar 2011-11-04 13:47:49 -05:00
John Bowler
fcc0263191 [libpng15] Paeth filter speed improvements from work by Siarhei Siamashka. This
changes the 'Paeth' reconstruction function to improve the GCC code
generation on x86. The changes are only part of the suggested ones;
just the changes that definitely improve speed and remain simple.
The changes also slightly increase the clarity of the code. In a
2011-11-03 18:31:00 -05:00
John Bowler
1d8b75550f [libpng15] Fix for the preprocessor of the Intel C compiler. The preprocessor
adjacent @ signs with a space; this changes the concatentation
from @@@ to PNG_JOIN; that should work with all compiler
preprocessors.
2011-11-03 18:19:53 -05:00
John Bowler
aff44028ba [libpng15] Fixed bug in pngvalid on early allocation failure; fixed type cast
in pngmem.c; pngvalid would attempt to call png_error() if the allocation
of a png_struct or png_info failed. This would probably have led to a
crash.  The pngmem.c implementation of png_malloc() included a cast
to png_size_t which would fail on large allocations on 16-bit systems.
2011-11-03 16:11:08 -05:00
Mans Rullgard
d3a94802d8 [libpng15] Added support for ARM processor (Mans Rullgard) 2011-11-03 00:47:55 -05:00
Glenn Randers-Pehrson
2b7d730e27 [libpng15] Bump version to libpng-1.5.7beta01 2011-11-02 23:14:13 -05:00
Glenn Randers-Pehrson
bc6726bc04 [libpng15] Imported from libpng-1.5.6.tar 2011-11-02 22:48:36 -05:00
Glenn Randers-Pehrson
c94b996af8 [libpng15] Bump version to libpng-1.5.6rc04 2011-10-27 21:09:08 -05:00
Glenn Randers-Pehrson
7342fcaf92 [libpng] #define PNG_ALIGN_TYPE PNG_ALIGN_NONE in contrib/pngminim/*/pngusr.h 2011-10-27 19:56:36 -05:00
John Bowler
92ef313c77 [libpng15] Fixed compiler warnings with Intel and MSYS compilers.
The logical shift fix for Microsoft Visual C is required by other compilers,
so this enables that fix for all compilers when using compile-time constants.
Under MSYS 'byte' is a name declared in a system header file, so we
changed the name of a local variable to avoid the warnings that result.
2011-10-27 19:53:14 -05:00
Glenn Randers-Pehrson
cb75699dff [libpng15] Renamed the LSR() macro to PNG_LSR() and added PNG_LSL() macro. 2011-10-27 16:59:03 -05:00
Glenn Randers-Pehrson
122a525c83 [libpng15] Bump version to libpng-1.5.6rc03 2011-10-27 16:51:52 -05:00
Glenn Randers-Pehrson
ef02d563a3 [libpng15] Added LSR() macro to defend against buggy compilers that evaluate
non-taken code branches and complain about out-of-range shifts.
2011-10-27 12:05:58 -05:00
Glenn Randers-Pehrson
b2068640d1 [libpng15] Bump version to libpng-1.5.6rc02 2011-10-26 08:48:35 -05:00
Glenn Randers-Pehrson
93254f66fc [libpng15] Imported from libpng-1.5.6rc01.tar 2011-10-26 08:48:23 -05:00
Glenn Randers-Pehrson
52093f1776 [libpng15] Corrected recent ANNOUNCE and CHANGES entry 2011-10-21 12:57:01 -05:00
Glenn Randers-Pehrson
0654d63196 [libpng15] Bump version to libpng-1.5.6beta08 2011-10-21 07:39:45 -05:00
Glenn Randers-Pehrson
4e8aa822dc [libpng15] Imported from libpng-1.5.6beta07.tar 2011-10-21 07:39:34 -05:00
Mans Rullgard
c9e27d026d [libpng15] Made png_ptr->prev_row an aligned pointer into png_ptr->big_prev_row
and removed a redundant assignment (Mans Rullgard).
2011-10-17 15:25:03 -05:00
Glenn Randers-Pehrson
e7db181e5d [libpng15] Bump version to libpng-1.5.6beta07 2011-10-17 08:08:16 -05:00
Glenn Randers-Pehrson
f5c5e53bf5 [libpng15] Imported from libpng-1.5.6beta06.tar 2011-10-17 08:08:08 -05:00
John Bowler
ecb3ad035a [libpng15] Updated ANNOUNCE and CHANGES 2011-10-16 22:55:44 -05:00
John Bowler
fb5b3ac013 [libpng15] Prevent libpng overwriting unused bits at the end of the image when
is not byte aligned, while reading. Prior to libpng-1.5.6 libpng would
overwrite the end of the image if the row width is not an exact multiple
of 8 bits and the image is not interlaced.
2011-10-16 22:52:56 -05:00
John Bowler
5b84901c55 [libpng15] Turned on multiple png_read_update_info in pngvalid transform tests. 2011-10-16 22:42:46 -05:00
John Bowler
57cbcf6b8f [libpng15] Add ability to call png_read_update_info multiple times to pngvalid.c 2011-10-14 19:43:53 -05:00
John Bowler
07772cba07 [libpng15] Fixes for multiple calls to png_read_update_info.
These fixes attend to most of the errors revealed in pngvalid, however doing
the gamma work twice results in inaccuracies that can't be easily fixed.
There is now a warning in the code if this is going to happen.
2011-10-14 18:19:47 -05:00
John Bowler
5c1905caae [libpng15] Fixed a relatively harmless memory overwrite
in compressed text writing
2011-10-14 12:33:52 -05:00
Glenn Randers-Pehrson
d58251b47e [libpng15] Reverted previous change; removed png_get_compression_buffer() API.
It is too risky. Exactly how png_ptr->zbuf is used is under control of the
individual chunk implementation and there could easily be significant changes
within a major release.
2011-10-13 20:30:02 -05:00
Glenn Randers-Pehrson
d3dcb463d6 [libpng15] Added png_get_compression_buffer() API. 2011-10-13 17:51:31 -05:00
Glenn Randers-Pehrson
3dbfd300ff [libpng15] Removed two redundant tests for unitialized row. 2011-10-13 17:24:36 -05:00
Glenn Randers-Pehrson
ff36991ca2 [libpng15] Bump version to libpng-1.5.6beta06 2011-10-12 06:54:55 -05:00
Glenn Randers-Pehrson
5b3b54e3f6 [libpng15] Imported from libpng-1.5.6beta05.tar 2011-10-12 06:47:31 -05:00
Glenn Randers-Pehrson
76b62317b5 [libpng15] Fixed bug in png_write_chunk_header() debug print,
introduced in 1.5.6bet01.
2011-10-11 13:54:27 -05:00
Glenn Randers-Pehrson
4dd0dc6399 [libpng15] Fix small typo in CHANGES and ANNOUNCE 2011-10-07 18:48:10 -05:00
John Bowler
8be28e3eb6 [libpng15] Optimized png_combine_row() when rows are aligned This gains a
small percentage for 16-bit and 32-bit pixels in the typical case where the
output row buffers are appropriately aligned. The optimization was not
previously possible because the png_struct buffer was always misaligned.
2011-10-07 18:36:37 -05:00
John Bowler
ac8375d000 [libpng15] Align png_struct::row_buf - previously it was always unaligned,
caused by a bug in the code that attempted to align it; the code needs to
subtract one from the pointer to take account of the filter byte prepended to
each row.
2011-10-06 22:27:16 -05:00
Glenn Randers-Pehrson
65c0339b5c [libpng15] Speed up png_combine_row() for interlaced images. This reduces the
generality of the code, allowing it to be optimized for Adam7 interlace.  The
masks passed to png_combine_row() are now generated internally, avoiding
some code duplication and localizing the interlace handling somewhat.
2011-10-06 21:54:17 -05:00
Glenn Randers-Pehrson
d5bc89ef11 [libpng15] Updated CHANGES and ANNOUNCE 2011-10-05 21:11:46 -05:00
Glenn Randers-Pehrson
fa7d7934f6 [libpng15] Replaced a short but frequently-used memcpy() in png_combine_row()
with a loop.
2011-10-05 21:09:22 -05:00
Glenn Randers-Pehrson
a92a212925 [libpng15] Bump version to libpng-1.5.6beta05 2011-10-05 16:49:14 -05:00
Glenn Randers-Pehrson
435cf87469 [libpng15] Bump version to libpng-1.5.6beta04 2011-10-05 16:42:16 -05:00
Glenn Randers-Pehrson
e51916c0f9 [libpng15] Bump version to libpng-1.5.6beta04 2011-09-28 07:34:53 -05:00
Glenn Randers-Pehrson
997b193f63 [libpng15] Imported from libpng-1.5.6beta03.tar 2011-09-28 07:24:28 -05:00
Glenn Randers-Pehrson
e29c4b9b93 [libpng15] Revised CMakeLists.txt to work with mingw and removed some material
from CMakeLists.txt that is no longer useful in libpng-1.5.
2011-09-27 19:01:58 -05:00
Glenn Randers-Pehrson
8e25a61277 [libpng15]` Revised test-pngtest.sh to report FAIL when pngtest fails.
Added "--strict" option to pngtest, to report FAIL when the failure is
only because the resulting valid files are different.
2011-09-26 20:57:33 -05:00
Glenn Randers-Pehrson
f573ff7792 [libpng15] Bump version to libpng-1.5.6beta03 2011-09-26 16:53:11 -05:00
Glenn Randers-Pehrson
d02d6a1c7d [libpng15] Fixed a typo in the definition of the new PNG_STRING_FROM_CHUNK(s,c)
macro.
2011-09-26 16:43:08 -05:00
Glenn Randers-Pehrson
968c231cc8 [libpng15] Added a note in the manual the png_read_update_info() must be
called only once with a particular info_ptr.
2011-09-26 16:35:22 -05:00
Glenn Randers-Pehrson
bb5cb1476b [libpng15] Bump version to libpng-1.5.6beta02 2011-09-22 12:48:19 -05:00
Glenn Randers-Pehrson
115020d985 [libpng15] Imported from libpng-1.5.6beta01.tar 2011-09-22 09:51:23 -05:00
Glenn Randers-Pehrson
3e2263abf2 [libpng15] Imported from libpng-1.5.5.tar 2011-09-22 08:45:04 -05:00
Glenn Randers-Pehrson
d71f09df4d [libpng15] Bump version to libpng-1.5.5rc02 2011-09-15 08:39:02 -05:00
Glenn Randers-Pehrson
0a456b5d16 [libpng15] Fix grammar in ANNOUNCE and CHANGES 2011-09-15 08:32:07 -05:00
Glenn Randers-Pehrson
d3261115a8 [libpng15] Imported from libpng-1.5.5rc01.tar 2011-09-15 08:27:01 -05:00
Glenn Randers-Pehrson
673a1166fe [libpng15] Updated ANNOUNCE and CHANGES with new CVE number. 2011-09-12 08:40:07 -05:00
Glenn Randers-Pehrson
853afe631c [libpng15] Bump version to libpng-1.5.5beta09 2011-09-09 22:33:48 -05:00
Glenn Randers-Pehrson
fe85bafedf [libpng15] Bump version to libpng-1.5.5beta08 2011-09-09 21:54:58 -05:00
John Bowler
751561218f [libpng15] Constant changes for 64-bit compatibility (removal of L suffixes).
The 16-bit cases still use "L" as we don't have a 16-bit test system.
2011-09-09 17:21:44 -05:00
Glenn Randers-Pehrson
f0c19e6455 [libpng15] Fix typo in ANNOUNCE and CHANGES 2011-09-09 08:16:53 -05:00
Glenn Randers-Pehrson
ccff383d44 [libpng15] Relocated new HAVE_SOLARIS_LD definition in configure.ac 2011-09-09 07:55:25 -05:00
John Bowler
f3f7e14727 [libpng15] Fixed 64-bit compilation errors (gcc). The errors fixed relate
to conditions where types that are 32 bits in the GCC 32-bit
world (uLong and png_size_t) become 64 bits in the 64-bit
world.  This produces potential truncation errors which the
compiler correctly flags.
2011-09-09 07:32:37 -05:00
Glenn Randers-Pehrson
3c2ae60f46 [libpng15] Bump version to libpng-1.5.5beta08 2011-09-09 06:10:21 -05:00
Glenn Randers-Pehrson
b6e4d58e4b [libpng15] Changed png_chunk_benign_error() to png_warning() in png.c, in
png_XYZ_from_xy_checked
2011-09-08 12:25:52 -05:00
Glenn Randers-Pehrson
83bd94f1f4 [devel] Added SunOS support to configure.ac and Makefile.am 2011-09-01 14:06:49 -05:00
Glenn Randers-Pehrson
b293334e7a [devel] Added "$(ARCH)" option to makefile.darwin 2011-08-29 07:22:13 -05:00
Glenn Randers-Pehrson
4ae297867d [devel] Bump version to libpng-1.5.5beta07 2011-08-26 06:07:33 -05:00
John Bowler
736f40f459 [devel] Fixes to rgb_to_gray and cHRM XYZ APIs 2011-08-25 16:19:44 -05:00
Glenn Randers-Pehrson
e61e403d20 [devel] Ensure the CMAKE_LIBRARY_OUTPUT_DIRECTORY is set in CMakeLists.txt
(Clifford Yap)
2011-08-17 09:02:07 -05:00
Glenn Randers-Pehrson
9d824eb166 [devel] Bump version to libpng-1.5.5beta06 2011-08-17 07:57:02 -05:00
John Bowler
9b979b177b [devel] Added new types and internal functions for CIE RGB end point handling
to pngpriv.h (functions yet to be implemented).
2011-08-16 22:58:33 -05:00
John Bowler
7b9796539d [devel] Prevent unexpected API exports from non-libpng DLLs on Windows.
The "_DLL" is removed from the test of whether a DLL is being built.
2011-08-16 22:57:27 -05:00