Commit Graph

425 Commits

Author SHA1 Message Date
Glenn Randers-Pehrson
9477ecdfa6 [libpng16] Updated copyright year to 2013 in newly-changed files 2013-01-01 07:45:42 -06:00
John Bowler
24639a63ce [libpng16] Made default Zlib compression settings be configurable. This adds #defines to
pnglibconf.h to control the defaults.
2012-12-20 22:26:18 -06:00
Glenn Randers-Pehrson
e4f124e335 [libpng16] Bump version to 1.6.0beta33 2012-12-09 19:25:42 -06:00
John Bowler
f8dfd123e2 [libpng16] Changed ICC profile support to allow use of an external color
management system (CMS). In practice it is not possible to obtain cHRM
information reliably using just the end-point tags because they do not exist
in the vast majority of profiles.  Instead it is necessary to run the endpoints
through the ICC colorimetric intent transform (as described in the v4
spec).  Since this is likely to be too much code inside libpng for too
little gain (it implies a fairly complete CMS implementation) the code
has been changed to allow an external CMS to be used.  This code is
temporarily disabled until a suitable set of test cases using one or more
external CMS implementations have been implemented.
2012-10-25 19:30:02 -05:00
Glenn Randers-Pehrson
702053d110 [libpng16] Bump version to 1.6.0beta28 2012-08-17 21:54:45 -05:00
Glenn Randers-Pehrson
025d415838 [libpng16] Folded long lines and fixed some grammar. 2012-08-16 00:51:44 -05:00
Glenn Randers-Pehrson
810c99583b [libpng16] Fixed some spelling errors. 2012-08-15 23:20:47 -05:00
Glenn Randers-Pehrson
3744f94fd1 [libpng16] Removed trailing blanks 2012-08-10 19:22:53 -05:00
Glenn Randers-Pehrson
ece07cfe9c [libpng16] Removed the png_sizeof(), png_strlen(), png_memset(), png_memcpy(),
and png_memcmp() macros.
2012-08-10 18:19:41 -05:00
Glenn Randers-Pehrson
dbb7e19fda [libpng16] Consistently use memset(), memcpy(), and memcmp() instead of the
png_memset(), png_memcpy(), and png_memcmp() macros.
2012-08-10 17:27:42 -05:00
Glenn Randers-Pehrson
26849f4693 [libpng16] Consistently use png_memset(), png_memcpy(), and png_memcmp(),
except in pngtest.c and example.c where these macros are not visible.
2012-08-10 16:01:45 -05:00
John Bowler
134c5761fa [libpng16] Fix new leak when text compression is disabled. 2012-08-10 10:49:21 -05:00
Glenn Randers-Pehrson
4430b91363 [libpng16] Restore info_ptr members that were deleted by the previous
patch; they are needed by png_set_IHDR() for both read and write.  Fix
some ifdefs that caused the contrib/pngminim/ applications to not compile.
2012-08-09 22:24:04 -05:00
Glenn Randers-Pehrson
432c174b64 [libpng16] Eliminated use of png_sizeof(); use sizeof() instead, and use.
a consistent style for (sizeof type) and (sizeof (array))
2012-08-09 20:14:48 -05:00
Glenn Randers-Pehrson
8f4d67218e [libpng16] Imported from libpng-1.6.0beta22.tar 2012-05-23 13:19:30 -05:00
John Bowler
921648a997 [libpng16] Recognize known sRGB ICC profiles while reading; prefer writing the
iCCP profile over writing the sRGB chunk, controlled by the
    PNG_sRGB_PROFILE_CHECKS option.
2012-03-28 23:36:12 -05:00
John Bowler
b11b31aea2 [libpng16] Changed chunk handler warnings into benign errors, incrementally
load iCCP
2012-03-21 07:55:46 -05:00
John Bowler
b5d0051dcb [libpng16] Deflate/inflate was reworked to move common zlib calls into single
functions [rw]util.c.  A new shared keyword check routine was also added
and the 'zbuf' is no longer allocated on progressive read.  It is now
possible to call png_inflate() incrementally.
2012-03-09 09:15:18 -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
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
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
1531bd61a0 [libpng16] Updated copyright year to 2012 2012-01-01 14:45:04 -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
55e85c24b4 [libpng15] Imported from libpng-1.5.7beta01.tar 2011-11-04 13:47:49 -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
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
5b3b54e3f6 [libpng15] Imported from libpng-1.5.6beta05.tar 2011-10-12 06:47:31 -05:00
Glenn Randers-Pehrson
ba55c0770b [libpng15] Use PNG_CSTRING_FROM_CHUNK macro with png_debug2() in pngwutil.c 2011-10-11 21:21:37 -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
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
853afe631c [libpng15] Bump version to libpng-1.5.5beta09 2011-09-09 22:33:48 -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
d404b6d488 [devel] Imported from libpng-1.5.4.tar 2011-07-07 06:26:30 -05:00
Glenn Randers-Pehrson
ef217b76a3 [devel] Updated comments that mention 1.5.3; changed them to 1.5.4. 2011-06-15 12:58:27 -05:00
John Bowler
550bab03fb [devel] Removed the ACCURATE and LEGACY options (they are no longer useable)
Fixed some compiliation problems with scaling options.
2011-06-14 06:17:26 -05:00
John Bowler
b2bee3374c [devel] Make the 16-to-8 scaling accurate. Dividing by 256 with no rounding is
wrong (high by one) 25% of the time. Dividing by 257 with rounding is
    wrong in 128 out of 65536 cases. Getting the right answer all the time
    without division is easy.
2011-06-10 23:24:58 -05:00
Glenn Randers-Pehrson
3fceee058f [devel] Fix typo in pngwutil.c comment. 2011-05-23 06:31:33 -05:00
Glenn Randers-Pehrson
492ef9c964 [devel] Apply new PNG_WARNING_PARAMETERS macro in pngwutil.c 2011-05-07 21:42:25 -05:00
John Bowler
d273ad2d0f [devel] Implementation of premultiplied alpha support: png_set_alpha_mode
(libpng-manual.txt still to be updated, see png.h for documentation.)
2011-05-07 21:00:28 -05:00
John Bowler
c5bef946b1 [devel] IDAT compression failed if preceded by a compressed text chunk
This was because the attempt to reset the zlib stream in png_write_IDAT
happened after the first IDAT chunk had been deflated - much too late.
In this change internal functions are added to claim/release the z_stream
and, hopefully, make the code more robust.  Also deflateEnd checking is
added - previously libpng would ignore an error at the end of the stream.
2011-05-05 17:35:39 -05:00
Glenn Randers-Pehrson
c559bb58ed [devel] Added PNG_WRITE_OPTIMIZE_CMF_SUPPORTED macro to make zlib "CMF"
optimization configureable.
2011-05-05 16:55:20 -05:00
John Bowler
88b77cc6f3 [devel] Remove png_snprintf, add formatted warning messages.
This change adds internal APIs to allow png_warning messages to have parameters
 without requiring the host OS to implelment snprintf.  As a side effect the
 dependency of the RFC1132 code on stdio is removed and PNG_NO_WARNINGS does
 actually work now.
2011-05-05 06:49:55 -05:00
John Bowler
8d4ce1fed5 [devel] Fixed 64-bit builds where png_uint_32 is smaller than png_size_t 2011-04-15 06:54:30 -05:00
Glenn Randers-Pehrson
61365b6d15 [devel] Removed "#if 1" and the matching "#endif" 2011-04-03 19:49:37 -05:00
Glenn Randers-Pehrson
6785856858 [devel] Optimize the zlib CMF byte in non-IDAT compressed chunks 2011-04-02 08:26:42 -05:00
Glenn Randers-Pehrson
e99107b1aa [devel] Moved misplaced declarations 2011-04-02 05:49:03 -05:00