John Bowler
f87df31c8c
[libpng17] Fixed GCC unsigned int->float warnings. Various versions of GCC
...
seem to generate warnings when an unsigned value is implicitly
converted to double. This is probably a GCC bug but this change
avoids the issue by explicitly converting to (int) where safe.
Free all allocated memory in pngimage. The file buffer cache was left
allocated at the end of the program, harmless but it causes memory
leak reports from clang.
Fixed array size calculations to avoid warnings. At various points
in the code the number of elements in an array is calculated using
sizeof. This generates a compile time constant of type (size_t) which
is then typically assigned to an (unsigned int) or (int). Some versions
of GCC on 64-bit systems warn about the apparent narrowing, even though
the same compiler does apparently generate the correct, in-range,
numeric constant. This adds appropriate, safe, casts to make the
warnings go away.
2014-11-05 18:53:01 -06:00
Glenn Randers-Pehrson
4f8050416f
[libpng17] Merge pngvalid.c and pngfix.c with libpng-1.6.14beta04
2014-09-28 10:37:26 -05:00
Glenn Randers-Pehrson
776d1768aa
[libpng17] Merge pngvalid.c with libpng-1.6.14beta04.
2014-09-27 19:30:35 -05:00
Glenn Randers-Pehrson
4a67ac3f1e
[libpng17] Imported from libpng-1.7.0beta36.tar
2014-09-27 18:52:47 -05:00
Glenn Randers-Pehrson
1a9c06b11a
[libpng17] Imported from libpng-1.7.0beta35.tar
2014-08-06 09:10:02 -05:00
Glenn Randers-Pehrson
b407af6503
[libpng17] Imported from libpng-1.7.0beta34.tar
2014-03-17 13:19:20 -05:00
Glenn Randers-Pehrson
f99393490d
[libpng17] Imported from libpng-1.7.0beta32.tar
2014-02-26 12:54:47 -06:00
Glenn Randers-Pehrson
4526f546ba
[libpng17] Use a user warning handler in contrib/gregbook/readpng2.c instead
...
of default, so warnings will be put on stderr even if libpng has CONSOLE_IO
disabled.
2014-02-23 10:08:50 -06:00
John Bowler
2ced844b0e
[libpng17] Deleted a now-redundant #define png_error from pngvalid.c
2014-02-16 22:51:23 -06:00
Glenn Randers-Pehrson
e2c5ed8d1d
[libpng17] Removed "#define PNG_NO_WARNINGS" from contrib/pngminim/*/pngusr.h
...
because warnings are already turned off in the *.dfa files.
2014-02-16 15:48:58 -06:00
John Bowler
76004ce6ed
[libpng17] Moved OS dependent code from arm/arm_init.c, to allow the included
...
implementation of the ARM NEON discovery function to be set at
build-time and provide sample implementations from the current code in the
contrib/arm-neon subdirectory. The __linux__ code has also been changed to
compile and link on Android by using /proc/cpuinfo, and the old linux code
is in contrib/arm-neon/linux-auxv.c. The new code avoids POSIX and Linux
dependencies apart from opening /proc/cpuinfo and is C90 compliant.
2014-02-16 15:41:51 -06:00
Glenn Randers-Pehrson
9a3f244085
[libpng17] Imported from libpng-1.7.0beta31.tar
2014-02-05 22:46:04 -06:00
Glenn Randers-Pehrson
98b9371115
[libpng17] Fixed some typos in commentary of pngimage.c
2014-02-05 13:21:41 -06:00
John Bowler
dc63b03da1
[libpng17] Completed full working pngimage test program and added two test
...
scripts. Fixed combination of ~alpha with shift. On read invert alpha,
processing occurred after shift processing, which causes the final values to be
outside the range that should be produced by the shift. Reversing the
order on read makes the two transforms work together correctly and mirrors
the order used on write.
2014-02-05 11:39:59 -06:00
Glenn Randers-Pehrson
302c58b8cf
[libpng17] Added pngimage test program for png_read_png and png_write_png.
...
This is a work-in-progress; no tests are run automatically at present and
the program by virtue of exhaustively testing all the transforms is
very slow.
2014-01-31 22:00:27 -06:00
Glenn Randers-Pehrson
39fee3cee1
[libpng17] Fixed a large number of instances where PNGCBAPI was omitted from
...
function definitions.
2014-01-31 21:55:27 -06:00
Glenn Randers-Pehrson
d38ebc9ded
[libpng17] Updated scripts/makefile.* to use CPPFLAGS (Cosmin)
2014-01-12 12:28:20 -06:00
Glenn Randers-Pehrson
28711dff2a
[libpng17] Updated copyright year in recently-changed files.
2013-12-31 21:15:11 -06:00
John Bowler
206d1eed42
[libpng17] Changed pngvalid.c to support libpng 1.5, which does not support
...
the PNG_MAXIMUM_INFLATE_WINDOW option, so #define it out when
appropriate in pngvalid.c
2013-12-29 15:57:30 -06:00
John Bowler
114fa16ab3
[libpng17] Fixed test programs for interlace options. Made pngvalid.c and
...
pngtest.c work correctly when READ_INTERLACING and/or WRITE_INTERLACING
are switched off.
2013-12-29 10:33:58 -06:00
Glenn Randers-Pehrson
200fc68f52
[libpng17] Removed #error macro from contrib/tools/pngfix.c (Thomas Klausner).
2013-12-27 20:18:50 -06:00
John Bowler
e98229ceb0
[libpng17] Merged with 1.5 and 1.6 changes to create a single pngvalid.c
2013-12-27 08:04:49 -06:00
John Bowler
ad1a4c8cc3
[libpng17] Added libpng 1.5 checks to pngvalid.c
2013-12-27 07:53:50 -06:00
Glenn Randers-Pehrson
9e168ea2c9
[libpng17] Merged files with version 1.6.8 that have not changed since then.
2013-12-19 20:33:08 -06:00
John Bowler
5a1b8d106d
[libpng17] Tidied up pngfix inits and fixed pngtest no-write builds.
2013-12-01 15:50:03 -06:00
Glenn Randers-Pehrson
a199a15b28
[libpng17] Added another "assert()" to pngfix.c
2013-11-23 12:58:32 -06:00
Glenn Randers-Pehrson
e9446f2f95
[libpng17] Added an "assert()" to pngfix.c to quiet a clang scanner warning.
2013-11-23 12:14:02 -06:00
John Bowler
158c947ce2
[libpng17] Revert recent change to pngvalid.c.
2013-11-22 18:34:37 -06:00
John Bowler
7e2707e2af
[libpng17] Ported recent changes from libpng16 to libpng17
...
Fixed 'minimal' builds. Various obviously useful minimal configurations
don't build because of missing contrib/libtests test programs and overly
complex dependencies in scripts/pnglibconf.dfa. This change adds
contrib/conftest/*.dfa files that can be used in automatic build
scripts to ensure that these configurations continue to build.
Enabled WRITE_INVERT and WRITE_PACK in contrib/pngminim/encoder.
2013-11-22 18:01:30 -06:00
Glenn Randers-Pehrson
81824079b5
[libpng17] Added "-Wall" to CFLAGS in contrib/pngminim/*/makefile
2013-11-18 17:03:24 -06:00
John Bowler
9f2fbcf5d8
[libpng17] Fixed #include in filter_neon_intrinsics.c and ctype macros. The
...
ctype char checking macros take an unsigned char argument, not a signed char.
2013-11-04 13:50:20 -06:00
John Bowler
4b29f97f9b
[libpng17] Port recent libpng-1.6.7beta03, beta04 changes to 1.7.0beta21
...
(mainly ARMv8 support)
2013-11-02 15:29:45 -05:00
John Bowler
091fab713c
[libpng17] Simplified error message code in pngunknown. The simplification has
...
the useful side effect of avoiding a bogus warning generated by the latest
version of the Intel C compiler (it objects to
condition ? string-literal : string-literal).
2013-10-06 08:51:42 -05:00
John Bowler
32aeb2cd4e
[libpng17] Cleaned up (char*) casts of zlib messages. The latest version
...
of the Intel C compiler complains about casting a string literal as (char*),
so copied the treatment of z_const from the library code into pngfix.c
2013-10-06 08:47:43 -05:00
John Bowler
b37a7c6674
[libpng17] Updated pngunknown.c
2013-09-30 13:11:44 -05:00
John Bowler
7657ac14f2
[libpng17] Catch up with recent libpng16 changes; unknown handling and spelling
...
corrections
2013-09-30 11:18:13 -05:00
John Bowler
d9f60caf72
[libpng17] Fixed default behavior of ARM_NEON_API. If the ARM NEON API option is
...
compiled without the CHECK option it defaulted to on, not off.
2013-09-30 08:07:18 -05:00
Glenn Randers-Pehrson
a14071d814
[libpng17] Imported from libpng-1.7.0beta16.tar
2013-07-04 22:31:06 -05:00
John Bowler
23f3e46518
[libpng17] Ported pngfix.c patches from libpng16.
2013-07-03 07:50:24 -05:00
John Bowler
23f4320775
[libpng17] Added perfect hash code generation for lists of PNG chunks. This is
...
a work in progress; checked in for use in pngfix.c
2013-07-03 07:41:04 -05:00
Glenn Randers-Pehrson
5aa2ca454d
[libpng17] Revised pngfix.c to use PNG_U32() instead of PNG_CHUNK()
2013-07-02 09:52:09 -05:00
Glenn Randers-Pehrson
7905286ffa
[libpng17] Renamed contrib/tools/png-fix-too-far-back.c to pngfix.c and revised
...
it to check all compressed chunks known to libpng.
2013-07-01 15:11:36 -05:00
Glenn Randers-Pehrson
4a7796faca
[libpng17] Imported from libpng-1.7.0beta14.tar
2013-06-08 21:00:36 -05:00
Glenn Randers-Pehrson
46ad4c5bd4
[libpng17] Deleted contrib/tools/fixitxt.c, which has been renamed.
2013-06-05 17:03:38 -05:00
John Bowler
a08ac031fc
[libpng17] Fixed ICC compiler warning in tools/png-fix-itxt.c
2013-06-05 16:48:18 -05:00
Glenn Randers-Pehrson
bd56d76417
[libpng17] Port recent zlib windowBits handling from libpng-1.6.3beta06
2013-05-10 17:43:59 -05:00
Glenn Randers-Pehrson
0cc23ac171
[libpng17] Updated contrib/pngminus/pnm2png.c (Paul Stewart):
...
Fixed whitespace handling
Added a call to png_set_packing()
Initialize dimension values so if sscanf fails at least we have known
invalid values.
2013-05-09 23:30:46 -05:00
Glenn Randers-Pehrson
9dba7219a0
[libpng17] Revised contrib/pngminim/*/makefile to generate pnglibconf.h with the
...
right zlib header files.
2013-05-09 22:59:08 -05:00
Glenn Randers-Pehrson
17c6af8c40
[libpng17] Check for EOF in contrib/pngminus/pnm2png.c (Paul Stewart).
...
Ignore "#" delimited comments in input file to pnm2png.c.
2013-05-07 14:38:19 -05:00
John Bowler
371c3d4dfd
[libpng17] Install missing patch to contrib/libtests/pngunknown.c
2013-04-19 21:56:00 -05:00