mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Compare commits
88 Commits
v1.6.9
...
v1.2.20bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b56c1f6023 | ||
|
|
268f0d64fc | ||
|
|
b3ea17736b | ||
|
|
963daeaec5 | ||
|
|
249bd44ebc | ||
|
|
04a1b1c123 | ||
|
|
3922e7afc3 | ||
|
|
f0a97a0d80 | ||
|
|
88713fd590 | ||
|
|
394759e0c8 | ||
|
|
c229f65dcf | ||
|
|
f929861609 | ||
|
|
f024ce7675 | ||
|
|
f3fcf00392 | ||
|
|
08313ef870 | ||
|
|
911c469d69 | ||
|
|
07c089ee04 | ||
|
|
dadc944810 | ||
|
|
80663032a9 | ||
|
|
67c75ee7f0 | ||
|
|
62626737a5 | ||
|
|
e404eed318 | ||
|
|
3c115428ea | ||
|
|
db40ca4aca | ||
|
|
f456d0d6bb | ||
|
|
06fe17eb9f | ||
|
|
7945bdb88f | ||
|
|
f7794ec181 | ||
|
|
16851b3eb3 | ||
|
|
c72d8d4d29 | ||
|
|
2b7436558e | ||
|
|
e59c47d5b1 | ||
|
|
c1523ad16d | ||
|
|
d0be8e27de | ||
|
|
5c66b81289 | ||
|
|
1a42cb2013 | ||
|
|
cf2978cbbb | ||
|
|
8a9733e777 | ||
|
|
ba880c5501 | ||
|
|
788f962fbd | ||
|
|
12f8283560 | ||
|
|
4d27f6b77b | ||
|
|
413ed28246 | ||
|
|
ad084f559a | ||
|
|
3832ab1c21 | ||
|
|
999bceb413 | ||
|
|
e8f6605642 | ||
|
|
3148c65323 | ||
|
|
0a3d2cc68b | ||
|
|
11cf76edb3 | ||
|
|
8833ad415c | ||
|
|
bc290d8e6c | ||
|
|
9c5b3a4060 | ||
|
|
04bbba55c7 | ||
|
|
40b70d5373 | ||
|
|
833d32646e | ||
|
|
6cdefb3cac | ||
|
|
f959d3ee7a | ||
|
|
b0952eabc7 | ||
|
|
43bb4ba4bf | ||
|
|
c2de22abeb | ||
|
|
a0113ee049 | ||
|
|
05db10fda3 | ||
|
|
948ee23a2a | ||
|
|
271a2931b6 | ||
|
|
9fe05edd47 | ||
|
|
c2573702cf | ||
|
|
b8e76b586e | ||
|
|
11a89964b9 | ||
|
|
b5bfcbae59 | ||
|
|
efe95a6953 | ||
|
|
e88a5eca8b | ||
|
|
2e3980e1de | ||
|
|
0ff85c6923 | ||
|
|
e3358d1839 | ||
|
|
f5eac0c7fa | ||
|
|
6034592a27 | ||
|
|
7b00d826d3 | ||
|
|
52ef3586b9 | ||
|
|
4118fcdd14 | ||
|
|
d9e18047d3 | ||
|
|
734f320ade | ||
|
|
79f25cdeb2 | ||
|
|
413f3db617 | ||
|
|
4db11d5143 | ||
|
|
78d28c6b96 | ||
|
|
24df7333a2 | ||
|
|
8694cd8bf5 |
67
ANNOUNCE
67
ANNOUNCE
@@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.2.10rc1 - April 19, 2006
|
||||
Libpng 1.2.20beta04 - August 21, 2007
|
||||
|
||||
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.
|
||||
@@ -9,66 +9,53 @@ Files available for download:
|
||||
Source files with LF line endings (for Unix/Linux) and with a
|
||||
"configure" script
|
||||
|
||||
1.2.10rc1.tar.gz
|
||||
1.2.10rc1.tar.bz2
|
||||
libpng-1.2.20beta04.tar.gz
|
||||
libpng-1.2.20beta04.tar.bz2
|
||||
|
||||
Source files with LF line endings (for Unix/Linux) without the
|
||||
"configure" script
|
||||
|
||||
1.2.10rc1-no-config.tar.gz
|
||||
1.2.10rc1-no-config.tar.bz2
|
||||
libpng-1.2.20beta04-no-config.tar.gz
|
||||
libpng-1.2.20beta04-no-config.tar.bz2
|
||||
|
||||
Source files with CRLF line endings (for Windows), without the
|
||||
"configure" script
|
||||
|
||||
lp1210r01.zip
|
||||
lp1210r01.tar.bz2
|
||||
lp1220b04.zip
|
||||
lp1220b04.tar.bz2
|
||||
|
||||
Project files
|
||||
|
||||
1.2.10rc1-project-netware.zip
|
||||
1.2.10rc1-project-wince.zip
|
||||
libpng-1.2.20beta04-project-netware.zip
|
||||
libpng-1.2.20beta04-project-wince.zip
|
||||
|
||||
Other information:
|
||||
|
||||
1.2.10rc1-README.txt
|
||||
1.2.10rc1-KNOWNBUGS.txt
|
||||
1.2.10rc1-LICENSE.txt
|
||||
1.2.10rc1-Y2K-compliance.txt
|
||||
libpng-1.2.20beta04-README.txt
|
||||
libpng-1.2.20beta04-KNOWNBUGS.txt
|
||||
libpng-1.2.20beta04-LICENSE.txt
|
||||
libpng-1.2.20beta04-Y2K-compliance.txt
|
||||
|
||||
Changes since the last public release (1.2.9):
|
||||
Changes since the last public release (1.2.19):
|
||||
|
||||
version 1.2.10beta1 [April 15, 2006]
|
||||
Renamed "config.h" to "png_conf.h" and revised Makefile.am to add
|
||||
-DPNG_BUILDING_LIBPNG to compile directive, and modified pngconf.h
|
||||
to include png_conf.h only when PNG_BUILDING_LIBPNG is defined.
|
||||
version 1.2.20beta01 [August 19, 2007]
|
||||
Fixed problem with compiling pnggccrd.c on Intel-Apple platforms.
|
||||
Added PNG_NO_ERROR_TEXT feature, with demo in contrib/pngminim
|
||||
Removed define PNG_WARN_UNINITIALIZED_ROW 1 /* 0: warning; 1: error */
|
||||
because it caused some trouble.
|
||||
|
||||
version 1.2.10beta2 [April 15, 2006]
|
||||
Manually updated Makefile.in and configure. Changed png_conf.h.in
|
||||
back to config.h.
|
||||
version 1.2.20beta02 [August 20, 2007]
|
||||
Avoid compiling pnggccrd.c on Intel-Apple platforms.
|
||||
|
||||
version 1.2.10beta3 [April 15, 2006]
|
||||
Change png_conf.h back to config.h in pngconf.h.
|
||||
version 1.2.20beta03 [August 20, 2007]
|
||||
Added "/D PNG_NO_MMX_CODE" to the non-mmx builds of projects/visualc6
|
||||
and visualc71.
|
||||
|
||||
version 1.2.10beta4 [April 16, 2006]
|
||||
Change PNG_BUILDING_LIBPNG to PNG_CONFIGURE_LIBPNG in config/Makefile*.
|
||||
|
||||
version 1.2.10beta5 [April 16, 2006]
|
||||
Added a configure check for compiling assembler code in pnggccrd.c
|
||||
|
||||
version 1.2.10beta6 [April 17, 2006]
|
||||
Revised the configure check for pnggccrd.c
|
||||
Moved -DPNG_CONFIGURE_LIBPNG into @LIBPNG_DEFINES@
|
||||
Added @LIBPNG_DEFINES@ to arguments when building libpng.sym
|
||||
|
||||
version 1.2.10beta7 [April 18, 2006]
|
||||
Change "exec_prefix=$prefix" to "exec_prefix=$(prefix)" in makefiles.
|
||||
|
||||
version 1.2.10beta8 [April 19, 2006]
|
||||
Ensure pngconf.h doesn't define both PNG_USE_PNGGCCRD and PNG_USE_PNGVCRD
|
||||
Fixed "LN_FS" typo in makefile.sco and makefile.solaris.
|
||||
version 1.2.20beta04 [August 21, 2007]
|
||||
Revised pngvcrd.c for improved efficiency (Steve Snyder).
|
||||
|
||||
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
|
||||
|
||||
368
CHANGES
368
CHANGES
@@ -1480,7 +1480,7 @@ version 1.2.9beta5 [March 4, 2006]
|
||||
Restored scripts/makefile.elf which was inadvertently deleted.
|
||||
|
||||
version 1.2.9beta6 [March 6, 2006]
|
||||
Fixed typo (10) in configuration files.
|
||||
Fixed typo (20) in configuration files.
|
||||
|
||||
version 1.2.9beta7 [March 7, 2006]
|
||||
Removed libpng.vers and libpng.sym from libpng12_la_SOURCES in Makefile.am
|
||||
@@ -1552,14 +1552,364 @@ version 1.2.10rc1 [April 19, 2006]
|
||||
Ensure pngconf.h doesn't define both PNG_USE_PNGGCCRD and PNG_USE_PNGVCRD
|
||||
Fixed "LN_FS" typo in makefile.sco and makefile.solaris.
|
||||
|
||||
version 1.4.0beta1 [future]
|
||||
Enabled iTXt support (changes png_struct, thus requires so-number change).
|
||||
Removed deprecated functions png_read_init, png_write_init, png_info_init,
|
||||
png_permit_empty_plte, png_set_gray_1_2_4_to_8, and removed the
|
||||
deprecated macro PNG_MAX_UINT.
|
||||
Cleaned up PNG_ASSEMBLER_CODE_SUPPORTED vs PNG_MMX_CODE_SUPPORTED
|
||||
Cleaned up WINCE project.
|
||||
Moved "PNG_INTERNAL" parts of png.h into a new private header, pngintrn.h
|
||||
version 1.2.10rc2 [April 20, 2006]
|
||||
Added a backslash between -DPNG_CONFIGURE_LIBPNG and -DPNG_NO_ASSEMBLER_CODE
|
||||
in configure.ac and configure
|
||||
Made the configure warning about versioned symbols less arrogant.
|
||||
|
||||
version 1.2.10rc3 [April 21, 2006]
|
||||
Added a note in libpng.txt that png_set_sig_bytes(8) can be used when
|
||||
writing an embedded PNG without the 8-byte signature.
|
||||
Revised makefiles and configure to avoid making links to libpng.so.*
|
||||
|
||||
version 1.2.10 [April 23, 2006]
|
||||
Reverted configure to "rc2" state.
|
||||
|
||||
version 1.2.11beta1 [May 31, 2006]
|
||||
scripts/libpng.pc.in contained "configure" style version info and would
|
||||
not work with makefiles.
|
||||
The shared-library makefiles were linking to libpng.so.0 instead of
|
||||
libpng.so.3 compatibility as the library.
|
||||
|
||||
version 1.2.11beta2 [June 2, 2006]
|
||||
Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid
|
||||
buffer overflow.
|
||||
Fixed bug in example.c (png_set_palette_rgb -> png_set_palette_to_rgb)
|
||||
|
||||
version 1.2.11beta3 [June 5, 2006]
|
||||
Prepended "#! /bin/sh" to ltmail.sh and contrib/pngminus/*.sh (Cosmin).
|
||||
Removed the accidental leftover Makefile.in~ (Cosmin).
|
||||
Avoided potential buffer overflow and optimized buffer in
|
||||
png_write_sCAL(), png_write_sCAL_s() (Cosmin).
|
||||
Removed the include directories and libraries from CFLAGS and LDFLAGS
|
||||
in scripts/makefile.gcc (Nelson A. de Oliveira, Cosmin).
|
||||
|
||||
version 1.2.11beta4 [June 6, 2006]
|
||||
Allow zero-length IDAT chunks after the entire zlib datastream, but not
|
||||
after another intervening chunk type.
|
||||
|
||||
version 1.0.19rc1, 1.2.11rc1 [June 13, 2006]
|
||||
Deleted extraneous square brackets from [config.h] in configure.ac
|
||||
|
||||
version 1.0.19rc2, 1.2.11rc2 [June 14, 2006]
|
||||
Added prototypes for PNG_INCH_CONVERSIONS functions to png.h
|
||||
Revised INSTALL and autogen.sh
|
||||
Fixed typo in several makefiles (-W1 should be -Wl)
|
||||
Added typedef for png_int_32 and png_uint_32 on 64-bit systems.
|
||||
|
||||
version 1.0.19rc3, 1.2.11rc3 [June 15, 2006]
|
||||
Removed the new typedefs for 64-bit systems (delay until version 1.4.0)
|
||||
Added one zero element to png_gamma_shift[] array in pngrtran.c to avoid
|
||||
reading out of bounds.
|
||||
|
||||
version 1.0.19rc4, 1.2.11rc4 [June 15, 2006]
|
||||
Really removed the new typedefs for 64-bit systems.
|
||||
|
||||
version 1.0.19rc5, 1.2.11rc5 [June 22, 2006]
|
||||
Removed png_sig_bytes entry from scripts/pngw32.def
|
||||
|
||||
version 1.0.19, 1.2.11 [June 26, 2006]
|
||||
None.
|
||||
|
||||
version 1.0.20, 1.2.12 [June 27, 2006]
|
||||
Really increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid
|
||||
buffer overflow.
|
||||
|
||||
version 1.2.13beta1 [October 2, 2006]
|
||||
Removed AC_FUNC_MALLOC from configure.ac
|
||||
Work around Intel-Mac compiler bug by setting PNG_NO_MMX_CODE in pngconf.h
|
||||
Change "logical" to "bitwise" throughout documentation.
|
||||
Detect and fix attempt to write wrong iCCP profile length.
|
||||
|
||||
version 1.0.21, 1.2.13 [November 14, 2006]
|
||||
Fix potential buffer overflow in sPLT chunk handler.
|
||||
Fix Makefile.am to not try to link to noexistent files.
|
||||
Check all exported functions for NULL png_ptr.
|
||||
|
||||
version 1.2.14beta1 [November 17, 2006]
|
||||
Relocated three misplaced tests for NULL png_ptr.
|
||||
Built Makefile.in with automake-1.9.6 instead of 1.9.2.
|
||||
Build configure with autoconf-2.60 instead of 2.59
|
||||
|
||||
version 1.2.14beta2 [November 17, 2006]
|
||||
Added some typecasts in png_zalloc().
|
||||
|
||||
version 1.2.14rc1 [November 20, 2006]
|
||||
Changed "strtod" to "png_strtod" in pngrutil.c
|
||||
|
||||
version 1.0.22, 1.2.14 [November 27, 2006]
|
||||
Added missing "$(srcdir)" in Makefile.am and Makefile.in
|
||||
|
||||
version 1.2.15beta1 [December 3, 2006]
|
||||
Generated configure with autoconf-2.61 instead of 2.60
|
||||
Revised configure.ac to update libpng.pc and libpng-config.
|
||||
|
||||
version 1.2.15beta2 [December 3, 2006]
|
||||
Always export MMX asm functions, just stubs if not building pnggccrd.c
|
||||
|
||||
version 1.2.15beta3 [December 4, 2006]
|
||||
Add "png_bytep" typecast to profile while calculating length in pngwutil.c
|
||||
|
||||
version 1.2.15beta4 [December 7, 2006]
|
||||
Added scripts/CMakeLists.txt
|
||||
Changed PNG_NO_ASSEMBLER_CODE to PNG_NO_MMX_CODE in scripts, like 1.4.0beta
|
||||
|
||||
version 1.2.15beta5 [December 7, 2006]
|
||||
Changed some instances of PNG_ASSEMBLER_* to PNG_MMX_* in pnggccrd.c
|
||||
Revised scripts/CMakeLists.txt
|
||||
|
||||
version 1.2.15beta6 [December 13, 2006]
|
||||
Revised scripts/CMakeLists.txt and configure.ac
|
||||
|
||||
version 1.2.15rc1 [December 18, 2006]
|
||||
Revised scripts/CMakeLists.txt
|
||||
|
||||
version 1.2.15rc2 [December 21, 2006]
|
||||
Added conditional #undef jmpbuf in pngtest.c to undo #define in AIX headers.
|
||||
Added scripts/makefile.nommx
|
||||
|
||||
version 1.2.15rc3 [December 25, 2006]
|
||||
Fixed shared library numbering error that was intruduced in 1.2.15beta6.
|
||||
|
||||
version 1.2.15rc4 [December 27, 2006]
|
||||
Fixed handling of rgb_to_gray when png_ptr->color.gray isn't set.
|
||||
|
||||
version 1.2.15rc5 [December 31, 2006]
|
||||
Revised handling of rgb_to_gray.
|
||||
|
||||
version 1.2.15 [January 5, 2007]
|
||||
Added some (unsigned long) typecasts in pngtest.c to avoid printing errors.
|
||||
|
||||
version 1.2.16beta1 [January 6, 2007]
|
||||
Fix bugs in makefile.nommx
|
||||
|
||||
version 1.2.16beta2 [January 16, 2007]
|
||||
Revised scripts/CMakeLists.txt
|
||||
|
||||
version 1.2.16 [January 31, 2007]
|
||||
No changes.
|
||||
|
||||
version 1.2.17beta1 [March 6, 2007]
|
||||
Revised scripts/CMakeLists.txt to install both shared and static libraries.
|
||||
Deleted a redundant line from pngset.c.
|
||||
|
||||
version 1.2.17beta2 [April 26, 2007]
|
||||
Relocated misplaced test for png_ptr == NULL in pngpread.c
|
||||
Change "==" to "&" for testing PNG_RGB_TO_GRAY_ERR & PNG_RGB_TO_GRAY_WARN
|
||||
flags.
|
||||
Changed remaining instances of PNG_ASSEMBLER_* to PNG_MMX_*
|
||||
Added pngerror() when write_IHDR fails in deflateInit2().
|
||||
Added "const" to some array declarations.
|
||||
Mention examples of libpng usage in the libpng*.txt and libpng.3 documents.
|
||||
|
||||
version 1.2.17rc1 [May 4, 2007]
|
||||
No changes.
|
||||
|
||||
version 1.2.17rc2 [May 8, 2007]
|
||||
Moved several PNG_HAVE_* macros out of PNG_INTERNAL because applications
|
||||
calling set_unknown_chunk_location() need them.
|
||||
Changed transformation flag from PNG_EXPAND_tRNS to PNG_EXPAND in
|
||||
png_set_expand_gray_1_2_4_to_8().
|
||||
Added png_ptr->unknown_chunk to hold working unknown chunk data, so it
|
||||
can be free'ed in case of error. Revised unknown chunk handling in
|
||||
pngrutil.c and pngpread.c to use this structure.
|
||||
|
||||
version 1.2.17rc3 [May 8, 2007]
|
||||
Revised symbol-handling in configure script.
|
||||
|
||||
version 1.2.17rc4 [May 10, 2007]
|
||||
Revised unknown chunk handling to avoid storing unknown critical chunks.
|
||||
|
||||
version 1.0.25 [May 15, 2007]
|
||||
version 1.2.17 [May 15, 2007]
|
||||
Added "png_ptr->num_trans=0" before error return in png_handle_tRNS,
|
||||
to eliminate a vulnerability (CVE-2007-2445, CERT VU#684664)
|
||||
|
||||
version 1.0.26 [May 15, 2007]
|
||||
version 1.2.18 [May 15, 2007]
|
||||
Reverted the libpng-1.2.17rc3 change to symbol-handling in configure script
|
||||
|
||||
version 1.2.19beta1 [May 18, 2007]
|
||||
Changed "const static" to "static PNG_CONST" everywhere, mostly undoing
|
||||
change of libpng-1.2.17beta2. Changed other "const" to "PNG_CONST"
|
||||
Changed some handling of unused parameters, to avoid compiler warnings.
|
||||
"if (unused == NULL) return;" becomes "unused = unused".
|
||||
|
||||
version 1.2.19beta2 [May 18, 2007]
|
||||
Only use the valid bits of tRNS value in png_do_expand() (Brian Cartier)
|
||||
|
||||
version 1.2.19beta3 [May 19, 2007]
|
||||
Add some "png_byte" typecasts in png_check_keyword() and write new_key
|
||||
instead of key in zTXt chunk (Kevin Ryde).
|
||||
|
||||
version 1.2.19beta4 [May 21, 2007]
|
||||
Add png_snprintf() function and use it in place of sprint() for improved
|
||||
defense against buffer overflows.
|
||||
|
||||
version 1.2.19beta5 [May 21, 2007]
|
||||
Fixed png_handle_tRNS() to only use the valid bits of tRNS value.
|
||||
Changed handling of more unused parameters, to avoid compiler warnings.
|
||||
Removed some PNG_CONST in pngwutil.c to avoid compiler warnings.
|
||||
|
||||
version 1.2.19beta6 [May 22, 2007]
|
||||
Added some #ifdef PNG_MMX_CODE_SUPPORTED where needed in pngvcrd.c
|
||||
Added a special "_MSC_VER" case that defines png_snprintf to _snprintf
|
||||
|
||||
version 1.2.19beta7 [May 22, 2007]
|
||||
Squelched png_squelch_warnings() in pnggccrd.c and added an
|
||||
#ifdef PNG_MMX_CODE_SUPPORTED block around the declarations that caused
|
||||
the warnings that png_squelch_warnings was squelching.
|
||||
|
||||
version 1.2.19beta8 [May 22, 2007]
|
||||
Removed __MMX__ from test in pngconf.h.
|
||||
|
||||
version 1.2.19beta9 [May 23, 2007]
|
||||
Made png_squelch_warnings() available via PNG_SQUELCH_WARNINGS macro.
|
||||
Revised png_squelch_warnings() so it might work.
|
||||
Updated makefile.sgcc and makefile.solaris; added makefile.solaris-x86.
|
||||
|
||||
version 1.2.19beta10 [May 24, 2007]
|
||||
Resquelched png_squelch_warnings(), use "__attribute__((used))" instead.
|
||||
|
||||
version 1.2.19beta11 [May 28, 2007]
|
||||
Return 0 from png_get_sPLT() and png_get_unknown_chunks() if png_ptr is NULL;
|
||||
changed three remaining instances of png_strcpy() to png_strncpy() (David
|
||||
Hill).
|
||||
Make test for NULL row_buf at the beginning of png_do_read_transformations
|
||||
unconditional.
|
||||
|
||||
version 1.2.19beta12 [May 28, 2007]
|
||||
Revised pnggccrd.c.
|
||||
|
||||
version 1.2.19beta13 [June 14, 2007]
|
||||
Prefer PNG_USE_PNGVCRD when _MSC_VER is defined in pngconf.h
|
||||
|
||||
version 1.2.19beta14 [June 16, 2007]
|
||||
Fix bug with handling of 16-bit transparency, introduced in 1.2.19beta2
|
||||
|
||||
version 1.2.19beta15 [June 17, 2007]
|
||||
Revised pnggccrd.c.
|
||||
|
||||
version 1.2.19beta16 [June 18, 2007]
|
||||
Revised pnggccrd.c again.
|
||||
Updated contrib/gregbook.
|
||||
Changed '#include "pnggccrd.c"' to 'include "$srcdir/pnggccrd.c"'
|
||||
in configure.ac
|
||||
|
||||
version 1.2.19beta17 [June 19, 2007]
|
||||
Revised many of the makefiles, to set -DPNG_NO_MMX_CODE where needed
|
||||
and to not use -O3 unless -DPNG_NO_MMX_CODE is also set.
|
||||
|
||||
version 1.2.19beta18 [June 23, 2007]
|
||||
Replaced some C++ style comments with C style comments in pnggccrd.c.
|
||||
Copied optimized C code from pnggccrd.c to pngrutil.c, removed dependency
|
||||
on pnggccrd.o from many makefiles.
|
||||
Added sl and dylib to list of extensions be installed by Makefile.am
|
||||
|
||||
version 1.2.19beta19 [June 28, 2007]
|
||||
Fixed testing PNG_RGB_TO_GRAY_ERR & PNG_RGB_TO_GRAY_WARN in pngrtran.c
|
||||
More cleanup of pnggccrd.c and pngvcrd.c
|
||||
|
||||
version 1.2.19beta20 [June 29, 2007]
|
||||
Rebuilt Makefile.in and configure using libtool-1.5.24.
|
||||
Fixed typo in pnggccrd.c
|
||||
|
||||
version 1.2.19beta21 [June 30, 2007]
|
||||
More revision of pnggccrd.c
|
||||
Added "test" target to Makefile.in and Makefile.am
|
||||
|
||||
version 1.2.19beta22 [July 3, 2007]
|
||||
Added info about pngrutil/pnggccrd/pngvcrd to png_get_header_version()
|
||||
Fix type definition of dummy_value_a, b in pnggccrd.c
|
||||
|
||||
version 1.2.19beta23 [July 10, 2007]
|
||||
Revert change to type definition of dummy_value_a, b in pnggccrd.c
|
||||
Make sure __PIC__ is defined in pnggccrd.c when PIC is defined.
|
||||
Require gcc-4.1 or better to use PNG_HAVE_MMX_FILTER_ROW on x86_64 platforms
|
||||
|
||||
version 1.2.19beta24 [July 14, 2007]
|
||||
Added PNG_NO_READ_FILTER, PNG_NO_WRITE_FILTER, PNG_NO_WARNING macros.
|
||||
Added contrib/pngminim to demonstrate building minimal encoder and decoder
|
||||
|
||||
version 1.2.19beta25 [July 15, 2007]
|
||||
Removed the new PNG_NO_READ_FILTER macro since it would make the library
|
||||
unable to read valid PNG files, and filtering is at the heart of the
|
||||
PNG format.
|
||||
|
||||
version 1.2.19beta26 [July 16, 2007]
|
||||
Changed "png_free(str)" to "png_free(png_ptr,str)" in pngrutil.c WinCE
|
||||
code (Yves Piguet). This bug was introduced in libpng-1.2.14.
|
||||
Updated scripts/CMakeLists.txt
|
||||
Relocated a misplaced #endif in pnggccrd.c
|
||||
|
||||
version 1.2.19beta27 [July 17, 2007]
|
||||
Fixed incorrect stride and number of bytes copied (was 4 instead of
|
||||
6 bytes) in the cleanup loop of pnggccrd.c and pngvcrd.c for handling
|
||||
the end of 48-bit interlaced rows (Glenn R-P).
|
||||
|
||||
version 1.2.19beta28 [July 19, 2007]
|
||||
Removed requirement for gcc-4.1 or better to use PNG_HAVE_MMX_FILTER_ROW
|
||||
on x86_64 platforms
|
||||
Added png_warning() in pngrutil.c for short iCCP, iTXt, sPLT, or zTXT chunks.
|
||||
Revised pngtest.c so warnings are displayed regardless of PNG_NO_STDIO.
|
||||
|
||||
version 1.2.19beta29 [July 20, 2007]
|
||||
Fix typo in pnggccrd.c (%%eax should be %%ax in secondloop48)
|
||||
|
||||
version 1.2.19beta30 [July 26, 2007]
|
||||
Revised pnggccrd.c
|
||||
|
||||
version 1.2.19beta31 [July 27, 2007]
|
||||
Fix typos in pnggccrd.c
|
||||
|
||||
version 1.0.27rc1 and 1.2.19rc1 [July 31, 2007]
|
||||
Disable PNG_MMX_CODE_SUPPORTED when PNG_ASSEMBLER_CODE_SUPPORTED is off.
|
||||
Enable PNG_MMX_READ_FILTER_* by default, except when gcc-3.x is being
|
||||
used (they were inadvertently disabled in libpng-1.2.19beta23).
|
||||
Fix some debugging statements in pnggccrd.c and pngrutil.c
|
||||
Added information about disabling the MMX code in libpng documentation.
|
||||
|
||||
version 1.0.27rc2 and 1.2.19rc2 [August 4, 2007]
|
||||
Removed some "#if 0" blocks.
|
||||
Made a global struct local in pngvcrd.c to make it thread safe.
|
||||
Issue a png_error() if application attempts to transform a row tht
|
||||
has not been initialized.
|
||||
|
||||
version 1.0.27rc3 and 1.2.19rc3 [August 9, 2007]
|
||||
Slightly revised pngvcrd.c
|
||||
|
||||
version 1.0.27rc4 and 1.2.19rc4 [August 9, 2007]
|
||||
Revised pnggccrd.c debugging change of rc1, which was broken.
|
||||
Revised scripts/CMakeLists.txt
|
||||
Change default to PNG_NO_GLOBAL_ARRAYS for MSVC.
|
||||
Turn off PNG_FLAG_ROW_INIT flag when setting transforms that expand pixels.
|
||||
|
||||
version 1.0.27rc5 and 1.2.19rc5 [August 10, 2007]
|
||||
Fix typo (missing '"') in pnggccrd.c
|
||||
Revise handling of png_strtod in recent versions of WINCE
|
||||
|
||||
version 1.0.27rc6 and 1.2.19rc6 [August 15, 2007]
|
||||
Fix typo (missing ',') in contrib/gregbook/readpng2.c
|
||||
Undid row initialization error exit added to rc2 and rc4.
|
||||
|
||||
version 1.0.27 and 1.2.19 [August 18, 2007]
|
||||
Conditionally restored row initialization error exit.
|
||||
|
||||
version 1.2.20beta01 [August 19, 2007]
|
||||
Fixed problem with compiling pnggccrd.c on Intel-Apple platforms.
|
||||
Added PNG_NO_ERROR_TEXT feature, with demo in contrib/pngminim
|
||||
Removed define PNG_WARN_UNINITIALIZED_ROW 1 /* 0: warning; 1: error */
|
||||
because it caused some trouble.
|
||||
|
||||
version 1.2.20beta02 [August 20, 2007]
|
||||
Avoid compiling pnggccrd.c on Intel-Apple platforms.
|
||||
|
||||
version 1.2.20beta03 [August 20, 2007]
|
||||
Added "/D PNG_NO_MMX_CODE" to the non-mmx builds of projects/visualc6
|
||||
and visualc71.
|
||||
|
||||
version 1.2.20beta04 [August 21, 2007]
|
||||
Revised pngvcrd.c for improved efficiency (Steve Snyder).
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
||||
45
INSTALL
45
INSTALL
@@ -1,16 +1,24 @@
|
||||
|
||||
Installing libpng version 1.2.10rc1 - April 19, 2006
|
||||
Installing libpng version 1.2.20beta04 - August 21, 2007
|
||||
|
||||
On Unix/Linux and similar systems, you can simply type
|
||||
|
||||
./autogen.sh
|
||||
./configure [--prefix=$HOME]
|
||||
./configure [--prefix=/path]
|
||||
make check
|
||||
make install
|
||||
|
||||
and ignore the rest of this document.
|
||||
|
||||
Or you can use one of the custom-built makefiles in the
|
||||
If configure does not work on your system and you have a reasonably
|
||||
up-to-date set of tools, running ./autogen.sh before running ./configure
|
||||
may fix the problem. You can also run the individual commands in
|
||||
autogen.sh with the --force option, if supported by your version of
|
||||
the tools. If you run 'libtoolize --force', though, this will replace
|
||||
the distributed, patched, version of ltmain.sh with an unpatched version
|
||||
and your shared library builds may fail to produce libraries with the
|
||||
correct version numbers.
|
||||
|
||||
Instead, you can use one of the custom-built makefiles in the
|
||||
"scripts" directory
|
||||
|
||||
cp scripts/makefile.system makefile
|
||||
@@ -19,6 +27,13 @@ Or you can use one of the custom-built makefiles in the
|
||||
|
||||
Or you can use one of the "projects" in the "projects" directory.
|
||||
|
||||
If you want to use "cmake" (see www.cmake.org), copy CMakeLists.txt
|
||||
from the "scripts" directory to this directory and type
|
||||
|
||||
cmake . [-DPNG_MMX=YES] -DCMAKE_INSTALL_PREFIX=/path
|
||||
make
|
||||
make install
|
||||
|
||||
Before installing libpng, you must first install zlib, if it
|
||||
is not already on your system. zlib can usually be found
|
||||
wherever you got libpng. zlib can be placed in another directory,
|
||||
@@ -29,7 +44,7 @@ to have access to the zlib.h and zconf.h include files that
|
||||
correspond to the version of zlib that's installed.
|
||||
|
||||
You can rename the directories that you downloaded (they
|
||||
might be called "libpng-1.2.10rc1" or "lpng109" and "zlib-1.2.1"
|
||||
might be called "libpng-1.2.20beta04" or "lpng109" and "zlib-1.2.1"
|
||||
or "zlib121") so that you have directories called "zlib" and "libpng".
|
||||
|
||||
Your directory structure should look like this:
|
||||
@@ -83,14 +98,18 @@ makefile.sys in the scripts directory.
|
||||
The files that are presently available in the scripts directory
|
||||
include
|
||||
|
||||
CMakeLists.txt => "cmake" script
|
||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||
makefile.elf => Linux/ELF makefile symbol versioning,
|
||||
gcc, creates libpng12.so.0.1.2.10rc1)
|
||||
gcc, creates libpng12.so.0.1.2.20beta04)
|
||||
makefile.linux => Linux/ELF makefile
|
||||
(gcc, creates libpng12.so.0.1.2.10rc1)
|
||||
(gcc, creates libpng12.so.0.1.2.20beta04)
|
||||
makefile.gcmmx => Linux/ELF makefile
|
||||
(gcc, creates libpng12.so.0.1.2.10rc1,
|
||||
(gcc, creates libpng12.so.0.1.2.20beta04,
|
||||
uses assembler code tuned for Intel MMX platform)
|
||||
makefile.nommx => Linux/ELF makefile
|
||||
(gcc, creates libpng12.so.0.1.2.20beta04
|
||||
does not use Intel MMX assembler code)
|
||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||
ansi2knr (Requires ansi2knr.c from
|
||||
@@ -112,12 +131,14 @@ include
|
||||
makefile.openbsd => OpenBSD makefile
|
||||
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
||||
makefile.sggcc => Silicon Graphics (gcc,
|
||||
creates libpng12.so.0.1.2.10rc1)
|
||||
creates libpng12.so.0.1.2.20beta04)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile (gcc,
|
||||
creates libpng12.so.0.1.2.10rc1)
|
||||
creates libpng12.so.0.1.2.20beta04)
|
||||
makefile.solaris-x86 => Solaris/intelMMX 2.X makefile (gcc,
|
||||
creates libpng12.so.0.1.2.20beta04)
|
||||
makefile.so9 => Solaris 9 makefile (gcc,
|
||||
creates libpng12.so.0.1.2.10rc1)
|
||||
creates libpng12.so.0.1.2.20beta04)
|
||||
makefile.32sunu => Sun Ultra 32-bit makefile
|
||||
makefile.64sunu => Sun Ultra 64-bit makefile
|
||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||
@@ -197,7 +218,7 @@ which previously was done semi-automatically (if you didn't edit
|
||||
scripts/makefile.* yourself, that is)
|
||||
|
||||
|
||||
CFLAGS="-Wall -O3 -funroll-loops \
|
||||
CFLAGS="-Wall -O -funroll-loops \
|
||||
-malign-loops=2 -malign-functions=2" ./configure --prefix=/usr/include \
|
||||
--with-pkgconfigdir=/usr/lib/pkgconfig --includedir=/usr/include
|
||||
|
||||
|
||||
10
KNOWNBUG
10
KNOWNBUG
@@ -1,5 +1,5 @@
|
||||
|
||||
Known bugs in libpng version 1.2.10rc1
|
||||
Known bugs in libpng version 1.2.20beta04
|
||||
|
||||
1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when
|
||||
reading interlaced PNG files, when assembler code is enabled but running
|
||||
@@ -19,5 +19,11 @@ Known bugs in libpng version 1.2.10rc1
|
||||
libpng12.so => libpng12.so.0.1.2.9betaN
|
||||
that are generated by the custom makefiles.
|
||||
|
||||
STATUS: For now, system library builders should use the custom makefiles.
|
||||
4. June 28, 2007: Pnggccrd.c has been reported to be unreliable on
|
||||
several 64-bit platforms running gcc-3.x. Although it appears to
|
||||
build properly, it does not always read files correctly.
|
||||
|
||||
STATUS: Appears to be a bug in the 64-bit version of gcc-3.4.6.
|
||||
Workarounds are to define PNG_NO_MMX_FILTER_UP|AVG|PAETH (as in
|
||||
pngconf.h) or to upgrade gcc to a newer version.
|
||||
|
||||
|
||||
6
LICENSE
6
LICENSE
@@ -8,8 +8,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
|
||||
If you modify libpng you may insert additional notices immediately following
|
||||
this sentence.
|
||||
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.2.10rc1, April 19, 2006, are
|
||||
Copyright (c) 2004, 2006 Glenn Randers-Pehrson, and are
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.2.20beta04, August 21, 2007, are
|
||||
Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are
|
||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||
with the following individual added to the list of Contributing Authors
|
||||
|
||||
@@ -106,4 +106,4 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
glennrp at users.sourceforge.net
|
||||
April 19, 2006
|
||||
August 21, 2007
|
||||
|
||||
34
Makefile.am
34
Makefile.am
@@ -8,7 +8,7 @@
|
||||
# -version-number settings below so that the new values have
|
||||
# the correct major part (first field).
|
||||
|
||||
PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@
|
||||
PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
|
||||
|
||||
# libpng does not follow GNU file name conventions
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
@@ -42,10 +42,10 @@ libpng12_la_CPPFLAGS = @LIBPNG_DEFINES@
|
||||
|
||||
# MAJOR UPGRADE: the version-number settings below must be changed.
|
||||
libpng12_la_LDFLAGS = -no-undefined -export-dynamic \
|
||||
-version-number 0:@PNGLIB_MINOR@:0
|
||||
-version-number 0:@PNGLIB_RELEASE@:0
|
||||
# -rpath is needed as automake doesn't know the directory
|
||||
libpng_la_LDFLAGS = -rpath '$(libdir)' -no-undefined -export-dynamic \
|
||||
-version-number 3:@PNGLIB_MINOR@:0
|
||||
-version-number 3:@PNGLIB_RELEASE@:0
|
||||
|
||||
if HAVE_LD_VERSION_SCRIPT
|
||||
# Versioned symbols and restricted exports
|
||||
@@ -85,7 +85,8 @@ EXTRA_DIST= \
|
||||
$(TESTS) \
|
||||
example.c libpng.txt pngvcrd.c
|
||||
|
||||
CLEANFILES= pngout.png libpng12.pc libpng12-config libpng.vers libpng.sym
|
||||
CLEANFILES= pngout.png libpng12.pc libpng12-config libpng.vers \
|
||||
libpng.sym
|
||||
|
||||
$(PNGLIB_BASENAME).pc: libpng.pc
|
||||
cp libpng.pc $@
|
||||
@@ -103,11 +104,13 @@ libpng.sym: png.h pngconf.h
|
||||
|
||||
libpng.vers: libpng.sym
|
||||
rm -f $@ $@.new
|
||||
$(ECHO) PNG@PNGLIB_MAJOR@_0 '{global:' > $@.new
|
||||
$(ECHO) PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0 '{global:' > $@.new
|
||||
$(SED) s/$$/\;/ libpng.sym >> $@.new
|
||||
$(ECHO) 'local: *; };' >> $@.new
|
||||
mv $@.new $@
|
||||
|
||||
test: check
|
||||
|
||||
# install the .../include headers as links to the new ones
|
||||
install-data-hook:
|
||||
cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h
|
||||
@@ -116,19 +119,18 @@ install-data-hook:
|
||||
cd $(DESTDIR)$(pkgconfigdir); rm -f libpng.pc
|
||||
cd $(DESTDIR)$(pkgconfigdir); $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc
|
||||
|
||||
# do evil things to libpng to cause libpng12 to be used, if
|
||||
# the compat library is not being built do nothing.
|
||||
# do evil things to libpng to cause libpng12 to be used
|
||||
install-exec-hook:
|
||||
cd $(DESTDIR)$(bindir); rm -f libpng-config
|
||||
cd $(DESTDIR)$(bindir); $(LN_S) $(PNGLIB_BASENAME)-config libpng-config
|
||||
@if test -n "@compatlib@"; then\
|
||||
set -x;\
|
||||
cd $(DESTDIR)$(libdir);\
|
||||
for ext in a la so; do\
|
||||
rm -f libpng.$$ext;\
|
||||
$(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\
|
||||
done;\
|
||||
fi
|
||||
@set -x;\
|
||||
cd $(DESTDIR)$(libdir);\
|
||||
for ext in a la so sl dylib; do\
|
||||
rm -f libpng.$$ext;\
|
||||
if test -f $(PNGLIB_BASENAME).$$ext; then\
|
||||
$(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\
|
||||
fi;\
|
||||
done
|
||||
|
||||
uninstall-hook:
|
||||
cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h
|
||||
@@ -137,7 +139,7 @@ uninstall-hook:
|
||||
@if test -n "@compatlib@"; then\
|
||||
set -x;\
|
||||
cd $(DESTDIR)$(libdir);\
|
||||
for ext in a la so; do\
|
||||
for ext in a la so sl dylib; do\
|
||||
rm -f libpng.$$ext;\
|
||||
done;\
|
||||
fi
|
||||
|
||||
194
Makefile.in
194
Makefile.in
@@ -2,7 +2,7 @@
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
|
||||
|
||||
SOURCES = $(libpng_la_SOURCES) $(libpng12_la_SOURCES) $(pngtest_SOURCES)
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
@@ -46,7 +48,6 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
check_PROGRAMS = pngtest$(EXEEXT)
|
||||
@HAVE_LD_VERSION_SCRIPT_TRUE@am__append_1 = -Wl,--version-script=libpng.vers
|
||||
@@ -55,9 +56,9 @@ DIST_COMMON = README $(am__configure_deps) $(dist_man_MANS) \
|
||||
$(pkginclude_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(top_srcdir)/configure $(top_srcdir)/scripts/libpng-config.in \
|
||||
$(top_srcdir)/scripts/libpng.pc.in INSTALL TODO compile \
|
||||
config.guess config.sub depcomp install-sh ltmain.sh missing \
|
||||
mkinstalldirs
|
||||
$(top_srcdir)/scripts/libpng.pc-configure.in INSTALL TODO \
|
||||
compile config.guess config.sub depcomp install-sh ltmain.sh \
|
||||
missing mkinstalldirs
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
@@ -110,11 +111,11 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libpng_la_SOURCES) $(libpng12_la_SOURCES) \
|
||||
$(pngtest_SOURCES)
|
||||
@@ -173,6 +174,7 @@ EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
HAVE_LD_VERSION_SCRIPT_FALSE = @HAVE_LD_VERSION_SCRIPT_FALSE@
|
||||
HAVE_LD_VERSION_SCRIPT_TRUE = @HAVE_LD_VERSION_SCRIPT_TRUE@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
@@ -182,6 +184,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBPNG_DEFINES = @LIBPNG_DEFINES@
|
||||
LIBPNG_NO_MMX = @LIBPNG_NO_MMX@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
@@ -200,6 +203,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PNGLIB_MAJOR = @PNGLIB_MAJOR@
|
||||
PNGLIB_MINOR = @PNGLIB_MINOR@
|
||||
PNGLIB_RELEASE = @PNGLIB_RELEASE@
|
||||
PNGLIB_VERSION = @PNGLIB_VERSION@
|
||||
POW_LIB = @POW_LIB@
|
||||
RANLIB = @RANLIB@
|
||||
@@ -208,13 +212,9 @@ SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_SED = @ac_ct_SED@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
@@ -235,32 +235,39 @@ build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
compatlib = @compatlib@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
|
||||
# pkg-config stuff, note that libpng.pc is always required in order
|
||||
# to get the correct library
|
||||
pkgconfigdir = @pkgconfigdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
PNGLIB_BASENAME = libpng@PNGLIB_MAJOR@
|
||||
PNGLIB_BASENAME = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
|
||||
|
||||
# libpng does not follow GNU file name conventions
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
@@ -288,10 +295,10 @@ libpng12_la_CPPFLAGS = @LIBPNG_DEFINES@
|
||||
|
||||
# MAJOR UPGRADE: the version-number settings below must be changed.
|
||||
libpng12_la_LDFLAGS = -no-undefined -export-dynamic -version-number \
|
||||
0:@PNGLIB_MINOR@:0 $(am__append_1) $(am__append_2)
|
||||
0:@PNGLIB_RELEASE@:0 $(am__append_1) $(am__append_2)
|
||||
# -rpath is needed as automake doesn't know the directory
|
||||
libpng_la_LDFLAGS = -rpath '$(libdir)' -no-undefined -export-dynamic \
|
||||
-version-number 3:@PNGLIB_MINOR@:0
|
||||
-version-number 3:@PNGLIB_RELEASE@:0
|
||||
|
||||
@HAVE_LD_VERSION_SCRIPT_FALSE@libpng12_la_DEPENDENCIES = libpng.sym
|
||||
@HAVE_LD_VERSION_SCRIPT_TRUE@libpng12_la_DEPENDENCIES = libpng.vers
|
||||
@@ -317,7 +324,9 @@ EXTRA_DIST = \
|
||||
$(TESTS) \
|
||||
example.c libpng.txt pngvcrd.c
|
||||
|
||||
CLEANFILES = pngout.png libpng12.pc libpng12-config libpng.vers libpng.sym
|
||||
CLEANFILES = pngout.png libpng12.pc libpng12-config libpng.vers \
|
||||
libpng.sym
|
||||
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||
|
||||
@@ -373,7 +382,7 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
libpng.pc: $(top_builddir)/config.status $(top_srcdir)/scripts/libpng.pc.in
|
||||
libpng.pc: $(top_builddir)/config.status $(top_srcdir)/scripts/libpng.pc-configure.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
libpng-config: $(top_builddir)/config.status $(top_srcdir)/scripts/libpng-config.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
@@ -500,228 +509,228 @@ distclean-compile:
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
libpng_la-png.lo: png.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-png.lo -MD -MP -MF "$(DEPDIR)/libpng_la-png.Tpo" -c -o libpng_la-png.lo `test -f 'png.c' || echo '$(srcdir)/'`png.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-png.lo -MD -MP -MF "$(DEPDIR)/libpng_la-png.Tpo" -c -o libpng_la-png.lo `test -f 'png.c' || echo '$(srcdir)/'`png.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng_la-png.Tpo" "$(DEPDIR)/libpng_la-png.Plo"; else rm -f "$(DEPDIR)/libpng_la-png.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='png.c' object='libpng_la-png.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-png.lo `test -f 'png.c' || echo '$(srcdir)/'`png.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-png.lo `test -f 'png.c' || echo '$(srcdir)/'`png.c
|
||||
|
||||
libpng_la-pngset.lo: pngset.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngset.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngset.Tpo" -c -o libpng_la-pngset.lo `test -f 'pngset.c' || echo '$(srcdir)/'`pngset.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngset.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngset.Tpo" -c -o libpng_la-pngset.lo `test -f 'pngset.c' || echo '$(srcdir)/'`pngset.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng_la-pngset.Tpo" "$(DEPDIR)/libpng_la-pngset.Plo"; else rm -f "$(DEPDIR)/libpng_la-pngset.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngset.c' object='libpng_la-pngset.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngset.lo `test -f 'pngset.c' || echo '$(srcdir)/'`pngset.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngset.lo `test -f 'pngset.c' || echo '$(srcdir)/'`pngset.c
|
||||
|
||||
libpng_la-pngget.lo: pngget.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngget.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngget.Tpo" -c -o libpng_la-pngget.lo `test -f 'pngget.c' || echo '$(srcdir)/'`pngget.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngget.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngget.Tpo" -c -o libpng_la-pngget.lo `test -f 'pngget.c' || echo '$(srcdir)/'`pngget.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng_la-pngget.Tpo" "$(DEPDIR)/libpng_la-pngget.Plo"; else rm -f "$(DEPDIR)/libpng_la-pngget.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngget.c' object='libpng_la-pngget.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngget.lo `test -f 'pngget.c' || echo '$(srcdir)/'`pngget.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngget.lo `test -f 'pngget.c' || echo '$(srcdir)/'`pngget.c
|
||||
|
||||
libpng_la-pngrutil.lo: pngrutil.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngrutil.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngrutil.Tpo" -c -o libpng_la-pngrutil.lo `test -f 'pngrutil.c' || echo '$(srcdir)/'`pngrutil.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngrutil.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngrutil.Tpo" -c -o libpng_la-pngrutil.lo `test -f 'pngrutil.c' || echo '$(srcdir)/'`pngrutil.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng_la-pngrutil.Tpo" "$(DEPDIR)/libpng_la-pngrutil.Plo"; else rm -f "$(DEPDIR)/libpng_la-pngrutil.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngrutil.c' object='libpng_la-pngrutil.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngrutil.lo `test -f 'pngrutil.c' || echo '$(srcdir)/'`pngrutil.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngrutil.lo `test -f 'pngrutil.c' || echo '$(srcdir)/'`pngrutil.c
|
||||
|
||||
libpng_la-pngtrans.lo: pngtrans.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngtrans.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngtrans.Tpo" -c -o libpng_la-pngtrans.lo `test -f 'pngtrans.c' || echo '$(srcdir)/'`pngtrans.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngtrans.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngtrans.Tpo" -c -o libpng_la-pngtrans.lo `test -f 'pngtrans.c' || echo '$(srcdir)/'`pngtrans.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng_la-pngtrans.Tpo" "$(DEPDIR)/libpng_la-pngtrans.Plo"; else rm -f "$(DEPDIR)/libpng_la-pngtrans.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngtrans.c' object='libpng_la-pngtrans.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngtrans.lo `test -f 'pngtrans.c' || echo '$(srcdir)/'`pngtrans.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngtrans.lo `test -f 'pngtrans.c' || echo '$(srcdir)/'`pngtrans.c
|
||||
|
||||
libpng_la-pngwutil.lo: pngwutil.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngwutil.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngwutil.Tpo" -c -o libpng_la-pngwutil.lo `test -f 'pngwutil.c' || echo '$(srcdir)/'`pngwutil.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngwutil.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngwutil.Tpo" -c -o libpng_la-pngwutil.lo `test -f 'pngwutil.c' || echo '$(srcdir)/'`pngwutil.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng_la-pngwutil.Tpo" "$(DEPDIR)/libpng_la-pngwutil.Plo"; else rm -f "$(DEPDIR)/libpng_la-pngwutil.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngwutil.c' object='libpng_la-pngwutil.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngwutil.lo `test -f 'pngwutil.c' || echo '$(srcdir)/'`pngwutil.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngwutil.lo `test -f 'pngwutil.c' || echo '$(srcdir)/'`pngwutil.c
|
||||
|
||||
libpng_la-pngread.lo: pngread.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngread.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngread.Tpo" -c -o libpng_la-pngread.lo `test -f 'pngread.c' || echo '$(srcdir)/'`pngread.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngread.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngread.Tpo" -c -o libpng_la-pngread.lo `test -f 'pngread.c' || echo '$(srcdir)/'`pngread.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng_la-pngread.Tpo" "$(DEPDIR)/libpng_la-pngread.Plo"; else rm -f "$(DEPDIR)/libpng_la-pngread.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngread.c' object='libpng_la-pngread.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngread.lo `test -f 'pngread.c' || echo '$(srcdir)/'`pngread.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngread.lo `test -f 'pngread.c' || echo '$(srcdir)/'`pngread.c
|
||||
|
||||
libpng_la-pngrio.lo: pngrio.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngrio.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngrio.Tpo" -c -o libpng_la-pngrio.lo `test -f 'pngrio.c' || echo '$(srcdir)/'`pngrio.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngrio.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngrio.Tpo" -c -o libpng_la-pngrio.lo `test -f 'pngrio.c' || echo '$(srcdir)/'`pngrio.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng_la-pngrio.Tpo" "$(DEPDIR)/libpng_la-pngrio.Plo"; else rm -f "$(DEPDIR)/libpng_la-pngrio.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngrio.c' object='libpng_la-pngrio.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngrio.lo `test -f 'pngrio.c' || echo '$(srcdir)/'`pngrio.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngrio.lo `test -f 'pngrio.c' || echo '$(srcdir)/'`pngrio.c
|
||||
|
||||
libpng_la-pngwio.lo: pngwio.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngwio.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngwio.Tpo" -c -o libpng_la-pngwio.lo `test -f 'pngwio.c' || echo '$(srcdir)/'`pngwio.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngwio.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngwio.Tpo" -c -o libpng_la-pngwio.lo `test -f 'pngwio.c' || echo '$(srcdir)/'`pngwio.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng_la-pngwio.Tpo" "$(DEPDIR)/libpng_la-pngwio.Plo"; else rm -f "$(DEPDIR)/libpng_la-pngwio.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngwio.c' object='libpng_la-pngwio.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngwio.lo `test -f 'pngwio.c' || echo '$(srcdir)/'`pngwio.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngwio.lo `test -f 'pngwio.c' || echo '$(srcdir)/'`pngwio.c
|
||||
|
||||
libpng_la-pngwrite.lo: pngwrite.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngwrite.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngwrite.Tpo" -c -o libpng_la-pngwrite.lo `test -f 'pngwrite.c' || echo '$(srcdir)/'`pngwrite.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngwrite.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngwrite.Tpo" -c -o libpng_la-pngwrite.lo `test -f 'pngwrite.c' || echo '$(srcdir)/'`pngwrite.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng_la-pngwrite.Tpo" "$(DEPDIR)/libpng_la-pngwrite.Plo"; else rm -f "$(DEPDIR)/libpng_la-pngwrite.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngwrite.c' object='libpng_la-pngwrite.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngwrite.lo `test -f 'pngwrite.c' || echo '$(srcdir)/'`pngwrite.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngwrite.lo `test -f 'pngwrite.c' || echo '$(srcdir)/'`pngwrite.c
|
||||
|
||||
libpng_la-pngrtran.lo: pngrtran.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngrtran.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngrtran.Tpo" -c -o libpng_la-pngrtran.lo `test -f 'pngrtran.c' || echo '$(srcdir)/'`pngrtran.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngrtran.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngrtran.Tpo" -c -o libpng_la-pngrtran.lo `test -f 'pngrtran.c' || echo '$(srcdir)/'`pngrtran.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng_la-pngrtran.Tpo" "$(DEPDIR)/libpng_la-pngrtran.Plo"; else rm -f "$(DEPDIR)/libpng_la-pngrtran.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngrtran.c' object='libpng_la-pngrtran.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngrtran.lo `test -f 'pngrtran.c' || echo '$(srcdir)/'`pngrtran.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngrtran.lo `test -f 'pngrtran.c' || echo '$(srcdir)/'`pngrtran.c
|
||||
|
||||
libpng_la-pngwtran.lo: pngwtran.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngwtran.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngwtran.Tpo" -c -o libpng_la-pngwtran.lo `test -f 'pngwtran.c' || echo '$(srcdir)/'`pngwtran.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngwtran.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngwtran.Tpo" -c -o libpng_la-pngwtran.lo `test -f 'pngwtran.c' || echo '$(srcdir)/'`pngwtran.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng_la-pngwtran.Tpo" "$(DEPDIR)/libpng_la-pngwtran.Plo"; else rm -f "$(DEPDIR)/libpng_la-pngwtran.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngwtran.c' object='libpng_la-pngwtran.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngwtran.lo `test -f 'pngwtran.c' || echo '$(srcdir)/'`pngwtran.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngwtran.lo `test -f 'pngwtran.c' || echo '$(srcdir)/'`pngwtran.c
|
||||
|
||||
libpng_la-pngmem.lo: pngmem.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngmem.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngmem.Tpo" -c -o libpng_la-pngmem.lo `test -f 'pngmem.c' || echo '$(srcdir)/'`pngmem.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngmem.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngmem.Tpo" -c -o libpng_la-pngmem.lo `test -f 'pngmem.c' || echo '$(srcdir)/'`pngmem.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng_la-pngmem.Tpo" "$(DEPDIR)/libpng_la-pngmem.Plo"; else rm -f "$(DEPDIR)/libpng_la-pngmem.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngmem.c' object='libpng_la-pngmem.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngmem.lo `test -f 'pngmem.c' || echo '$(srcdir)/'`pngmem.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngmem.lo `test -f 'pngmem.c' || echo '$(srcdir)/'`pngmem.c
|
||||
|
||||
libpng_la-pngerror.lo: pngerror.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngerror.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngerror.Tpo" -c -o libpng_la-pngerror.lo `test -f 'pngerror.c' || echo '$(srcdir)/'`pngerror.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngerror.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngerror.Tpo" -c -o libpng_la-pngerror.lo `test -f 'pngerror.c' || echo '$(srcdir)/'`pngerror.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng_la-pngerror.Tpo" "$(DEPDIR)/libpng_la-pngerror.Plo"; else rm -f "$(DEPDIR)/libpng_la-pngerror.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngerror.c' object='libpng_la-pngerror.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngerror.lo `test -f 'pngerror.c' || echo '$(srcdir)/'`pngerror.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngerror.lo `test -f 'pngerror.c' || echo '$(srcdir)/'`pngerror.c
|
||||
|
||||
libpng_la-pngpread.lo: pngpread.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngpread.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngpread.Tpo" -c -o libpng_la-pngpread.lo `test -f 'pngpread.c' || echo '$(srcdir)/'`pngpread.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pngpread.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pngpread.Tpo" -c -o libpng_la-pngpread.lo `test -f 'pngpread.c' || echo '$(srcdir)/'`pngpread.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng_la-pngpread.Tpo" "$(DEPDIR)/libpng_la-pngpread.Plo"; else rm -f "$(DEPDIR)/libpng_la-pngpread.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngpread.c' object='libpng_la-pngpread.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngpread.lo `test -f 'pngpread.c' || echo '$(srcdir)/'`pngpread.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pngpread.lo `test -f 'pngpread.c' || echo '$(srcdir)/'`pngpread.c
|
||||
|
||||
libpng_la-pnggccrd.lo: pnggccrd.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pnggccrd.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pnggccrd.Tpo" -c -o libpng_la-pnggccrd.lo `test -f 'pnggccrd.c' || echo '$(srcdir)/'`pnggccrd.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng_la-pnggccrd.lo -MD -MP -MF "$(DEPDIR)/libpng_la-pnggccrd.Tpo" -c -o libpng_la-pnggccrd.lo `test -f 'pnggccrd.c' || echo '$(srcdir)/'`pnggccrd.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng_la-pnggccrd.Tpo" "$(DEPDIR)/libpng_la-pnggccrd.Plo"; else rm -f "$(DEPDIR)/libpng_la-pnggccrd.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pnggccrd.c' object='libpng_la-pnggccrd.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pnggccrd.lo `test -f 'pnggccrd.c' || echo '$(srcdir)/'`pnggccrd.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng_la-pnggccrd.lo `test -f 'pnggccrd.c' || echo '$(srcdir)/'`pnggccrd.c
|
||||
|
||||
libpng12_la-png.lo: png.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-png.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-png.Tpo" -c -o libpng12_la-png.lo `test -f 'png.c' || echo '$(srcdir)/'`png.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-png.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-png.Tpo" -c -o libpng12_la-png.lo `test -f 'png.c' || echo '$(srcdir)/'`png.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng12_la-png.Tpo" "$(DEPDIR)/libpng12_la-png.Plo"; else rm -f "$(DEPDIR)/libpng12_la-png.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='png.c' object='libpng12_la-png.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-png.lo `test -f 'png.c' || echo '$(srcdir)/'`png.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-png.lo `test -f 'png.c' || echo '$(srcdir)/'`png.c
|
||||
|
||||
libpng12_la-pngset.lo: pngset.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngset.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngset.Tpo" -c -o libpng12_la-pngset.lo `test -f 'pngset.c' || echo '$(srcdir)/'`pngset.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngset.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngset.Tpo" -c -o libpng12_la-pngset.lo `test -f 'pngset.c' || echo '$(srcdir)/'`pngset.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng12_la-pngset.Tpo" "$(DEPDIR)/libpng12_la-pngset.Plo"; else rm -f "$(DEPDIR)/libpng12_la-pngset.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngset.c' object='libpng12_la-pngset.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngset.lo `test -f 'pngset.c' || echo '$(srcdir)/'`pngset.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngset.lo `test -f 'pngset.c' || echo '$(srcdir)/'`pngset.c
|
||||
|
||||
libpng12_la-pngget.lo: pngget.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngget.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngget.Tpo" -c -o libpng12_la-pngget.lo `test -f 'pngget.c' || echo '$(srcdir)/'`pngget.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngget.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngget.Tpo" -c -o libpng12_la-pngget.lo `test -f 'pngget.c' || echo '$(srcdir)/'`pngget.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng12_la-pngget.Tpo" "$(DEPDIR)/libpng12_la-pngget.Plo"; else rm -f "$(DEPDIR)/libpng12_la-pngget.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngget.c' object='libpng12_la-pngget.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngget.lo `test -f 'pngget.c' || echo '$(srcdir)/'`pngget.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngget.lo `test -f 'pngget.c' || echo '$(srcdir)/'`pngget.c
|
||||
|
||||
libpng12_la-pngrutil.lo: pngrutil.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngrutil.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngrutil.Tpo" -c -o libpng12_la-pngrutil.lo `test -f 'pngrutil.c' || echo '$(srcdir)/'`pngrutil.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngrutil.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngrutil.Tpo" -c -o libpng12_la-pngrutil.lo `test -f 'pngrutil.c' || echo '$(srcdir)/'`pngrutil.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng12_la-pngrutil.Tpo" "$(DEPDIR)/libpng12_la-pngrutil.Plo"; else rm -f "$(DEPDIR)/libpng12_la-pngrutil.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngrutil.c' object='libpng12_la-pngrutil.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngrutil.lo `test -f 'pngrutil.c' || echo '$(srcdir)/'`pngrutil.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngrutil.lo `test -f 'pngrutil.c' || echo '$(srcdir)/'`pngrutil.c
|
||||
|
||||
libpng12_la-pngtrans.lo: pngtrans.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngtrans.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngtrans.Tpo" -c -o libpng12_la-pngtrans.lo `test -f 'pngtrans.c' || echo '$(srcdir)/'`pngtrans.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngtrans.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngtrans.Tpo" -c -o libpng12_la-pngtrans.lo `test -f 'pngtrans.c' || echo '$(srcdir)/'`pngtrans.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng12_la-pngtrans.Tpo" "$(DEPDIR)/libpng12_la-pngtrans.Plo"; else rm -f "$(DEPDIR)/libpng12_la-pngtrans.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngtrans.c' object='libpng12_la-pngtrans.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngtrans.lo `test -f 'pngtrans.c' || echo '$(srcdir)/'`pngtrans.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngtrans.lo `test -f 'pngtrans.c' || echo '$(srcdir)/'`pngtrans.c
|
||||
|
||||
libpng12_la-pngwutil.lo: pngwutil.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngwutil.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngwutil.Tpo" -c -o libpng12_la-pngwutil.lo `test -f 'pngwutil.c' || echo '$(srcdir)/'`pngwutil.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngwutil.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngwutil.Tpo" -c -o libpng12_la-pngwutil.lo `test -f 'pngwutil.c' || echo '$(srcdir)/'`pngwutil.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng12_la-pngwutil.Tpo" "$(DEPDIR)/libpng12_la-pngwutil.Plo"; else rm -f "$(DEPDIR)/libpng12_la-pngwutil.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngwutil.c' object='libpng12_la-pngwutil.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngwutil.lo `test -f 'pngwutil.c' || echo '$(srcdir)/'`pngwutil.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngwutil.lo `test -f 'pngwutil.c' || echo '$(srcdir)/'`pngwutil.c
|
||||
|
||||
libpng12_la-pngread.lo: pngread.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngread.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngread.Tpo" -c -o libpng12_la-pngread.lo `test -f 'pngread.c' || echo '$(srcdir)/'`pngread.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngread.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngread.Tpo" -c -o libpng12_la-pngread.lo `test -f 'pngread.c' || echo '$(srcdir)/'`pngread.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng12_la-pngread.Tpo" "$(DEPDIR)/libpng12_la-pngread.Plo"; else rm -f "$(DEPDIR)/libpng12_la-pngread.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngread.c' object='libpng12_la-pngread.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngread.lo `test -f 'pngread.c' || echo '$(srcdir)/'`pngread.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngread.lo `test -f 'pngread.c' || echo '$(srcdir)/'`pngread.c
|
||||
|
||||
libpng12_la-pngrio.lo: pngrio.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngrio.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngrio.Tpo" -c -o libpng12_la-pngrio.lo `test -f 'pngrio.c' || echo '$(srcdir)/'`pngrio.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngrio.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngrio.Tpo" -c -o libpng12_la-pngrio.lo `test -f 'pngrio.c' || echo '$(srcdir)/'`pngrio.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng12_la-pngrio.Tpo" "$(DEPDIR)/libpng12_la-pngrio.Plo"; else rm -f "$(DEPDIR)/libpng12_la-pngrio.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngrio.c' object='libpng12_la-pngrio.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngrio.lo `test -f 'pngrio.c' || echo '$(srcdir)/'`pngrio.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngrio.lo `test -f 'pngrio.c' || echo '$(srcdir)/'`pngrio.c
|
||||
|
||||
libpng12_la-pngwio.lo: pngwio.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngwio.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngwio.Tpo" -c -o libpng12_la-pngwio.lo `test -f 'pngwio.c' || echo '$(srcdir)/'`pngwio.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngwio.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngwio.Tpo" -c -o libpng12_la-pngwio.lo `test -f 'pngwio.c' || echo '$(srcdir)/'`pngwio.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng12_la-pngwio.Tpo" "$(DEPDIR)/libpng12_la-pngwio.Plo"; else rm -f "$(DEPDIR)/libpng12_la-pngwio.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngwio.c' object='libpng12_la-pngwio.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngwio.lo `test -f 'pngwio.c' || echo '$(srcdir)/'`pngwio.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngwio.lo `test -f 'pngwio.c' || echo '$(srcdir)/'`pngwio.c
|
||||
|
||||
libpng12_la-pngwrite.lo: pngwrite.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngwrite.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngwrite.Tpo" -c -o libpng12_la-pngwrite.lo `test -f 'pngwrite.c' || echo '$(srcdir)/'`pngwrite.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngwrite.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngwrite.Tpo" -c -o libpng12_la-pngwrite.lo `test -f 'pngwrite.c' || echo '$(srcdir)/'`pngwrite.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng12_la-pngwrite.Tpo" "$(DEPDIR)/libpng12_la-pngwrite.Plo"; else rm -f "$(DEPDIR)/libpng12_la-pngwrite.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngwrite.c' object='libpng12_la-pngwrite.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngwrite.lo `test -f 'pngwrite.c' || echo '$(srcdir)/'`pngwrite.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngwrite.lo `test -f 'pngwrite.c' || echo '$(srcdir)/'`pngwrite.c
|
||||
|
||||
libpng12_la-pngrtran.lo: pngrtran.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngrtran.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngrtran.Tpo" -c -o libpng12_la-pngrtran.lo `test -f 'pngrtran.c' || echo '$(srcdir)/'`pngrtran.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngrtran.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngrtran.Tpo" -c -o libpng12_la-pngrtran.lo `test -f 'pngrtran.c' || echo '$(srcdir)/'`pngrtran.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng12_la-pngrtran.Tpo" "$(DEPDIR)/libpng12_la-pngrtran.Plo"; else rm -f "$(DEPDIR)/libpng12_la-pngrtran.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngrtran.c' object='libpng12_la-pngrtran.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngrtran.lo `test -f 'pngrtran.c' || echo '$(srcdir)/'`pngrtran.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngrtran.lo `test -f 'pngrtran.c' || echo '$(srcdir)/'`pngrtran.c
|
||||
|
||||
libpng12_la-pngwtran.lo: pngwtran.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngwtran.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngwtran.Tpo" -c -o libpng12_la-pngwtran.lo `test -f 'pngwtran.c' || echo '$(srcdir)/'`pngwtran.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngwtran.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngwtran.Tpo" -c -o libpng12_la-pngwtran.lo `test -f 'pngwtran.c' || echo '$(srcdir)/'`pngwtran.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng12_la-pngwtran.Tpo" "$(DEPDIR)/libpng12_la-pngwtran.Plo"; else rm -f "$(DEPDIR)/libpng12_la-pngwtran.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngwtran.c' object='libpng12_la-pngwtran.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngwtran.lo `test -f 'pngwtran.c' || echo '$(srcdir)/'`pngwtran.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngwtran.lo `test -f 'pngwtran.c' || echo '$(srcdir)/'`pngwtran.c
|
||||
|
||||
libpng12_la-pngmem.lo: pngmem.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngmem.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngmem.Tpo" -c -o libpng12_la-pngmem.lo `test -f 'pngmem.c' || echo '$(srcdir)/'`pngmem.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngmem.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngmem.Tpo" -c -o libpng12_la-pngmem.lo `test -f 'pngmem.c' || echo '$(srcdir)/'`pngmem.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng12_la-pngmem.Tpo" "$(DEPDIR)/libpng12_la-pngmem.Plo"; else rm -f "$(DEPDIR)/libpng12_la-pngmem.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngmem.c' object='libpng12_la-pngmem.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngmem.lo `test -f 'pngmem.c' || echo '$(srcdir)/'`pngmem.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngmem.lo `test -f 'pngmem.c' || echo '$(srcdir)/'`pngmem.c
|
||||
|
||||
libpng12_la-pngerror.lo: pngerror.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngerror.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngerror.Tpo" -c -o libpng12_la-pngerror.lo `test -f 'pngerror.c' || echo '$(srcdir)/'`pngerror.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngerror.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngerror.Tpo" -c -o libpng12_la-pngerror.lo `test -f 'pngerror.c' || echo '$(srcdir)/'`pngerror.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng12_la-pngerror.Tpo" "$(DEPDIR)/libpng12_la-pngerror.Plo"; else rm -f "$(DEPDIR)/libpng12_la-pngerror.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngerror.c' object='libpng12_la-pngerror.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngerror.lo `test -f 'pngerror.c' || echo '$(srcdir)/'`pngerror.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngerror.lo `test -f 'pngerror.c' || echo '$(srcdir)/'`pngerror.c
|
||||
|
||||
libpng12_la-pngpread.lo: pngpread.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngpread.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngpread.Tpo" -c -o libpng12_la-pngpread.lo `test -f 'pngpread.c' || echo '$(srcdir)/'`pngpread.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pngpread.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pngpread.Tpo" -c -o libpng12_la-pngpread.lo `test -f 'pngpread.c' || echo '$(srcdir)/'`pngpread.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng12_la-pngpread.Tpo" "$(DEPDIR)/libpng12_la-pngpread.Plo"; else rm -f "$(DEPDIR)/libpng12_la-pngpread.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngpread.c' object='libpng12_la-pngpread.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngpread.lo `test -f 'pngpread.c' || echo '$(srcdir)/'`pngpread.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pngpread.lo `test -f 'pngpread.c' || echo '$(srcdir)/'`pngpread.c
|
||||
|
||||
libpng12_la-pnggccrd.lo: pnggccrd.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pnggccrd.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pnggccrd.Tpo" -c -o libpng12_la-pnggccrd.lo `test -f 'pnggccrd.c' || echo '$(srcdir)/'`pnggccrd.c; \
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng12_la-pnggccrd.lo -MD -MP -MF "$(DEPDIR)/libpng12_la-pnggccrd.Tpo" -c -o libpng12_la-pnggccrd.lo `test -f 'pnggccrd.c' || echo '$(srcdir)/'`pnggccrd.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpng12_la-pnggccrd.Tpo" "$(DEPDIR)/libpng12_la-pnggccrd.Plo"; else rm -f "$(DEPDIR)/libpng12_la-pnggccrd.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pnggccrd.c' object='libpng12_la-pnggccrd.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pnggccrd.lo `test -f 'pnggccrd.c' || echo '$(srcdir)/'`pnggccrd.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng12_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng12_la-pnggccrd.lo `test -f 'pnggccrd.c' || echo '$(srcdir)/'`pnggccrd.c
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
@@ -1245,11 +1254,13 @@ libpng.sym: png.h pngconf.h
|
||||
|
||||
libpng.vers: libpng.sym
|
||||
rm -f $@ $@.new
|
||||
$(ECHO) PNG@PNGLIB_MAJOR@_0 '{global:' > $@.new
|
||||
$(ECHO) PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0 '{global:' > $@.new
|
||||
$(SED) s/$$/\;/ libpng.sym >> $@.new
|
||||
$(ECHO) 'local: *; };' >> $@.new
|
||||
mv $@.new $@
|
||||
|
||||
test: check
|
||||
|
||||
# install the .../include headers as links to the new ones
|
||||
install-data-hook:
|
||||
cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h
|
||||
@@ -1258,19 +1269,18 @@ install-data-hook:
|
||||
cd $(DESTDIR)$(pkgconfigdir); rm -f libpng.pc
|
||||
cd $(DESTDIR)$(pkgconfigdir); $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc
|
||||
|
||||
# do evil things to libpng to cause libpng12 to be used, if
|
||||
# the compat library is not being built do nothing.
|
||||
# do evil things to libpng to cause libpng12 to be used
|
||||
install-exec-hook:
|
||||
cd $(DESTDIR)$(bindir); rm -f libpng-config
|
||||
cd $(DESTDIR)$(bindir); $(LN_S) $(PNGLIB_BASENAME)-config libpng-config
|
||||
@if test -n "@compatlib@"; then\
|
||||
set -x;\
|
||||
cd $(DESTDIR)$(libdir);\
|
||||
for ext in a la so; do\
|
||||
rm -f libpng.$$ext;\
|
||||
$(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\
|
||||
done;\
|
||||
fi
|
||||
@set -x;\
|
||||
cd $(DESTDIR)$(libdir);\
|
||||
for ext in a la so sl dylib; do\
|
||||
rm -f libpng.$$ext;\
|
||||
if test -f $(PNGLIB_BASENAME).$$ext; then\
|
||||
$(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\
|
||||
fi;\
|
||||
done
|
||||
|
||||
uninstall-hook:
|
||||
cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h
|
||||
@@ -1279,7 +1289,7 @@ uninstall-hook:
|
||||
@if test -n "@compatlib@"; then\
|
||||
set -x;\
|
||||
cd $(DESTDIR)$(libdir);\
|
||||
for ext in a la so; do\
|
||||
for ext in a la so sl dylib; do\
|
||||
rm -f libpng.$$ext;\
|
||||
done;\
|
||||
fi
|
||||
|
||||
14
README
14
README
@@ -1,4 +1,4 @@
|
||||
README for libpng version 1.2.10rc1 - April 19, 2006 (shared library 12.0)
|
||||
README for libpng version 1.2.20beta04 - August 21, 2007 (shared library 12.0)
|
||||
See the note about version numbers near the top of png.h
|
||||
|
||||
See INSTALL for instructions on how to install libpng.
|
||||
@@ -190,11 +190,11 @@ Files in this distribution:
|
||||
descrip.mms => VMS makefile for MMS or MMK
|
||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||
makefile.elf => Linux/ELF makefile symbol versioning,
|
||||
gcc, creates libpng12.so.0.1.2.10rc1)
|
||||
gcc, creates libpng12.so.0.1.2.20beta04)
|
||||
makefile.linux => Linux/ELF makefile
|
||||
(gcc, creates libpng12.so.0.1.2.10rc1)
|
||||
(gcc, creates libpng12.so.0.1.2.20beta04)
|
||||
makefile.gcmmx => Linux/ELF makefile
|
||||
(gcc, creates libpng12.so.0.1.2.10rc1,
|
||||
(gcc, creates libpng12.so.0.1.2.20beta04,
|
||||
uses assembler code tuned for Intel MMX platform)
|
||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||
@@ -216,12 +216,12 @@ Files in this distribution:
|
||||
makefile.openbsd => OpenBSD makefile
|
||||
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
|
||||
makefile.sggcc => Silicon Graphics
|
||||
(gcc, creates libpng12.so.0.1.2.10rc1)
|
||||
(gcc, creates libpng12.so.0.1.2.20beta04)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile
|
||||
(gcc, creates libpng12.so.0.1.2.10rc1)
|
||||
(gcc, creates libpng12.so.0.1.2.20beta04)
|
||||
makefile.so9 => Solaris 9 makefile
|
||||
(gcc, creates libpng12.so.0.1.2.10rc1)
|
||||
(gcc, creates libpng12.so.0.1.2.20beta04)
|
||||
makefile.32sunu => Sun Ultra 32-bit makefile
|
||||
makefile.64sunu => Sun Ultra 64-bit makefile
|
||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||
|
||||
4
Y2KINFO
4
Y2KINFO
@@ -1,13 +1,13 @@
|
||||
Y2K compliance in libpng:
|
||||
=========================
|
||||
|
||||
April 19, 2006
|
||||
August 21, 2007
|
||||
|
||||
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.2.10rc1 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.2.20beta04 are Y2K compliant. It is my belief that earlier
|
||||
versions were also Y2K compliant.
|
||||
|
||||
Libpng only has three year fields. One is a 2-byte unsigned integer
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#
|
||||
# WARNING: if you run this you will change the versions
|
||||
# of the tools which are used and, maybe, required!
|
||||
touch Makefile.am configure.ac
|
||||
{
|
||||
echo "running libtoolize" >&2
|
||||
libtoolize --copy --automake
|
||||
|
||||
@@ -12,10 +12,6 @@
|
||||
/* Define to 1 if you have the `z' library (-lz). */
|
||||
#undef HAVE_LIBZ
|
||||
|
||||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||
to 0 otherwise. */
|
||||
#undef HAVE_MALLOC
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#undef HAVE_MALLOC_H
|
||||
|
||||
@@ -79,8 +75,5 @@
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to rpl_malloc if the replacement function should be used. */
|
||||
#undef malloc
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
39
configure.ac
39
configure.ac
@@ -3,7 +3,7 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
dnl Minor upgrades (compatible ABI): increment the package version
|
||||
dnl (third field in two places below) and set the PNGLIB_MINOR
|
||||
dnl (third field in two places below) and set the PNGLIB_RELEASE
|
||||
dnl variable.
|
||||
dnl
|
||||
dnl Major upgrades (incompatible ABI): increment the package major
|
||||
@@ -18,19 +18,20 @@ AC_PREREQ(2.59)
|
||||
|
||||
dnl Version number stuff here:
|
||||
|
||||
AC_INIT([libpng], [1.2.10rc1], [png-mng-implement@lists.sourceforge.net])
|
||||
AC_INIT([libpng], [1.2.20beta04], [png-mng-implement@lists.sourceforge.net])
|
||||
AM_INIT_AUTOMAKE
|
||||
dnl stop configure from automagically running automake
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
PNGLIB_VERSION=1.2.10rc1
|
||||
PNGLIB_MAJOR=12
|
||||
PNGLIB_MINOR=10
|
||||
PNGLIB_VERSION=1.2.20beta04
|
||||
PNGLIB_MAJOR=1
|
||||
PNGLIB_MINOR=2
|
||||
PNGLIB_RELEASE=20
|
||||
|
||||
dnl End of version number stuff
|
||||
|
||||
AC_CONFIG_SRCDIR([pngget.c])
|
||||
AM_CONFIG_HEADER([config.h])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
@@ -52,25 +53,24 @@ AC_TYPE_SIZE_T
|
||||
AC_STRUCT_TM
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_STRTOD
|
||||
AC_CHECK_FUNCS([memset], , AC_ERROR([memset not found in libc]))
|
||||
AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_ERROR([cannot find pow])) )
|
||||
AC_CHECK_LIB(z, zlibVersion, , AC_ERROR([zlib not installed]))
|
||||
|
||||
AC_MSG_CHECKING([if assembler code in pnggccrd.c can be compiled])
|
||||
LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
|
||||
AC_MSG_CHECKING(
|
||||
[if assembler code in pnggccrd.c can be compiled without PNG_NO_MMX_CODE])
|
||||
AC_TRY_COMPILE(
|
||||
[#include "pnggccrd.c"],
|
||||
[#include "$srcdir/pnggccrd.c"],
|
||||
[return 0;],
|
||||
LIBPNG_DEFINES=,
|
||||
LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG -DPNG_NO_ASSEMBLER_CODE)
|
||||
if test "$LIBPNG_DEFINES"; then
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
|
||||
fi
|
||||
AC_MSG_RESULT(yes)
|
||||
LIBPNG_NO_MMX="",
|
||||
AC_MSG_RESULT(no)
|
||||
LIBPNG_NO_MMX=-DPNG_NO_MMX_CODE)
|
||||
LIBPNG_DEFINES=$LIBPNG_DEFINES\ $LIBPNG_NO_MMX
|
||||
AC_SUBST(LIBPNG_DEFINES)
|
||||
AC_SUBST(LIBPNG_NO_MMX)
|
||||
|
||||
AC_MSG_CHECKING([if libraries can be versioned])
|
||||
GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
|
||||
@@ -80,7 +80,7 @@ if test "$GLD"; then
|
||||
else
|
||||
have_ld_version_script=no
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_WARN(*** You may want to rerun configure using --with-gnu-ld to enable versioned symbols.)
|
||||
AC_MSG_WARN(*** You have not enabled versioned symbols.)
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
|
||||
|
||||
@@ -88,6 +88,7 @@ AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
|
||||
AC_SUBST(PNGLIB_VERSION)
|
||||
AC_SUBST(PNGLIB_MAJOR)
|
||||
AC_SUBST(PNGLIB_MINOR)
|
||||
AC_SUBST(PNGLIB_RELEASE)
|
||||
|
||||
# Additional arguments (and substitutions)
|
||||
# Allow the pkg-config directory to be set
|
||||
@@ -129,7 +130,7 @@ AC_ARG_WITH(libpng-compat,
|
||||
AC_SUBST([compatlib])
|
||||
|
||||
# Config files, substituting as above
|
||||
AC_CONFIG_FILES([Makefile libpng.pc:scripts/libpng.pc.in])
|
||||
AC_CONFIG_FILES([Makefile libpng.pc:scripts/libpng.pc-configure.in])
|
||||
AC_CONFIG_FILES([libpng-config:scripts/libpng-config.in],
|
||||
[chmod +x libpng-config])
|
||||
|
||||
|
||||
340
contrib/gregbook/COPYING
Normal file
340
contrib/gregbook/COPYING
Normal file
@@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
@@ -1,12 +1,19 @@
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998-2001 Greg Roelofs. All rights reserved.
|
||||
Copyright (c) 1998-2007 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
|
||||
be held liable for any damages arising in any way from the use of
|
||||
this software.
|
||||
|
||||
The contents of this file are DUAL-LICENSED. You may modify and/or
|
||||
redistribute this software according to the terms of one of the
|
||||
following two licenses (at your option):
|
||||
|
||||
|
||||
LICENSE 1 ("BSD-like with advertising clause"):
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute
|
||||
it freely, subject to the following restrictions:
|
||||
@@ -23,4 +30,21 @@
|
||||
and contributors for the book, "PNG: The Definitive Guide,"
|
||||
published by O'Reilly and Associates.
|
||||
|
||||
|
||||
LICENSE 2 (GNU GPL v2 or later):
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
130
contrib/gregbook/Makefile.mingw32
Normal file
130
contrib/gregbook/Makefile.mingw32
Normal file
@@ -0,0 +1,130 @@
|
||||
# Sample makefile for rpng-win / rpng2-win / wpng using mingw32-gcc and make.
|
||||
# Greg Roelofs
|
||||
# Last modified: 2 June 2007
|
||||
#
|
||||
# The programs built by this makefile are described in the book,
|
||||
# "PNG: The Definitive Guide," by Greg Roelofs (O'Reilly and
|
||||
# Associates, 1999). Go buy a copy, eh? Well, OK, it's not
|
||||
# generally for sale anymore, but it's the thought that counts,
|
||||
# right? (Hint: http://www.libpng.org/pub/png/book/ )
|
||||
#
|
||||
# Invoke this makefile from a DOS-prompt window via:
|
||||
#
|
||||
# make -f Makefile.mingw32
|
||||
#
|
||||
# This makefile assumes libpng and zlib have already been built or downloaded
|
||||
# and are in subdirectories at the same level as the current subdirectory
|
||||
# (as indicated by the PNGDIR and ZDIR macros below). It makes no assumptions
|
||||
# at all about the mingw32 installation tree (W32DIR). Edit as appropriate.
|
||||
#
|
||||
# Note that the names of the dynamic and static libpng and zlib libraries
|
||||
# used below may change in later releases of the libraries. This makefile
|
||||
# builds both statically and dynamically linked executables by default.
|
||||
# (You need only one set, but for testing it can be handy to have both.)
|
||||
|
||||
|
||||
# macros --------------------------------------------------------------------
|
||||
|
||||
#PNGDIR = ../..# for libpng-x.y.z/contrib/gregbook builds
|
||||
PNGDIR = ../libpng-win32
|
||||
PNGINC = -I$(PNGDIR)
|
||||
PNGLIBd = $(PNGDIR)/libpng.dll.a # dynamically linked
|
||||
PNGLIBs = $(PNGDIR)/libpng.a # statically linked, local libpng
|
||||
|
||||
#ZDIR = ../../../zlib-win32# for libpng-x.y.z/contrib/gregbook builds
|
||||
ZDIR = ../zlib-win32
|
||||
ZINC = -I$(ZDIR)
|
||||
ZLIBd = $(ZDIR)/libzdll.a
|
||||
ZLIBs = $(ZDIR)/libz.a
|
||||
|
||||
# change this to be the path where mingw32 installs its stuff:
|
||||
W32DIR =
|
||||
#W32DIR = /usr/local/cross-tools/i386-mingw32msvc
|
||||
W32INC = -I$(W32DIR)/include
|
||||
W32LIB = $(W32DIR)/lib/libuser32.a $(W32DIR)/lib/libgdi32.a
|
||||
|
||||
CC = gcc
|
||||
#CC = i386-mingw32msvc-gcc # e.g., Linux -> Win32 cross-compilation
|
||||
LD = $(CC)
|
||||
RM = rm -f
|
||||
CFLAGS = -O -Wall $(INCS) $(MINGW_CCFLAGS)
|
||||
# [note that -Wall is a gcc-specific compilation flag ("most warnings on")]
|
||||
# [-ansi, -pedantic and -W can also be used]
|
||||
LDFLAGS = $(MINGW_LDFLAGS)
|
||||
O = .o
|
||||
E = .exe
|
||||
|
||||
INCS = $(PNGINC) $(ZINC) $(W32INC)
|
||||
RLIBSd = $(PNGLIBd) $(ZLIBd) $(W32LIB) -lm
|
||||
RLIBSs = $(PNGLIBs) $(ZLIBs) $(W32LIB) -lm
|
||||
WLIBSd = $(PNGLIBd) $(ZLIBd)
|
||||
WLIBSs = $(PNGLIBs) $(ZLIBs)
|
||||
|
||||
RPNG = rpng-win
|
||||
RPNG2 = rpng2-win
|
||||
WPNG = wpng
|
||||
|
||||
ROBJSd = $(RPNG)$(O) readpng.pic$(O)
|
||||
ROBJS2d = $(RPNG2)$(O) readpng2.pic$(O)
|
||||
WOBJSd = $(WPNG)$(O) writepng.pic$(O)
|
||||
|
||||
RPNGs = $(RPNG)-static
|
||||
RPNG2s = $(RPNG2)-static
|
||||
WPNGs = $(WPNG)-static
|
||||
|
||||
ROBJSs = $(RPNG)$(O) readpng$(O)
|
||||
ROBJS2s = $(RPNG2)$(O) readpng2$(O)
|
||||
WOBJSs = $(WPNG)$(O) writepng$(O)
|
||||
|
||||
STATIC_EXES = $(RPNGs)$(E) $(RPNG2s)$(E) $(WPNGs)$(E)
|
||||
DYNAMIC_EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E)
|
||||
|
||||
EXES = $(STATIC_EXES) $(DYNAMIC_EXES)
|
||||
|
||||
|
||||
# implicit make rules -------------------------------------------------------
|
||||
|
||||
.c$(O):
|
||||
$(CC) -c $(CFLAGS) $<
|
||||
|
||||
%.pic$(O): %.c
|
||||
$(CC) -c $(CFLAGS) -DPNG_BUILD_DLL -o $@ $<
|
||||
|
||||
|
||||
# dependencies --------------------------------------------------------------
|
||||
|
||||
all: $(EXES)
|
||||
|
||||
$(RPNGs)$(E): $(ROBJSs)
|
||||
$(LD) $(LDFLAGS) -o $@ $(ROBJSs) $(RLIBSs)
|
||||
|
||||
$(RPNG)$(E): $(ROBJSd)
|
||||
$(LD) $(LDFLAGS) -o $@ $(ROBJSd) $(RLIBSd)
|
||||
|
||||
$(RPNG2s)$(E): $(ROBJS2s)
|
||||
$(LD) $(LDFLAGS) -o $@ $(ROBJS2s) $(RLIBSs)
|
||||
|
||||
$(RPNG2)$(E): $(ROBJS2d)
|
||||
$(LD) $(LDFLAGS) -o $@ $(ROBJS2d) $(RLIBSd)
|
||||
|
||||
$(WPNGs)$(E): $(WOBJSs)
|
||||
$(LD) $(LDFLAGS) -o $@ $(WOBJSs) $(WLIBSs)
|
||||
|
||||
$(WPNG)$(E): $(WOBJSd)
|
||||
$(LD) $(LDFLAGS) -o $@ $(WOBJSd) $(WLIBSd)
|
||||
|
||||
$(RPNG)$(O): $(RPNG).c readpng.h
|
||||
$(RPNG2)$(O): $(RPNG2).c readpng2.h
|
||||
$(WPNG)$(O): $(WPNG).c writepng.h
|
||||
|
||||
readpng$(O) readpng.pic$(O): readpng.c readpng.h
|
||||
readpng2$(O) readpng2.pic$(O): readpng2.c readpng2.h
|
||||
writepng$(O) writepng.pic$(O): writepng.c writepng.h
|
||||
|
||||
|
||||
# maintenance ---------------------------------------------------------------
|
||||
|
||||
clean:
|
||||
$(RM) $(EXES)
|
||||
$(RM) $(ROBJSs) $(ROBJS2s) $(WOBJSs)
|
||||
$(RM) $(ROBJSd) $(ROBJS2d) $(WOBJSd)
|
||||
@@ -1,73 +1,92 @@
|
||||
# Sample makefile for rpng-x / rpng2-x / wpng using gcc and make.
|
||||
# Greg Roelofs
|
||||
# Last modified: 7 March 2002
|
||||
# Last modified: 2 June 2007
|
||||
#
|
||||
# The programs built by this makefile are described in the book,
|
||||
# "PNG: The Definitive Guide," by Greg Roelofs (O'Reilly and
|
||||
# Associates, 1999). Go buy a copy, eh? Buy some for friends
|
||||
# and family, too. (Not that this is a blatant plug or anything.)
|
||||
# Associates, 1999). Go buy a copy, eh? Well, OK, it's not
|
||||
# generally for sale anymore, but it's the thought that counts,
|
||||
# right? (Hint: http://www.libpng.org/pub/png/book/ )
|
||||
#
|
||||
# Invoke this makefile from a shell prompt in the usual way; for example:
|
||||
#
|
||||
# make -f Makefile.unx
|
||||
#
|
||||
# This makefile assumes libpng and zlib have already been built or downloaded
|
||||
# and are both installed in /usr/local/{include,lib} (as indicated by the
|
||||
# PNG* and Z* macros below). Edit as appropriate--choose only ONE each of
|
||||
# the PNGINC, PNGLIB, ZINC and ZLIB lines.
|
||||
# and are installed in /usr/local/{include,lib} or as otherwise indicated by
|
||||
# the PNG* and Z* macros below. Edit as appropriate--choose only ONE each of
|
||||
# the PNGINC, PNGLIBd, PNGLIBs, ZINC, ZLIBd and ZLIBs lines.
|
||||
#
|
||||
# This makefile builds statically linked executables (against libpng and zlib,
|
||||
# that is), but that can be changed by uncommenting the appropriate PNGLIB and
|
||||
# ZLIB lines.
|
||||
# This makefile builds both dynamically and statically linked executables
|
||||
# (against libpng and zlib, that is), but that can be changed by modifying
|
||||
# the "EXES =" line. (You need only one set, but for testing it can be handy
|
||||
# to have both.)
|
||||
|
||||
|
||||
# macros --------------------------------------------------------------------
|
||||
|
||||
PNGINC = -I/usr/local/include/libpng12
|
||||
#PNGLIB = -L/usr/local/lib -lpng12 # dynamically linked against libpng
|
||||
PNGLIB = /usr/local/lib/libpng12.a # statically linked against libpng
|
||||
#PNGDIR = /usr/local/lib
|
||||
#PNGINC = -I/usr/local/include/libpng12
|
||||
#PNGLIBd = -L$(PNGDIR) -lpng12 # dynamically linked, installed libpng
|
||||
#PNGLIBs = $(PNGDIR)/libpng12.a # statically linked, installed libpng
|
||||
# or:
|
||||
#PNGINC = -I../libpng
|
||||
#PNGLIB = -L../libpng -lpng
|
||||
#PNGLIB = ../libpng/libpng.a
|
||||
PNGDIR = ../..# this one is for libpng-x.y.z/contrib/gregbook builds
|
||||
#PNGDIR = ../libpng
|
||||
PNGINC = -I$(PNGDIR)
|
||||
PNGLIBd = -Wl,-rpath,$(PNGDIR) -L$(PNGDIR) -lpng12 # dynamically linked
|
||||
PNGLIBs = $(PNGDIR)/libpng.a # statically linked, local libpng
|
||||
|
||||
ZDIR = /usr/local/lib
|
||||
#ZDIR = /usr/lib64
|
||||
ZINC = -I/usr/local/include
|
||||
#ZLIB = -L/usr/local/lib -lz # dynamically linked against zlib
|
||||
ZLIB = /usr/local/lib/libz.a # statically linked against zlib
|
||||
#ZINC = -I../zlib
|
||||
#ZLIB = -L../zlib -lz
|
||||
#ZLIB = ../zlib/libz.a
|
||||
ZLIBd = -L$(ZDIR) -lz # dynamically linked against zlib
|
||||
ZLIBs = $(ZDIR)/libz.a # statically linked against zlib
|
||||
# or:
|
||||
#ZDIR = ../zlib
|
||||
#ZINC = -I$(ZDIR)
|
||||
#ZLIBd = -Wl,-rpath,$(ZDIR) -L$(ZDIR) -lz # -rpath allows in-place testing
|
||||
#ZLIBs = $(ZDIR)/libz.a
|
||||
|
||||
#XINC = -I/usr/include # old-style, stock X distributions
|
||||
#XLIB = -L/usr/lib/X11 -lX11
|
||||
#XLIB = -L/usr/lib/X11 -lX11 # (including SGI IRIX)
|
||||
#XINC = -I/usr/openwin/include # Sun workstations (OpenWindows)
|
||||
#XLIB = -L/usr/openwin/lib -lX11
|
||||
XINC = -I/usr/X11R6/include # new X distributions (XFree86, etc.)
|
||||
XINC = -I/usr/X11R6/include # new X distributions (X.org, etc.)
|
||||
XLIB = -L/usr/X11R6/lib -lX11
|
||||
#XLIB = -L/usr/X11R6/lib64 -lX11 # e.g., Red Hat on AMD64
|
||||
|
||||
INCS = $(PNGINC) $(ZINC) $(XINC)
|
||||
RLIBS = $(PNGLIB) $(ZLIB) $(XLIB) -lm
|
||||
WLIBS = $(PNGLIB) $(ZLIB)
|
||||
RLIBSd = $(PNGLIBd) $(ZLIBd) $(XLIB) -lm
|
||||
RLIBSs = $(PNGLIBs) $(ZLIBs) $(XLIB) -lm
|
||||
WLIBSd = $(PNGLIBd) $(ZLIBd) -lm
|
||||
WLIBSs = $(PNGLIBs) $(ZLIBs)
|
||||
|
||||
CC = gcc
|
||||
LD = gcc
|
||||
RM = rm -f
|
||||
CFLAGS = -O -Wall $(INCS)
|
||||
CFLAGS = -O -Wall $(INCS) -DFEATURE_LOOP
|
||||
# [note that -Wall is a gcc-specific compilation flag ("most warnings on")]
|
||||
# [-ansi, -pedantic and -W can also be used]
|
||||
LDFLAGS =
|
||||
O = .o
|
||||
E =
|
||||
|
||||
RPNG = rpng-x
|
||||
RPNG2 = rpng2-x
|
||||
WPNG = wpng
|
||||
RPNG = rpng-x
|
||||
RPNG2 = rpng2-x
|
||||
WPNG = wpng
|
||||
|
||||
RPNGs = $(RPNG)-static
|
||||
RPNG2s = $(RPNG2)-static
|
||||
WPNGs = $(WPNG)-static
|
||||
|
||||
ROBJS = $(RPNG)$(O) readpng$(O)
|
||||
ROBJS2 = $(RPNG2)$(O) readpng2$(O)
|
||||
WOBJS = $(WPNG)$(O) writepng$(O)
|
||||
|
||||
EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E)
|
||||
STATIC_EXES = $(RPNGs)$(E) $(RPNG2s)$(E) $(WPNGs)$(E)
|
||||
DYNAMIC_EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E)
|
||||
|
||||
EXES = $(STATIC_EXES) $(DYNAMIC_EXES)
|
||||
|
||||
|
||||
# implicit make rules -------------------------------------------------------
|
||||
@@ -80,14 +99,23 @@ EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E)
|
||||
|
||||
all: $(EXES)
|
||||
|
||||
$(RPNGs)$(E): $(ROBJS)
|
||||
$(LD) $(LDFLAGS) -o $@ $(ROBJS) $(RLIBSs)
|
||||
|
||||
$(RPNG)$(E): $(ROBJS)
|
||||
$(LD) $(LDFLAGS) -o $@ $(ROBJS) $(RLIBS)
|
||||
$(LD) $(LDFLAGS) -o $@ $(ROBJS) $(RLIBSd)
|
||||
|
||||
$(RPNG2s)$(E): $(ROBJS2)
|
||||
$(LD) $(LDFLAGS) -o $@ $(ROBJS2) $(RLIBSs)
|
||||
|
||||
$(RPNG2)$(E): $(ROBJS2)
|
||||
$(LD) $(LDFLAGS) -o $@ $(ROBJS2) $(RLIBS)
|
||||
$(LD) $(LDFLAGS) -o $@ $(ROBJS2) $(RLIBSd)
|
||||
|
||||
$(WPNGs)$(E): $(WOBJS)
|
||||
$(LD) $(LDFLAGS) -o $@ $(WOBJS) $(WLIBSs)
|
||||
|
||||
$(WPNG)$(E): $(WOBJS)
|
||||
$(LD) $(LDFLAGS) -o $@ $(WOBJS) $(WLIBS)
|
||||
$(LD) $(LDFLAGS) -o $@ $(WOBJS) $(WLIBSd)
|
||||
|
||||
$(RPNG)$(O): $(RPNG).c readpng.h
|
||||
$(RPNG2)$(O): $(RPNG2).c readpng2.h
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
# Sample makefile for rpng-win / rpng2-win / wpng using MSVC and NMAKE.
|
||||
# Greg Roelofs
|
||||
# Last modified: 16 February 1999
|
||||
# Last modified: 2 June 2007
|
||||
#
|
||||
# The programs built by this makefile are described in the book,
|
||||
# "PNG: The Definitive Guide," by Greg Roelofs (O'Reilly and
|
||||
# Associates, 1999). Go buy a copy, eh? Buy some for friends
|
||||
# and family, too. (Not that this is a blatant plug or anything.)
|
||||
# Associates, 1999). Go buy a copy, eh? Well, OK, it's not
|
||||
# generally for sale anymore, but it's the thought that counts,
|
||||
# right? (Hint: http://www.libpng.org/pub/png/book/ )
|
||||
#
|
||||
# Invoke this makefile from a DOS prompt window via:
|
||||
#
|
||||
@@ -53,7 +54,7 @@ CC = cl
|
||||
LD = link
|
||||
RM = del
|
||||
CFLAGS = -nologo -O -W3 $(INCS) $(cvars)
|
||||
# [note that -Wall is an MSVC-specific compilation flag ("all warnings on")]
|
||||
# [note that -W3 is an MSVC-specific compilation flag ("all warnings on")]
|
||||
# [see %devstudio%\vc\include\win32.mak for cvars macro definition]
|
||||
O = .obj
|
||||
E = .exe
|
||||
|
||||
@@ -22,7 +22,8 @@ below.
|
||||
Files:
|
||||
|
||||
README this file
|
||||
LICENSE terms of distribution and reuse (BSD-like)
|
||||
LICENSE terms of distribution and reuse (BSD-like or GNU GPL)
|
||||
COPYING GNU General Public License (GPL)
|
||||
|
||||
Makefile.unx Unix makefile
|
||||
Makefile.w32 Windows (MSVC) makefile
|
||||
@@ -54,15 +55,15 @@ mation and links to the latest version of the source code, and Chapters
|
||||
13-15 of the book for detailed discussion of the three programs.
|
||||
|
||||
Greg Roelofs
|
||||
newt@pobox.com
|
||||
30 June 2001
|
||||
http://pobox.com/~newt/greg_contact.html
|
||||
2 June 2007
|
||||
|
||||
|
||||
BUILD INSTRUCTIONS
|
||||
|
||||
- Prerequisites (in order of compilation):
|
||||
|
||||
- zlib http://www.gzip.org/zlib/
|
||||
- zlib http://zlib.net/
|
||||
- libpng http://www.libpng.org/pub/png/libpng.html
|
||||
- pngbook http://www.libpng.org/pub/png/book/sources.html
|
||||
|
||||
@@ -150,9 +151,9 @@ BUILD INSTRUCTIONS
|
||||
To run the programs, they probably first need to be set up as "foreign
|
||||
symbols," with "disk" and "dir" set appropriately:
|
||||
|
||||
$ rpng == "$disk:[dir]rpng-x.exe"
|
||||
$ rpng == "$disk:[dir]rpng-x.exe"
|
||||
$ rpng2 == "$disk:[dir]rpng2-x.exe"
|
||||
$ wpng == "$disk:[dir]wpng.exe"
|
||||
$ wpng == "$disk:[dir]wpng.exe"
|
||||
|
||||
All three will print a basic usage screen when run without any command-
|
||||
line arguments; see the book for more details. Note that the options
|
||||
@@ -176,7 +177,7 @@ RUNNING THE PROGRAMS: (VERY) BRIEF INTRO
|
||||
wpng is a purely command-line image converter from binary PBMPLUS/NetPBM
|
||||
format (.pgm or .ppm) to PNG; for example,
|
||||
|
||||
wpng -time < toucan.ppm > toucan.png
|
||||
wpng -time < toucan-notrans.ppm > toucan-notrans.png
|
||||
|
||||
would convert the specified PPM file (using redirection) to PNG, auto-
|
||||
matically setting the PNG modification-time chunk.
|
||||
|
||||
@@ -4,13 +4,20 @@
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998-2000 Greg Roelofs. All rights reserved.
|
||||
Copyright (c) 1998-2007 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
|
||||
be held liable for any damages arising in any way from the use of
|
||||
this software.
|
||||
|
||||
The contents of this file are DUAL-LICENSED. You may modify and/or
|
||||
redistribute this software according to the terms of one of the
|
||||
following two licenses (at your option):
|
||||
|
||||
|
||||
LICENSE 1 ("BSD-like with advertising clause"):
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute
|
||||
it freely, subject to the following restrictions:
|
||||
@@ -27,6 +34,23 @@
|
||||
and contributors for the book, "PNG: The Definitive Guide,"
|
||||
published by O'Reilly and Associates.
|
||||
|
||||
|
||||
LICENSE 2 (GNU GPL v2 or later):
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -4,13 +4,20 @@
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998-2000 Greg Roelofs. All rights reserved.
|
||||
Copyright (c) 1998-2007 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
|
||||
be held liable for any damages arising in any way from the use of
|
||||
this software.
|
||||
|
||||
The contents of this file are DUAL-LICENSED. You may modify and/or
|
||||
redistribute this software according to the terms of one of the
|
||||
following two licenses (at your option):
|
||||
|
||||
|
||||
LICENSE 1 ("BSD-like with advertising clause"):
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute
|
||||
it freely, subject to the following restrictions:
|
||||
@@ -27,6 +34,23 @@
|
||||
and contributors for the book, "PNG: The Definitive Guide,"
|
||||
published by O'Reilly and Associates.
|
||||
|
||||
|
||||
LICENSE 2 (GNU GPL v2 or later):
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef TRUE
|
||||
|
||||
@@ -4,19 +4,20 @@
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Changelog:
|
||||
- 1.01: initial public release
|
||||
- 1.02: added code to skip unused chunks (GR-P)
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998-2002 Greg Roelofs. All rights reserved.
|
||||
Copyright (c) 1998-2007 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
|
||||
be held liable for any damages arising in any way from the use of
|
||||
this software.
|
||||
|
||||
The contents of this file are DUAL-LICENSED. You may modify and/or
|
||||
redistribute this software according to the terms of one of the
|
||||
following two licenses (at your option):
|
||||
|
||||
|
||||
LICENSE 1 ("BSD-like with advertising clause"):
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute
|
||||
it freely, subject to the following restrictions:
|
||||
@@ -33,6 +34,23 @@
|
||||
and contributors for the book, "PNG: The Definitive Guide,"
|
||||
published by O'Reilly and Associates.
|
||||
|
||||
|
||||
LICENSE 2 (GNU GPL v2 or later):
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -56,7 +74,7 @@ static void readpng2_error_handler(png_structp png_ptr, png_const_charp msg);
|
||||
void readpng2_version_info(void)
|
||||
{
|
||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && \
|
||||
(defined(__i386__) || defined(_M_IX86)) && \
|
||||
(defined(__i386__) || defined(_M_IX86) || defined(__x86_64__)) && \
|
||||
defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
|
||||
/*
|
||||
* WARNING: This preprocessor approach means that the following code
|
||||
@@ -79,7 +97,12 @@ void readpng2_version_info(void)
|
||||
"with MMX support\n (%s version).", PNG_LIBPNG_VER_STRING,
|
||||
png_libpng_ver, compilerID == 1? "MSVC++" :
|
||||
(compilerID == 2? "GNU C" : "unknown"));
|
||||
fprintf(stderr, " Processor %s MMX instructions.\n",
|
||||
fprintf(stderr, " Processor (x86%s) %s MMX instructions.\n",
|
||||
#if defined(__x86_64__)
|
||||
"_64",
|
||||
#else
|
||||
"",
|
||||
#endif
|
||||
mmxsupport? "supports" : "does not support");
|
||||
if (mmxsupport > 0) {
|
||||
int num_optims = 0;
|
||||
@@ -179,40 +202,38 @@ int readpng2_init(mainprog_info *mainprog_ptr)
|
||||
return 2;
|
||||
}
|
||||
|
||||
/* prepare the reader to ignore all recognized chunks whose data isn't
|
||||
* going to be used, i.e., all chunks recognized by libpng except for
|
||||
* IHDR, PLTE, IDAT, IEND, tRNS, bKGD, gAMA, and sRGB : */
|
||||
|
||||
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
||||
#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
|
||||
/* prepare the reader to ignore all recognized chunks whose data won't be
|
||||
* used, i.e., all chunks recognized by libpng except for IHDR, PLTE, IDAT,
|
||||
* IEND, tRNS, bKGD, gAMA, and sRGB (small performance improvement) */
|
||||
{
|
||||
#ifndef HANDLE_CHUNK_NEVER
|
||||
/* prior to libpng-1.2.5, this macro was internal, so we define it here. */
|
||||
# define HANDLE_CHUNK_NEVER 1
|
||||
#endif
|
||||
/* these byte strings were copied from png.h.
|
||||
* If a future libpng version recognizes more chunks, add them
|
||||
* to this list. If a future version of readpng2.c recognizes
|
||||
* more chunks, delete them from this list. */
|
||||
png_byte png_chunk_types_to_ignore[]=
|
||||
{ 99, 72, 82, 77, '\0', /* cHRM */
|
||||
104, 73, 83, 84, '\0', /* hIST */
|
||||
105, 67, 67, 80, '\0', /* iCCP */
|
||||
105, 84, 88, 116, '\0', /* iTXt */
|
||||
111, 70, 70, 115, '\0', /* oFFs */
|
||||
112, 67, 65, 76, '\0', /* pCAL */
|
||||
115, 67, 65, 76, '\0', /* sCAL */
|
||||
112, 72, 89, 115, '\0', /* pHYs */
|
||||
115, 66, 73, 84, '\0', /* sBIT */
|
||||
115, 80, 76, 84, '\0', /* sPLT */
|
||||
116, 69, 88, 116, '\0', /* tEXt */
|
||||
116, 73, 77, 69, '\0', /* tIME */
|
||||
122, 84, 88, 116, '\0'}; /* zTXt */
|
||||
#define NUM_PNG_CHUNK_TYPES_TO_IGNORE 13
|
||||
/* These byte strings were copied from png.h. If a future libpng
|
||||
* version recognizes more chunks, add them to this list. If a
|
||||
* future version of readpng2.c recognizes more chunks, delete them
|
||||
* from this list. */
|
||||
static const png_byte chunks_to_ignore[] = {
|
||||
99, 72, 82, 77, '\0', /* cHRM */
|
||||
104, 73, 83, 84, '\0', /* hIST */
|
||||
105, 67, 67, 80, '\0', /* iCCP */
|
||||
105, 84, 88, 116, '\0', /* iTXt */
|
||||
111, 70, 70, 115, '\0', /* oFFs */
|
||||
112, 67, 65, 76, '\0', /* pCAL */
|
||||
112, 72, 89, 115, '\0', /* pHYs */
|
||||
115, 66, 73, 84, '\0', /* sBIT */
|
||||
115, 67, 65, 76, '\0', /* sCAL */
|
||||
115, 80, 76, 84, '\0', /* sPLT */
|
||||
115, 84, 69, 82, '\0', /* sTER */
|
||||
116, 69, 88, 116, '\0', /* tEXt */
|
||||
116, 73, 77, 69, '\0', /* tIME */
|
||||
122, 84, 88, 116, '\0' /* zTXt */
|
||||
};
|
||||
|
||||
png_set_keep_unknown_chunks(png_ptr, HANDLE_CHUNK_NEVER,
|
||||
png_chunk_types_to_ignore, NUM_PNG_CHUNK_TYPES_TO_IGNORE);
|
||||
png_set_keep_unknown_chunks(png_ptr, 1 /* PNG_HANDLE_CHUNK_NEVER */,
|
||||
chunks_to_ignore, sizeof(chunks_to_ignore)/5);
|
||||
}
|
||||
#endif
|
||||
#endif /* PNG_UNKNOWN_CHUNKS_SUPPORTED */
|
||||
|
||||
|
||||
/* instead of doing png_init_io() here, now we set up our callback
|
||||
* functions for progressive decoding */
|
||||
@@ -237,7 +258,7 @@ int readpng2_init(mainprog_info *mainprog_ptr)
|
||||
* png_set_asm_flags (png_ptr, flags);
|
||||
*/
|
||||
|
||||
#if (defined(__i386__) || defined(_M_IX86)) && \
|
||||
#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__)) && \
|
||||
defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
|
||||
/*
|
||||
* WARNING: This preprocessor approach means that the following code
|
||||
|
||||
@@ -4,13 +4,20 @@
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998-2001 Greg Roelofs. All rights reserved.
|
||||
Copyright (c) 1998-2007 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
|
||||
be held liable for any damages arising in any way from the use of
|
||||
this software.
|
||||
|
||||
The contents of this file are DUAL-LICENSED. You may modify and/or
|
||||
redistribute this software according to the terms of one of the
|
||||
following two licenses (at your option):
|
||||
|
||||
|
||||
LICENSE 1 ("BSD-like with advertising clause"):
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute
|
||||
it freely, subject to the following restrictions:
|
||||
@@ -27,6 +34,23 @@
|
||||
and contributors for the book, "PNG: The Definitive Guide,"
|
||||
published by O'Reilly and Associates.
|
||||
|
||||
|
||||
LICENSE 2 (GNU GPL v2 or later):
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef TRUE
|
||||
@@ -66,7 +90,7 @@ typedef struct _mainprog_info {
|
||||
int rowbytes;
|
||||
int channels;
|
||||
int need_bgcolor;
|
||||
#if (defined(__i386__) || defined(_M_IX86))
|
||||
#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__))
|
||||
int nommxfilters;
|
||||
int nommxcombine;
|
||||
int nommxinterlace;
|
||||
|
||||
179
contrib/gregbook/readppm.c
Normal file
179
contrib/gregbook/readppm.c
Normal file
@@ -0,0 +1,179 @@
|
||||
/*---------------------------------------------------------------------------
|
||||
|
||||
rpng - simple PNG display program readppm.c
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
This is a special-purpose replacement for readpng.c that allows binary
|
||||
PPM files to be used in place of PNG images.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998-2007 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
|
||||
be held liable for any damages arising in any way from the use of
|
||||
this software.
|
||||
|
||||
The contents of this file are DUAL-LICENSED. You may modify and/or
|
||||
redistribute this software according to the terms of one of the
|
||||
following two licenses (at your option):
|
||||
|
||||
|
||||
LICENSE 1 ("BSD-like with advertising clause"):
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute
|
||||
it freely, subject to the following restrictions:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, disclaimer, and this list of conditions.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, disclaimer, and this list of conditions in the documenta-
|
||||
tion and/or other materials provided with the distribution.
|
||||
3. All advertising materials mentioning features or use of this
|
||||
software must display the following acknowledgment:
|
||||
|
||||
This product includes software developed by Greg Roelofs
|
||||
and contributors for the book, "PNG: The Definitive Guide,"
|
||||
published by O'Reilly and Associates.
|
||||
|
||||
|
||||
LICENSE 2 (GNU GPL v2 or later):
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "readpng.h" /* typedefs, common macros, public prototypes */
|
||||
|
||||
|
||||
ulg width, height;
|
||||
int bit_depth, color_type, channels;
|
||||
uch *image_data = NULL;
|
||||
FILE *saved_infile;
|
||||
|
||||
|
||||
void readpng_version_info()
|
||||
{
|
||||
fprintf(stderr, " Compiled without libpng, zlib or PBMPLUS/NetPBM.\n");
|
||||
}
|
||||
|
||||
|
||||
/* return value = 0 for success, 1 for bad sig, 2 for bad IHDR, 4 for no mem */
|
||||
|
||||
int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight)
|
||||
{
|
||||
static uch ppmline[256];
|
||||
int maxval;
|
||||
|
||||
|
||||
saved_infile = infile;
|
||||
|
||||
fgets(ppmline, 256, infile);
|
||||
if (ppmline[0] != 'P' || ppmline[1] != '6') {
|
||||
fprintf(stderr, "ERROR: not a PPM file\n");
|
||||
return 1;
|
||||
}
|
||||
/* possible color types: P5 = grayscale (0), P6 = RGB (2), P8 = RGBA (6) */
|
||||
if (ppmline[1] == '6') {
|
||||
color_type = 2;
|
||||
channels = 3;
|
||||
} else if (ppmline[1] == '8') {
|
||||
color_type = 6;
|
||||
channels = 4;
|
||||
} else /* if (ppmline[1] == '5') */ {
|
||||
color_type = 0;
|
||||
channels = 1;
|
||||
}
|
||||
|
||||
do {
|
||||
fgets(ppmline, 256, infile);
|
||||
} while (ppmline[0] == '#');
|
||||
sscanf(ppmline, "%lu %lu", &width, &height);
|
||||
|
||||
do {
|
||||
fgets(ppmline, 256, infile);
|
||||
} while (ppmline[0] == '#');
|
||||
sscanf(ppmline, "%d", &maxval);
|
||||
if (maxval != 255) {
|
||||
fprintf(stderr, "ERROR: maxval = %d\n", maxval);
|
||||
return 2;
|
||||
}
|
||||
bit_depth = 8;
|
||||
|
||||
*pWidth = width;
|
||||
*pHeight = height;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* returns 0 if succeeds, 1 if fails due to no bKGD chunk, 2 if libpng error;
|
||||
* scales values to 8-bit if necessary */
|
||||
|
||||
int readpng_get_bgcolor(uch *red, uch *green, uch *blue)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* display_exponent == LUT_exponent * CRT_exponent */
|
||||
|
||||
uch *readpng_get_image(double display_exponent, int *pChannels, ulg *pRowbytes)
|
||||
{
|
||||
ulg rowbytes;
|
||||
|
||||
|
||||
/* expand palette images to RGB, low-bit-depth grayscale images to 8 bits,
|
||||
* transparency chunks to full alpha channel; strip 16-bit-per-sample
|
||||
* images to 8 bits per sample; and convert grayscale to RGB[A] */
|
||||
|
||||
/* GRR WARNING: grayscale needs to be expanded and channels reset! */
|
||||
|
||||
*pRowbytes = rowbytes = channels*width;
|
||||
*pChannels = channels;
|
||||
|
||||
if ((image_data = (uch *)malloc(rowbytes*height)) == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Trace((stderr, "readpng_get_image: rowbytes = %ld, height = %ld\n", rowbytes, height));
|
||||
|
||||
|
||||
/* now we can go ahead and just read the whole image */
|
||||
|
||||
fread(image_data, 1L, rowbytes*height, saved_infile);
|
||||
|
||||
|
||||
return image_data;
|
||||
}
|
||||
|
||||
|
||||
void readpng_cleanup(int free_image_data)
|
||||
{
|
||||
if (free_image_data && image_data) {
|
||||
free(image_data);
|
||||
image_data = NULL;
|
||||
}
|
||||
}
|
||||
@@ -22,16 +22,24 @@
|
||||
- 1.02: added extra set of parentheses to png_jmpbuf() macro; fixed
|
||||
command-line parsing bug
|
||||
- 1.10: enabled "message window"/console (thanks to David Geldreich)
|
||||
- 2.00: dual-licensed (added GNU GPL)
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998-2001 Greg Roelofs. All rights reserved.
|
||||
Copyright (c) 1998-2007 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
|
||||
be held liable for any damages arising in any way from the use of
|
||||
this software.
|
||||
|
||||
The contents of this file are DUAL-LICENSED. You may modify and/or
|
||||
redistribute this software according to the terms of one of the
|
||||
following two licenses (at your option):
|
||||
|
||||
|
||||
LICENSE 1 ("BSD-like with advertising clause"):
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute
|
||||
it freely, subject to the following restrictions:
|
||||
@@ -48,11 +56,28 @@
|
||||
and contributors for the book, "PNG: The Definitive Guide,"
|
||||
published by O'Reilly and Associates.
|
||||
|
||||
|
||||
LICENSE 2 (GNU GPL v2 or later):
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#define PROGNAME "rpng-win"
|
||||
#define LONGNAME "Simple PNG Viewer for Windows"
|
||||
#define VERSION "1.20 of 28 May 2001"
|
||||
#define VERSION "2.00 of 2 June 2007"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -85,10 +110,9 @@ static void rpng_win_cleanup(void);
|
||||
LRESULT CALLBACK rpng_win_wndproc(HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
|
||||
static char titlebar[1024], *window_name = titlebar;
|
||||
static char titlebar[1024];
|
||||
static char *progname = PROGNAME;
|
||||
static char *appname = LONGNAME;
|
||||
static char *icon_name = PROGNAME; /* GRR: not (yet) used */
|
||||
static char *filename;
|
||||
static FILE *infile;
|
||||
|
||||
@@ -325,9 +349,14 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
|
||||
* check for one in the PNG file--if not, the initialized values of 0
|
||||
* (black) will be used */
|
||||
|
||||
if (have_bg)
|
||||
sscanf(bgstr+1, "%2x%2x%2x", &bg_red, &bg_green, &bg_blue);
|
||||
else if (readpng_get_bgcolor(&bg_red, &bg_green, &bg_blue) > 1) {
|
||||
if (have_bg) {
|
||||
unsigned r, g, b; /* this approach quiets compiler warnings */
|
||||
|
||||
sscanf(bgstr+1, "%2x%2x%2x", &r, &g, &b);
|
||||
bg_red = (uch)r;
|
||||
bg_green = (uch)g;
|
||||
bg_blue = (uch)b;
|
||||
} else if (readpng_get_bgcolor(&bg_red, &bg_green, &bg_blue) > 1) {
|
||||
readpng_cleanup(TRUE);
|
||||
fprintf(stderr, PROGNAME
|
||||
": libpng error while checking for background color\n");
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
by Martin Zinser under OpenVMS; may work under OS/2 with some tweaking).
|
||||
|
||||
to do:
|
||||
- 8-bit support
|
||||
- 8-bit (colormapped) X support
|
||||
- use %.1023s to simplify truncation of title-bar string?
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
@@ -21,18 +21,27 @@
|
||||
- 1.10: added support for non-default visuals; fixed X pixel-conversion
|
||||
- 1.11: added extra set of parentheses to png_jmpbuf() macro; fixed
|
||||
command-line parsing bug
|
||||
- 1.12: fixed small X memory leak (thanks to Francois Petitjean)
|
||||
- 1.13: fixed XFreeGC() crash bug
|
||||
- 1.12: fixed some small X memory leaks (thanks to Fran<EFBFBD>ois Petitjean)
|
||||
- 1.13: fixed XFreeGC() crash bug (thanks to Patrick Welche)
|
||||
- 1.14: added support for X resources (thanks to Gerhard Niklasch)
|
||||
- 2.00: dual-licensed (added GNU GPL)
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998-2001 Greg Roelofs. All rights reserved.
|
||||
Copyright (c) 1998-2007 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
|
||||
be held liable for any damages arising in any way from the use of
|
||||
this software.
|
||||
|
||||
The contents of this file are DUAL-LICENSED. You may modify and/or
|
||||
redistribute this software according to the terms of one of the
|
||||
following two licenses (at your option):
|
||||
|
||||
|
||||
LICENSE 1 ("BSD-like with advertising clause"):
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute
|
||||
it freely, subject to the following restrictions:
|
||||
@@ -49,11 +58,30 @@
|
||||
and contributors for the book, "PNG: The Definitive Guide,"
|
||||
published by O'Reilly and Associates.
|
||||
|
||||
|
||||
LICENSE 2 (GNU GPL v2 or later):
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#define PROGNAME "rpng-x"
|
||||
#define LONGNAME "Simple PNG Viewer for X"
|
||||
#define VERSION "1.13 of 16 August 2001"
|
||||
#define VERSION "2.00 of 2 June 2007"
|
||||
#define RESNAME "rpng" /* our X resource application name */
|
||||
#define RESCLASS "Rpng" /* our X resource class name */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -91,6 +119,8 @@ static int rpng_x_msb(ulg u32val);
|
||||
static char titlebar[1024], *window_name = titlebar;
|
||||
static char *appname = LONGNAME;
|
||||
static char *icon_name = PROGNAME;
|
||||
static char *res_name = RESNAME;
|
||||
static char *res_class = RESCLASS;
|
||||
static char *filename;
|
||||
static FILE *infile;
|
||||
|
||||
@@ -399,11 +429,12 @@ static int rpng_x_create_window(void)
|
||||
XEvent e;
|
||||
XGCValues gcvalues;
|
||||
XSetWindowAttributes attr;
|
||||
XSizeHints *size_hints;
|
||||
XTextProperty windowName, *pWindowName = &windowName;
|
||||
XTextProperty iconName, *pIconName = &iconName;
|
||||
XVisualInfo visual_info;
|
||||
XSizeHints *size_hints;
|
||||
XWMHints *wm_hints;
|
||||
XClassHint *class_hints;
|
||||
|
||||
|
||||
screen = DefaultScreen(display);
|
||||
@@ -526,7 +557,7 @@ static int rpng_x_create_window(void)
|
||||
if (!XStringListToTextProperty(&icon_name, 1, pIconName))
|
||||
pIconName = NULL;
|
||||
|
||||
/* OK if either hints allocation fails; XSetWMProperties() allows NULLs */
|
||||
/* OK if any hints allocation fails; XSetWMProperties() allows NULLs */
|
||||
|
||||
if ((size_hints = XAllocSizeHints()) != NULL) {
|
||||
/* window will not be resizable */
|
||||
@@ -542,8 +573,13 @@ static int rpng_x_create_window(void)
|
||||
wm_hints->flags = StateHint | InputHint /* | IconPixmapHint */ ;
|
||||
}
|
||||
|
||||
if ((class_hints = XAllocClassHint()) != NULL) {
|
||||
class_hints->res_name = res_name;
|
||||
class_hints->res_class = res_class;
|
||||
}
|
||||
|
||||
XSetWMProperties(display, window, pWindowName, pIconName, NULL, 0,
|
||||
size_hints, wm_hints, NULL);
|
||||
size_hints, wm_hints, class_hints);
|
||||
|
||||
/* various properties and hints no longer needed; free memory */
|
||||
if (pWindowName)
|
||||
@@ -554,6 +590,8 @@ static int rpng_x_create_window(void)
|
||||
XFree(size_hints);
|
||||
if (wm_hints)
|
||||
XFree(wm_hints);
|
||||
if (class_hints)
|
||||
XFree(class_hints);
|
||||
|
||||
XMapWindow(display, window);
|
||||
|
||||
|
||||
@@ -27,16 +27,25 @@
|
||||
- 1.10: enabled "message window"/console (thanks to David Geldreich)
|
||||
- 1.20: added runtime MMX-enabling/disabling and new -mmx* options
|
||||
- 1.21: made minor tweak to usage screen to fit within 25-line console
|
||||
- 1.22: added AMD64/EM64T support (__x86_64__)
|
||||
- 2.00: dual-licensed (added GNU GPL)
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998-2001 Greg Roelofs. All rights reserved.
|
||||
Copyright (c) 1998-2007 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
|
||||
be held liable for any damages arising in any way from the use of
|
||||
this software.
|
||||
|
||||
The contents of this file are DUAL-LICENSED. You may modify and/or
|
||||
redistribute this software according to the terms of one of the
|
||||
following two licenses (at your option):
|
||||
|
||||
|
||||
LICENSE 1 ("BSD-like with advertising clause"):
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute
|
||||
it freely, subject to the following restrictions:
|
||||
@@ -53,11 +62,28 @@
|
||||
and contributors for the book, "PNG: The Definitive Guide,"
|
||||
published by O'Reilly and Associates.
|
||||
|
||||
|
||||
LICENSE 2 (GNU GPL v2 or later):
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#define PROGNAME "rpng2-win"
|
||||
#define LONGNAME "Progressive PNG Viewer for Windows"
|
||||
#define VERSION "1.21 of 29 June 2001"
|
||||
#define VERSION "2.00 of 2 June 2007"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -119,10 +145,9 @@ static void rpng2_win_cleanup(void);
|
||||
LRESULT CALLBACK rpng2_win_wndproc(HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
|
||||
static char titlebar[1024], *window_name = titlebar;
|
||||
static char titlebar[1024];
|
||||
static char *progname = PROGNAME;
|
||||
static char *appname = LONGNAME;
|
||||
static char *icon_name = PROGNAME; /* GRR: not (yet) used */
|
||||
static char *filename;
|
||||
static FILE *infile;
|
||||
|
||||
@@ -367,7 +392,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
|
||||
}
|
||||
} else if (!strncmp(*argv, "-timing", 2)) {
|
||||
timing = TRUE;
|
||||
#if (defined(__i386__) || defined(_M_IX86))
|
||||
#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__))
|
||||
} else if (!strncmp(*argv, "-nommxfilters", 7)) {
|
||||
rpng2_info.nommxfilters = TRUE;
|
||||
} else if (!strncmp(*argv, "-nommxcombine", 7)) {
|
||||
@@ -432,7 +457,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
|
||||
readpng2_version_info();
|
||||
fprintf(stderr, "\n"
|
||||
"Usage: %s [-gamma exp] [-bgcolor bg | -bgpat pat] [-timing]\n"
|
||||
#if (defined(__i386__) || defined(_M_IX86))
|
||||
#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__))
|
||||
" %*s [[-nommxfilters] [-nommxcombine] [-nommxinterlace] | -nommx]\n"
|
||||
#endif
|
||||
" %*s file.png\n\n"
|
||||
@@ -447,17 +472,17 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
|
||||
"\t\t transparent images; overrides -bgcolor option\n"
|
||||
" -timing\tenables delay for every block read, to simulate modem\n"
|
||||
"\t\t download of image (~36 Kbps)\n"
|
||||
#if (defined(__i386__) || defined(_M_IX86))
|
||||
#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__))
|
||||
" -nommx*\tdisable optimized MMX routines for decoding row filters,\n"
|
||||
"\t\t combining rows, and expanding interlacing, respectively\n"
|
||||
#endif
|
||||
"\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n"
|
||||
"Press Q or Esc to quit this usage screen. ",
|
||||
PROGNAME,
|
||||
#if (defined(__i386__) || defined(_M_IX86))
|
||||
strlen(PROGNAME), " ",
|
||||
#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__))
|
||||
(int)strlen(PROGNAME), " ",
|
||||
#endif
|
||||
strlen(PROGNAME), " ", default_display_exponent, num_bgpat);
|
||||
(int)strlen(PROGNAME), " ", default_display_exponent, num_bgpat);
|
||||
fflush(stderr);
|
||||
do
|
||||
ch = _getch();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,8 +5,10 @@
|
||||
This program converts certain NetPBM binary files (grayscale and RGB,
|
||||
maxval = 255) to PNG. Non-interlaced PNGs are written progressively;
|
||||
interlaced PNGs are read and written in one memory-intensive blast.
|
||||
|
||||
Thanks to Jean-loup Gailly for providing the necessary trick to read
|
||||
interactive text from the keyboard while stdin is redirected.
|
||||
interactive text from the keyboard while stdin is redirected. Thanks
|
||||
to Cosmin Truta for Cygwin fixes.
|
||||
|
||||
NOTE: includes provisional support for PNM type "8" (portable alphamap)
|
||||
images, presumed to be a 32-bit interleaved RGBA format; no pro-
|
||||
@@ -24,16 +26,32 @@
|
||||
- 1.02: modified to allow abbreviated options
|
||||
- 1.03: removed extraneous character from usage screen; fixed bug in
|
||||
command-line parsing
|
||||
- 1.04: fixed DOS/OS2/Win32 detection, including partial Cygwin fix
|
||||
(see http://home.att.net/~perlspinr/diffs/GregBook_cygwin.diff)
|
||||
- 2.00: dual-licensed (added GNU GPL)
|
||||
|
||||
[REPORTED BUG (win32 only): "contrib/gregbook/wpng.c - cmd line
|
||||
dose not work! In order to do something useful I needed to redirect
|
||||
both input and output, with cygwin and with bcc32 as well. Under
|
||||
Linux, the same wpng appears to work fine. I don't know what is
|
||||
the problem."]
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998-2000 Greg Roelofs. All rights reserved.
|
||||
Copyright (c) 1998-2007 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
|
||||
be held liable for any damages arising in any way from the use of
|
||||
this software.
|
||||
|
||||
The contents of this file are DUAL-LICENSED. You may modify and/or
|
||||
redistribute this software according to the terms of one of the
|
||||
following two licenses (at your option):
|
||||
|
||||
|
||||
LICENSE 1 ("BSD-like with advertising clause"):
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute
|
||||
it freely, subject to the following restrictions:
|
||||
@@ -50,16 +68,35 @@
|
||||
and contributors for the book, "PNG: The Definitive Guide,"
|
||||
published by O'Reilly and Associates.
|
||||
|
||||
|
||||
LICENSE 2 (GNU GPL v2 or later):
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#define PROGNAME "wpng"
|
||||
#define VERSION "1.03 of 19 March 2000"
|
||||
#define VERSION "2.00 of 2 June 2007"
|
||||
#define APPNAME "Simple PGM/PPM/PAM to PNG Converter"
|
||||
|
||||
#if defined(__MSDOS__) || defined(__OS2__)
|
||||
# define DOS_OS2_W32
|
||||
#elif defined(_WIN32) || defined(__WIN32__)
|
||||
# define DOS_OS2_W32
|
||||
#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
|
||||
# ifndef __GNUC__ /* treat Win32 native ports of gcc as Unix environments */
|
||||
# define DOS_OS2_W32
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -4,13 +4,20 @@
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998-2000 Greg Roelofs. All rights reserved.
|
||||
Copyright (c) 1998-2007 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
|
||||
be held liable for any damages arising in any way from the use of
|
||||
this software.
|
||||
|
||||
The contents of this file are DUAL-LICENSED. You may modify and/or
|
||||
redistribute this software according to the terms of one of the
|
||||
following two licenses (at your option):
|
||||
|
||||
|
||||
LICENSE 1 ("BSD-like with advertising clause"):
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute
|
||||
it freely, subject to the following restrictions:
|
||||
@@ -27,6 +34,23 @@
|
||||
and contributors for the book, "PNG: The Definitive Guide,"
|
||||
published by O'Reilly and Associates.
|
||||
|
||||
|
||||
LICENSE 2 (GNU GPL v2 or later):
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
@@ -4,13 +4,20 @@
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998-2000 Greg Roelofs. All rights reserved.
|
||||
Copyright (c) 1998-2007 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
|
||||
be held liable for any damages arising in any way from the use of
|
||||
this software.
|
||||
|
||||
The contents of this file are DUAL-LICENSED. You may modify and/or
|
||||
redistribute this software according to the terms of one of the
|
||||
following two licenses (at your option):
|
||||
|
||||
|
||||
LICENSE 1 ("BSD-like with advertising clause"):
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute
|
||||
it freely, subject to the following restrictions:
|
||||
@@ -27,6 +34,23 @@
|
||||
and contributors for the book, "PNG: The Definitive Guide,"
|
||||
published by O'Reilly and Associates.
|
||||
|
||||
|
||||
LICENSE 2 (GNU GPL v2 or later):
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef TRUE
|
||||
|
||||
6
contrib/pngminim/decoder/README
Normal file
6
contrib/pngminim/decoder/README
Normal file
@@ -0,0 +1,6 @@
|
||||
This demonstrates the use of PNG_USER_CONFIG and pngusr.h
|
||||
|
||||
To build a minimal read-only decoder, run
|
||||
gather.sh # to collect needed files from pngminus, libpng, and zlib
|
||||
make -f makefile.std
|
||||
|
||||
8
contrib/pngminim/decoder/gather.sh
Executable file
8
contrib/pngminim/decoder/gather.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
cp ../../pngminus/png2pnm.c pngm2pnm.c
|
||||
cp ../../../*.h .
|
||||
cp ../../../*.c .
|
||||
rm example.c pnggccrd.c pngvcrd.c pngtest.c
|
||||
# change the following 2 lines if zlib is somewhere else
|
||||
cp ../../../../zlib/*.h .
|
||||
cp ../../../../zlib/*.c .
|
||||
rm minigzip.c example.c compress.c deflate.c
|
||||
44
contrib/pngminim/decoder/makefile.std
Normal file
44
contrib/pngminim/decoder/makefile.std
Normal file
@@ -0,0 +1,44 @@
|
||||
# Makefile for PngMinus (pngm2pnm)
|
||||
# Linux / Unix
|
||||
|
||||
#CC=cc
|
||||
CC=gcc
|
||||
LD=$(CC)
|
||||
|
||||
RM=rm -f
|
||||
|
||||
CFLAGS=-DPNG_USER_CONFIG -DNO_GZCOMPRESS -DNO_GZIP \
|
||||
-DdeflateParams\(a,b,c\)=Z_OK -I. -O1
|
||||
|
||||
C=.c
|
||||
O=.o
|
||||
L=.a
|
||||
E=
|
||||
|
||||
ZOBJS = adler32$(O) crc32$(O) gzio$(O) \
|
||||
infback$(O) inffast$(O) inflate$(O) inftrees$(O) \
|
||||
trees$(O) uncompr$(O) zutil$(O)
|
||||
|
||||
OBJS = pngm2pnm$(O) png$(O) pngerror$(O) pngget$(O) pngmem$(O) \
|
||||
pngpread$(O) pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) \
|
||||
pngset$(O) pngtrans$(O) $(ZOBJS)
|
||||
|
||||
# implicit make rules -------------------------------------------------------
|
||||
|
||||
.c$(O): png.h pngconf.h pngusr.h zlib.h
|
||||
$(CC) -c $(CFLAGS) $<
|
||||
|
||||
# dependencies
|
||||
|
||||
all: pngm2pnm$(E)
|
||||
|
||||
pngm2pnm$(E): $(OBJS)
|
||||
$(LD) -o pngm2pnm$(E) $(OBJS)
|
||||
strip pngm2pnm$(E)
|
||||
|
||||
clean:
|
||||
$(RM) pngm2pnm$(O)
|
||||
$(RM) pngm2pnm$(E)
|
||||
$(RM) $(OBJS)
|
||||
|
||||
# End of makefile for pngm2pnm
|
||||
67
contrib/pngminim/decoder/pngusr.h
Normal file
67
contrib/pngminim/decoder/pngusr.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/* minrdpngconf.h: headers to make a minimal png-read-only library
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 2007 Glenn Randers-Pehrson
|
||||
* Derived from pngcrush.h, Copyright 1998-2007, Glenn Randers-Pehrson
|
||||
*/
|
||||
|
||||
#ifndef MINRDPNGCONF_H
|
||||
#define MINRDPNGCONF_H
|
||||
|
||||
#define PNG_NO_GLOBAL_ARRAYS
|
||||
|
||||
#define PNG_NO_WARNINGS
|
||||
#define png_warning(s1,s2) ""
|
||||
#define png_chunk_warning(s1,s2) ""
|
||||
#define PNG_NO_ERROR_TEXT
|
||||
#define png_error(s1,s2) png_err(s1)
|
||||
#define png_chunk_error(s1,s2) png_err(s1)
|
||||
|
||||
#define PNG_NO_ASSEMBLER_CODE
|
||||
#define PNG_NO_OPTIMIZED_CODE
|
||||
#define PNG_NO_READ_GAMMA
|
||||
#define PNG_NO_READ_BACKGROUND
|
||||
#define PNG_NO_READ_DITHER
|
||||
#define PNG_NO_READ_INVERT
|
||||
#define PNG_NO_READ_SHIFT
|
||||
#define PNG_NO_READ_PACK
|
||||
#define PNG_NO_READ_PACKSWAP
|
||||
#define PNG_NO_READ_FILLER
|
||||
#define PNG_NO_READ_SWAP_ALPHA
|
||||
#define PNG_NO_READ_INVERT_ALPHA
|
||||
#define PNG_NO_READ_RGB_TO_GRAY
|
||||
#define PNG_NO_READ_USER_TRANSFORM
|
||||
#define PNG_NO_READ_bKGD
|
||||
#define PNG_NO_READ_cHRM
|
||||
#define PNG_NO_READ_gAMA
|
||||
#define PNG_NO_READ_hIST
|
||||
#define PNG_NO_READ_iCCP
|
||||
#define PNG_NO_READ_pCAL
|
||||
#define PNG_NO_READ_pHYs
|
||||
#define PNG_NO_READ_sBIT
|
||||
#define PNG_NO_READ_sCAL
|
||||
#define PNG_NO_READ_sPLT
|
||||
#define PNG_NO_READ_TEXT
|
||||
#define PNG_NO_READ_tIME
|
||||
#define PNG_NO_READ_UNKNOWN_CHUNKS
|
||||
#define PNG_NO_READ_USER_CHUNKS
|
||||
#define PNG_NO_READ_EMPTY_PLTE
|
||||
#define PNG_NO_READ_OPT_PLTE
|
||||
#define PNG_NO_READ_STRIP_ALPHA
|
||||
#define PNG_NO_READ_oFFs
|
||||
#define PNG_NO_WARN_UNINITIALIZED_ROW
|
||||
|
||||
#define PNG_NO_WRITE_SUPPORTED
|
||||
|
||||
#define PNG_NO_INFO_IMAGE
|
||||
#define PNG_NO_USER_MEM
|
||||
#define PNG_NO_FIXED_POINT_SUPPORTED
|
||||
#define PNG_NO_MNG_FEATURES
|
||||
#define PNG_NO_USER_TRANSFORM_PTR
|
||||
#define PNG_NO_HANDLE_AS_UNKNOWN
|
||||
#define PNG_NO_CONSOLE_IO
|
||||
#define PNG_NO_ZALLOC_ZERO
|
||||
#define PNG_NO_ERROR_NUMBERS
|
||||
#define PNG_NO_EASY_ACCESS
|
||||
#define PNG_NO_PROGRESSIVE_READ
|
||||
|
||||
#endif /* MINRDPNGCONF_H */
|
||||
6
contrib/pngminim/encoder/README
Normal file
6
contrib/pngminim/encoder/README
Normal file
@@ -0,0 +1,6 @@
|
||||
This demonstrates the use of PNG_USER_CONFIG and pngusr.h
|
||||
|
||||
To build a minimal write-only encoder, run
|
||||
gather.sh # to collect needed files from pngminus, libpng, and zlib
|
||||
make -f makefile.std
|
||||
|
||||
27
contrib/pngminim/encoder/dummy_inflate.c
Normal file
27
contrib/pngminim/encoder/dummy_inflate.c
Normal file
@@ -0,0 +1,27 @@
|
||||
#include "zlib.h"
|
||||
|
||||
int ZEXPORT inflate(strm, flush)
|
||||
z_streamp strm;
|
||||
int flush;
|
||||
{ return Z_OK ; }
|
||||
|
||||
int ZEXPORT inflateReset(strm)
|
||||
z_streamp strm;
|
||||
{ return Z_OK ; }
|
||||
|
||||
int ZEXPORT inflateEnd(strm)
|
||||
z_streamp strm;
|
||||
{ return Z_STREAM_ERROR ; }
|
||||
|
||||
int ZEXPORT inflateInit_(strm, version, stream_size)
|
||||
z_streamp strm;
|
||||
const char *version;
|
||||
int stream_size;
|
||||
{ return Z_OK ; }
|
||||
|
||||
int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
|
||||
z_streamp strm;
|
||||
int windowBits;
|
||||
const char *version;
|
||||
int stream_size;
|
||||
{ return Z_STREAM_ERROR ; }
|
||||
9
contrib/pngminim/encoder/gather.sh
Executable file
9
contrib/pngminim/encoder/gather.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
cp ../../pngminus/pnm2png.c pnm2pngm.c
|
||||
cp ../../../*.h .
|
||||
cp ../../../*.c .
|
||||
rm example.c pnggccrd.c pngvcrd.c pngtest.c
|
||||
# Change the next 2 lines if zlib is somewhere else.
|
||||
cp ../../../../zlib/*.h .
|
||||
cp ../../../../zlib/*.c .
|
||||
rm inf*.[ch]
|
||||
rm minigzip.c example.c
|
||||
44
contrib/pngminim/encoder/makefile.std
Normal file
44
contrib/pngminim/encoder/makefile.std
Normal file
@@ -0,0 +1,44 @@
|
||||
# Makefile for PngMinus (pnm2pngm)
|
||||
# Linux / Unix
|
||||
|
||||
#CC=cc
|
||||
CC=gcc
|
||||
LD=$(CC)
|
||||
|
||||
RM=rm -f
|
||||
|
||||
CFLAGS=-DPNG_USER_CONFIG -DNO_GZIP -I. -O1
|
||||
|
||||
C=.c
|
||||
O=.o
|
||||
L=.a
|
||||
E=
|
||||
|
||||
ZOBJS = adler32$(O) compress$(O) crc32$(O) deflate$(O) gzio$(O) \
|
||||
dummy_inflate$(O) \
|
||||
trees$(O) uncompr$(O) zutil$(O)
|
||||
|
||||
OBJS = pnm2pngm$(O) png$(O) pngerror$(O) pngget$(O) pngmem$(O) \
|
||||
pngpread$(O) pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) \
|
||||
pngset$(O) pngtrans$(O) pngwio$(O) pngwrite$(O) \
|
||||
pngwtran$(O) pngwutil$(O) $(ZOBJS)
|
||||
|
||||
# implicit make rules -------------------------------------------------------
|
||||
|
||||
.c$(O): png.h pngconf.h pngusr.h zlib.h
|
||||
$(CC) -c $(CFLAGS) $<
|
||||
|
||||
# dependencies
|
||||
|
||||
all: pnm2pngm$(E)
|
||||
|
||||
pnm2pngm$(E): $(OBJS)
|
||||
$(LD) -o pnm2pngm$(E) $(OBJS)
|
||||
strip pnm2pngm$(E)
|
||||
|
||||
clean:
|
||||
$(RM) pnm2pngm$(O)
|
||||
$(RM) pnm2pngm$(E)
|
||||
$(RM) $(OBJS)
|
||||
|
||||
# End of makefile for pnm2pngm
|
||||
66
contrib/pngminim/encoder/pngusr.h
Normal file
66
contrib/pngminim/encoder/pngusr.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/* minwrpngconf.h: headers to make a minimal png-write-only library
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 2007 Glenn Randers-Pehrson
|
||||
* Derived from pngcrush.h, Copyright 1998-2007, Glenn Randers-Pehrson
|
||||
*/
|
||||
|
||||
#ifndef MINWRPNGCONF_H
|
||||
#define MINWRPNGCONF_H
|
||||
|
||||
#define PNG_NO_GLOBAL_ARRAYS
|
||||
|
||||
#define PNG_NO_READ_SUPPORTED
|
||||
|
||||
#define PNG_NO_WARNINGS
|
||||
#define png_warning(s1,s2) ""
|
||||
#define png_chunk_warning(s1,s2) ""
|
||||
#define PNG_NO_ERROR_TEXT
|
||||
#define png_error(s1,s2) png_err(s1)
|
||||
#define png_chunk_error(s1,s2) png_err(s1)
|
||||
|
||||
#define PNG_NO_WRITE_BACKGROUND
|
||||
#define PNG_NO_WRITE_GAMMA
|
||||
#define PNG_NO_WRITE_DITHER
|
||||
#define PNG_NO_WRITE_INVERT
|
||||
#define PNG_NO_WRITE_SHIFT
|
||||
#define PNG_NO_WRITE_PACK
|
||||
#define PNG_NO_WRITE_PACKSWAP
|
||||
#define PNG_NO_WRITE_FILLER
|
||||
#define PNG_NO_WRITE_SWAP_ALPHA
|
||||
#define PNG_NO_WRITE_INVERT_ALPHA
|
||||
#define PNG_NO_WRITE_RGB_TO_GRAY
|
||||
#define PNG_NO_WRITE_USER_TRANSFORM
|
||||
#define PNG_NO_WRITE_bKGD
|
||||
#define PNG_NO_WRITE_cHRM
|
||||
#define PNG_NO_WRITE_gAMA
|
||||
#define PNG_NO_WRITE_sRGB
|
||||
#define PNG_NO_WRITE_hIST
|
||||
#define PNG_NO_WRITE_iCCP
|
||||
#define PNG_NO_WRITE_oFFs
|
||||
#define PNG_NO_WRITE_pCAL
|
||||
#define PNG_NO_WRITE_pHYs
|
||||
#define PNG_NO_WRITE_sBIT
|
||||
#define PNG_NO_WRITE_sCAL
|
||||
#define PNG_NO_WRITE_sPLT
|
||||
#define PNG_NO_WRITE_TEXT
|
||||
#define PNG_NO_WRITE_tIME
|
||||
#define PNG_NO_WRITE_UNKNOWN_CHUNKS
|
||||
#define PNG_NO_WRITE_USER_CHUNKS
|
||||
#define PNG_NO_WRITE_EMPTY_PLTE
|
||||
#define PNG_NO_WRITE_OPT_PLTE
|
||||
#define PNG_NO_WRITE_FILTER
|
||||
#define PNG_NO_WRITE_WEIGHTED_FILTER
|
||||
#define PNG_NO_WRITE_INTERLACING_SUPPORTED /* effective libpng-1.3.0 */
|
||||
|
||||
#define PNG_NO_INFO_IMAGE
|
||||
#define PNG_NO_USER_MEM
|
||||
#define PNG_NO_FIXED_POINT_SUPPORTED
|
||||
#define PNG_NO_MNG_FEATURES
|
||||
#define PNG_NO_USER_TRANSFORM_PTR
|
||||
#define PNG_NO_HANDLE_AS_UNKNOWN
|
||||
#define PNG_NO_CONSOLE_IO
|
||||
#define PNG_NO_ZALLOC_ZERO
|
||||
#define PNG_NO_ERROR_NUMBERS
|
||||
#define PNG_NO_EASY_ACCESS
|
||||
|
||||
#endif /* MINWRPNGCONF_H */
|
||||
@@ -20,7 +20,7 @@ Soon after the creation of PNG in 1995, the need was felt for a set of
|
||||
pnmtopng / pngtopnm utilities. Independantly Alexander Lehmann and I
|
||||
(Willem van Schaik) started such a project. Luckily we discovered this
|
||||
and merged the two together into pnmtopng.tar.gz, which is available
|
||||
from a/o ftp://swrinde.nde.swri.edu/pub/png/.
|
||||
from a/o ftp://ftp.simplesystems.org/pub/libpng/png/.
|
||||
|
||||
These two utilities have many, many options and make use of most of the
|
||||
features of PNG, like gamma, alpha, sbit, text-chunks, etc. This makes
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
# -- grayscale
|
||||
./png2pnm -noraw ../pngsuite/basn0g01.png basn0g01.pgm
|
||||
./png2pnm -noraw ../pngsuite/basn0g02.png basn0g02.pgm
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
make -f makefile.std
|
||||
sh png2pnm.sh
|
||||
sh pnm2png.sh
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
# -- grayscale
|
||||
./pnm2png basn0g01.pgm basn0g01.png
|
||||
./pnm2png basn0g02.pgm basn0g02.png
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/* example.c - an example of using libpng
|
||||
* Last changed in libpng 1.2.1 December 7, 2001.
|
||||
* This file has been placed in the public domain by the authors.
|
||||
* Maintained 1998-2001 Glenn Randers-Pehrson
|
||||
* Maintained 1998-2007 Glenn Randers-Pehrson
|
||||
* Maintained 1996, 1997 Andreas Dilger)
|
||||
* Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*/
|
||||
@@ -200,7 +200,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
|
||||
|
||||
/* Expand paletted colors into true RGB triplets */
|
||||
if (color_type == PNG_COLOR_TYPE_PALETTE)
|
||||
png_set_palette_rgb(png_ptr);
|
||||
png_set_palette_to_rgb(png_ptr);
|
||||
|
||||
/* Expand grayscale images to the full 8 bits from 1, 2, or 4 bits/pixel */
|
||||
if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
libpng.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.2.10rc1 - April 19, 2006
|
||||
libpng version 1.2.20beta04 - August 21, 2007
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<glennrp at users.sourceforge.net>
|
||||
Copyright (c) 1998-2005 Glenn Randers-Pehrson
|
||||
Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
For conditions of distribution and use, see copyright
|
||||
notice in png.h.
|
||||
|
||||
@@ -33,6 +33,10 @@ it is heavily commented and should include everything most people
|
||||
will need. We assume that libpng is already installed; see the
|
||||
INSTALL file for instructions on how to install libpng.
|
||||
|
||||
For examples of libpng usage, see the files "example.c", "pngtest.c",
|
||||
and the files in the "contrib" directory, all of which are included in the
|
||||
libpng distribution.
|
||||
|
||||
Libpng was written as a companion to the PNG specification, as a way
|
||||
of reducing the amount of time and effort it takes to support the PNG
|
||||
file format in application programs.
|
||||
@@ -392,7 +396,7 @@ dithering, and setting filler.) If this is the case, simply do this:
|
||||
|
||||
png_read_png(png_ptr, info_ptr, png_transforms, NULL)
|
||||
|
||||
where png_transforms is an integer containing the logical OR of
|
||||
where png_transforms is an integer containing the bitwise OR of
|
||||
some set of transformation flags. This call is equivalent to png_read_info(),
|
||||
followed the set of transformations indicated by the transform mask,
|
||||
then png_read_image(), and finally png_read_end().
|
||||
@@ -1272,7 +1276,7 @@ point to libpng-allocated storage with the following function:
|
||||
|
||||
png_free_data(png_ptr, info_ptr, mask, seq)
|
||||
mask - identifies data to be freed, a mask
|
||||
containing the logical OR of one or
|
||||
containing the bitwise OR of one or
|
||||
more of
|
||||
PNG_FREE_PLTE, PNG_FREE_TRNS,
|
||||
PNG_FREE_HIST, PNG_FREE_ICCP,
|
||||
@@ -1334,7 +1338,7 @@ application instead of by libpng, you can use
|
||||
|
||||
png_set_invalid(png_ptr, info_ptr, mask);
|
||||
mask - identifies the chunks to be made invalid,
|
||||
containing the logical OR of one or
|
||||
containing the bitwise OR of one or
|
||||
more of
|
||||
PNG_INFO_gAMA, PNG_INFO_sBIT,
|
||||
PNG_INFO_cHRM, PNG_INFO_PLTE,
|
||||
@@ -1601,6 +1605,14 @@ Libpng section below.
|
||||
|
||||
png_init_io(png_ptr, fp);
|
||||
|
||||
If you are embedding your PNG into a datastream such as MNG, and don't
|
||||
want libpng to write the 8-byte signature, or if you have already
|
||||
written the signature in your application, use
|
||||
|
||||
png_set_sig_bytes(png_ptr, 8);
|
||||
|
||||
to inform libpng that it should not write a signature.
|
||||
|
||||
Write callbacks
|
||||
|
||||
At this point, you can set up a callback function that will be
|
||||
@@ -1638,7 +1650,7 @@ types.
|
||||
|
||||
/* turn on or off filtering, and/or choose
|
||||
specific filters. You can use either a single
|
||||
PNG_FILTER_VALUE_NAME or the logical OR of one
|
||||
PNG_FILTER_VALUE_NAME or the bitwise OR of one
|
||||
or more PNG_FILTER_NAME masks. */
|
||||
png_set_filter(png_ptr, 0,
|
||||
PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE |
|
||||
@@ -2011,7 +2023,7 @@ png_set_rows() to put image data in the info structure), simply do this:
|
||||
|
||||
png_write_png(png_ptr, info_ptr, png_transforms, NULL)
|
||||
|
||||
where png_transforms is an integer containing the logical OR of some set of
|
||||
where png_transforms is an integer containing the bitwise OR of some set of
|
||||
transformation flags. This call is equivalent to png_write_info(),
|
||||
followed the set of transformations indicated by the transform mask,
|
||||
then png_write_image(), and finally png_write_end().
|
||||
@@ -2271,7 +2283,7 @@ point to libpng-allocated storage with the following function:
|
||||
|
||||
png_free_data(png_ptr, info_ptr, mask, seq)
|
||||
mask - identifies data to be freed, a mask
|
||||
containing the logical OR of one or
|
||||
containing the bitwise OR of one or
|
||||
more of
|
||||
PNG_FREE_PLTE, PNG_FREE_TRNS,
|
||||
PNG_FREE_HIST, PNG_FREE_ICCP,
|
||||
@@ -2778,7 +2790,8 @@ this may include optimizations that did not exist at the time the code was
|
||||
written and compiled. It is also possible, of course, to enable only known,
|
||||
specific optimizations; for example:
|
||||
|
||||
#if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
|
||||
#if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) && \
|
||||
defined(PNG_USE_PNGGCCRD) && defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
||||
flags = PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \
|
||||
| PNG_ASM_FLAG_MMX_READ_INTERLACE \
|
||||
| PNG_ASM_FLAG_MMX_READ_FILTER_SUB \
|
||||
@@ -2815,7 +2828,7 @@ defined:
|
||||
#if defined(PNG_USE_PNGGCCRD) && defined(PNG_ASSEMBLER_CODE_SUPPORTED) \
|
||||
&& defined(PNG_THREAD_UNSAFE_OK)
|
||||
/* Disable thread-unsafe features of pnggccrd */
|
||||
if (png_access_version() >= 10200)
|
||||
if (png_access_version_number() >= 10200)
|
||||
{
|
||||
png_uint_32 mmx_disable_mask = 0;
|
||||
png_uint_32 asm_flags;
|
||||
@@ -2833,6 +2846,52 @@ For more extensive examples of runtime querying, enabling and disabling
|
||||
of optimized features, see contrib/gregbook/readpng2.c in the libpng
|
||||
source-code distribution.
|
||||
|
||||
It is also possible to disable or enable specific optimization features
|
||||
at compile time. To disable them entirely, which may result in slower
|
||||
but smaller and less complex and troublesome code, define
|
||||
|
||||
PNG_NO_ASSEMBLER_CODE
|
||||
|
||||
If you do this, then the run-time code for setting and querying flags
|
||||
described above, and the assembler code in pnggccrd.c or pngvcrd.c will
|
||||
not be built.
|
||||
|
||||
If you have disabled the assembler code, you can also disable the
|
||||
optimized C code, to obtain even slower but smaller code, by defining
|
||||
|
||||
PNG_NO_OPTIMZED_CODE
|
||||
|
||||
To disable only the MMX assembler code, define
|
||||
|
||||
PNG_NO_MMX_CODE
|
||||
|
||||
There are two versions of the MMX code: one for gcc compilers and one for
|
||||
MSVC compilers. Pngconf.h should automatically detect which you are
|
||||
using, and it will set either PNG_USE_PNGGCCRD or PNG_USE_PNGVCRD for you.
|
||||
|
||||
Define one or more of the following to disable specific parts of the
|
||||
assembler code:
|
||||
|
||||
PNG_NO_MMX_COMBINE_ROW
|
||||
PNG_NO_MMX_READ_INTERLACE
|
||||
PNG_NO_MMX_READ_FILTER_ROW
|
||||
|
||||
If the latter is not disabled, you can disable one or more of the
|
||||
individual filter types by defining
|
||||
|
||||
PNG_NO_MMX_FILTER_SUB
|
||||
PNG_NO_MMX_FILTER_UP
|
||||
PNG_NO_MMX_FILTER_AVG
|
||||
PNG_NO_MMX_FILTER_PAETH
|
||||
|
||||
By default, libpng only enables the "sub" filter when gcc-3.x is used
|
||||
because experiments show that gcc-3.x produces bad code for the others.
|
||||
|
||||
When you disable various MMX features, libpng will still be able to decode
|
||||
files with those features. It will fall back upon the optimized C code
|
||||
or the unoptimized C code to decode them.
|
||||
|
||||
|
||||
VII. MNG support
|
||||
|
||||
The MNG specification (available at http://www.libpng.org/pub/mng) allows
|
||||
@@ -2841,12 +2900,12 @@ Libpng can support some of these extensions. To enable them, use the
|
||||
png_permit_mng_features() function:
|
||||
|
||||
feature_set = png_permit_mng_features(png_ptr, mask)
|
||||
mask is a png_uint_32 containing the logical OR of the
|
||||
mask is a png_uint_32 containing the bitwise OR of the
|
||||
features you want to enable. These include
|
||||
PNG_FLAG_MNG_EMPTY_PLTE
|
||||
PNG_FLAG_MNG_FILTER_64
|
||||
PNG_ALL_MNG_FEATURES
|
||||
feature_set is a png_uint_32 that is the logical AND of
|
||||
feature_set is a png_uint_32 that is the bitwise AND of
|
||||
your mask with the set of MNG features that is
|
||||
supported by the version of libpng that you are using.
|
||||
|
||||
@@ -2909,13 +2968,13 @@ application:
|
||||
|
||||
IX. Y2K Compliance in libpng
|
||||
|
||||
April 19, 2006
|
||||
August 21, 2007
|
||||
|
||||
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.2.10rc1 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.2.20beta04 are Y2K compliant. It is my belief that earlier
|
||||
versions were also Y2K compliant.
|
||||
|
||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
||||
516
libpngpf.3
516
libpngpf.3
@@ -1,776 +1,266 @@
|
||||
.TH LIBPNGPF 3 "April 19, 2006"
|
||||
.TH LIBPNGPF 3 "August 21, 2007"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.10rc1
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.20beta04
|
||||
(private functions)
|
||||
.SH SYNOPSIS
|
||||
\fB#include <png.h>\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_build_gamma_table (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_build_grayscale_palette (int \fP\fIbit_depth\fP\fB, png_colorp \fIpalette\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_calculate_crc (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIptr\fP\fB, png_size_t \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_check_chunk_name (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBpng_size_t png_check_keyword (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIkey\fP\fB, png_charpp \fInew_key\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_combine_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fImask\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_correct_palette (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fInum_palette\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBint png_crc_error (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBint png_crc_finish (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIskip\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_crc_read (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuf\fP\fB, png_size_t \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBpng_voidp png_create_struct (int \fItype\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBpng_voidp png_create_struct_2 (int \fP\fItype\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_voidp \fImem_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBpng_charp png_decompress_chunk (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcomp_type\fP\fB, png_charp \fP\fIchunkdata\fP\fB, png_size_t \fP\fIchunklength\fP\fB, png_size_t \fP\fIprefix_length\fP\fB, png_size_t \fI*data_length\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_destroy_struct (png_voidp \fIstruct_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_destroy_struct_2 (png_voidp \fP\fIstruct_ptr\fP\fB, png_free_ptr \fP\fIfree_fn\fP\fB, png_voidp \fImem_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_background (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fP\fItrans_values\fP\fB, png_color_16p \fP\fIbackground\fP\fB, png_color_16p \fP\fIbackground_1\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_bytep \fP\fIgamma_from_1\fP\fB, png_bytep \fP\fIgamma_to_1\fP\fB, png_uint_16pp \fP\fIgamma_16\fP\fB, png_uint_16pp \fP\fIgamma_16_from_1\fP\fB, png_uint_16pp \fP\fIgamma_16_to_1\fP\fB, int \fIgamma_shift\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_bgr (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_chop (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_dither (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIpalette_lookup\fP\fB, png_bytep \fIdither_lookup\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_expand (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fItrans_value\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_expand_palette (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_colorp \fP\fIpalette\fP\fB, png_bytep \fP\fItrans\fP\fB, int \fInum_trans\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_gamma (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_uint_16pp \fP\fIgamma_16_table\fP\fB, int \fIgamma_shift\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_gray_to_rgb (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_invert (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_pack (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fIbit_depth\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_packswap (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_read_filler (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, png_uint_32 \fIflags\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_read_interlace (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fP\fIpass\fP\fB, png_uint_32 \fItransformations\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_read_invert_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_read_swap_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_read_transformations (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBint png_do_rgb_to_gray (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_shift (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_8p \fIbit_depth\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_strip_filler (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fIflags\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_swap (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_unpack (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_unshift (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_8p \fIsig_bits\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_write_interlace (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fIpass\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_write_invert_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_write_swap_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_do_write_transformations (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid *png_far_to_near (png_structp png_ptr,png_voidp \fP\fIptr\fP\fB, int \fIcheck\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_flush (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_gAMA (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_IEND (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_iTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_handle_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_info_destroy (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_init_mmx_flags (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_init_read_transformations (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_process_IDAT_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_length\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_process_some_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_push_check_crc (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_push_crc_finish (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_push_crc_skip (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_push_fill_buffer (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_push_handle_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_push_handle_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_push_handle_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_push_have_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_push_have_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_push_have_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIrow\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_push_process_row (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_push_read_chunk (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_push_read_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_push_read_IDAT (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_push_read_sig (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_push_read_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_push_read_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_push_restore_buffer (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_length\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_push_save_buffer (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_read_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_read_filter_row (png_structp \fP\fIpng_ptr\fP\fB, png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIprev_row\fP\fB, int \fIfilter\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_read_finish_row (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_read_push_finish_row (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_read_start_row (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_read_transform_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_reset_crc (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBint png_set_text_2 (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fItext_ptr\fP\fB, int \fInum_text\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_cHRM (png_structp \fP\fIpng_ptr\fP\fB, double \fP\fIwhite_x\fP\fB, double \fP\fIwhite_y\fP\fB, double \fP\fIred_x\fP\fB, double \fP\fIred_y\fP\fB, double \fP\fIgreen_x\fP\fB, double \fP\fIgreen_y\fP\fB, double \fP\fIblue_x\fP\fB, double \fIblue_y\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIwhite_x\fP\fB, png_uint_32 \fP\fIwhite_y\fP\fB, png_uint_32 \fP\fIred_x\fP\fB, png_uint_32 \fP\fIred_y\fP\fB, png_uint_32 \fP\fIgreen_x\fP\fB, png_uint_32 \fP\fIgreen_y\fP\fB, png_uint_32 \fP\fIblue_x\fP\fB, png_uint_32 \fIblue_y\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_filtered_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIfiltered_row\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_find_filter (png_structp \fP\fIpng_ptr\fP\fB, png_row_infop \fIrow_info\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_finish_row (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_gAMA (png_structp \fP\fIpng_ptr\fP\fB, double \fIfile_gamma\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_gAMA_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIint_file_gamma\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_uint_16p \fP\fIhist\fP\fB, int \fInum_hist\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIname\fP\fB, int \fP\fIcompression_type\fP\fB, png_charp \fP\fIprofile\fP\fB, int \fIproflen\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_IDAT (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_IEND (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIwidth\fP\fB, png_uint_32 \fP\fIheight\fP\fB, int \fP\fIbit_depth\fP\fB, int \fP\fIcolor_type\fP\fB, int \fP\fIcompression_type\fP\fB, int \fP\fIfilter_type\fP\fB, int \fIinterlace_type\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_iTXt (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcompression\fP\fB, png_charp \fP\fIkey\fP\fB, png_charp \fP\fIlang\fP\fB, png_charp \fP\fItranslated_key\fP\fB, png_charp \fItext\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIx_offset\fP\fB, png_uint_32 \fP\fIy_offset\fP\fB, int \fIunit_type\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIpurpose\fP\fB, png_int_32 \fP\fIX0\fP\fB, png_int_32 \fP\fIX1\fP\fB, int \fP\fItype\fP\fB, int \fP\fInparams\fP\fB, png_charp \fP\fIunits\fP\fB, png_charpp \fIparams\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIx_pixels_per_unit\fP\fB, png_uint_32 \fP\fIy_pixels_per_unit\fP\fB, int \fIunit_type\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, png_uint_32 \fInum_pal\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_color_8p \fP\fIsbit\fP\fB, int \fIcolor_type\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIunit\fP\fB, double \fP\fIwidth\fP\fB, double \fIheight\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_sCAL_s (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIunit\fP\fB, png_charp \fP\fIwidth\fP\fB, png_charp \fIheight\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_sig (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_sRGB (png_structp \fP\fIpng_ptr\fP\fB, int \fIintent\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_spalette_p \fIpalette\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_start_row (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIkey\fP\fB, png_charp \fP\fItext\fP\fB, png_size_t \fItext_len\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_timep \fImod_time\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fItrans\fP\fB, png_color_16p \fP\fIvalues\fP\fB, int \fP\fInumber\fP\fB, int \fIcolor_type\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIkey\fP\fB, png_charp \fP\fItext\fP\fB, png_size_t \fP\fItext_len\fP\fB, int \fIcompression\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoidpf png_zalloc (voidpf \fP\fIpng_ptr\fP\fB, uInt \fP\fIitems\fP\fB, uInt \fIsize\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_zfree (voidpf \fP\fIpng_ptr\fP\fB, voidpf \fIptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fI\fB
|
||||
|
||||
.SH DESCRIPTION
|
||||
The functions listed above are used privately by libpng
|
||||
and are not recommended for use by applications. They are
|
||||
@@ -779,6 +269,6 @@ are listed alphabetically here as an aid to libpng maintainers.
|
||||
See png.h for more information on these functions.
|
||||
|
||||
.SH SEE ALSO
|
||||
libpng(3), png(5)
|
||||
.IR libpng(3) ", " png(5)
|
||||
.SH AUTHOR
|
||||
Glenn Randers-Pehrson
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#! /bin/sh
|
||||
# ltmain.sh - Provide generalized library-building support services.
|
||||
# NOTE: Changing this file will not affect anything until you rerun configure.
|
||||
#
|
||||
|
||||
4
png.5
4
png.5
@@ -1,4 +1,4 @@
|
||||
.TH PNG 5 "April 19, 2006"
|
||||
.TH PNG 5 "August 21, 2007"
|
||||
.SH NAME
|
||||
png \- Portable Network Graphics (PNG) format
|
||||
.SH DESCRIPTION
|
||||
@@ -18,7 +18,7 @@ gamma and chromaticity data for improved color matching on heterogeneous
|
||||
platforms.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.IR libpng(3), zlib(3), deflate(5), and zlib(5)
|
||||
.IR libpng(3) ", " zlib(3) ", " deflate(5) ", and " zlib(5)
|
||||
.LP
|
||||
PNG specification (second edition), November 2003:
|
||||
.IP
|
||||
|
||||
150
png.c
150
png.c
@@ -1,9 +1,9 @@
|
||||
|
||||
/* png.c - location for general purpose libpng functions
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.19 August 19, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 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.)
|
||||
*/
|
||||
@@ -13,20 +13,20 @@
|
||||
#include "png.h"
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef version_1_2_10rc1 Your_png_h_is_not_version_1_2_10rc1;
|
||||
typedef version_1_2_20beta04 Your_png_h_is_not_version_1_2_20beta04;
|
||||
|
||||
/* Version information for C files. This had better match the version
|
||||
* string defined in png.h. */
|
||||
|
||||
#ifdef PNG_USE_GLOBAL_ARRAYS
|
||||
/* png_libpng_ver was changed to a function in version 1.0.5c */
|
||||
const char png_libpng_ver[18] = PNG_LIBPNG_VER_STRING;
|
||||
PNG_CONST char png_libpng_ver[18] = PNG_LIBPNG_VER_STRING;
|
||||
|
||||
#ifdef PNG_READ_SUPPORTED
|
||||
|
||||
/* png_sig was changed to a function in version 1.0.5c */
|
||||
/* Place to hold the signature string for a PNG file. */
|
||||
const png_byte FARDATA png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10};
|
||||
PNG_CONST png_byte FARDATA png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10};
|
||||
#endif /* PNG_READ_SUPPORTED */
|
||||
|
||||
/* Invoke global declarations for constant strings for known chunk types */
|
||||
@@ -56,32 +56,32 @@ PNG_zTXt;
|
||||
/* arrays to facilitate easy interlacing - use pass (0 - 6) as index */
|
||||
|
||||
/* start of interlace block */
|
||||
const int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0};
|
||||
PNG_CONST int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0};
|
||||
|
||||
/* offset to next interlace block */
|
||||
const int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};
|
||||
PNG_CONST int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};
|
||||
|
||||
/* start of interlace block in the y direction */
|
||||
const int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1};
|
||||
PNG_CONST int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1};
|
||||
|
||||
/* offset to next interlace block in the y direction */
|
||||
const int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2};
|
||||
PNG_CONST int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2};
|
||||
|
||||
/* width of interlace block (used in assembler routines only) */
|
||||
#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW
|
||||
const int FARDATA png_pass_width[] = {8, 4, 4, 2, 2, 1, 1};
|
||||
#if defined(PNG_HAVE_MMX_COMBINE_ROW) || defined(PNG_OPTIMIZED_CODE_SUPPORTED)
|
||||
PNG_CONST int FARDATA png_pass_width[] = {8, 4, 4, 2, 2, 1, 1};
|
||||
#endif
|
||||
|
||||
/* Height of interlace block. This is not currently used - if you need
|
||||
* it, uncomment it here and in png.h
|
||||
const int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
|
||||
PNG_CONST int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
|
||||
*/
|
||||
|
||||
/* Mask to determine which pixels are valid in a pass */
|
||||
const int FARDATA png_pass_mask[] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
|
||||
PNG_CONST int FARDATA png_pass_mask[] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
|
||||
|
||||
/* Mask to determine which pixels to overwrite while displaying */
|
||||
const int FARDATA png_pass_dsp_mask[]
|
||||
PNG_CONST int FARDATA png_pass_dsp_mask[]
|
||||
= {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};
|
||||
|
||||
#endif /* PNG_READ_SUPPORTED */
|
||||
@@ -97,6 +97,7 @@ const int FARDATA png_pass_dsp_mask[]
|
||||
void PNGAPI
|
||||
png_set_sig_bytes(png_structp png_ptr, int num_bytes)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_debug(1, "in png_set_sig_bytes\n");
|
||||
if (num_bytes > 8)
|
||||
png_error(png_ptr, "Too many bytes for PNG signature.");
|
||||
@@ -133,7 +134,7 @@ png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check)
|
||||
#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
|
||||
/* (Obsolete) function to check signature bytes. It does not allow one
|
||||
* to check a partial signature. This function might be removed in the
|
||||
* future - use png_sig_cmp(). Returns true (nonzero) if the file is a PNG.
|
||||
* future - use png_sig_cmp(). Returns true (nonzero) if the file is PNG.
|
||||
*/
|
||||
int PNGAPI
|
||||
png_check_sig(png_bytep sig, int num)
|
||||
@@ -153,13 +154,14 @@ voidpf /* private */
|
||||
png_zalloc(voidpf png_ptr, uInt items, uInt size)
|
||||
{
|
||||
png_voidp ptr;
|
||||
png_structp p=png_ptr;
|
||||
png_structp p=(png_structp)png_ptr;
|
||||
png_uint_32 save_flags=p->flags;
|
||||
png_uint_32 num_bytes;
|
||||
|
||||
if(png_ptr == NULL) return (NULL);
|
||||
if (items > PNG_UINT_32_MAX/size)
|
||||
{
|
||||
png_warning (png_ptr, "Potential overflow in png_zalloc()");
|
||||
png_warning (p, "Potential overflow in png_zalloc()");
|
||||
return (NULL);
|
||||
}
|
||||
num_bytes = (png_uint_32)items * size;
|
||||
@@ -266,6 +268,7 @@ void PNGAPI
|
||||
png_destroy_info_struct(png_structp png_ptr, png_infopp info_ptr_ptr)
|
||||
{
|
||||
png_infop info_ptr = NULL;
|
||||
if(png_ptr == NULL) return;
|
||||
|
||||
png_debug(1, "in png_destroy_info_struct\n");
|
||||
if (info_ptr_ptr != NULL)
|
||||
@@ -304,6 +307,8 @@ png_info_init_3(png_infopp ptr_ptr, png_size_t png_info_struct_size)
|
||||
{
|
||||
png_infop info_ptr = *ptr_ptr;
|
||||
|
||||
if(info_ptr == NULL) return;
|
||||
|
||||
png_debug(1, "in png_info_init_3\n");
|
||||
|
||||
if(png_sizeof(png_info) > png_info_struct_size)
|
||||
@@ -485,6 +490,11 @@ if (mask & PNG_FREE_SPLT)
|
||||
#endif
|
||||
|
||||
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
||||
if(png_ptr->unknown_chunk.data)
|
||||
{
|
||||
png_free(png_ptr, png_ptr->unknown_chunk.data);
|
||||
png_ptr->unknown_chunk.data = NULL;
|
||||
}
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
if ((mask & PNG_FREE_UNKN) & info_ptr->free_me)
|
||||
#else
|
||||
@@ -611,6 +621,7 @@ png_info_destroy(png_structp png_ptr, png_infop info_ptr)
|
||||
png_voidp PNGAPI
|
||||
png_get_io_ptr(png_structp png_ptr)
|
||||
{
|
||||
if(png_ptr == NULL) return (NULL);
|
||||
return (png_ptr->io_ptr);
|
||||
}
|
||||
|
||||
@@ -626,6 +637,7 @@ void PNGAPI
|
||||
png_init_io(png_structp png_ptr, png_FILE_p fp)
|
||||
{
|
||||
png_debug(1, "in png_init_io\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->io_ptr = (png_voidp)fp;
|
||||
}
|
||||
#endif
|
||||
@@ -641,6 +653,7 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
|
||||
{"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
|
||||
|
||||
if(png_ptr == NULL) return (NULL);
|
||||
if (png_ptr->time_buffer == NULL)
|
||||
{
|
||||
png_ptr->time_buffer = (png_charp)png_malloc(png_ptr, (png_uint_32)(29*
|
||||
@@ -661,7 +674,7 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
|
||||
#ifdef USE_FAR_KEYWORD
|
||||
{
|
||||
char near_time_buf[29];
|
||||
sprintf(near_time_buf, "%d %s %d %02d:%02d:%02d +0000",
|
||||
png_snprintf6(near_time_buf,29,"%d %s %d %02d:%02d:%02d +0000",
|
||||
ptime->day % 32, short_months[(ptime->month - 1) % 12],
|
||||
ptime->year, ptime->hour % 24, ptime->minute % 60,
|
||||
ptime->second % 61);
|
||||
@@ -669,7 +682,7 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
|
||||
29*png_sizeof(char));
|
||||
}
|
||||
#else
|
||||
sprintf(png_ptr->time_buffer, "%d %s %d %02d:%02d:%02d +0000",
|
||||
png_snprintf6(png_ptr->time_buffer,29,"%d %s %d %02d:%02d:%02d +0000",
|
||||
ptime->day % 32, short_months[(ptime->month - 1) % 12],
|
||||
ptime->year, ptime->hour % 24, ptime->minute % 60,
|
||||
ptime->second % 61);
|
||||
@@ -679,25 +692,16 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
|
||||
}
|
||||
#endif /* PNG_TIME_RFC1123_SUPPORTED */
|
||||
|
||||
#if 0
|
||||
/* Signature string for a PNG file. */
|
||||
png_bytep PNGAPI
|
||||
png_sig_bytes(void)
|
||||
{
|
||||
return ((png_bytep)"\211\120\116\107\015\012\032\012");
|
||||
}
|
||||
#endif
|
||||
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
|
||||
|
||||
png_charp PNGAPI
|
||||
png_get_copyright(png_structp png_ptr)
|
||||
{
|
||||
if (&png_ptr != NULL) /* silence compiler warning about unused png_ptr */
|
||||
return ((png_charp) "\n libpng version 1.2.10rc1 - April 19, 2006\n\
|
||||
Copyright (c) 1998-2006 Glenn Randers-Pehrson\n\
|
||||
png_ptr = png_ptr; /* silence compiler warning about unused png_ptr */
|
||||
return ((png_charp) "\n libpng version 1.2.20beta04 - August 21, 2007\n\
|
||||
Copyright (c) 1998-2007 Glenn Randers-Pehrson\n\
|
||||
Copyright (c) 1996-1997 Andreas Dilger\n\
|
||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n");
|
||||
return ((png_charp) "");
|
||||
}
|
||||
|
||||
/* The following return the library version as a short string in the
|
||||
@@ -712,27 +716,70 @@ png_charp PNGAPI
|
||||
png_get_libpng_ver(png_structp png_ptr)
|
||||
{
|
||||
/* Version of *.c files used when building libpng */
|
||||
if (&png_ptr != NULL) /* silence compiler warning about unused png_ptr */
|
||||
return ((png_charp) PNG_LIBPNG_VER_STRING);
|
||||
return ((png_charp) "");
|
||||
png_ptr = png_ptr; /* silence compiler warning about unused png_ptr */
|
||||
return ((png_charp) PNG_LIBPNG_VER_STRING);
|
||||
}
|
||||
|
||||
png_charp PNGAPI
|
||||
png_get_header_ver(png_structp png_ptr)
|
||||
{
|
||||
/* Version of *.h files used when building libpng */
|
||||
if (&png_ptr != NULL) /* silence compiler warning about unused png_ptr */
|
||||
return ((png_charp) PNG_LIBPNG_VER_STRING);
|
||||
return ((png_charp) "");
|
||||
png_ptr = png_ptr; /* silence compiler warning about unused png_ptr */
|
||||
return ((png_charp) PNG_LIBPNG_VER_STRING);
|
||||
}
|
||||
|
||||
png_charp PNGAPI
|
||||
png_get_header_version(png_structp png_ptr)
|
||||
{
|
||||
/* Returns longer string containing both version and date */
|
||||
if (&png_ptr != NULL) /* silence compiler warning about unused png_ptr */
|
||||
return ((png_charp) PNG_HEADER_VERSION_STRING);
|
||||
return ((png_charp) "");
|
||||
png_ptr = png_ptr; /* silence compiler warning about unused png_ptr */
|
||||
return ((png_charp) PNG_HEADER_VERSION_STRING
|
||||
#ifdef PNG_READ_SUPPORTED
|
||||
# ifdef PNG_USE_PNGGCCRD
|
||||
# ifdef __x86_64__
|
||||
# ifdef __PIC__
|
||||
" (PNGGCRD x86_64, PIC)\n"
|
||||
# else
|
||||
# ifdef PNG_THREAD_UNSAFE_OK
|
||||
" (PNGGCRD x86_64, Thread unsafe)\n"
|
||||
# else
|
||||
" (PNGGCRD x86_64, Thread safe)\n"
|
||||
# endif
|
||||
# endif
|
||||
# else
|
||||
# ifdef PNG_THREAD_UNSAFE_OK
|
||||
" (PNGGCRD, Thread unsafe)\n"
|
||||
# else
|
||||
" (PNGGCRD, Thread safe)\n"
|
||||
# endif
|
||||
# endif
|
||||
# else
|
||||
# ifdef PNG_USE_PNGVCRD
|
||||
# ifdef __x86_64__
|
||||
" (x86_64 PNGVCRD)\n"
|
||||
# else
|
||||
" (PNGVCRD)\n"
|
||||
# endif
|
||||
# else
|
||||
# ifdef __x86_64__
|
||||
# ifdef PNG_OPTIMIZED_CODE_SUPPORTED
|
||||
" (x86_64 OPTIMIZED)\n"
|
||||
# else
|
||||
" (x86_64 NOT OPTIMIZED)\n"
|
||||
# endif
|
||||
# else
|
||||
# ifdef PNG_OPTIMIZED_CODE_SUPPORTED
|
||||
" (OPTIMIZED)\n"
|
||||
# else
|
||||
" (NOT OPTIMIZED)\n"
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
" (NO READ SUPPORT)\n"
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||
@@ -743,7 +790,7 @@ png_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name)
|
||||
/* check chunk_name and return "keep" value if it's on the list, else 0 */
|
||||
int i;
|
||||
png_bytep p;
|
||||
if((png_ptr == NULL && chunk_name == NULL) || png_ptr->num_chunk_list<=0)
|
||||
if(png_ptr == NULL || chunk_name == NULL || png_ptr->num_chunk_list<=0)
|
||||
return 0;
|
||||
p=png_ptr->chunk_list+png_ptr->num_chunk_list*5-5;
|
||||
for (i = png_ptr->num_chunk_list; i; i--, p-=5)
|
||||
@@ -757,6 +804,7 @@ png_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name)
|
||||
int PNGAPI
|
||||
png_reset_zstream(png_structp png_ptr)
|
||||
{
|
||||
if (png_ptr == NULL) return Z_STREAM_ERROR;
|
||||
return (inflateReset(&png_ptr->zstream));
|
||||
}
|
||||
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
|
||||
@@ -770,14 +818,14 @@ png_access_version_number(void)
|
||||
}
|
||||
|
||||
|
||||
#if defined(PNG_READ_SUPPORTED)
|
||||
#if defined(PNG_READ_SUPPORTED) && defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
||||
#if !defined(PNG_1_0_X)
|
||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
||||
/* GRR: could add this: && defined(PNG_MMX_CODE_SUPPORTED) */
|
||||
#if defined(PNG_MMX_CODE_SUPPORTED)
|
||||
/* this INTERNAL function was added to libpng 1.2.0 */
|
||||
void /* PRIVATE */
|
||||
png_init_mmx_flags (png_structp png_ptr)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->mmx_rowbytes_threshold = 0;
|
||||
png_ptr->mmx_bitdepth_threshold = 0;
|
||||
|
||||
@@ -787,13 +835,13 @@ png_init_mmx_flags (png_structp png_ptr)
|
||||
|
||||
if (png_mmx_support() > 0) {
|
||||
png_ptr->asm_flags |= PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU
|
||||
# ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW
|
||||
# ifdef PNG_HAVE_MMX_COMBINE_ROW
|
||||
| PNG_ASM_FLAG_MMX_READ_COMBINE_ROW
|
||||
# endif
|
||||
# ifdef PNG_HAVE_ASSEMBLER_READ_INTERLACE
|
||||
# ifdef PNG_HAVE_MMX_READ_INTERLACE
|
||||
| PNG_ASM_FLAG_MMX_READ_INTERLACE
|
||||
# endif
|
||||
# ifndef PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
|
||||
# ifndef PNG_HAVE_MMX_READ_FILTER_ROW
|
||||
;
|
||||
# else
|
||||
| PNG_ASM_FLAG_MMX_READ_FILTER_SUB
|
||||
@@ -810,7 +858,7 @@ png_init_mmx_flags (png_structp png_ptr)
|
||||
| PNG_MMX_WRITE_FLAGS );
|
||||
}
|
||||
|
||||
# else /* !((PNGVCRD || PNGGCCRD) && PNG_ASSEMBLER_CODE_SUPPORTED)) */
|
||||
# else /* !(PNGVCRD || PNGGCCRD) */
|
||||
|
||||
/* clear all MMX flags; no support is compiled in */
|
||||
png_ptr->asm_flags &= ~( PNG_MMX_FLAGS );
|
||||
@@ -818,11 +866,11 @@ png_init_mmx_flags (png_structp png_ptr)
|
||||
# endif /* ?(PNGVCRD || PNGGCCRD) */
|
||||
}
|
||||
|
||||
#endif /* !(PNG_ASSEMBLER_CODE_SUPPORTED) */
|
||||
#endif /* !(PNG_MMX_CODE_SUPPORTED) */
|
||||
|
||||
/* this function was added to libpng 1.2.0 */
|
||||
#if !defined(PNG_USE_PNGGCCRD) && \
|
||||
!(defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_USE_PNGVCRD))
|
||||
!(defined(PNG_MMX_CODE_SUPPORTED) && defined(PNG_USE_PNGVCRD))
|
||||
int PNGAPI
|
||||
png_mmx_support(void)
|
||||
{
|
||||
@@ -830,7 +878,7 @@ png_mmx_support(void)
|
||||
}
|
||||
#endif
|
||||
#endif /* PNG_1_0_X */
|
||||
#endif /* PNG_READ_SUPPORTED */
|
||||
#endif /* PNG_READ_SUPPORTED && PNG_ASSEMBLER_CODE_SUPPORTED */
|
||||
|
||||
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||
#ifdef PNG_SIZE_T
|
||||
|
||||
255
png.h
255
png.h
@@ -1,15 +1,15 @@
|
||||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.2.10rc1 - April 19, 2006
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* libpng version 1.2.20beta04 - August 21, 2007
|
||||
* Copyright (c) 1998-2007 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.)
|
||||
*
|
||||
* Authors and maintainers:
|
||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
||||
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||
* libpng versions 0.97, January 1998, through 1.2.10rc1 - April 19, 2006: Glenn
|
||||
* libpng versions 0.97, January 1998, through 1.2.20beta04 - August 21, 2007: Glenn
|
||||
* See also "Contributing Authors", below.
|
||||
*
|
||||
* Note about libpng version numbers:
|
||||
@@ -103,20 +103,59 @@
|
||||
* 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.0.17rc1 10 10017 10.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.0.17 10 10017 10.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.0.18rc1-5 10 10018 10.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.0.18 10 10018 10.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-8 13 10210 12.so.0.10[.0]
|
||||
* 1.2.10rc1-3 13 10210 12.so.0.10[.0]
|
||||
* 1.2.10 13 10210 12.so.0.10[.0]
|
||||
* 1.2.11beta1-4 13 10211 12.so.0.11[.0]
|
||||
* 1.0.19rc1-5 10 10019 10.so.0.19[.0]
|
||||
* 1.2.11rc1-5 13 10211 12.so.0.11[.0]
|
||||
* 1.0.19 10 10019 10.so.0.19[.0]
|
||||
* 1.2.11 13 10211 12.so.0.11[.0]
|
||||
* 1.0.20 10 10020 10.so.0.20[.0]
|
||||
* 1.2.12 13 10212 12.so.0.12[.0]
|
||||
* 1.2.13beta1 13 10213 12.so.0.13[.0]
|
||||
* 1.0.21 10 10021 10.so.0.21[.0]
|
||||
* 1.2.13 13 10213 12.so.0.13[.0]
|
||||
* 1.2.14beta1-2 13 10214 12.so.0.14[.0]
|
||||
* 1.0.22rc1 10 10022 10.so.0.22[.0]
|
||||
* 1.2.14rc1 13 10214 12.so.0.14[.0]
|
||||
* 1.0.22 10 10022 10.so.0.22[.0]
|
||||
* 1.2.14 13 10214 12.so.0.14[.0]
|
||||
* 1.2.15beta1-6 13 10215 12.so.0.15[.0]
|
||||
* 1.0.23rc1-5 10 10023 10.so.0.23[.0]
|
||||
* 1.2.15rc1-5 13 10215 12.so.0.15[.0]
|
||||
* 1.0.23 10 10023 10.so.0.23[.0]
|
||||
* 1.2.15 13 10215 12.so.0.15[.0]
|
||||
* 1.2.16beta1-2 13 10216 12.so.0.16[.0]
|
||||
* 1.2.16rc1 13 10216 12.so.0.16[.0]
|
||||
* 1.0.24 10 10024 10.so.0.24[.0]
|
||||
* 1.2.16 13 10216 12.so.0.16[.0]
|
||||
* 1.2.17beta1-2 13 10217 12.so.0.17[.0]
|
||||
* 1.0.25rc1 10 10025 10.so.0.25[.0]
|
||||
* 1.2.17rc1-3 13 10217 12.so.0.17[.0]
|
||||
* 1.0.25 10 10025 10.so.0.25[.0]
|
||||
* 1.2.17 13 10217 12.so.0.17[.0]
|
||||
* 1.0.26 10 10026 10.so.0.26[.0]
|
||||
* 1.2.18 13 10218 12.so.0.18[.0]
|
||||
* 1.2.19beta1-31 13 10219 12.so.0.19[.0]
|
||||
* 1.0.27rc1-6 10 10027 10.so.0.27[.0]
|
||||
* 1.2.19rc1-6 13 10219 12.so.0.19[.0]
|
||||
* 1.0.27 10 10027 10.so.0.27[.0]
|
||||
* 1.2.19 13 10219 12.so.0.19[.0]
|
||||
* 1.2.20beta01-04 13 10220 12.so.0.20[.0]
|
||||
*
|
||||
* Henceforth the source version will match the shared-library major
|
||||
* and minor numbers; the shared-library major version number will be
|
||||
@@ -146,8 +185,8 @@
|
||||
* If you modify libpng you may insert additional notices immediately following
|
||||
* this sentence.
|
||||
*
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.2.10rc1, April 19, 2006, are
|
||||
* Copyright (c) 2004, 2006 Glenn Randers-Pehrson, and are
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.2.20beta04, August 21, 2007, are
|
||||
* Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are
|
||||
* distributed according to the same disclaimer and license as libpng-1.2.5
|
||||
* with the following individual added to the list of Contributing Authors:
|
||||
*
|
||||
@@ -258,13 +297,13 @@
|
||||
* Y2K compliance in libpng:
|
||||
* =========================
|
||||
*
|
||||
* April 19, 2006
|
||||
* August 21, 2007
|
||||
*
|
||||
* 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.2.10rc1 are Y2K compliant. It is my belief that earlier
|
||||
* upward through 1.2.20beta04 are Y2K compliant. It is my belief that earlier
|
||||
* versions were also Y2K compliant.
|
||||
*
|
||||
* Libpng only has three year fields. One is a 2-byte unsigned integer
|
||||
@@ -320,9 +359,9 @@
|
||||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.2.10rc1"
|
||||
#define PNG_LIBPNG_VER_STRING "1.2.20beta04"
|
||||
#define PNG_HEADER_VERSION_STRING \
|
||||
" libpng version 1.2.10rc1 - April 19, 2006 (header)\n"
|
||||
" libpng version 1.2.20beta04 - August 21, 2007\n"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 0
|
||||
#define PNG_LIBPNG_VER_DLLNUM 13
|
||||
@@ -330,11 +369,11 @@
|
||||
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
||||
#define PNG_LIBPNG_VER_MAJOR 1
|
||||
#define PNG_LIBPNG_VER_MINOR 2
|
||||
#define PNG_LIBPNG_VER_RELEASE 10
|
||||
#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: */
|
||||
|
||||
#define PNG_LIBPNG_VER_BUILD 1
|
||||
#define PNG_LIBPNG_VER_BUILD 04
|
||||
|
||||
/* Release Status */
|
||||
#define PNG_LIBPNG_BUILD_ALPHA 1
|
||||
@@ -351,14 +390,14 @@
|
||||
#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
|
||||
PNG_LIBPNG_BUILD_PRIVATE */
|
||||
|
||||
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_RC
|
||||
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_BETA
|
||||
|
||||
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
|
||||
* We must not include leading zeros.
|
||||
* Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
|
||||
* 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 10210 /* 1.2.10 */
|
||||
#define PNG_LIBPNG_VER 10220 /* 1.2.20 */
|
||||
|
||||
#ifndef PNG_VERSION_INFO_ONLY
|
||||
/* include the compression library's header */
|
||||
@@ -446,7 +485,7 @@ extern "C" {
|
||||
* the version above.
|
||||
*/
|
||||
#ifdef PNG_USE_GLOBAL_ARRAYS
|
||||
PNG_EXPORT_VAR (const char) png_libpng_ver[18];
|
||||
PNG_EXPORT_VAR (PNG_CONST char) png_libpng_ver[18];
|
||||
/* need room for 99.99.99beta99z */
|
||||
#else
|
||||
#define png_libpng_ver png_get_header_ver(NULL)
|
||||
@@ -455,17 +494,17 @@ PNG_EXPORT_VAR (const char) png_libpng_ver[18];
|
||||
#ifdef PNG_USE_GLOBAL_ARRAYS
|
||||
/* This was removed in version 1.0.5c */
|
||||
/* Structures to facilitate easy interlacing. See png.c for more details */
|
||||
PNG_EXPORT_VAR (const int FARDATA) png_pass_start[7];
|
||||
PNG_EXPORT_VAR (const int FARDATA) png_pass_inc[7];
|
||||
PNG_EXPORT_VAR (const int FARDATA) png_pass_ystart[7];
|
||||
PNG_EXPORT_VAR (const int FARDATA) png_pass_yinc[7];
|
||||
PNG_EXPORT_VAR (const int FARDATA) png_pass_mask[7];
|
||||
PNG_EXPORT_VAR (const int FARDATA) png_pass_dsp_mask[7];
|
||||
#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW
|
||||
PNG_EXPORT_VAR (const int FARDATA) png_pass_width[7];
|
||||
PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_start[7];
|
||||
PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_inc[7];
|
||||
PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_ystart[7];
|
||||
PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_yinc[7];
|
||||
PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_mask[7];
|
||||
PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_dsp_mask[7];
|
||||
#if defined(PNG_HAVE_MMX_COMBINE_ROW) || defined(PNG_OPTIMIZED_CODE_SUPPORTED)
|
||||
PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_width[7];
|
||||
#endif
|
||||
/* This isn't currently used. If you need it, see png.c for more details.
|
||||
PNG_EXPORT_VAR (const int FARDATA) png_pass_height[7];
|
||||
PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_height[7];
|
||||
*/
|
||||
#endif
|
||||
|
||||
@@ -1319,16 +1358,20 @@ struct png_struct_def
|
||||
png_byte filter_type;
|
||||
#endif
|
||||
|
||||
#if defined(PNG_1_0_X) || (defined(PNG_DEBUG) && defined(PNG_USE_PNGGCCRD))
|
||||
#if defined(PNG_1_0_X)
|
||||
/* New member added in libpng-1.0.10, ifdef'ed out in 1.2.0 */
|
||||
png_uint_32 row_buf_size;
|
||||
#endif
|
||||
|
||||
/* New members added in libpng-1.2.0 */
|
||||
#if !defined(PNG_1_0_X) && defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
||||
# if !defined(PNG_1_0_X)
|
||||
# if defined(PNG_MMX_CODE_SUPPORTED)
|
||||
png_byte mmx_bitdepth_threshold;
|
||||
png_uint_32 mmx_rowbytes_threshold;
|
||||
# endif
|
||||
png_uint_32 asm_flags;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */
|
||||
@@ -1358,13 +1401,18 @@ struct png_struct_def
|
||||
png_uint_32 user_height_max;
|
||||
#endif
|
||||
|
||||
/* New member added in libpng-1.0.25 and 1.2.17 */
|
||||
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
||||
/* storage for unknown chunk that the library doesn't recognize. */
|
||||
png_unknown_chunk unknown_chunk;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
/* This triggers a compiler error in png.c, if png.c and png.h
|
||||
* do not agree upon the version number.
|
||||
*/
|
||||
typedef png_structp version_1_2_10rc1;
|
||||
typedef png_structp version_1_2_20beta04;
|
||||
|
||||
typedef png_struct FAR * FAR * png_structpp;
|
||||
|
||||
@@ -2012,6 +2060,7 @@ extern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr,
|
||||
int check));
|
||||
#endif /* USE_FAR_KEYWORD */
|
||||
|
||||
#ifndef PNG_NO_ERROR_TEXT
|
||||
/* Fatal error in PNG image of libpng - can't continue */
|
||||
extern PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr,
|
||||
png_const_charp error_message));
|
||||
@@ -2019,14 +2068,22 @@ extern PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr,
|
||||
/* The same, but the chunk name is prepended to the error string. */
|
||||
extern PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr,
|
||||
png_const_charp error_message));
|
||||
#else
|
||||
/* Fatal error in PNG image of libpng - can't continue */
|
||||
extern PNG_EXPORT(void,png_err) PNGARG((png_structp png_ptr));
|
||||
#endif
|
||||
|
||||
#ifndef PNG_NO_WARNINGS
|
||||
/* Non-fatal error in libpng. Can continue, but may have a problem. */
|
||||
extern PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr,
|
||||
png_const_charp warning_message));
|
||||
|
||||
#ifdef PNG_READ_SUPPORTED
|
||||
/* Non-fatal error in libpng, chunk name is prepended to message. */
|
||||
extern PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr,
|
||||
png_const_charp warning_message));
|
||||
#endif /* PNG_READ_SUPPORTED */
|
||||
#endif /* PNG_NO_WARNINGS */
|
||||
|
||||
/* The png_set_<chunk> functions are for storing values in the png_info_struct.
|
||||
* Similarly, the png_get_<chunk> calls are used to read values from the
|
||||
@@ -2360,7 +2417,7 @@ extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr,
|
||||
handling or default unknown chunk handling is not desired. Any chunks not
|
||||
listed will be handled in the default manner. The IHDR and IEND chunks
|
||||
must not be listed.
|
||||
keep = 0: follow default behavour
|
||||
keep = 0: follow default behaviour
|
||||
= 1: do not keep
|
||||
= 2: keep only if safe-to-copy
|
||||
= 3: keep even if unsafe-to-copy
|
||||
@@ -2448,10 +2505,6 @@ extern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr,
|
||||
#define png_debug2(l, m, p1, p2)
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
extern PNG_EXPORT(png_bytep,png_sig_bytes) PNGARG((void));
|
||||
#endif
|
||||
|
||||
extern PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr));
|
||||
extern PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr));
|
||||
extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp png_ptr));
|
||||
@@ -2470,6 +2523,7 @@ extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp
|
||||
|
||||
/* Added to version 1.2.0 */
|
||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
||||
#if defined(PNG_MMX_CODE_SUPPORTED)
|
||||
#define PNG_ASM_FLAG_MMX_SUPPORT_COMPILED 0x01 /* not user-settable */
|
||||
#define PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU 0x02 /* not user-settable */
|
||||
#define PNG_ASM_FLAG_MMX_READ_COMBINE_ROW 0x04
|
||||
@@ -2495,6 +2549,7 @@ extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp
|
||||
|
||||
#define PNG_SELECT_READ 1
|
||||
#define PNG_SELECT_WRITE 2
|
||||
#endif /* PNG_MMX_CODE_SUPPORTED */
|
||||
|
||||
#if !defined(PNG_1_0_X)
|
||||
/* pngget.c */
|
||||
@@ -2527,11 +2582,11 @@ extern PNG_EXPORT(void,png_set_mmx_thresholds)
|
||||
png_uint_32 mmx_rowbytes_threshold));
|
||||
|
||||
#endif /* PNG_1_0_X */
|
||||
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
|
||||
|
||||
#if !defined(PNG_1_0_X)
|
||||
/* png.c, pnggccrd.c, or pngvcrd.c */
|
||||
extern PNG_EXPORT(int,png_mmx_support) PNGARG((void));
|
||||
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
|
||||
|
||||
/* Strip the prepended error numbers ("#nnn ") from error and warning
|
||||
* messages before passing them to the error or warning handler. */
|
||||
@@ -2639,16 +2694,21 @@ extern PNG_EXPORT(void,png_save_uint_16)
|
||||
* be found in the files where the functions are located.
|
||||
*/
|
||||
|
||||
#if defined(PNG_INTERNAL)
|
||||
|
||||
/* Various modes of operation. Note that after an init, mode is set to
|
||||
* zero automatically when the structure is created.
|
||||
/* Various modes of operation, that are visible to applications because
|
||||
* they are used for unknown chunk location.
|
||||
*/
|
||||
#define PNG_HAVE_IHDR 0x01
|
||||
#define PNG_HAVE_PLTE 0x02
|
||||
#define PNG_HAVE_IDAT 0x04
|
||||
#define PNG_AFTER_IDAT 0x08
|
||||
#define PNG_AFTER_IDAT 0x08 /* Have complete zlib datastream */
|
||||
#define PNG_HAVE_IEND 0x10
|
||||
|
||||
#if defined(PNG_INTERNAL)
|
||||
|
||||
/* More modes of operation. Note that after an init, mode is set to
|
||||
* zero automatically when the structure is created.
|
||||
*/
|
||||
#define PNG_HAVE_gAMA 0x20
|
||||
#define PNG_HAVE_cHRM 0x40
|
||||
#define PNG_HAVE_sRGB 0x80
|
||||
@@ -2657,6 +2717,7 @@ extern PNG_EXPORT(void,png_save_uint_16)
|
||||
#define PNG_WROTE_INFO_BEFORE_PLTE 0x400
|
||||
#define PNG_BACKGROUND_IS_GRAY 0x800
|
||||
#define PNG_HAVE_PNG_SIGNATURE 0x1000
|
||||
#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */
|
||||
|
||||
/* flags for the transformations the PNG library does on the image data */
|
||||
#define PNG_BGR 0x0001
|
||||
@@ -2767,11 +2828,8 @@ extern PNG_EXPORT(void,png_save_uint_16)
|
||||
#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
|
||||
/* place to hold the signature string for a PNG file. */
|
||||
#ifdef PNG_USE_GLOBAL_ARRAYS
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_sig[8];
|
||||
PNG_EXPORT_VAR (PNG_CONST png_byte FARDATA) png_sig[8];
|
||||
#else
|
||||
#if 0
|
||||
#define png_sig png_sig_bytes(NULL)
|
||||
#endif
|
||||
#endif
|
||||
#endif /* PNG_NO_EXTERN */
|
||||
|
||||
@@ -2779,50 +2837,50 @@ extern PNG_EXPORT(void,png_save_uint_16)
|
||||
* define the name here, and add an invocation of the macro in png.c and
|
||||
* wherever it's needed.
|
||||
*/
|
||||
#define PNG_IHDR const png_byte png_IHDR[5] = { 73, 72, 68, 82, '\0'}
|
||||
#define PNG_IDAT const png_byte png_IDAT[5] = { 73, 68, 65, 84, '\0'}
|
||||
#define PNG_IEND const png_byte png_IEND[5] = { 73, 69, 78, 68, '\0'}
|
||||
#define PNG_PLTE const png_byte png_PLTE[5] = { 80, 76, 84, 69, '\0'}
|
||||
#define PNG_bKGD const png_byte png_bKGD[5] = { 98, 75, 71, 68, '\0'}
|
||||
#define PNG_cHRM const png_byte png_cHRM[5] = { 99, 72, 82, 77, '\0'}
|
||||
#define PNG_gAMA const png_byte png_gAMA[5] = {103, 65, 77, 65, '\0'}
|
||||
#define PNG_hIST const png_byte png_hIST[5] = {104, 73, 83, 84, '\0'}
|
||||
#define PNG_iCCP const png_byte png_iCCP[5] = {105, 67, 67, 80, '\0'}
|
||||
#define PNG_iTXt const png_byte png_iTXt[5] = {105, 84, 88, 116, '\0'}
|
||||
#define PNG_oFFs const png_byte png_oFFs[5] = {111, 70, 70, 115, '\0'}
|
||||
#define PNG_pCAL const png_byte png_pCAL[5] = {112, 67, 65, 76, '\0'}
|
||||
#define PNG_sCAL const png_byte png_sCAL[5] = {115, 67, 65, 76, '\0'}
|
||||
#define PNG_pHYs const png_byte png_pHYs[5] = {112, 72, 89, 115, '\0'}
|
||||
#define PNG_sBIT const png_byte png_sBIT[5] = {115, 66, 73, 84, '\0'}
|
||||
#define PNG_sPLT const png_byte png_sPLT[5] = {115, 80, 76, 84, '\0'}
|
||||
#define PNG_sRGB const png_byte png_sRGB[5] = {115, 82, 71, 66, '\0'}
|
||||
#define PNG_tEXt const png_byte png_tEXt[5] = {116, 69, 88, 116, '\0'}
|
||||
#define PNG_tIME const png_byte png_tIME[5] = {116, 73, 77, 69, '\0'}
|
||||
#define PNG_tRNS const png_byte png_tRNS[5] = {116, 82, 78, 83, '\0'}
|
||||
#define PNG_zTXt const png_byte png_zTXt[5] = {122, 84, 88, 116, '\0'}
|
||||
#define PNG_IHDR png_byte png_IHDR[5] = { 73, 72, 68, 82, '\0'}
|
||||
#define PNG_IDAT png_byte png_IDAT[5] = { 73, 68, 65, 84, '\0'}
|
||||
#define PNG_IEND png_byte png_IEND[5] = { 73, 69, 78, 68, '\0'}
|
||||
#define PNG_PLTE png_byte png_PLTE[5] = { 80, 76, 84, 69, '\0'}
|
||||
#define PNG_bKGD png_byte png_bKGD[5] = { 98, 75, 71, 68, '\0'}
|
||||
#define PNG_cHRM png_byte png_cHRM[5] = { 99, 72, 82, 77, '\0'}
|
||||
#define PNG_gAMA png_byte png_gAMA[5] = {103, 65, 77, 65, '\0'}
|
||||
#define PNG_hIST png_byte png_hIST[5] = {104, 73, 83, 84, '\0'}
|
||||
#define PNG_iCCP png_byte png_iCCP[5] = {105, 67, 67, 80, '\0'}
|
||||
#define PNG_iTXt png_byte png_iTXt[5] = {105, 84, 88, 116, '\0'}
|
||||
#define PNG_oFFs png_byte png_oFFs[5] = {111, 70, 70, 115, '\0'}
|
||||
#define PNG_pCAL png_byte png_pCAL[5] = {112, 67, 65, 76, '\0'}
|
||||
#define PNG_sCAL png_byte png_sCAL[5] = {115, 67, 65, 76, '\0'}
|
||||
#define PNG_pHYs png_byte png_pHYs[5] = {112, 72, 89, 115, '\0'}
|
||||
#define PNG_sBIT png_byte png_sBIT[5] = {115, 66, 73, 84, '\0'}
|
||||
#define PNG_sPLT png_byte png_sPLT[5] = {115, 80, 76, 84, '\0'}
|
||||
#define PNG_sRGB png_byte png_sRGB[5] = {115, 82, 71, 66, '\0'}
|
||||
#define PNG_tEXt png_byte png_tEXt[5] = {116, 69, 88, 116, '\0'}
|
||||
#define PNG_tIME png_byte png_tIME[5] = {116, 73, 77, 69, '\0'}
|
||||
#define PNG_tRNS png_byte png_tRNS[5] = {116, 82, 78, 83, '\0'}
|
||||
#define PNG_zTXt png_byte png_zTXt[5] = {122, 84, 88, 116, '\0'}
|
||||
|
||||
#ifdef PNG_USE_GLOBAL_ARRAYS
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_IHDR[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_IDAT[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_IEND[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_PLTE[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_bKGD[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_cHRM[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_gAMA[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_hIST[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_iCCP[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_iTXt[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_oFFs[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_pCAL[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_sCAL[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_pHYs[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_sBIT[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_sPLT[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_sRGB[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_tEXt[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_tIME[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_tRNS[5];
|
||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_zTXt[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_IHDR[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_IDAT[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_IEND[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_PLTE[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_bKGD[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_cHRM[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_gAMA[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_hIST[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_iCCP[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_iTXt[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_oFFs[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_pCAL[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_sCAL[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_pHYs[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_sBIT[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_sPLT[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_sRGB[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_tEXt[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_tIME[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_tRNS[5];
|
||||
PNG_EXPORT_VAR (png_byte FARDATA) png_zTXt[5];
|
||||
#endif /* PNG_USE_GLOBAL_ARRAYS */
|
||||
|
||||
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
|
||||
@@ -3432,9 +3490,34 @@ PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info,
|
||||
#endif
|
||||
|
||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
||||
#if defined(PNG_MMX_CODE_SUPPORTED)
|
||||
/* png.c */ /* PRIVATE */
|
||||
PNG_EXTERN void png_init_mmx_flags PNGARG((png_structp png_ptr));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED)
|
||||
PNG_EXTERN png_uint_32 png_get_pixels_per_inch PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
|
||||
PNG_EXTERN png_uint_32 png_get_x_pixels_per_inch PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
|
||||
PNG_EXTERN png_uint_32 png_get_y_pixels_per_inch PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
|
||||
PNG_EXTERN float png_get_x_offset_inches PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
|
||||
PNG_EXTERN float png_get_y_offset_inches PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
|
||||
#if defined(PNG_pHYs_SUPPORTED)
|
||||
PNG_EXTERN png_uint_32 png_get_pHYs_dpi PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
|
||||
#endif /* PNG_pHYs_SUPPORTED */
|
||||
#endif /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */
|
||||
|
||||
/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
|
||||
|
||||
#endif /* PNG_INTERNAL */
|
||||
|
||||
176
pngconf.h
176
pngconf.h
@@ -1,9 +1,9 @@
|
||||
|
||||
/* pngconf.h - machine configurable file for libpng
|
||||
*
|
||||
* libpng version 1.2.10rc1 - April 19, 2006
|
||||
* libpng version 1.2.20beta04 - August 21, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2005 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 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.)
|
||||
*/
|
||||
@@ -75,6 +75,11 @@
|
||||
|
||||
/* End of material added to libpng-1.2.8 */
|
||||
|
||||
/* Added at libpng-1.2.19, removed at libpng-1.2.20 because it caused trouble
|
||||
# define PNG_WARN_UNINITIALIZED_ROW 1
|
||||
*/
|
||||
/* End of material added at libpng-1.2.19 */
|
||||
|
||||
/* This is the size of the compression buffer, and thus the size of
|
||||
* an IDAT chunk. Make this whatever size you feel is best for your
|
||||
* machine. One of these will be allocated per png_struct. When this
|
||||
@@ -276,6 +281,7 @@
|
||||
# define PNGARG(arglist) arglist
|
||||
#endif /* _NO_PROTO */
|
||||
|
||||
|
||||
#endif /* OF */
|
||||
|
||||
#endif /* PNGARG */
|
||||
@@ -594,16 +600,16 @@
|
||||
#endif /* PNG_READ_TRANSFORMS_SUPPORTED */
|
||||
|
||||
#if !defined(PNG_NO_PROGRESSIVE_READ) && \
|
||||
!defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED) /* if you don't do progressive */
|
||||
# define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */
|
||||
#endif /* about interlacing capability! You'll */
|
||||
/* still have interlacing unless you change the following line: */
|
||||
!defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED) /* if you don't do progressive */
|
||||
# define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */
|
||||
#endif /* about interlacing capability! You'll */
|
||||
/* still have interlacing unless you change the following line: */
|
||||
|
||||
#define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */
|
||||
#define PNG_READ_INTERLACING_SUPPORTED /* required in PNG-compliant decoders */
|
||||
|
||||
#ifndef PNG_NO_READ_COMPOSITE_NODIV
|
||||
# ifndef PNG_NO_READ_COMPOSITED_NODIV /* libpng-1.0.x misspelling */
|
||||
# define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */
|
||||
# define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -721,26 +727,54 @@
|
||||
#endif
|
||||
|
||||
/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0
|
||||
even when PNG_USE_PNGVCRD or PNG_USE_PNGGCCRD is not defined */
|
||||
* even when PNG_USE_PNGVCRD or PNG_USE_PNGGCCRD is not defined.
|
||||
*
|
||||
* PNG_NO_ASSEMBLER_CODE disables use of all assembler code,
|
||||
* and removes several functions from the API.
|
||||
*
|
||||
* PNG_NO_MMX_CODE disables the use of MMX code without changing the API.
|
||||
* When MMX code is off, then optimized C replacement functions are used,
|
||||
* if PNG_NO_OPTIMIZED_CODE is not enabled. This was added in version
|
||||
* 1.2.19.
|
||||
*/
|
||||
|
||||
#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_OPTIMIZED_CODE)
|
||||
# ifndef PNG_OPTIMIZED_CODE_SUPPORTED
|
||||
# define PNG_OPTIMIZED_CODE_SUPPORTED
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
|
||||
# ifndef PNG_ASSEMBLER_CODE_SUPPORTED
|
||||
# define PNG_ASSEMBLER_CODE_SUPPORTED
|
||||
# endif
|
||||
# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) && \
|
||||
defined(__MMX__)
|
||||
|
||||
# if defined(__APPLE__)
|
||||
# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
|
||||
# define PNG_NO_MMX_CODE
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
|
||||
# define PNG_MMX_CODE_SUPPORTED
|
||||
# endif
|
||||
# if !defined(PNG_USE_PNGGCCRD) && !defined(PNG_NO_MMX_CODE) && \
|
||||
!defined(PNG_USE_PNGVCRD) && defined(__MMX__)
|
||||
# define PNG_USE_PNGGCCRD
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* If you are sure that you don't need thread safety and you are compiling
|
||||
with PNG_USE_PNGCCRD for an MMX application, you can define this for
|
||||
faster execution. See pnggccrd.c.
|
||||
#define PNG_THREAD_UNSAFE_OK
|
||||
*/
|
||||
# if !defined(PNG_USE_PNGVCRD) && defined(PNG_MMX_CODE_SUPPORTED) && \
|
||||
defined(_MSC_VER)
|
||||
# define PNG_USE_PNGVCRD
|
||||
# endif
|
||||
|
||||
# if !defined(PNG_USE_PNGGCCRD) && defined(PNG_MMX_CODE_SUPPORTED) && \
|
||||
!defined(PNG_USE_PNGVCRD)
|
||||
# define PNG_USE_PNGGCCRD
|
||||
/* If you are sure that you don't need thread safety and you are compiling
|
||||
with PNG_USE_PNGCCRD for an MMX application, you can define this for
|
||||
faster execution. See pnggccrd.c.
|
||||
# define PNG_THREAD_UNSAFE_OK
|
||||
*/
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(PNG_1_0_X)
|
||||
#if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)
|
||||
@@ -1262,7 +1296,8 @@ typedef z_stream FAR * png_zstreamp;
|
||||
* but might be required for some pre-1.0.5c applications.
|
||||
*/
|
||||
#if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
|
||||
# if defined(PNG_NO_GLOBAL_ARRAYS) || (defined(__GNUC__) && defined(PNG_DLL))
|
||||
# if defined(PNG_NO_GLOBAL_ARRAYS) || \
|
||||
(defined(__GNUC__) && defined(PNG_DLL)) || defined(_MSC_VER)
|
||||
# define PNG_USE_LOCAL_ARRAYS
|
||||
# else
|
||||
# define PNG_USE_GLOBAL_ARRAYS
|
||||
@@ -1399,6 +1434,7 @@ typedef z_stream FAR * png_zstreamp;
|
||||
# define NOCHECK 0
|
||||
# define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
|
||||
# define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
|
||||
# define png_snprintf _fsnprintf /* Added to v 1.2.19 */
|
||||
# define png_strcpy _fstrcpy
|
||||
# define png_strncpy _fstrncpy /* Added to v 1.2.6 */
|
||||
# define png_strlen _fstrlen
|
||||
@@ -1408,6 +1444,27 @@ typedef z_stream FAR * png_zstreamp;
|
||||
#else /* use the usual functions */
|
||||
# define CVT_PTR(ptr) (ptr)
|
||||
# define CVT_PTR_NOCHECK(ptr) (ptr)
|
||||
# ifndef PNG_NO_SNPRINTF
|
||||
# ifdef _MSC_VER
|
||||
# define png_snprintf _snprintf /* Added to v 1.2.19 */
|
||||
# define png_snprintf2 _snprintf
|
||||
# define png_snprintf6 _snprintf
|
||||
# else
|
||||
# define png_snprintf snprintf /* Added to v 1.2.19 */
|
||||
# define png_snprintf2 snprintf
|
||||
# define png_snprintf6 snprintf
|
||||
# endif
|
||||
# else
|
||||
/* You don't have or don't want to use snprintf(). Caution: Using
|
||||
* sprintf instead of snprintf exposes your application to accidental
|
||||
* or malevolent buffer overflows. If you don't have snprintf()
|
||||
* as a general rule you should provide one (you can get one from
|
||||
* Portable OpenSSH). */
|
||||
# define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1)
|
||||
# define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2)
|
||||
# define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \
|
||||
sprintf(s1,fmt,x1,x2,x3,x4,x5,x6)
|
||||
# endif
|
||||
# define png_strcpy strcpy
|
||||
# define png_strncpy strncpy /* Added to v 1.2.6 */
|
||||
# define png_strlen strlen
|
||||
@@ -1429,39 +1486,48 @@ typedef z_stream FAR * png_zstreamp;
|
||||
/* Prior to libpng-1.0.9, this block was in pngasmrd.h */
|
||||
#if defined(PNG_INTERNAL)
|
||||
|
||||
/* These are the default thresholds before the MMX code kicks in; if either
|
||||
* rowbytes or bitdepth is below the threshold, plain C code is used. These
|
||||
* can be overridden at runtime via the png_set_mmx_thresholds() call in
|
||||
* libpng 1.2.0 and later. The values below were chosen by Intel.
|
||||
*/
|
||||
|
||||
#ifndef PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT
|
||||
# define PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT 128 /* >= */
|
||||
#endif
|
||||
#ifndef PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT
|
||||
# define PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT 9 /* >= */
|
||||
#endif
|
||||
|
||||
/* Set this in the makefile for VC++ on Pentium, not here. */
|
||||
/* Platform must be Pentium. Makefile must assemble and load pngvcrd.c .
|
||||
* MMX will be detected at run time and used if present.
|
||||
*/
|
||||
#ifdef PNG_USE_PNGVCRD
|
||||
# define PNG_HAVE_ASSEMBLER_COMBINE_ROW
|
||||
# define PNG_HAVE_ASSEMBLER_READ_INTERLACE
|
||||
# define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
|
||||
#endif
|
||||
|
||||
/* Set this in the makefile for gcc/as on Pentium, not here. */
|
||||
/* Platform must be Pentium. Makefile must assemble and load pnggccrd.c .
|
||||
* MMX will be detected at run time and used if present.
|
||||
*/
|
||||
#ifdef PNG_USE_PNGGCCRD
|
||||
# define PNG_HAVE_ASSEMBLER_COMBINE_ROW
|
||||
# define PNG_HAVE_ASSEMBLER_READ_INTERLACE
|
||||
# define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
|
||||
#endif
|
||||
/* - see pnggccrd.c for info about what is currently enabled */
|
||||
#if defined(PNG_USE_PNGGCCRD) || defined(PNG_USE_PNGVCRD)
|
||||
/* Platform must be Pentium. Makefile must assemble and load
|
||||
* pnggccrd.c or pngvcrd.c. MMX will be detected at run time and
|
||||
* used if present.
|
||||
*/
|
||||
# ifndef PNG_NO_MMX_COMBINE_ROW
|
||||
# define PNG_HAVE_MMX_COMBINE_ROW
|
||||
# endif
|
||||
# ifndef PNG_NO_MMX_READ_INTERLACE
|
||||
# define PNG_HAVE_MMX_READ_INTERLACE
|
||||
# endif
|
||||
# ifndef PNG_NO_MMX_READ_FILTER_ROW
|
||||
# define PNG_HAVE_MMX_READ_FILTER_ROW
|
||||
# ifndef PNG_NO_MMX_FILTER_SUB
|
||||
# define PNG_MMX_READ_FILTER_SUB_SUPPORTED
|
||||
# endif
|
||||
# if !(defined(__GNUC__) && defined(__x86_64__) && (__GNUC__ < 4))
|
||||
/* work around 64-bit gcc compiler bugs in gcc-3.x */
|
||||
# ifndef PNG_NO_MMX_FILTER_UP
|
||||
# define PNG_MMX_READ_FILTER_UP_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_MMX_FILTER_AVG
|
||||
# define PNG_MMX_READ_FILTER_AVG_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_MMX_FILTER_PAETH
|
||||
# define PNG_MMX_READ_FILTER_PAETH_SUPPORTED
|
||||
# endif
|
||||
# endif /* !((__x86_64__) && (GNUC < 4)) */
|
||||
# endif
|
||||
/* These are the default thresholds before the MMX code kicks in; if either
|
||||
* rowbytes or bitdepth is below the threshold, plain C code is used. These
|
||||
* can be overridden at runtime via the png_set_mmx_thresholds() call in
|
||||
* libpng 1.2.0 and later. The values below were chosen by Intel.
|
||||
*/
|
||||
# ifndef PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT
|
||||
# define PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT 128 /* >= */
|
||||
# endif
|
||||
# ifndef PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT
|
||||
# define PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT 9 /* >= */
|
||||
# endif
|
||||
#endif /* PNG_USE_PNGGCCRD || PNG_USE_PNGVCRD */
|
||||
/* - see pngvcrd.c or pnggccrd.c for info about what is currently enabled */
|
||||
|
||||
#endif /* PNG_INTERNAL */
|
||||
#endif /* PNG_READ_SUPPORTED */
|
||||
|
||||
66
pngerror.c
66
pngerror.c
@@ -1,9 +1,9 @@
|
||||
|
||||
/* pngerror.c - stub functions for i/o and memory allocation
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.20 August 21, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 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.)
|
||||
*
|
||||
@@ -20,15 +20,18 @@
|
||||
static void /* PRIVATE */
|
||||
png_default_error PNGARG((png_structp png_ptr,
|
||||
png_const_charp error_message));
|
||||
#ifndef PNG_NO_WARNINGS
|
||||
static void /* PRIVATE */
|
||||
png_default_warning PNGARG((png_structp png_ptr,
|
||||
png_const_charp warning_message));
|
||||
#endif /* PNG_NO_WARNINGS */
|
||||
|
||||
/* This function is called whenever there is a fatal error. This function
|
||||
* should not be changed. If there is a need to handle errors differently,
|
||||
* you should supply a replacement error function and use png_set_error_fn()
|
||||
* to replace the error function at run-time.
|
||||
*/
|
||||
#ifndef PNG_NO_ERROR_TEXT
|
||||
void PNGAPI
|
||||
png_error(png_structp png_ptr, png_const_charp error_message)
|
||||
{
|
||||
@@ -75,7 +78,20 @@ png_error(png_structp png_ptr, png_const_charp error_message)
|
||||
use the default handler, which will not return. */
|
||||
png_default_error(png_ptr, error_message);
|
||||
}
|
||||
#else
|
||||
void PNGAPI
|
||||
png_err(png_structp png_ptr)
|
||||
{
|
||||
if (png_ptr != NULL && png_ptr->error_fn != NULL)
|
||||
(*(png_ptr->error_fn))(png_ptr, '\0');
|
||||
|
||||
/* If the custom handler doesn't exist, or if it returns,
|
||||
use the default handler, which will not return. */
|
||||
png_default_error(png_ptr, '\0');
|
||||
}
|
||||
#endif /* PNG_NO_ERROR_TEXT */
|
||||
|
||||
#ifndef PNG_NO_WARNINGS
|
||||
/* This function is called whenever there is a non-fatal error. This function
|
||||
* should not be changed. If there is a need to handle warnings differently,
|
||||
* you should supply a replacement warning function and use
|
||||
@@ -105,6 +121,8 @@ png_warning(png_structp png_ptr, png_const_charp warning_message)
|
||||
else
|
||||
png_default_warning(png_ptr, warning_message+offset);
|
||||
}
|
||||
#endif /* PNG_NO_WARNINGS */
|
||||
|
||||
|
||||
/* These utilities are used internally to build an error message that relates
|
||||
* to the current chunk. The chunk name comes from png_ptr->chunk_name,
|
||||
@@ -118,6 +136,7 @@ static PNG_CONST char png_digit[16] = {
|
||||
'A', 'B', 'C', 'D', 'E', 'F'
|
||||
};
|
||||
|
||||
#if !defined(PNG_NO_WARNINGS) || !defined(PNG_NO_ERROR_TEXT)
|
||||
static void /* PRIVATE */
|
||||
png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp
|
||||
error_message)
|
||||
@@ -151,25 +170,37 @@ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef PNG_READ_SUPPORTED
|
||||
void PNGAPI
|
||||
png_chunk_error(png_structp png_ptr, png_const_charp error_message)
|
||||
{
|
||||
char msg[18+64];
|
||||
if (png_ptr == NULL)
|
||||
png_error(png_ptr, error_message);
|
||||
png_format_buffer(png_ptr, msg, error_message);
|
||||
png_error(png_ptr, msg);
|
||||
else
|
||||
{
|
||||
png_format_buffer(png_ptr, msg, error_message);
|
||||
png_error(png_ptr, msg);
|
||||
}
|
||||
}
|
||||
#endif /* PNG_READ_SUPPORTED */
|
||||
#endif /* !defined(PNG_NO_WARNINGS) || !defined(PNG_NO_ERROR_TEXT) */
|
||||
|
||||
#ifndef PNG_NO_WARNINGS
|
||||
void PNGAPI
|
||||
png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
|
||||
{
|
||||
char msg[18+64];
|
||||
if (png_ptr == NULL)
|
||||
png_warning(png_ptr, warning_message);
|
||||
png_format_buffer(png_ptr, msg, warning_message);
|
||||
png_warning(png_ptr, msg);
|
||||
else
|
||||
{
|
||||
png_format_buffer(png_ptr, msg, warning_message);
|
||||
png_warning(png_ptr, msg);
|
||||
}
|
||||
}
|
||||
#endif /* PNG_NO_WARNINGS */
|
||||
|
||||
|
||||
/* This is the default error handling function. Note that replacements for
|
||||
* this function MUST NOT RETURN, or the program will likely crash. This
|
||||
@@ -206,27 +237,27 @@ png_default_error(png_structp png_ptr, png_const_charp error_message)
|
||||
#endif
|
||||
|
||||
#ifdef PNG_SETJMP_SUPPORTED
|
||||
if (png_ptr)
|
||||
{
|
||||
# ifdef USE_FAR_KEYWORD
|
||||
{
|
||||
jmp_buf jmpbuf;
|
||||
png_memcpy(jmpbuf,png_ptr->jmpbuf,png_sizeof(jmp_buf));
|
||||
png_memcpy(jmpbuf, png_ptr->jmpbuf, png_sizeof(jmp_buf));
|
||||
longjmp(jmpbuf, 1);
|
||||
}
|
||||
# else
|
||||
longjmp(png_ptr->jmpbuf, 1);
|
||||
# endif
|
||||
# endif
|
||||
}
|
||||
#else
|
||||
/* make compiler happy */ ;
|
||||
if (png_ptr)
|
||||
PNG_ABORT();
|
||||
#endif
|
||||
#ifdef PNG_NO_CONSOLE_IO
|
||||
/* make compiler happy */ ;
|
||||
if (&error_message != NULL)
|
||||
return;
|
||||
error_message = error_message; /* make compiler happy */
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef PNG_NO_WARNINGS
|
||||
/* This function is called when there is a warning, but the library thinks
|
||||
* it can continue anyway. Replacement functions don't have to do anything
|
||||
* here if you don't want them to. In the default configuration, png_ptr is
|
||||
@@ -260,14 +291,11 @@ png_default_warning(png_structp png_ptr, png_const_charp warning_message)
|
||||
# endif
|
||||
fprintf(stderr, "libpng warning: %s\n", warning_message);
|
||||
#else
|
||||
/* make compiler happy */ ;
|
||||
if (warning_message)
|
||||
return;
|
||||
warning_message = warning_message; /* make compiler happy */
|
||||
#endif
|
||||
/* make compiler happy */ ;
|
||||
if (png_ptr)
|
||||
return;
|
||||
png_ptr = png_ptr; /* make compiler happy */
|
||||
}
|
||||
#endif /* PNG_NO_WARNINGS */
|
||||
|
||||
/* This function is called when the application wants to use another method
|
||||
* of handling errors and warnings. Note that the error function MUST NOT
|
||||
|
||||
6031
pnggccrd.c
6031
pnggccrd.c
File diff suppressed because it is too large
Load Diff
41
pngget.c
41
pngget.c
@@ -1,9 +1,9 @@
|
||||
|
||||
/* pngget.c - retrieval of values from info struct
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.15 January 5, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 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.)
|
||||
*/
|
||||
@@ -512,8 +512,11 @@ png_get_sPLT(png_structp png_ptr, png_infop info_ptr,
|
||||
png_sPLT_tpp spalettes)
|
||||
{
|
||||
if (png_ptr != NULL && info_ptr != NULL && spalettes != NULL)
|
||||
{
|
||||
*spalettes = info_ptr->splt_palettes;
|
||||
return ((png_uint_32)info_ptr->splt_palettes_num);
|
||||
return ((png_uint_32)info_ptr->splt_palettes_num);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -800,8 +803,11 @@ png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr,
|
||||
png_unknown_chunkpp unknowns)
|
||||
{
|
||||
if (png_ptr != NULL && info_ptr != NULL && unknowns != NULL)
|
||||
{
|
||||
*unknowns = info_ptr->unknown_chunks;
|
||||
return ((png_uint_32)info_ptr->unknown_chunks_num);
|
||||
return ((png_uint_32)info_ptr->unknown_chunks_num);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -829,19 +835,24 @@ png_get_compression_buffer_size(png_structp png_ptr)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef PNG_1_0_X
|
||||
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
|
||||
#ifndef PNG_1_0_X
|
||||
/* this function was added to libpng 1.2.0 and should exist by default */
|
||||
png_uint_32 PNGAPI
|
||||
png_get_asm_flags (png_structp png_ptr)
|
||||
{
|
||||
#ifdef PNG_MMX_CODE_SUPPORTED
|
||||
return (png_uint_32)(png_ptr? png_ptr->asm_flags : 0L);
|
||||
#else
|
||||
return (png_ptr? 0L: 0L);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* this function was added to libpng 1.2.0 and should exist by default */
|
||||
png_uint_32 PNGAPI
|
||||
png_get_asm_flagmask (int flag_select)
|
||||
{
|
||||
#ifdef PNG_MMX_CODE_SUPPORTED
|
||||
png_uint_32 settable_asm_flags = 0;
|
||||
|
||||
if (flag_select & PNG_SELECT_READ)
|
||||
@@ -862,16 +873,18 @@ png_get_asm_flagmask (int flag_select)
|
||||
#endif /* 0 */
|
||||
|
||||
return settable_asm_flags; /* _theoretically_ settable capabilities only */
|
||||
#else
|
||||
return (0L);
|
||||
#endif /* PNG_MMX_CODE_SUPPORTED */
|
||||
}
|
||||
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
|
||||
|
||||
|
||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
||||
/* GRR: could add this: && defined(PNG_MMX_CODE_SUPPORTED) */
|
||||
/* this function was added to libpng 1.2.0 */
|
||||
png_uint_32 PNGAPI
|
||||
png_get_mmx_flagmask (int flag_select, int *compilerID)
|
||||
{
|
||||
#if defined(PNG_MMX_CODE_SUPPORTED)
|
||||
png_uint_32 settable_mmx_flags = 0;
|
||||
|
||||
if (flag_select & PNG_SELECT_READ)
|
||||
@@ -902,23 +915,34 @@ png_get_mmx_flagmask (int flag_select, int *compilerID)
|
||||
}
|
||||
|
||||
return settable_mmx_flags; /* _theoretically_ settable capabilities only */
|
||||
#else
|
||||
return (0L);
|
||||
#endif /* ?PNG_MMX_CODE_SUPPORTED */
|
||||
}
|
||||
|
||||
/* this function was added to libpng 1.2.0 */
|
||||
png_byte PNGAPI
|
||||
png_get_mmx_bitdepth_threshold (png_structp png_ptr)
|
||||
{
|
||||
#if defined(PNG_MMX_CODE_SUPPORTED)
|
||||
return (png_byte)(png_ptr? png_ptr->mmx_bitdepth_threshold : 0);
|
||||
#else
|
||||
return (png_ptr? 0: 0);
|
||||
#endif /* ?PNG_MMX_CODE_SUPPORTED */
|
||||
}
|
||||
|
||||
/* this function was added to libpng 1.2.0 */
|
||||
png_uint_32 PNGAPI
|
||||
png_get_mmx_rowbytes_threshold (png_structp png_ptr)
|
||||
{
|
||||
#if defined(PNG_MMX_CODE_SUPPORTED)
|
||||
return (png_uint_32)(png_ptr? png_ptr->mmx_rowbytes_threshold : 0L);
|
||||
#else
|
||||
return (png_ptr? 0L: 0L);
|
||||
#endif /* ?PNG_MMX_CODE_SUPPORTED */
|
||||
}
|
||||
#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
|
||||
#endif /* ?PNG_1_0_X */
|
||||
#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
|
||||
|
||||
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
|
||||
/* these functions were added to libpng 1.2.6 */
|
||||
@@ -933,5 +957,6 @@ png_get_user_height_max (png_structp png_ptr)
|
||||
return (png_ptr? png_ptr->user_height_max : 0);
|
||||
}
|
||||
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
|
||||
|
||||
|
||||
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
|
||||
|
||||
14
pngmem.c
14
pngmem.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngmem.c - stub functions for memory allocation
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.13 November 13, 2006
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -137,6 +137,9 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
|
||||
png_voidp ret;
|
||||
#endif /* PNG_USER_MEM_SUPPORTED */
|
||||
|
||||
if (png_ptr == NULL || size == 0)
|
||||
return (NULL);
|
||||
|
||||
#ifdef PNG_MAX_MALLOC_64K
|
||||
if (size > (png_uint_32)65536L)
|
||||
{
|
||||
@@ -290,6 +293,8 @@ png_free_default(png_structp png_ptr, png_voidp ptr)
|
||||
{
|
||||
#endif /* PNG_USER_MEM_SUPPORTED */
|
||||
|
||||
if(png_ptr == NULL) return;
|
||||
|
||||
if (png_ptr->offset_table != NULL)
|
||||
{
|
||||
int i;
|
||||
@@ -536,8 +541,10 @@ png_voidp PNGAPI
|
||||
png_malloc_warn(png_structp png_ptr, png_uint_32 size)
|
||||
{
|
||||
png_voidp ptr;
|
||||
png_uint_32 save_flags=png_ptr->flags;
|
||||
png_uint_32 save_flags;
|
||||
if(png_ptr == NULL) return (NULL);
|
||||
|
||||
save_flags=png_ptr->flags;
|
||||
png_ptr->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK;
|
||||
ptr = (png_voidp)png_malloc((png_structp)png_ptr, size);
|
||||
png_ptr->flags=save_flags;
|
||||
@@ -580,9 +587,11 @@ void PNGAPI
|
||||
png_set_mem_fn(png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr
|
||||
malloc_fn, png_free_ptr free_fn)
|
||||
{
|
||||
if(png_ptr != NULL) {
|
||||
png_ptr->mem_ptr = mem_ptr;
|
||||
png_ptr->malloc_fn = malloc_fn;
|
||||
png_ptr->free_fn = free_fn;
|
||||
}
|
||||
}
|
||||
|
||||
/* This function returns a pointer to the mem_ptr associated with the user
|
||||
@@ -592,6 +601,7 @@ png_set_mem_fn(png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr
|
||||
png_voidp PNGAPI
|
||||
png_get_mem_ptr(png_structp png_ptr)
|
||||
{
|
||||
if(png_ptr == NULL) return (NULL);
|
||||
return ((png_voidp)png_ptr->mem_ptr);
|
||||
}
|
||||
#endif /* PNG_USER_MEM_SUPPORTED */
|
||||
|
||||
162
pngpread.c
162
pngpread.c
@@ -1,9 +1,9 @@
|
||||
|
||||
/* pngpread.c - read a png file in push mode
|
||||
*
|
||||
* Last changed in libpng 1.2.8 - December 3, 2004
|
||||
* Last changed in libpng 1.2.20 August 21, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 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.)
|
||||
*/
|
||||
@@ -28,6 +28,7 @@ void PNGAPI
|
||||
png_process_data(png_structp png_ptr, png_infop info_ptr,
|
||||
png_bytep buffer, png_size_t buffer_size)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_push_restore_buffer(png_ptr, buffer, buffer_size);
|
||||
|
||||
while (png_ptr->buffer_size)
|
||||
@@ -42,6 +43,7 @@ png_process_data(png_structp png_ptr, png_infop info_ptr,
|
||||
void /* PRIVATE */
|
||||
png_process_some_data(png_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
switch (png_ptr->process_mode)
|
||||
{
|
||||
case PNG_READ_SIG_MODE:
|
||||
@@ -135,60 +137,60 @@ void /* PRIVATE */
|
||||
png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
#ifdef PNG_USE_LOCAL_ARRAYS
|
||||
PNG_IHDR;
|
||||
PNG_IDAT;
|
||||
PNG_IEND;
|
||||
PNG_PLTE;
|
||||
PNG_CONST PNG_IHDR;
|
||||
PNG_CONST PNG_IDAT;
|
||||
PNG_CONST PNG_IEND;
|
||||
PNG_CONST PNG_PLTE;
|
||||
#if defined(PNG_READ_bKGD_SUPPORTED)
|
||||
PNG_bKGD;
|
||||
PNG_CONST PNG_bKGD;
|
||||
#endif
|
||||
#if defined(PNG_READ_cHRM_SUPPORTED)
|
||||
PNG_cHRM;
|
||||
PNG_CONST PNG_cHRM;
|
||||
#endif
|
||||
#if defined(PNG_READ_gAMA_SUPPORTED)
|
||||
PNG_gAMA;
|
||||
PNG_CONST PNG_gAMA;
|
||||
#endif
|
||||
#if defined(PNG_READ_hIST_SUPPORTED)
|
||||
PNG_hIST;
|
||||
PNG_CONST PNG_hIST;
|
||||
#endif
|
||||
#if defined(PNG_READ_iCCP_SUPPORTED)
|
||||
PNG_iCCP;
|
||||
PNG_CONST PNG_iCCP;
|
||||
#endif
|
||||
#if defined(PNG_READ_iTXt_SUPPORTED)
|
||||
PNG_iTXt;
|
||||
PNG_CONST PNG_iTXt;
|
||||
#endif
|
||||
#if defined(PNG_READ_oFFs_SUPPORTED)
|
||||
PNG_oFFs;
|
||||
PNG_CONST PNG_oFFs;
|
||||
#endif
|
||||
#if defined(PNG_READ_pCAL_SUPPORTED)
|
||||
PNG_pCAL;
|
||||
PNG_CONST PNG_pCAL;
|
||||
#endif
|
||||
#if defined(PNG_READ_pHYs_SUPPORTED)
|
||||
PNG_pHYs;
|
||||
PNG_CONST PNG_pHYs;
|
||||
#endif
|
||||
#if defined(PNG_READ_sBIT_SUPPORTED)
|
||||
PNG_sBIT;
|
||||
PNG_CONST PNG_sBIT;
|
||||
#endif
|
||||
#if defined(PNG_READ_sCAL_SUPPORTED)
|
||||
PNG_sCAL;
|
||||
PNG_CONST PNG_sCAL;
|
||||
#endif
|
||||
#if defined(PNG_READ_sRGB_SUPPORTED)
|
||||
PNG_sRGB;
|
||||
PNG_CONST PNG_sRGB;
|
||||
#endif
|
||||
#if defined(PNG_READ_sPLT_SUPPORTED)
|
||||
PNG_sPLT;
|
||||
PNG_CONST PNG_sPLT;
|
||||
#endif
|
||||
#if defined(PNG_READ_tEXt_SUPPORTED)
|
||||
PNG_tEXt;
|
||||
PNG_CONST PNG_tEXt;
|
||||
#endif
|
||||
#if defined(PNG_READ_tIME_SUPPORTED)
|
||||
PNG_tIME;
|
||||
PNG_CONST PNG_tIME;
|
||||
#endif
|
||||
#if defined(PNG_READ_tRNS_SUPPORTED)
|
||||
PNG_tRNS;
|
||||
PNG_CONST PNG_tRNS;
|
||||
#endif
|
||||
#if defined(PNG_READ_zTXt_SUPPORTED)
|
||||
PNG_zTXt;
|
||||
PNG_CONST PNG_zTXt;
|
||||
#endif
|
||||
#endif /* PNG_USE_LOCAL_ARRAYS */
|
||||
/* First we make sure we have enough data for the 4 byte chunk name
|
||||
@@ -214,6 +216,10 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
|
||||
png_ptr->mode |= PNG_HAVE_CHUNK_HEADER;
|
||||
}
|
||||
|
||||
if (!png_memcmp(png_ptr->chunk_name, (png_bytep)png_IDAT, 4))
|
||||
if(png_ptr->mode & PNG_AFTER_IDAT)
|
||||
png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT;
|
||||
|
||||
if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4))
|
||||
{
|
||||
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
|
||||
@@ -281,8 +287,9 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
|
||||
|
||||
if (png_ptr->mode & PNG_HAVE_IDAT)
|
||||
{
|
||||
if (png_ptr->push_length == 0)
|
||||
return;
|
||||
if (!(png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT))
|
||||
if (png_ptr->push_length == 0)
|
||||
return;
|
||||
|
||||
if (png_ptr->mode & PNG_AFTER_IDAT)
|
||||
png_error(png_ptr, "Too many IDAT's found");
|
||||
@@ -556,6 +563,7 @@ png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length)
|
||||
{
|
||||
png_bytep ptr;
|
||||
|
||||
if(png_ptr == NULL) return;
|
||||
ptr = buffer;
|
||||
if (png_ptr->save_buffer_size)
|
||||
{
|
||||
@@ -652,7 +660,7 @@ void /* PRIVATE */
|
||||
png_push_read_IDAT(png_structp png_ptr)
|
||||
{
|
||||
#ifdef PNG_USE_LOCAL_ARRAYS
|
||||
PNG_IDAT;
|
||||
PNG_CONST PNG_IDAT;
|
||||
#endif
|
||||
if (!(png_ptr->mode & PNG_HAVE_CHUNK_HEADER))
|
||||
{
|
||||
@@ -982,25 +990,25 @@ png_read_push_finish_row(png_structp png_ptr)
|
||||
/* arrays to facilitate easy interlacing - use pass (0 - 6) as index */
|
||||
|
||||
/* start of interlace block */
|
||||
const int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0};
|
||||
PNG_CONST int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0};
|
||||
|
||||
/* offset to next interlace block */
|
||||
const int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};
|
||||
PNG_CONST int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};
|
||||
|
||||
/* start of interlace block in the y direction */
|
||||
const int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1};
|
||||
PNG_CONST int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1};
|
||||
|
||||
/* offset to next interlace block in the y direction */
|
||||
const int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2};
|
||||
PNG_CONST int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2};
|
||||
|
||||
/* Width of interlace block. This is not currently used - if you need
|
||||
* it, uncomment it here and in png.h
|
||||
const int FARDATA png_pass_width[] = {8, 4, 4, 2, 2, 1, 1};
|
||||
PNG_CONST int FARDATA png_pass_width[] = {8, 4, 4, 2, 2, 1, 1};
|
||||
*/
|
||||
|
||||
/* Height of interlace block. This is not currently used - if you need
|
||||
* it, uncomment it here and in png.h
|
||||
const int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
|
||||
PNG_CONST int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
|
||||
*/
|
||||
#endif
|
||||
|
||||
@@ -1054,8 +1062,7 @@ png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
|
||||
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
|
||||
{
|
||||
png_error(png_ptr, "Out of place tEXt");
|
||||
/* to quiet some compiler warnings */
|
||||
if(info_ptr == NULL) return;
|
||||
info_ptr = info_ptr; /* to quiet some compiler warnings */
|
||||
}
|
||||
|
||||
#ifdef PNG_MAX_MALLOC_64K
|
||||
@@ -1151,8 +1158,7 @@ png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
|
||||
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
|
||||
{
|
||||
png_error(png_ptr, "Out of place zTXt");
|
||||
/* to quiet some compiler warnings */
|
||||
if(info_ptr == NULL) return;
|
||||
info_ptr = info_ptr; /* to quiet some compiler warnings */
|
||||
}
|
||||
|
||||
#ifdef PNG_MAX_MALLOC_64K
|
||||
@@ -1344,8 +1350,7 @@ png_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
|
||||
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
|
||||
{
|
||||
png_error(png_ptr, "Out of place iTXt");
|
||||
/* to quiet some compiler warnings */
|
||||
if(info_ptr == NULL) return;
|
||||
info_ptr = info_ptr; /* to quiet some compiler warnings */
|
||||
}
|
||||
|
||||
#ifdef PNG_MAX_MALLOC_64K
|
||||
@@ -1463,55 +1468,59 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32
|
||||
if (!(png_ptr->chunk_name[0] & 0x20))
|
||||
{
|
||||
#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
|
||||
if(png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=
|
||||
PNG_HANDLE_CHUNK_ALWAYS
|
||||
if(png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=
|
||||
PNG_HANDLE_CHUNK_ALWAYS
|
||||
#if defined(PNG_READ_USER_CHUNKS_SUPPORTED)
|
||||
&& png_ptr->read_user_chunk_fn == NULL
|
||||
&& png_ptr->read_user_chunk_fn == NULL
|
||||
#endif
|
||||
)
|
||||
)
|
||||
#endif
|
||||
png_chunk_error(png_ptr, "unknown critical chunk");
|
||||
png_chunk_error(png_ptr, "unknown critical chunk");
|
||||
|
||||
/* to quiet compiler warnings about unused info_ptr */
|
||||
if (info_ptr == NULL)
|
||||
return;
|
||||
info_ptr = info_ptr; /* to quiet some compiler warnings */
|
||||
}
|
||||
|
||||
#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
|
||||
if (png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS)
|
||||
{
|
||||
png_unknown_chunk chunk;
|
||||
|
||||
#ifdef PNG_MAX_MALLOC_64K
|
||||
if (length > (png_uint_32)65535L)
|
||||
{
|
||||
png_warning(png_ptr, "unknown chunk too large to fit in memory");
|
||||
skip = length - (png_uint_32)65535L;
|
||||
length = (png_uint_32)65535L;
|
||||
}
|
||||
if (length > (png_uint_32)65535L)
|
||||
{
|
||||
png_warning(png_ptr, "unknown chunk too large to fit in memory");
|
||||
skip = length - (png_uint_32)65535L;
|
||||
length = (png_uint_32)65535L;
|
||||
}
|
||||
#endif
|
||||
|
||||
png_strcpy((png_charp)chunk.name, (png_charp)png_ptr->chunk_name);
|
||||
chunk.data = (png_bytep)png_malloc(png_ptr, length);
|
||||
png_crc_read(png_ptr, chunk.data, length);
|
||||
chunk.size = length;
|
||||
png_strncpy((png_charp)png_ptr->unknown_chunk.name,
|
||||
(png_charp)png_ptr->chunk_name,
|
||||
png_sizeof((png_charp)png_ptr->chunk_name));
|
||||
png_ptr->unknown_chunk.data = (png_bytep)png_malloc(png_ptr, length);
|
||||
png_ptr->unknown_chunk.size = (png_size_t)length;
|
||||
png_crc_read(png_ptr, (png_bytep)png_ptr->unknown_chunk.data, length);
|
||||
#if defined(PNG_READ_USER_CHUNKS_SUPPORTED)
|
||||
if(png_ptr->read_user_chunk_fn != NULL)
|
||||
{
|
||||
/* callback to user unknown chunk handler */
|
||||
if ((*(png_ptr->read_user_chunk_fn)) (png_ptr, &chunk) <= 0)
|
||||
{
|
||||
if (!(png_ptr->chunk_name[0] & 0x20))
|
||||
if(png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=
|
||||
PNG_HANDLE_CHUNK_ALWAYS)
|
||||
png_chunk_error(png_ptr, "unknown critical chunk");
|
||||
}
|
||||
png_set_unknown_chunks(png_ptr, info_ptr, &chunk, 1);
|
||||
}
|
||||
else
|
||||
if(png_ptr->read_user_chunk_fn != NULL)
|
||||
{
|
||||
/* callback to user unknown chunk handler */
|
||||
int ret;
|
||||
ret = (*(png_ptr->read_user_chunk_fn))
|
||||
(png_ptr, &png_ptr->unknown_chunk);
|
||||
if (ret < 0)
|
||||
png_chunk_error(png_ptr, "error in user chunk");
|
||||
if (ret == 0)
|
||||
{
|
||||
if (!(png_ptr->chunk_name[0] & 0x20))
|
||||
if(png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=
|
||||
PNG_HANDLE_CHUNK_ALWAYS)
|
||||
png_chunk_error(png_ptr, "unknown critical chunk");
|
||||
png_set_unknown_chunks(png_ptr, info_ptr,
|
||||
&png_ptr->unknown_chunk, 1);
|
||||
}
|
||||
}
|
||||
#else
|
||||
png_set_unknown_chunks(png_ptr, info_ptr, &png_ptr->unknown_chunk, 1);
|
||||
#endif
|
||||
png_set_unknown_chunks(png_ptr, info_ptr, &chunk, 1);
|
||||
png_free(png_ptr, chunk.data);
|
||||
png_free(png_ptr, png_ptr->unknown_chunk.data);
|
||||
png_ptr->unknown_chunk.data = NULL;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
@@ -1546,9 +1555,10 @@ png_progressive_combine_row (png_structp png_ptr,
|
||||
png_bytep old_row, png_bytep new_row)
|
||||
{
|
||||
#ifdef PNG_USE_LOCAL_ARRAYS
|
||||
const int FARDATA png_pass_dsp_mask[7] =
|
||||
PNG_CONST int FARDATA png_pass_dsp_mask[7] =
|
||||
{0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};
|
||||
#endif
|
||||
if(png_ptr == NULL) return;
|
||||
if (new_row != NULL) /* new_row must == png_ptr->row_buf here. */
|
||||
png_combine_row(png_ptr, old_row, png_pass_dsp_mask[png_ptr->pass]);
|
||||
}
|
||||
@@ -1558,6 +1568,7 @@ png_set_progressive_read_fn(png_structp png_ptr, png_voidp progressive_ptr,
|
||||
png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,
|
||||
png_progressive_end_ptr end_fn)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->info_fn = info_fn;
|
||||
png_ptr->row_fn = row_fn;
|
||||
png_ptr->end_fn = end_fn;
|
||||
@@ -1568,6 +1579,7 @@ png_set_progressive_read_fn(png_structp png_ptr, png_voidp progressive_ptr,
|
||||
png_voidp PNGAPI
|
||||
png_get_progressive_ptr(png_structp png_ptr)
|
||||
{
|
||||
if(png_ptr == NULL) return (NULL);
|
||||
return png_ptr->io_ptr;
|
||||
}
|
||||
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
|
||||
|
||||
135
pngread.c
135
pngread.c
@@ -1,9 +1,9 @@
|
||||
|
||||
/* pngread.c - read a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.19 August 19, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 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.)
|
||||
*
|
||||
@@ -56,7 +56,7 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
|
||||
return (NULL);
|
||||
|
||||
#if !defined(PNG_1_0_X)
|
||||
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
|
||||
#ifdef PNG_MMX_CODE_SUPPORTED
|
||||
png_init_mmx_flags(png_ptr); /* 1.2.0 addition */
|
||||
#endif
|
||||
#endif /* PNG_1_0_X */
|
||||
@@ -117,11 +117,13 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
|
||||
char msg[80];
|
||||
if (user_png_ver)
|
||||
{
|
||||
sprintf(msg, "Application was compiled with png.h from libpng-%.20s",
|
||||
png_snprintf(msg, 80,
|
||||
"Application was compiled with png.h from libpng-%.20s",
|
||||
user_png_ver);
|
||||
png_warning(png_ptr, msg);
|
||||
}
|
||||
sprintf(msg, "Application is running with png.c from libpng-%.20s",
|
||||
png_snprintf(msg, 80,
|
||||
"Application is running with png.c from libpng-%.20s",
|
||||
png_libpng_ver);
|
||||
png_warning(png_ptr, msg);
|
||||
#endif
|
||||
@@ -188,6 +190,7 @@ png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver,
|
||||
png_size_t png_struct_size, png_size_t png_info_size)
|
||||
{
|
||||
/* We only come here via pre-1.0.12-compiled applications */
|
||||
if(png_ptr == NULL) return;
|
||||
#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
|
||||
if(png_sizeof(png_struct) > png_struct_size ||
|
||||
png_sizeof(png_info) > png_info_size)
|
||||
@@ -196,11 +199,13 @@ png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver,
|
||||
png_ptr->warning_fn=NULL;
|
||||
if (user_png_ver)
|
||||
{
|
||||
sprintf(msg, "Application was compiled with png.h from libpng-%.20s",
|
||||
png_snprintf(msg, 80,
|
||||
"Application was compiled with png.h from libpng-%.20s",
|
||||
user_png_ver);
|
||||
png_warning(png_ptr, msg);
|
||||
}
|
||||
sprintf(msg, "Application is running with png.c from libpng-%.20s",
|
||||
png_snprintf(msg, 80,
|
||||
"Application is running with png.c from libpng-%.20s",
|
||||
png_libpng_ver);
|
||||
png_warning(png_ptr, msg);
|
||||
}
|
||||
@@ -239,6 +244,8 @@ png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
|
||||
|
||||
png_structp png_ptr=*ptr_ptr;
|
||||
|
||||
if(png_ptr == NULL) return;
|
||||
|
||||
do
|
||||
{
|
||||
if(user_png_ver[i] != png_libpng_ver[i])
|
||||
@@ -317,6 +324,7 @@ png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
|
||||
void PNGAPI
|
||||
png_read_info(png_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_debug(1, "in png_read_info\n");
|
||||
/* If we haven't checked all of the PNG signature bytes, do so now. */
|
||||
if (png_ptr->sig_bytes < 8)
|
||||
@@ -342,60 +350,60 @@ png_read_info(png_structp png_ptr, png_infop info_ptr)
|
||||
for(;;)
|
||||
{
|
||||
#ifdef PNG_USE_LOCAL_ARRAYS
|
||||
PNG_IHDR;
|
||||
PNG_IDAT;
|
||||
PNG_IEND;
|
||||
PNG_PLTE;
|
||||
PNG_CONST PNG_IHDR;
|
||||
PNG_CONST PNG_IDAT;
|
||||
PNG_CONST PNG_IEND;
|
||||
PNG_CONST PNG_PLTE;
|
||||
#if defined(PNG_READ_bKGD_SUPPORTED)
|
||||
PNG_bKGD;
|
||||
PNG_CONST PNG_bKGD;
|
||||
#endif
|
||||
#if defined(PNG_READ_cHRM_SUPPORTED)
|
||||
PNG_cHRM;
|
||||
PNG_CONST PNG_cHRM;
|
||||
#endif
|
||||
#if defined(PNG_READ_gAMA_SUPPORTED)
|
||||
PNG_gAMA;
|
||||
PNG_CONST PNG_gAMA;
|
||||
#endif
|
||||
#if defined(PNG_READ_hIST_SUPPORTED)
|
||||
PNG_hIST;
|
||||
PNG_CONST PNG_hIST;
|
||||
#endif
|
||||
#if defined(PNG_READ_iCCP_SUPPORTED)
|
||||
PNG_iCCP;
|
||||
PNG_CONST PNG_iCCP;
|
||||
#endif
|
||||
#if defined(PNG_READ_iTXt_SUPPORTED)
|
||||
PNG_iTXt;
|
||||
PNG_CONST PNG_iTXt;
|
||||
#endif
|
||||
#if defined(PNG_READ_oFFs_SUPPORTED)
|
||||
PNG_oFFs;
|
||||
PNG_CONST PNG_oFFs;
|
||||
#endif
|
||||
#if defined(PNG_READ_pCAL_SUPPORTED)
|
||||
PNG_pCAL;
|
||||
PNG_CONST PNG_pCAL;
|
||||
#endif
|
||||
#if defined(PNG_READ_pHYs_SUPPORTED)
|
||||
PNG_pHYs;
|
||||
PNG_CONST PNG_pHYs;
|
||||
#endif
|
||||
#if defined(PNG_READ_sBIT_SUPPORTED)
|
||||
PNG_sBIT;
|
||||
PNG_CONST PNG_sBIT;
|
||||
#endif
|
||||
#if defined(PNG_READ_sCAL_SUPPORTED)
|
||||
PNG_sCAL;
|
||||
PNG_CONST PNG_sCAL;
|
||||
#endif
|
||||
#if defined(PNG_READ_sPLT_SUPPORTED)
|
||||
PNG_sPLT;
|
||||
PNG_CONST PNG_sPLT;
|
||||
#endif
|
||||
#if defined(PNG_READ_sRGB_SUPPORTED)
|
||||
PNG_sRGB;
|
||||
PNG_CONST PNG_sRGB;
|
||||
#endif
|
||||
#if defined(PNG_READ_tEXt_SUPPORTED)
|
||||
PNG_tEXt;
|
||||
PNG_CONST PNG_tEXt;
|
||||
#endif
|
||||
#if defined(PNG_READ_tIME_SUPPORTED)
|
||||
PNG_tIME;
|
||||
PNG_CONST PNG_tIME;
|
||||
#endif
|
||||
#if defined(PNG_READ_tRNS_SUPPORTED)
|
||||
PNG_tRNS;
|
||||
PNG_CONST PNG_tRNS;
|
||||
#endif
|
||||
#if defined(PNG_READ_zTXt_SUPPORTED)
|
||||
PNG_zTXt;
|
||||
PNG_CONST PNG_zTXt;
|
||||
#endif
|
||||
#endif /* PNG_USE_LOCAL_ARRAYS */
|
||||
png_byte chunk_length[4];
|
||||
@@ -413,6 +421,10 @@ png_read_info(png_structp png_ptr, png_infop info_ptr)
|
||||
/* This should be a binary subdivision search or a hash for
|
||||
* matching the chunk name rather than a linear search.
|
||||
*/
|
||||
if (!png_memcmp(png_ptr->chunk_name, (png_bytep)png_IDAT, 4))
|
||||
if(png_ptr->mode & PNG_AFTER_IDAT)
|
||||
png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT;
|
||||
|
||||
if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4))
|
||||
png_handle_IHDR(png_ptr, info_ptr, length);
|
||||
else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4))
|
||||
@@ -529,6 +541,7 @@ void PNGAPI
|
||||
png_read_update_info(png_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
png_debug(1, "in png_read_update_info\n");
|
||||
if(png_ptr == NULL) return;
|
||||
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
|
||||
png_read_start_row(png_ptr);
|
||||
else
|
||||
@@ -547,6 +560,7 @@ void PNGAPI
|
||||
png_start_read_image(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_start_read_image\n");
|
||||
if(png_ptr == NULL) return;
|
||||
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
|
||||
png_read_start_row(png_ptr);
|
||||
}
|
||||
@@ -557,11 +571,13 @@ void PNGAPI
|
||||
png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
|
||||
{
|
||||
#ifdef PNG_USE_LOCAL_ARRAYS
|
||||
PNG_IDAT;
|
||||
const int png_pass_dsp_mask[7] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};
|
||||
const int png_pass_mask[7] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
|
||||
PNG_CONST PNG_IDAT;
|
||||
PNG_CONST int png_pass_dsp_mask[7] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55,
|
||||
0xff};
|
||||
PNG_CONST int png_pass_mask[7] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
|
||||
#endif
|
||||
int ret;
|
||||
if(png_ptr == NULL) return;
|
||||
png_debug2(1, "in png_read_row (row %lu, pass %d)\n",
|
||||
png_ptr->row_number, png_ptr->pass);
|
||||
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
|
||||
@@ -820,6 +836,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row,
|
||||
png_bytepp dp;
|
||||
|
||||
png_debug(1, "in png_read_rows\n");
|
||||
if(png_ptr == NULL) return;
|
||||
rp = row;
|
||||
dp = display_row;
|
||||
if (rp != NULL && dp != NULL)
|
||||
@@ -868,6 +885,7 @@ png_read_image(png_structp png_ptr, png_bytepp image)
|
||||
png_bytepp rp;
|
||||
|
||||
png_debug(1, "in png_read_image\n");
|
||||
if(png_ptr == NULL) return;
|
||||
|
||||
#ifdef PNG_READ_INTERLACING_SUPPORTED
|
||||
pass = png_set_interlace_handling(png_ptr);
|
||||
@@ -906,65 +924,66 @@ png_read_end(png_structp png_ptr, png_infop info_ptr)
|
||||
png_uint_32 length;
|
||||
|
||||
png_debug(1, "in png_read_end\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_crc_finish(png_ptr, 0); /* Finish off CRC from last IDAT chunk */
|
||||
|
||||
do
|
||||
{
|
||||
#ifdef PNG_USE_LOCAL_ARRAYS
|
||||
PNG_IHDR;
|
||||
PNG_IDAT;
|
||||
PNG_IEND;
|
||||
PNG_PLTE;
|
||||
PNG_CONST PNG_IHDR;
|
||||
PNG_CONST PNG_IDAT;
|
||||
PNG_CONST PNG_IEND;
|
||||
PNG_CONST PNG_PLTE;
|
||||
#if defined(PNG_READ_bKGD_SUPPORTED)
|
||||
PNG_bKGD;
|
||||
PNG_CONST PNG_bKGD;
|
||||
#endif
|
||||
#if defined(PNG_READ_cHRM_SUPPORTED)
|
||||
PNG_cHRM;
|
||||
PNG_CONST PNG_cHRM;
|
||||
#endif
|
||||
#if defined(PNG_READ_gAMA_SUPPORTED)
|
||||
PNG_gAMA;
|
||||
PNG_CONST PNG_gAMA;
|
||||
#endif
|
||||
#if defined(PNG_READ_hIST_SUPPORTED)
|
||||
PNG_hIST;
|
||||
PNG_CONST PNG_hIST;
|
||||
#endif
|
||||
#if defined(PNG_READ_iCCP_SUPPORTED)
|
||||
PNG_iCCP;
|
||||
PNG_CONST PNG_iCCP;
|
||||
#endif
|
||||
#if defined(PNG_READ_iTXt_SUPPORTED)
|
||||
PNG_iTXt;
|
||||
PNG_CONST PNG_iTXt;
|
||||
#endif
|
||||
#if defined(PNG_READ_oFFs_SUPPORTED)
|
||||
PNG_oFFs;
|
||||
PNG_CONST PNG_oFFs;
|
||||
#endif
|
||||
#if defined(PNG_READ_pCAL_SUPPORTED)
|
||||
PNG_pCAL;
|
||||
PNG_CONST PNG_pCAL;
|
||||
#endif
|
||||
#if defined(PNG_READ_pHYs_SUPPORTED)
|
||||
PNG_pHYs;
|
||||
PNG_CONST PNG_pHYs;
|
||||
#endif
|
||||
#if defined(PNG_READ_sBIT_SUPPORTED)
|
||||
PNG_sBIT;
|
||||
PNG_CONST PNG_sBIT;
|
||||
#endif
|
||||
#if defined(PNG_READ_sCAL_SUPPORTED)
|
||||
PNG_sCAL;
|
||||
PNG_CONST PNG_sCAL;
|
||||
#endif
|
||||
#if defined(PNG_READ_sPLT_SUPPORTED)
|
||||
PNG_sPLT;
|
||||
PNG_CONST PNG_sPLT;
|
||||
#endif
|
||||
#if defined(PNG_READ_sRGB_SUPPORTED)
|
||||
PNG_sRGB;
|
||||
PNG_CONST PNG_sRGB;
|
||||
#endif
|
||||
#if defined(PNG_READ_tEXt_SUPPORTED)
|
||||
PNG_tEXt;
|
||||
PNG_CONST PNG_tEXt;
|
||||
#endif
|
||||
#if defined(PNG_READ_tIME_SUPPORTED)
|
||||
PNG_tIME;
|
||||
PNG_CONST PNG_tIME;
|
||||
#endif
|
||||
#if defined(PNG_READ_tRNS_SUPPORTED)
|
||||
PNG_tRNS;
|
||||
PNG_CONST PNG_tRNS;
|
||||
#endif
|
||||
#if defined(PNG_READ_zTXt_SUPPORTED)
|
||||
PNG_zTXt;
|
||||
PNG_CONST PNG_zTXt;
|
||||
#endif
|
||||
#endif /* PNG_USE_LOCAL_ARRAYS */
|
||||
|
||||
@@ -985,11 +1004,9 @@ png_read_end(png_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
|
||||
{
|
||||
if (length > 0 || png_ptr->mode & PNG_AFTER_IDAT)
|
||||
if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT))
|
||||
png_error(png_ptr, "Too many IDAT's found");
|
||||
}
|
||||
else
|
||||
png_ptr->mode |= PNG_AFTER_IDAT;
|
||||
png_handle_unknown(png_ptr, info_ptr, length);
|
||||
if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4))
|
||||
png_ptr->mode |= PNG_HAVE_PLTE;
|
||||
@@ -1000,7 +1017,7 @@ png_read_end(png_structp png_ptr, png_infop info_ptr)
|
||||
/* Zero length IDATs are legal after the last IDAT has been
|
||||
* read, but not after other chunks have been read.
|
||||
*/
|
||||
if (length > 0 || png_ptr->mode & PNG_AFTER_IDAT)
|
||||
if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT))
|
||||
png_error(png_ptr, "Too many IDAT's found");
|
||||
png_crc_finish(png_ptr, length);
|
||||
}
|
||||
@@ -1298,6 +1315,7 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr
|
||||
void PNGAPI
|
||||
png_set_read_status_fn(png_structp png_ptr, png_read_status_ptr read_row_fn)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->read_row_fn = read_row_fn;
|
||||
}
|
||||
|
||||
@@ -1311,6 +1329,7 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
|
||||
{
|
||||
int row;
|
||||
|
||||
if(png_ptr == NULL) return;
|
||||
#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED)
|
||||
/* invert the alpha channel from opacity to transparency
|
||||
*/
|
||||
@@ -1450,8 +1469,8 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
|
||||
/* read rest of file, and get additional chunks in info_ptr - REQUIRED */
|
||||
png_read_end(png_ptr, info_ptr);
|
||||
|
||||
if(transforms == 0 || params == NULL)
|
||||
/* quiet compiler warnings */ return;
|
||||
transforms = transforms; /* quiet compiler warnings */
|
||||
params = params;
|
||||
|
||||
}
|
||||
#endif /* PNG_INFO_IMAGE_SUPPORTED */
|
||||
|
||||
5
pngrio.c
5
pngrio.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrio.c - functions for data input
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.13 November 13, 2006
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -46,6 +46,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
{
|
||||
png_size_t check;
|
||||
|
||||
if(png_ptr == NULL) return;
|
||||
/* fread() returns 0 on error, so it is OK to store this in a png_size_t
|
||||
* instead of an int, which is what fread() actually returns.
|
||||
*/
|
||||
@@ -76,6 +77,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
png_byte *n_data;
|
||||
png_FILE_p io_ptr;
|
||||
|
||||
if(png_ptr == NULL) return;
|
||||
/* Check if data really is near. If so, use usual code. */
|
||||
n_data = (png_byte *)CVT_PTR_NOCHECK(data);
|
||||
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
|
||||
@@ -136,6 +138,7 @@ void PNGAPI
|
||||
png_set_read_fn(png_structp png_ptr, png_voidp io_ptr,
|
||||
png_rw_ptr read_data_fn)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->io_ptr = io_ptr;
|
||||
|
||||
#if !defined(PNG_NO_STDIO)
|
||||
|
||||
137
pngrtran.c
137
pngrtran.c
@@ -1,9 +1,9 @@
|
||||
|
||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.19 August 19, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 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.)
|
||||
*
|
||||
@@ -24,6 +24,7 @@ png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action)
|
||||
{
|
||||
png_debug(1, "in png_set_crc_action\n");
|
||||
/* Tell libpng how we react to CRC errors in critical chunks */
|
||||
if(png_ptr == NULL) return;
|
||||
switch (crit_action)
|
||||
{
|
||||
case PNG_CRC_NO_CHANGE: /* leave setting as is */
|
||||
@@ -80,6 +81,7 @@ png_set_background(png_structp png_ptr,
|
||||
int need_expand, double background_gamma)
|
||||
{
|
||||
png_debug(1, "in png_set_background\n");
|
||||
if(png_ptr == NULL) return;
|
||||
if (background_gamma_code == PNG_BACKGROUND_GAMMA_UNKNOWN)
|
||||
{
|
||||
png_warning(png_ptr, "Application must supply a known background gamma");
|
||||
@@ -92,17 +94,6 @@ png_set_background(png_structp png_ptr,
|
||||
png_ptr->background_gamma = (float)background_gamma;
|
||||
png_ptr->background_gamma_type = (png_byte)(background_gamma_code);
|
||||
png_ptr->transformations |= (need_expand ? PNG_BACKGROUND_EXPAND : 0);
|
||||
|
||||
/* Note: if need_expand is set and color_type is either RGB or RGB_ALPHA
|
||||
* (in which case need_expand is superfluous anyway), the background color
|
||||
* might actually be gray yet not be flagged as such. This is not a problem
|
||||
* for the current code, which uses PNG_BACKGROUND_IS_GRAY only to
|
||||
* decide when to do the png_do_gray_to_rgb() transformation.
|
||||
*/
|
||||
if ((need_expand && !(png_ptr->color_type & PNG_COLOR_MASK_COLOR)) ||
|
||||
(!need_expand && background_color->red == background_color->green &&
|
||||
background_color->red == background_color->blue))
|
||||
png_ptr->mode |= PNG_BACKGROUND_IS_GRAY;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -112,6 +103,7 @@ void PNGAPI
|
||||
png_set_strip_16(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_strip_16\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= PNG_16_TO_8;
|
||||
}
|
||||
#endif
|
||||
@@ -121,6 +113,7 @@ void PNGAPI
|
||||
png_set_strip_alpha(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_strip_alpha\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->flags |= PNG_FLAG_STRIP_ALPHA;
|
||||
}
|
||||
#endif
|
||||
@@ -150,6 +143,7 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
|
||||
int full_dither)
|
||||
{
|
||||
png_debug(1, "in png_set_dither\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= PNG_DITHER;
|
||||
|
||||
if (!full_dither)
|
||||
@@ -533,6 +527,7 @@ void PNGAPI
|
||||
png_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma)
|
||||
{
|
||||
png_debug(1, "in png_set_gamma\n");
|
||||
if(png_ptr == NULL) return;
|
||||
if ((fabs(scrn_gamma * file_gamma - 1.0) > PNG_GAMMA_THRESHOLD) ||
|
||||
(png_ptr->color_type & PNG_COLOR_MASK_ALPHA) ||
|
||||
(png_ptr->color_type == PNG_COLOR_TYPE_PALETTE))
|
||||
@@ -551,7 +546,11 @@ void PNGAPI
|
||||
png_set_expand(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_expand\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
|
||||
#ifdef PNG_WARN_UNINITIALIZED_ROW
|
||||
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* GRR 19990627: the following three functions currently are identical
|
||||
@@ -576,7 +575,11 @@ void PNGAPI
|
||||
png_set_palette_to_rgb(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_palette_to_rgb\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
|
||||
#ifdef PNG_WARN_UNINITIALIZED_ROW
|
||||
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !defined(PNG_1_0_X)
|
||||
@@ -585,7 +588,11 @@ void PNGAPI
|
||||
png_set_expand_gray_1_2_4_to_8(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_expand_gray_1_2_4_to_8\n");
|
||||
png_ptr->transformations |= PNG_EXPAND_tRNS;
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= PNG_EXPAND;
|
||||
#ifdef PNG_WARN_UNINITIALIZED_ROW
|
||||
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -596,6 +603,7 @@ void PNGAPI
|
||||
png_set_gray_1_2_4_to_8(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_gray_1_2_4_to_8\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
|
||||
}
|
||||
#endif
|
||||
@@ -605,8 +613,11 @@ png_set_gray_1_2_4_to_8(png_structp png_ptr)
|
||||
void PNGAPI
|
||||
png_set_tRNS_to_alpha(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_expand\n");
|
||||
png_debug(1, "in png_set_tRNS_to_alpha\n");
|
||||
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
|
||||
#ifdef PNG_WARN_UNINITIALIZED_ROW
|
||||
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
|
||||
#endif
|
||||
}
|
||||
#endif /* defined(PNG_READ_EXPAND_SUPPORTED) */
|
||||
|
||||
@@ -616,6 +627,9 @@ png_set_gray_to_rgb(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_gray_to_rgb\n");
|
||||
png_ptr->transformations |= PNG_GRAY_TO_RGB;
|
||||
#ifdef PNG_WARN_UNINITIALIZED_ROW
|
||||
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -631,6 +645,7 @@ png_set_rgb_to_gray(png_structp png_ptr, int error_action, double red,
|
||||
{
|
||||
int red_fixed = (int)((float)red*100000.0 + 0.5);
|
||||
int green_fixed = (int)((float)green*100000.0 + 0.5);
|
||||
if(png_ptr == NULL) return;
|
||||
png_set_rgb_to_gray_fixed(png_ptr, error_action, red_fixed, green_fixed);
|
||||
}
|
||||
#endif
|
||||
@@ -640,6 +655,7 @@ png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action,
|
||||
png_fixed_point red, png_fixed_point green)
|
||||
{
|
||||
png_debug(1, "in png_set_rgb_to_gray\n");
|
||||
if(png_ptr == NULL) return;
|
||||
switch(error_action)
|
||||
{
|
||||
case 1: png_ptr->transformations |= PNG_RGB_TO_GRAY;
|
||||
@@ -690,6 +706,7 @@ png_set_read_user_transform_fn(png_structp png_ptr, png_user_transform_ptr
|
||||
read_user_transform_fn)
|
||||
{
|
||||
png_debug(1, "in png_set_read_user_transform_fn\n");
|
||||
if(png_ptr == NULL) return;
|
||||
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
|
||||
png_ptr->transformations |= PNG_USER_TRANSFORM;
|
||||
png_ptr->read_user_transform_fn = read_user_transform_fn;
|
||||
@@ -719,6 +736,32 @@ png_init_read_transformations(png_structp png_ptr)
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_EXPAND_SUPPORTED) && defined(PNG_READ_BACKGROUND_SUPPORTED)
|
||||
|
||||
#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
|
||||
/* Detect gray background and attempt to enable optimization
|
||||
* for gray --> RGB case */
|
||||
/* Note: if PNG_BACKGROUND_EXPAND is set and color_type is either RGB or
|
||||
* RGB_ALPHA (in which case need_expand is superfluous anyway), the
|
||||
* background color might actually be gray yet not be flagged as such.
|
||||
* This is not a problem for the current code, which uses
|
||||
* PNG_BACKGROUND_IS_GRAY only to decide when to do the
|
||||
* png_do_gray_to_rgb() transformation.
|
||||
*/
|
||||
if ((png_ptr->transformations & PNG_BACKGROUND_EXPAND) &&
|
||||
!(color_type & PNG_COLOR_MASK_COLOR))
|
||||
{
|
||||
png_ptr->mode |= PNG_BACKGROUND_IS_GRAY;
|
||||
} else if ((png_ptr->transformations & PNG_BACKGROUND) &&
|
||||
!(png_ptr->transformations & PNG_BACKGROUND_EXPAND) &&
|
||||
(png_ptr->transformations & PNG_GRAY_TO_RGB) &&
|
||||
png_ptr->background.red == png_ptr->background.green &&
|
||||
png_ptr->background.red == png_ptr->background.blue)
|
||||
{
|
||||
png_ptr->mode |= PNG_BACKGROUND_IS_GRAY;
|
||||
png_ptr->background.gray = png_ptr->background.red;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((png_ptr->transformations & PNG_BACKGROUND_EXPAND) &&
|
||||
(png_ptr->transformations & PNG_EXPAND))
|
||||
{
|
||||
@@ -1216,19 +1259,29 @@ void /* PRIVATE */
|
||||
png_do_read_transformations(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_do_read_transformations\n");
|
||||
#if !defined(PNG_USELESS_TESTS_SUPPORTED)
|
||||
if (png_ptr->row_buf == NULL)
|
||||
{
|
||||
#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
|
||||
char msg[50];
|
||||
|
||||
sprintf(msg, "NULL row buffer for row %ld, pass %d", png_ptr->row_number,
|
||||
png_snprintf2(msg, 50,
|
||||
"NULL row buffer for row %ld, pass %d", png_ptr->row_number,
|
||||
png_ptr->pass);
|
||||
png_error(png_ptr, msg);
|
||||
#else
|
||||
png_error(png_ptr, "NULL row buffer");
|
||||
#endif
|
||||
}
|
||||
#ifdef PNG_WARN_UNINITIALIZED_ROW
|
||||
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
|
||||
/* Application has failed to call either png_read_start_image()
|
||||
* or png_read_update_info() after setting transforms that expand
|
||||
* pixels. This check added to libpng-1.2.19 */
|
||||
#if (PNG_WARN_UNINITIALIZED_ROW==1)
|
||||
png_error(png_ptr, "Uninitialized row");
|
||||
#else
|
||||
png_warning(png_ptr, "Uninitialized row");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_EXPAND_SUPPORTED)
|
||||
@@ -1241,7 +1294,8 @@ png_do_read_transformations(png_structp png_ptr)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (png_ptr->num_trans && (png_ptr->transformations & PNG_EXPAND_tRNS))
|
||||
if (png_ptr->num_trans &&
|
||||
(png_ptr->transformations & PNG_EXPAND_tRNS))
|
||||
png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1,
|
||||
&(png_ptr->trans_values));
|
||||
else
|
||||
@@ -1265,9 +1319,11 @@ png_do_read_transformations(png_structp png_ptr)
|
||||
if(rgb_error)
|
||||
{
|
||||
png_ptr->rgb_to_gray_status=1;
|
||||
if(png_ptr->transformations == PNG_RGB_TO_GRAY_WARN)
|
||||
if((png_ptr->transformations & PNG_RGB_TO_GRAY) ==
|
||||
PNG_RGB_TO_GRAY_WARN)
|
||||
png_warning(png_ptr, "png_do_rgb_to_gray found nongray pixel");
|
||||
if(png_ptr->transformations == PNG_RGB_TO_GRAY_ERR)
|
||||
if((png_ptr->transformations & PNG_RGB_TO_GRAY) ==
|
||||
PNG_RGB_TO_GRAY_ERR)
|
||||
png_error(png_ptr, "png_do_rgb_to_gray found nongray pixel");
|
||||
}
|
||||
}
|
||||
@@ -3671,7 +3727,7 @@ png_do_expand(png_row_infop row_info, png_bytep row,
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
gray = (png_uint_16)(gray*0xff);
|
||||
gray = (png_uint_16)((gray&0x01)*0xff);
|
||||
sp = row + (png_size_t)((row_width - 1) >> 3);
|
||||
dp = row + (png_size_t)row_width - 1;
|
||||
shift = 7 - (int)((row_width + 7) & 0x07);
|
||||
@@ -3695,7 +3751,7 @@ png_do_expand(png_row_infop row_info, png_bytep row,
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
gray = (png_uint_16)(gray*0x55);
|
||||
gray = (png_uint_16)((gray&0x03)*0x55);
|
||||
sp = row + (png_size_t)((row_width - 1) >> 2);
|
||||
dp = row + (png_size_t)row_width - 1;
|
||||
shift = (int)((3 - ((row_width + 3) & 0x03)) << 1);
|
||||
@@ -3718,7 +3774,7 @@ png_do_expand(png_row_infop row_info, png_bytep row,
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
gray = (png_uint_16)(gray*0x11);
|
||||
gray = (png_uint_16)((gray&0x0f)*0x11);
|
||||
sp = row + (png_size_t)((row_width - 1) >> 1);
|
||||
dp = row + (png_size_t)row_width - 1;
|
||||
shift = (int)((1 - ((row_width + 1) & 0x01)) << 2);
|
||||
@@ -3748,6 +3804,7 @@ png_do_expand(png_row_infop row_info, png_bytep row,
|
||||
{
|
||||
if (row_info->bit_depth == 8)
|
||||
{
|
||||
gray = gray & 0xff;
|
||||
sp = row + (png_size_t)row_width - 1;
|
||||
dp = row + (png_size_t)(row_width << 1) - 1;
|
||||
for (i = 0; i < row_width; i++)
|
||||
@@ -3761,12 +3818,13 @@ png_do_expand(png_row_infop row_info, png_bytep row,
|
||||
}
|
||||
else if (row_info->bit_depth == 16)
|
||||
{
|
||||
png_byte gray_high = (gray >> 8) & 0xff;
|
||||
png_byte gray_low = gray & 0xff;
|
||||
sp = row + row_info->rowbytes - 1;
|
||||
dp = row + (row_info->rowbytes << 1) - 1;
|
||||
for (i = 0; i < row_width; i++)
|
||||
{
|
||||
if (((png_uint_16)*(sp) |
|
||||
((png_uint_16)*(sp - 1) << 8)) == gray)
|
||||
if (*(sp-1) == gray_high && *(sp) == gray_low)
|
||||
{
|
||||
*dp-- = 0;
|
||||
*dp-- = 0;
|
||||
@@ -3791,13 +3849,14 @@ png_do_expand(png_row_infop row_info, png_bytep row,
|
||||
{
|
||||
if (row_info->bit_depth == 8)
|
||||
{
|
||||
png_byte red = trans_value->red & 0xff;
|
||||
png_byte green = trans_value->green & 0xff;
|
||||
png_byte blue = trans_value->blue & 0xff;
|
||||
sp = row + (png_size_t)row_info->rowbytes - 1;
|
||||
dp = row + (png_size_t)(row_width << 2) - 1;
|
||||
for (i = 0; i < row_width; i++)
|
||||
{
|
||||
if (*(sp - 2) == trans_value->red &&
|
||||
*(sp - 1) == trans_value->green &&
|
||||
*(sp - 0) == trans_value->blue)
|
||||
if (*(sp - 2) == red && *(sp - 1) == green && *(sp) == blue)
|
||||
*dp-- = 0;
|
||||
else
|
||||
*dp-- = 0xff;
|
||||
@@ -3808,16 +3867,22 @@ png_do_expand(png_row_infop row_info, png_bytep row,
|
||||
}
|
||||
else if (row_info->bit_depth == 16)
|
||||
{
|
||||
png_byte red_high = (trans_value->red > 8) & 0xff;
|
||||
png_byte green_high = (trans_value->green > 8) & 0xff;
|
||||
png_byte blue_high = (trans_value->blue > 8) & 0xff;
|
||||
png_byte red_low = trans_value->red & 0xff;
|
||||
png_byte green_low = trans_value->green & 0xff;
|
||||
png_byte blue_low = trans_value->blue & 0xff;
|
||||
sp = row + row_info->rowbytes - 1;
|
||||
dp = row + (png_size_t)(row_width << 3) - 1;
|
||||
for (i = 0; i < row_width; i++)
|
||||
{
|
||||
if ((((png_uint_16)*(sp - 4) |
|
||||
((png_uint_16)*(sp - 5) << 8)) == trans_value->red) &&
|
||||
(((png_uint_16)*(sp - 2) |
|
||||
((png_uint_16)*(sp - 3) << 8)) == trans_value->green) &&
|
||||
(((png_uint_16)*(sp - 0) |
|
||||
((png_uint_16)*(sp - 1) << 8)) == trans_value->blue))
|
||||
if (*(sp - 5) == red_high &&
|
||||
*(sp - 4) == red_low &&
|
||||
*(sp - 3) == green_high &&
|
||||
*(sp - 2) == green_low &&
|
||||
*(sp - 1) == blue_high &&
|
||||
*(sp ) == blue_low)
|
||||
{
|
||||
*dp-- = 0;
|
||||
*dp-- = 0;
|
||||
@@ -3937,8 +4002,8 @@ png_do_dither(png_row_infop row_info, png_bytep row,
|
||||
|
||||
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
#if defined(PNG_READ_GAMMA_SUPPORTED)
|
||||
static int png_gamma_shift[] =
|
||||
{0x10, 0x21, 0x42, 0x84, 0x110, 0x248, 0x550, 0xff0};
|
||||
static PNG_CONST int png_gamma_shift[] =
|
||||
{0x10, 0x21, 0x42, 0x84, 0x110, 0x248, 0x550, 0xff0, 0x00};
|
||||
|
||||
/* We build the 8- or 16-bit gamma tables here. Note that for 16-bit
|
||||
* tables, we don't make a full table if we are reducing to 8-bit in
|
||||
|
||||
1209
pngrutil.c
1209
pngrutil.c
File diff suppressed because it is too large
Load Diff
63
pngset.c
63
pngset.c
@@ -1,9 +1,9 @@
|
||||
|
||||
/* pngset.c - storage of image information into info struct
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.17 May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 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.)
|
||||
*
|
||||
@@ -353,7 +353,7 @@ png_set_IHDR(png_structp png_ptr, png_infop info_ptr,
|
||||
info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth);
|
||||
|
||||
/* check for potential overflow */
|
||||
if ( width > (PNG_UINT_32_MAX
|
||||
if (width > (PNG_UINT_32_MAX
|
||||
>> 3) /* 8-byte RGBA pixels */
|
||||
- 64 /* bigrowbuf hack */
|
||||
- 1 /* filter byte */
|
||||
@@ -484,7 +484,8 @@ png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr,
|
||||
info_ptr->scal_s_width = (png_charp)png_malloc_warn(png_ptr, length);
|
||||
if (info_ptr->scal_s_width == NULL)
|
||||
{
|
||||
png_warning(png_ptr, "Memory allocation failed while processing sCAL.");
|
||||
png_warning(png_ptr,
|
||||
"Memory allocation failed while processing sCAL.");
|
||||
}
|
||||
png_memcpy(info_ptr->scal_s_width, swidth, (png_size_t)length);
|
||||
|
||||
@@ -494,7 +495,8 @@ png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr,
|
||||
if (info_ptr->scal_s_height == NULL)
|
||||
{
|
||||
png_free (png_ptr, info_ptr->scal_s_width);
|
||||
png_warning(png_ptr, "Memory allocation failed while processing sCAL.");
|
||||
png_warning(png_ptr,
|
||||
"Memory allocation failed while processing sCAL.");
|
||||
}
|
||||
png_memcpy(info_ptr->scal_s_height, sheight, (png_size_t)length);
|
||||
|
||||
@@ -688,7 +690,7 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr,
|
||||
png_warning(png_ptr, "Insufficient memory to process iCCP chunk.");
|
||||
return;
|
||||
}
|
||||
png_strcpy(new_iccp_name, name);
|
||||
png_strncpy(new_iccp_name, name, png_sizeof(new_iccp_name));
|
||||
new_iccp_profile = (png_charp)png_malloc_warn(png_ptr, proflen);
|
||||
if (new_iccp_profile == NULL)
|
||||
{
|
||||
@@ -877,7 +879,6 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
|
||||
textp->itxt_length = 0;
|
||||
#endif
|
||||
}
|
||||
info_ptr->text[info_ptr->num_text]= *textp;
|
||||
info_ptr->num_text++;
|
||||
png_debug1(3, "transferred text chunk %d\n", info_ptr->num_text);
|
||||
}
|
||||
@@ -971,15 +972,27 @@ png_set_sPLT(png_structp png_ptr,
|
||||
png_sPLT_tp to = np + info_ptr->splt_palettes_num + i;
|
||||
png_sPLT_tp from = entries + i;
|
||||
|
||||
to->name = (png_charp)png_malloc(png_ptr,
|
||||
png_strlen(from->name) + 1);
|
||||
to->name = (png_charp)png_malloc_warn(png_ptr,
|
||||
png_strlen(from->name) + 1);
|
||||
if (to->name == NULL)
|
||||
{
|
||||
png_warning(png_ptr,
|
||||
"Out of memory while processing sPLT chunk");
|
||||
}
|
||||
/* TODO: use png_malloc_warn */
|
||||
png_strcpy(to->name, from->name);
|
||||
to->entries = (png_sPLT_entryp)png_malloc(png_ptr,
|
||||
from->nentries * png_sizeof(png_sPLT_t));
|
||||
png_strncpy(to->name, from->name, png_strlen(from->name));
|
||||
to->entries = (png_sPLT_entryp)png_malloc_warn(png_ptr,
|
||||
from->nentries * png_sizeof(png_sPLT_entry));
|
||||
/* TODO: use png_malloc_warn */
|
||||
png_memcpy(to->entries, from->entries,
|
||||
from->nentries * png_sizeof(png_sPLT_t));
|
||||
from->nentries * png_sizeof(png_sPLT_entry));
|
||||
if (to->entries == NULL)
|
||||
{
|
||||
png_warning(png_ptr,
|
||||
"Out of memory while processing sPLT chunk");
|
||||
png_free(png_ptr,to->name);
|
||||
to->name = NULL;
|
||||
}
|
||||
to->nentries = from->nentries;
|
||||
to->depth = from->depth;
|
||||
}
|
||||
@@ -1009,7 +1022,8 @@ png_set_unknown_chunks(png_structp png_ptr,
|
||||
png_sizeof(png_unknown_chunk));
|
||||
if (np == NULL)
|
||||
{
|
||||
png_warning(png_ptr, "Out of memory while processing unknown chunk.");
|
||||
png_warning(png_ptr,
|
||||
"Out of memory while processing unknown chunk.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1027,7 +1041,8 @@ png_set_unknown_chunks(png_structp png_ptr,
|
||||
to->data = (png_bytep)png_malloc_warn(png_ptr, from->size);
|
||||
if (to->data == NULL)
|
||||
{
|
||||
png_warning(png_ptr, "Out of memory processing unknown chunk.");
|
||||
png_warning(png_ptr,
|
||||
"Out of memory while processing unknown chunk.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1191,20 +1206,22 @@ png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask)
|
||||
void PNGAPI
|
||||
png_set_asm_flags (png_structp png_ptr, png_uint_32 asm_flags)
|
||||
{
|
||||
#ifdef PNG_MMX_CODE_SUPPORTED
|
||||
png_uint_32 settable_asm_flags;
|
||||
png_uint_32 settable_mmx_flags;
|
||||
|
||||
#endif
|
||||
if (png_ptr == NULL)
|
||||
return;
|
||||
#ifdef PNG_MMX_CODE_SUPPORTED
|
||||
|
||||
settable_mmx_flags =
|
||||
#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW
|
||||
#ifdef PNG_HAVE_MMX_COMBINE_ROW
|
||||
PNG_ASM_FLAG_MMX_READ_COMBINE_ROW |
|
||||
#endif
|
||||
#ifdef PNG_HAVE_ASSEMBLER_READ_INTERLACE
|
||||
#ifdef PNG_HAVE_MMX_READ_INTERLACE
|
||||
PNG_ASM_FLAG_MMX_READ_INTERLACE |
|
||||
#endif
|
||||
#ifdef PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
|
||||
#ifdef PNG_HAVE_MMX_READ_FILTER_ROW
|
||||
PNG_ASM_FLAG_MMX_READ_FILTER_SUB |
|
||||
PNG_ASM_FLAG_MMX_READ_FILTER_UP |
|
||||
PNG_ASM_FLAG_MMX_READ_FILTER_AVG |
|
||||
@@ -1224,15 +1241,14 @@ png_set_asm_flags (png_structp png_ptr, png_uint_32 asm_flags)
|
||||
}
|
||||
|
||||
/* we're replacing the settable bits with those passed in by the user,
|
||||
* so first zero them out of the master copy, then logical-OR in the
|
||||
* so first zero them out of the master copy, then bitwise-OR in the
|
||||
* allowed subset that was requested */
|
||||
|
||||
png_ptr->asm_flags &= ~settable_asm_flags; /* zero them */
|
||||
png_ptr->asm_flags |= (asm_flags & settable_asm_flags); /* set them */
|
||||
#endif /* ?PNG_MMX_CODE_SUPPORTED */
|
||||
}
|
||||
#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
|
||||
|
||||
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
|
||||
/* this function was added to libpng 1.2.0 */
|
||||
void PNGAPI
|
||||
png_set_mmx_thresholds (png_structp png_ptr,
|
||||
@@ -1241,8 +1257,10 @@ png_set_mmx_thresholds (png_structp png_ptr,
|
||||
{
|
||||
if (png_ptr == NULL)
|
||||
return;
|
||||
#ifdef PNG_MMX_CODE_SUPPORTED
|
||||
png_ptr->mmx_bitdepth_threshold = mmx_bitdepth_threshold;
|
||||
png_ptr->mmx_rowbytes_threshold = mmx_rowbytes_threshold;
|
||||
#endif /* ?PNG_MMX_CODE_SUPPORTED */
|
||||
}
|
||||
#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
|
||||
|
||||
@@ -1256,6 +1274,7 @@ png_set_user_limits (png_structp png_ptr, png_uint_32 user_width_max,
|
||||
* rejected by png_set_IHDR(). To accept any PNG datastream
|
||||
* regardless of dimensions, set both limits to 0x7ffffffL.
|
||||
*/
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->user_width_max = user_width_max;
|
||||
png_ptr->user_height_max = user_height_max;
|
||||
}
|
||||
|
||||
65
pngtest.c
65
pngtest.c
@@ -81,18 +81,6 @@ static float t_start, t_stop, t_decode, t_encode, t_misc;
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */
|
||||
#ifndef png_jmpbuf
|
||||
# define png_jmpbuf(png_ptr) png_ptr->jmpbuf
|
||||
#endif
|
||||
|
||||
#ifdef PNGTEST_TIMING
|
||||
static float t_start, t_stop, t_decode, t_encode, t_misc;
|
||||
#if !defined(PNG_tIME_SUPPORTED)
|
||||
#include <time.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(PNG_TIME_RFC1123_SUPPORTED)
|
||||
static int tIME_chunk_present=0;
|
||||
static char tIME_string[30] = "no tIME chunk present in file";
|
||||
@@ -115,6 +103,16 @@ static int status_pass=1;
|
||||
static int status_dots_requested=0;
|
||||
static int status_dots=1;
|
||||
|
||||
/* In case a system header (e.g., on AIX) defined jmpbuf */
|
||||
#ifdef jmpbuf
|
||||
# undef jmpbuf
|
||||
#endif
|
||||
|
||||
/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */
|
||||
#ifndef png_jmpbuf
|
||||
# define png_jmpbuf(png_ptr) png_ptr->jmpbuf
|
||||
#endif
|
||||
|
||||
void
|
||||
#ifdef PNG_1_0_X
|
||||
PNGAPI
|
||||
@@ -436,8 +434,9 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
png_error(png_ptr, "Write Error");
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* USE_FAR_KEYWORD */
|
||||
#endif /* PNG_NO_STDIO */
|
||||
/* END of code to validate stdio-free compilation */
|
||||
|
||||
/* This function is called when there is a warning, but the library thinks
|
||||
* it can continue anyway. Replacement functions don't have to do anything
|
||||
@@ -465,8 +464,6 @@ pngtest_error(png_structp png_ptr, png_const_charp message)
|
||||
/* We can return because png_error calls the default handler, which is
|
||||
* actually OK in this case. */
|
||||
}
|
||||
#endif /* PNG_NO_STDIO */
|
||||
/* END of code to validate stdio-free compilation */
|
||||
|
||||
/* START of code to validate memory allocation and deallocation */
|
||||
#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG
|
||||
@@ -536,7 +533,8 @@ png_debug_malloc(png_structp png_ptr, png_uint_32 size)
|
||||
/* Make sure the caller isn't assuming zeroed memory. */
|
||||
png_memset(pinfo->pointer, 0xdd, pinfo->size);
|
||||
if(verbose)
|
||||
printf("png_malloc %lu bytes at %x\n",size,pinfo->pointer);
|
||||
printf("png_malloc %lu bytes at %x\n",(unsigned long)size,
|
||||
pinfo->pointer);
|
||||
return (png_voidp)(pinfo->pointer);
|
||||
}
|
||||
}
|
||||
@@ -659,10 +657,8 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
||||
read_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, png_voidp_NULL,
|
||||
png_error_ptr_NULL, png_error_ptr_NULL);
|
||||
#endif
|
||||
#if defined(PNG_NO_STDIO)
|
||||
png_set_error_fn(read_ptr, (png_voidp)inname, pngtest_error,
|
||||
pngtest_warning);
|
||||
#endif
|
||||
#ifdef PNG_WRITE_SUPPORTED
|
||||
#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG
|
||||
write_ptr = png_create_write_struct_2(PNG_LIBPNG_VER_STRING, png_voidp_NULL,
|
||||
@@ -672,10 +668,8 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
||||
write_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, png_voidp_NULL,
|
||||
png_error_ptr_NULL, png_error_ptr_NULL);
|
||||
#endif
|
||||
#if defined(PNG_NO_STDIO)
|
||||
png_set_error_fn(write_ptr, (png_voidp)inname, pngtest_error,
|
||||
pngtest_warning);
|
||||
#endif
|
||||
#endif
|
||||
png_debug(0, "Allocating read_info, write_info and end_info structures\n");
|
||||
read_info_ptr = png_create_info_struct(read_ptr);
|
||||
@@ -1008,10 +1002,11 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
||||
{
|
||||
png_set_tIME(write_ptr, write_info_ptr, mod_time);
|
||||
#if defined(PNG_TIME_RFC1123_SUPPORTED)
|
||||
/* we have to use png_strcpy instead of "=" because the string
|
||||
/* we have to use png_strncpy instead of "=" because the string
|
||||
pointed to by png_convert_to_rfc1123() gets free'ed before
|
||||
we use it */
|
||||
png_strcpy(tIME_string,png_convert_to_rfc1123(read_ptr, mod_time));
|
||||
png_strncpy(tIME_string,png_convert_to_rfc1123(read_ptr,
|
||||
mod_time),30);
|
||||
tIME_chunk_present++;
|
||||
#endif /* PNG_TIME_RFC1123_SUPPORTED */
|
||||
}
|
||||
@@ -1148,10 +1143,11 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
||||
{
|
||||
png_set_tIME(write_ptr, write_end_info_ptr, mod_time);
|
||||
#if defined(PNG_TIME_RFC1123_SUPPORTED)
|
||||
/* we have to use png_strcpy instead of "=" because the string
|
||||
/* we have to use png_strncpy instead of "=" because the string
|
||||
pointed to by png_convert_to_rfc1123() gets free'ed before
|
||||
we use it */
|
||||
png_strcpy(tIME_string,png_convert_to_rfc1123(read_ptr, mod_time));
|
||||
png_strncpy(tIME_string,png_convert_to_rfc1123(read_ptr,
|
||||
mod_time),30);
|
||||
tIME_chunk_present++;
|
||||
#endif /* PNG_TIME_RFC1123_SUPPORTED */
|
||||
}
|
||||
@@ -1188,7 +1184,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
||||
iwidth = png_get_image_width(write_ptr, write_info_ptr);
|
||||
iheight = png_get_image_height(write_ptr, write_info_ptr);
|
||||
fprintf(STDERR, "Image width = %lu, height = %lu\n",
|
||||
iwidth, iheight);
|
||||
(unsigned long)iwidth, (unsigned long)iheight);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1312,7 +1308,8 @@ main(int argc, char *argv[])
|
||||
fprintf(STDERR, " with zlib version %s\n", ZLIB_VERSION);
|
||||
fprintf(STDERR,"%s",png_get_copyright(NULL));
|
||||
/* Show the version of libpng used in building the library */
|
||||
fprintf(STDERR," library (%lu):%s", png_access_version_number(),
|
||||
fprintf(STDERR," library (%lu):%s",
|
||||
(unsigned long)png_access_version_number(),
|
||||
png_get_header_version(NULL));
|
||||
/* Show the version of libpng used in building the application */
|
||||
fprintf(STDERR," pngtest (%lu):%s", (unsigned long)PNG_LIBPNG_VER,
|
||||
@@ -1400,7 +1397,8 @@ main(int argc, char *argv[])
|
||||
if (kerror == 0)
|
||||
{
|
||||
#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
||||
fprintf(STDERR, "\n PASS (%lu zero samples)\n",zero_samples);
|
||||
fprintf(STDERR, "\n PASS (%lu zero samples)\n",
|
||||
(unsigned long)zero_samples);
|
||||
#else
|
||||
fprintf(STDERR, " PASS\n");
|
||||
#endif
|
||||
@@ -1408,7 +1406,7 @@ main(int argc, char *argv[])
|
||||
for (k=0; k<256; k++)
|
||||
if(filters_used[k])
|
||||
fprintf(STDERR, " Filter %d was used %lu times\n",
|
||||
k,filters_used[k]);
|
||||
k,(unsigned long)filters_used[k]);
|
||||
#endif
|
||||
#if defined(PNG_TIME_RFC1123_SUPPORTED)
|
||||
if(tIME_chunk_present != 0)
|
||||
@@ -1433,7 +1431,7 @@ main(int argc, char *argv[])
|
||||
current_allocation);
|
||||
while (pinfo != NULL)
|
||||
{
|
||||
fprintf(STDERR, " %lu bytes at %x\n", pinfo->size,
|
||||
fprintf(STDERR, " %lu bytes at %x\n", (unsigned long)pinfo->size,
|
||||
(unsigned int) pinfo->pointer);
|
||||
pinfo = pinfo->next;
|
||||
}
|
||||
@@ -1473,7 +1471,8 @@ main(int argc, char *argv[])
|
||||
int k;
|
||||
#endif
|
||||
#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
||||
fprintf(STDERR, "\n PASS (%lu zero samples)\n",zero_samples);
|
||||
fprintf(STDERR, "\n PASS (%lu zero samples)\n",
|
||||
(unsigned long)zero_samples);
|
||||
#else
|
||||
fprintf(STDERR, " PASS\n");
|
||||
#endif
|
||||
@@ -1481,7 +1480,7 @@ main(int argc, char *argv[])
|
||||
for (k=0; k<256; k++)
|
||||
if(filters_used[k])
|
||||
fprintf(STDERR, " Filter %d was used %lu times\n",
|
||||
k,filters_used[k]);
|
||||
k,(unsigned long)filters_used[k]);
|
||||
#endif
|
||||
#if defined(PNG_TIME_RFC1123_SUPPORTED)
|
||||
if(tIME_chunk_present != 0)
|
||||
@@ -1509,7 +1508,7 @@ main(int argc, char *argv[])
|
||||
while (pinfo != NULL)
|
||||
{
|
||||
fprintf(STDERR," %lu bytes at %x\n",
|
||||
pinfo->size, (unsigned int)pinfo->pointer);
|
||||
(unsigned long)pinfo->size, (unsigned int)pinfo->pointer);
|
||||
pinfo = pinfo->next;
|
||||
}
|
||||
}
|
||||
@@ -1549,4 +1548,4 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef version_1_2_10rc1 your_png_h_is_not_version_1_2_10rc1;
|
||||
typedef version_1_2_20beta04 your_png_h_is_not_version_1_2_20beta04;
|
||||
|
||||
20
pngtrans.c
20
pngtrans.c
@@ -1,9 +1,9 @@
|
||||
|
||||
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.17 May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 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.)
|
||||
*/
|
||||
@@ -18,6 +18,7 @@ void PNGAPI
|
||||
png_set_bgr(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_bgr\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= PNG_BGR;
|
||||
}
|
||||
#endif
|
||||
@@ -28,6 +29,7 @@ void PNGAPI
|
||||
png_set_swap(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_swap\n");
|
||||
if(png_ptr == NULL) return;
|
||||
if (png_ptr->bit_depth == 16)
|
||||
png_ptr->transformations |= PNG_SWAP_BYTES;
|
||||
}
|
||||
@@ -39,6 +41,7 @@ void PNGAPI
|
||||
png_set_packing(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_packing\n");
|
||||
if(png_ptr == NULL) return;
|
||||
if (png_ptr->bit_depth < 8)
|
||||
{
|
||||
png_ptr->transformations |= PNG_PACK;
|
||||
@@ -53,6 +56,7 @@ void PNGAPI
|
||||
png_set_packswap(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_packswap\n");
|
||||
if(png_ptr == NULL) return;
|
||||
if (png_ptr->bit_depth < 8)
|
||||
png_ptr->transformations |= PNG_PACKSWAP;
|
||||
}
|
||||
@@ -63,6 +67,7 @@ void PNGAPI
|
||||
png_set_shift(png_structp png_ptr, png_color_8p true_bits)
|
||||
{
|
||||
png_debug(1, "in png_set_shift\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= PNG_SHIFT;
|
||||
png_ptr->shift = *true_bits;
|
||||
}
|
||||
@@ -74,7 +79,7 @@ int PNGAPI
|
||||
png_set_interlace_handling(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_interlace handling\n");
|
||||
if (png_ptr->interlaced)
|
||||
if (png_ptr && png_ptr->interlaced)
|
||||
{
|
||||
png_ptr->transformations |= PNG_INTERLACE;
|
||||
return (7);
|
||||
@@ -94,6 +99,7 @@ void PNGAPI
|
||||
png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc)
|
||||
{
|
||||
png_debug(1, "in png_set_filler\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= PNG_FILLER;
|
||||
png_ptr->filler = (png_byte)filler;
|
||||
if (filler_loc == PNG_FILLER_AFTER)
|
||||
@@ -126,6 +132,7 @@ void PNGAPI
|
||||
png_set_add_alpha(png_structp png_ptr, png_uint_32 filler, int filler_loc)
|
||||
{
|
||||
png_debug(1, "in png_set_add_alpha\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_set_filler(png_ptr, filler, filler_loc);
|
||||
png_ptr->transformations |= PNG_ADD_ALPHA;
|
||||
}
|
||||
@@ -139,6 +146,7 @@ void PNGAPI
|
||||
png_set_swap_alpha(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_swap_alpha\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= PNG_SWAP_ALPHA;
|
||||
}
|
||||
#endif
|
||||
@@ -149,6 +157,7 @@ void PNGAPI
|
||||
png_set_invert_alpha(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_invert_alpha\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= PNG_INVERT_ALPHA;
|
||||
}
|
||||
#endif
|
||||
@@ -158,6 +167,7 @@ void PNGAPI
|
||||
png_set_invert_mono(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_invert_mono\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= PNG_INVERT_MONO;
|
||||
}
|
||||
|
||||
@@ -621,6 +631,7 @@ png_set_user_transform_info(png_structp png_ptr, png_voidp
|
||||
user_transform_ptr, int user_transform_depth, int user_transform_channels)
|
||||
{
|
||||
png_debug(1, "in png_set_user_transform_info\n");
|
||||
if(png_ptr == NULL) return;
|
||||
#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
|
||||
png_ptr->user_transform_ptr = user_transform_ptr;
|
||||
png_ptr->user_transform_depth = (png_byte)user_transform_depth;
|
||||
@@ -642,10 +653,9 @@ png_voidp PNGAPI
|
||||
png_get_user_transform_ptr(png_structp png_ptr)
|
||||
{
|
||||
#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
|
||||
if (png_ptr == NULL) return (NULL);
|
||||
return ((png_voidp)png_ptr->user_transform_ptr);
|
||||
#else
|
||||
if(png_ptr)
|
||||
return (NULL);
|
||||
return (NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
10
pngwio.c
10
pngwio.c
@@ -1,9 +1,9 @@
|
||||
|
||||
/* pngwio.c - functions for data output
|
||||
*
|
||||
* Last changed in libpng 1.2.3 - May 21, 2002
|
||||
* Last changed in libpng 1.2.13 November 13, 2006
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2006 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.)
|
||||
*
|
||||
@@ -45,6 +45,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
{
|
||||
png_uint_32 check;
|
||||
|
||||
if(png_ptr == NULL) return;
|
||||
#if defined(_WIN32_WCE)
|
||||
if ( !WriteFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
|
||||
check = 0;
|
||||
@@ -70,6 +71,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
png_byte *near_data; /* Needs to be "png_byte *" instead of "png_bytep" */
|
||||
png_FILE_p io_ptr;
|
||||
|
||||
if(png_ptr == NULL) return;
|
||||
/* Check if data really is near. If so, use usual code. */
|
||||
near_data = (png_byte *)CVT_PTR_NOCHECK(data);
|
||||
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
|
||||
@@ -131,6 +133,9 @@ png_default_flush(png_structp png_ptr)
|
||||
{
|
||||
#if !defined(_WIN32_WCE)
|
||||
png_FILE_p io_ptr;
|
||||
#endif
|
||||
if(png_ptr == NULL) return;
|
||||
#if !defined(_WIN32_WCE)
|
||||
io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
|
||||
if (io_ptr != NULL)
|
||||
fflush(io_ptr);
|
||||
@@ -165,6 +170,7 @@ void PNGAPI
|
||||
png_set_write_fn(png_structp png_ptr, png_voidp io_ptr,
|
||||
png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->io_ptr = io_ptr;
|
||||
|
||||
#if !defined(PNG_NO_STDIO)
|
||||
|
||||
53
pngwrite.c
53
pngwrite.c
@@ -1,9 +1,9 @@
|
||||
|
||||
/* pngwrite.c - general routines to write a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.15 January 5, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 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.)
|
||||
*/
|
||||
@@ -391,11 +391,6 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
|
||||
|
||||
/* write end of PNG file */
|
||||
png_write_IEND(png_ptr);
|
||||
#if 0
|
||||
/* This flush, added in libpng-1.0.8, causes some applications to crash
|
||||
because they do not set png_ptr->output_flush_fn */
|
||||
png_flush(png_ptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(PNG_WRITE_tIME_SUPPORTED)
|
||||
@@ -461,8 +456,10 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
|
||||
|
||||
#if !defined(PNG_1_0_X)
|
||||
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
|
||||
#ifdef PNG_MMX_CODE_SUPPORTED
|
||||
png_init_mmx_flags(png_ptr); /* 1.2.0 addition */
|
||||
#endif
|
||||
#endif
|
||||
#endif /* PNG_1_0_X */
|
||||
|
||||
/* added at libpng-1.2.6 */
|
||||
@@ -515,11 +512,13 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
|
||||
char msg[80];
|
||||
if (user_png_ver)
|
||||
{
|
||||
sprintf(msg, "Application was compiled with png.h from libpng-%.20s",
|
||||
png_snprintf(msg, 80,
|
||||
"Application was compiled with png.h from libpng-%.20s",
|
||||
user_png_ver);
|
||||
png_warning(png_ptr, msg);
|
||||
}
|
||||
sprintf(msg, "Application is running with png.c from libpng-%.20s",
|
||||
png_snprintf(msg, 80,
|
||||
"Application is running with png.c from libpng-%.20s",
|
||||
png_libpng_ver);
|
||||
png_warning(png_ptr, msg);
|
||||
#endif
|
||||
@@ -576,6 +575,7 @@ png_write_init_2(png_structp png_ptr, png_const_charp user_png_ver,
|
||||
png_size_t png_struct_size, png_size_t png_info_size)
|
||||
{
|
||||
/* We only come here via pre-1.0.12-compiled applications */
|
||||
if(png_ptr == NULL) return;
|
||||
#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
|
||||
if(png_sizeof(png_struct) > png_struct_size ||
|
||||
png_sizeof(png_info) > png_info_size)
|
||||
@@ -584,11 +584,13 @@ png_write_init_2(png_structp png_ptr, png_const_charp user_png_ver,
|
||||
png_ptr->warning_fn=NULL;
|
||||
if (user_png_ver)
|
||||
{
|
||||
sprintf(msg, "Application was compiled with png.h from libpng-%.20s",
|
||||
png_snprintf(msg, 80,
|
||||
"Application was compiled with png.h from libpng-%.20s",
|
||||
user_png_ver);
|
||||
png_warning(png_ptr, msg);
|
||||
}
|
||||
sprintf(msg, "Application is running with png.c from libpng-%.20s",
|
||||
png_snprintf(msg, 80,
|
||||
"Application is running with png.c from libpng-%.20s",
|
||||
png_libpng_ver);
|
||||
png_warning(png_ptr, msg);
|
||||
}
|
||||
@@ -670,8 +672,10 @@ png_write_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
|
||||
|
||||
#if !defined(PNG_1_0_X)
|
||||
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
|
||||
#ifdef PNG_MMX_CODE_SUPPORTED
|
||||
png_init_mmx_flags(png_ptr); /* 1.2.0 addition */
|
||||
#endif
|
||||
#endif
|
||||
#endif /* PNG_1_0_X */
|
||||
|
||||
#ifdef PNG_SETJMP_SUPPORTED
|
||||
@@ -1132,15 +1136,26 @@ png_set_filter(png_structp png_ptr, int method, int filters)
|
||||
{
|
||||
switch (filters & (PNG_ALL_FILTERS | 0x07))
|
||||
{
|
||||
#ifndef PNG_NO_WRITE_FILTER
|
||||
case 5:
|
||||
case 6:
|
||||
case 7: png_warning(png_ptr, "Unknown row filter for method 0");
|
||||
case PNG_FILTER_VALUE_NONE: png_ptr->do_filter=PNG_FILTER_NONE; break;
|
||||
case PNG_FILTER_VALUE_SUB: png_ptr->do_filter=PNG_FILTER_SUB; break;
|
||||
case PNG_FILTER_VALUE_UP: png_ptr->do_filter=PNG_FILTER_UP; break;
|
||||
case PNG_FILTER_VALUE_AVG: png_ptr->do_filter=PNG_FILTER_AVG; break;
|
||||
case PNG_FILTER_VALUE_PAETH: png_ptr->do_filter=PNG_FILTER_PAETH;break;
|
||||
#endif /* PNG_NO_WRITE_FILTER */
|
||||
case PNG_FILTER_VALUE_NONE:
|
||||
png_ptr->do_filter=PNG_FILTER_NONE; break;
|
||||
#ifndef PNG_NO_WRITE_FILTER
|
||||
case PNG_FILTER_VALUE_SUB:
|
||||
png_ptr->do_filter=PNG_FILTER_SUB; break;
|
||||
case PNG_FILTER_VALUE_UP:
|
||||
png_ptr->do_filter=PNG_FILTER_UP; break;
|
||||
case PNG_FILTER_VALUE_AVG:
|
||||
png_ptr->do_filter=PNG_FILTER_AVG; break;
|
||||
case PNG_FILTER_VALUE_PAETH:
|
||||
png_ptr->do_filter=PNG_FILTER_PAETH; break;
|
||||
default: png_ptr->do_filter = (png_byte)filters; break;
|
||||
#else
|
||||
default: png_warning(png_ptr, "Unknown row filter for method 0");
|
||||
#endif /* PNG_NO_WRITE_FILTER */
|
||||
}
|
||||
|
||||
/* If we have allocated the row_buf, this means we have already started
|
||||
@@ -1154,6 +1169,7 @@ png_set_filter(png_structp png_ptr, int method, int filters)
|
||||
*/
|
||||
if (png_ptr->row_buf != NULL)
|
||||
{
|
||||
#ifndef PNG_NO_WRITE_FILTER
|
||||
if ((png_ptr->do_filter & PNG_FILTER_SUB) && png_ptr->sub_row == NULL)
|
||||
{
|
||||
png_ptr->sub_row = (png_bytep)png_malloc(png_ptr,
|
||||
@@ -1208,6 +1224,7 @@ png_set_filter(png_structp png_ptr, int method, int filters)
|
||||
}
|
||||
|
||||
if (png_ptr->do_filter == PNG_NO_FILTERS)
|
||||
#endif /* PNG_NO_WRITE_FILTER */
|
||||
png_ptr->do_filter = PNG_FILTER_NONE;
|
||||
}
|
||||
}
|
||||
@@ -1506,8 +1523,8 @@ png_write_png(png_structp png_ptr, png_infop info_ptr,
|
||||
/* It is REQUIRED to call this to finish writing the rest of the file */
|
||||
png_write_end(png_ptr, info_ptr);
|
||||
|
||||
if(transforms == 0 || params == NULL)
|
||||
/* quiet compiler warnings */ return;
|
||||
transforms = transforms; /* quiet compiler warnings */
|
||||
params = params;
|
||||
}
|
||||
#endif
|
||||
#endif /* PNG_WRITE_SUPPORTED */
|
||||
|
||||
135
pngwutil.c
135
pngwutil.c
@@ -1,9 +1,9 @@
|
||||
|
||||
/* pngwutil.c - utilities to write a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.19 August 19, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 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.)
|
||||
*/
|
||||
@@ -62,6 +62,7 @@ void PNGAPI
|
||||
png_write_chunk(png_structp png_ptr, png_bytep chunk_name,
|
||||
png_bytep data, png_size_t length)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_write_chunk_start(png_ptr, chunk_name, (png_uint_32)length);
|
||||
png_write_chunk_data(png_ptr, data, length);
|
||||
png_write_chunk_end(png_ptr);
|
||||
@@ -77,6 +78,7 @@ png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name,
|
||||
{
|
||||
png_byte buf[4];
|
||||
png_debug2(0, "Writing %s chunk (%lu bytes)\n", chunk_name, length);
|
||||
if(png_ptr == NULL) return;
|
||||
|
||||
/* write the length */
|
||||
png_save_uint_32(buf, length);
|
||||
@@ -98,6 +100,7 @@ void PNGAPI
|
||||
png_write_chunk_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
{
|
||||
/* write the data, and run the CRC over it */
|
||||
if(png_ptr == NULL) return;
|
||||
if (data != NULL && length > 0)
|
||||
{
|
||||
png_calculate_crc(png_ptr, data, length);
|
||||
@@ -111,6 +114,8 @@ png_write_chunk_end(png_structp png_ptr)
|
||||
{
|
||||
png_byte buf[4];
|
||||
|
||||
if(png_ptr == NULL) return;
|
||||
|
||||
/* write the crc */
|
||||
png_save_uint_32(buf, png_ptr->crc);
|
||||
|
||||
@@ -177,7 +182,7 @@ png_text_compress(png_structp png_ptr,
|
||||
{
|
||||
#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
|
||||
char msg[50];
|
||||
sprintf(msg, "Unknown compression type %d", compression);
|
||||
png_snprintf(msg, 50, "Unknown compression type %d", compression);
|
||||
png_warning(png_ptr, msg);
|
||||
#else
|
||||
png_warning(png_ptr, "Unknown compression type");
|
||||
@@ -518,9 +523,10 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
|
||||
png_ptr->zlib_window_bits = 15;
|
||||
if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_METHOD))
|
||||
png_ptr->zlib_method = 8;
|
||||
deflateInit2(&png_ptr->zstream, png_ptr->zlib_level,
|
||||
if (deflateInit2(&png_ptr->zstream, png_ptr->zlib_level,
|
||||
png_ptr->zlib_method, png_ptr->zlib_window_bits,
|
||||
png_ptr->zlib_mem_level, png_ptr->zlib_strategy);
|
||||
png_ptr->zlib_mem_level, png_ptr->zlib_strategy) != Z_OK)
|
||||
png_error(png_ptr, "zlib failed to initialize compressor");
|
||||
png_ptr->zstream.next_out = png_ptr->zbuf;
|
||||
png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
|
||||
/* libpng is not interested in zstream.data_type */
|
||||
@@ -572,7 +578,7 @@ png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal)
|
||||
png_ptr->num_palette = (png_uint_16)num_pal;
|
||||
png_debug1(3, "num_palette = %d\n", png_ptr->num_palette);
|
||||
|
||||
png_write_chunk_start(png_ptr, (png_bytep)png_PLTE, num_pal * 3);
|
||||
png_write_chunk_start(png_ptr, png_PLTE, num_pal * 3);
|
||||
#ifndef PNG_NO_POINTER_INDEXING
|
||||
for (i = 0, pal_ptr = palette; i < num_pal; i++, pal_ptr++)
|
||||
{
|
||||
@@ -728,6 +734,7 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,
|
||||
png_size_t name_len;
|
||||
png_charp new_name;
|
||||
compression_state comp;
|
||||
int embedded_profile_len = 0;
|
||||
|
||||
png_debug(1, "in png_write_iCCP\n");
|
||||
|
||||
@@ -750,12 +757,33 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,
|
||||
if (profile == NULL)
|
||||
profile_len = 0;
|
||||
|
||||
if (profile_len > 3)
|
||||
embedded_profile_len =
|
||||
((*( (png_bytep)profile ))<<24) |
|
||||
((*( (png_bytep)profile+1))<<16) |
|
||||
((*( (png_bytep)profile+2))<< 8) |
|
||||
((*( (png_bytep)profile+3)) );
|
||||
|
||||
if (profile_len < embedded_profile_len)
|
||||
{
|
||||
png_warning(png_ptr,
|
||||
"Embedded profile length too large in iCCP chunk");
|
||||
return;
|
||||
}
|
||||
|
||||
if (profile_len > embedded_profile_len)
|
||||
{
|
||||
png_warning(png_ptr,
|
||||
"Truncating profile to actual length in iCCP chunk");
|
||||
profile_len = embedded_profile_len;
|
||||
}
|
||||
|
||||
if (profile_len)
|
||||
profile_len = png_text_compress(png_ptr, profile, (png_size_t)profile_len,
|
||||
PNG_COMPRESSION_TYPE_BASE, &comp);
|
||||
|
||||
/* make sure we include the NULL after the name and the compression type */
|
||||
png_write_chunk_start(png_ptr, (png_bytep)png_iCCP,
|
||||
png_write_chunk_start(png_ptr, png_iCCP,
|
||||
(png_uint_32)name_len+profile_len+2);
|
||||
new_name[name_len+1]=0x00;
|
||||
png_write_chunk_data(png_ptr, (png_bytep)new_name, name_len + 2);
|
||||
@@ -795,7 +823,7 @@ png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette)
|
||||
}
|
||||
|
||||
/* make sure we include the NULL after the name */
|
||||
png_write_chunk_start(png_ptr, (png_bytep)png_sPLT,
|
||||
png_write_chunk_start(png_ptr, png_sPLT,
|
||||
(png_uint_32)(name_len + 2 + palette_size));
|
||||
png_write_chunk_data(png_ptr, (png_bytep)new_name, name_len + 1);
|
||||
png_write_chunk_data(png_ptr, (png_bytep)&spalette->depth, 1);
|
||||
@@ -1152,7 +1180,7 @@ png_write_hIST(png_structp png_ptr, png_uint_16p hist, int num_hist)
|
||||
return;
|
||||
}
|
||||
|
||||
png_write_chunk_start(png_ptr, (png_bytep)png_hIST, (png_uint_32)(num_hist * 2));
|
||||
png_write_chunk_start(png_ptr, png_hIST, (png_uint_32)(num_hist * 2));
|
||||
for (i = 0; i < num_hist; i++)
|
||||
{
|
||||
png_save_uint_16(buf, hist[i]);
|
||||
@@ -1203,12 +1231,14 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key)
|
||||
/* Replace non-printing characters with a blank and print a warning */
|
||||
for (kp = key, dp = *new_key; *kp != '\0'; kp++, dp++)
|
||||
{
|
||||
if (*kp < 0x20 || (*kp > 0x7E && (png_byte)*kp < 0xA1))
|
||||
if ((png_byte)*kp < 0x20 ||
|
||||
((png_byte)*kp > 0x7E && (png_byte)*kp < 0xA1))
|
||||
{
|
||||
#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
|
||||
char msg[40];
|
||||
|
||||
sprintf(msg, "invalid keyword character 0x%02X", *kp);
|
||||
png_snprintf(msg, 40,
|
||||
"invalid keyword character 0x%02X", (png_byte)*kp);
|
||||
png_warning(png_ptr, msg);
|
||||
#else
|
||||
png_warning(png_ptr, "invalid character in keyword");
|
||||
@@ -1369,8 +1399,6 @@ png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text,
|
||||
|
||||
text_len = png_strlen(text);
|
||||
|
||||
png_free(png_ptr, new_key);
|
||||
|
||||
/* compute the compressed data; do it now for the length */
|
||||
text_len = png_text_compress(png_ptr, text, text_len, compression,
|
||||
&comp);
|
||||
@@ -1379,7 +1407,9 @@ png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text,
|
||||
png_write_chunk_start(png_ptr, (png_bytep)png_zTXt, (png_uint_32)
|
||||
(key_len+text_len+2));
|
||||
/* write key */
|
||||
png_write_chunk_data(png_ptr, (png_bytep)key, key_len + 1);
|
||||
png_write_chunk_data(png_ptr, (png_bytep)new_key, key_len + 1);
|
||||
png_free(png_ptr, new_key);
|
||||
|
||||
buf[0] = (png_byte)compression;
|
||||
/* write compression */
|
||||
png_write_chunk_data(png_ptr, (png_bytep)buf, (png_size_t)1);
|
||||
@@ -1499,10 +1529,9 @@ png_write_oFFs(png_structp png_ptr, png_int_32 x_offset, png_int_32 y_offset,
|
||||
png_save_int_32(buf + 4, y_offset);
|
||||
buf[8] = (png_byte)unit_type;
|
||||
|
||||
png_write_chunk(png_ptr, (png_bytep)png_oFFs, buf, (png_size_t)9);
|
||||
png_write_chunk(png_ptr, png_oFFs, buf, (png_size_t)9);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PNG_WRITE_pCAL_SUPPORTED)
|
||||
/* write the pCAL chunk (described in the PNG extensions document) */
|
||||
void /* PRIVATE */
|
||||
@@ -1541,7 +1570,7 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0,
|
||||
}
|
||||
|
||||
png_debug1(3, "pCAL total length = %d\n", (int)total_len);
|
||||
png_write_chunk_start(png_ptr, (png_bytep)png_pCAL, (png_uint_32)total_len);
|
||||
png_write_chunk_start(png_ptr, png_pCAL, (png_uint_32)total_len);
|
||||
png_write_chunk_data(png_ptr, (png_bytep)new_purpose, purpose_len);
|
||||
png_save_int_32(buf, X0);
|
||||
png_save_int_32(buf + 4, X1);
|
||||
@@ -1567,39 +1596,41 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0,
|
||||
/* write the sCAL chunk */
|
||||
#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)
|
||||
void /* PRIVATE */
|
||||
png_write_sCAL(png_structp png_ptr, int unit, double width,double height)
|
||||
png_write_sCAL(png_structp png_ptr, int unit, double width, double height)
|
||||
{
|
||||
#ifdef PNG_USE_LOCAL_ARRAYS
|
||||
PNG_sCAL;
|
||||
#endif
|
||||
char buf[64];
|
||||
png_size_t total_len;
|
||||
char wbuf[32], hbuf[32];
|
||||
png_byte bunit = (png_byte)unit;
|
||||
|
||||
png_debug(1, "in png_write_sCAL\n");
|
||||
|
||||
buf[0] = (char)unit;
|
||||
#if defined(_WIN32_WCE)
|
||||
/* sprintf() function is not supported on WindowsCE */
|
||||
{
|
||||
wchar_t wc_buf[32];
|
||||
size_t wc_len;
|
||||
swprintf(wc_buf, TEXT("%12.12e"), width);
|
||||
WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, wbuf, 32, NULL, NULL);
|
||||
wc_len = wcslen(wc_buf);
|
||||
WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, buf + 1, wc_len, NULL, NULL);
|
||||
total_len = wc_len + 2;
|
||||
swprintf(wc_buf, TEXT("%12.12e"), height);
|
||||
WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, hbuf, 32, NULL, NULL);
|
||||
wc_len = wcslen(wc_buf);
|
||||
WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, buf + total_len, wc_len,
|
||||
NULL, NULL);
|
||||
total_len += wc_len;
|
||||
}
|
||||
#else
|
||||
sprintf(wbuf, "%12.12e", width);
|
||||
sprintf(hbuf, "%12.12e", height);
|
||||
png_snprintf(buf + 1, 63, "%12.12e", width);
|
||||
total_len = 1 + png_strlen(buf + 1) + 1;
|
||||
png_snprintf(buf + total_len, 64-total_len, "%12.12e", height);
|
||||
total_len += png_strlen(buf + total_len);
|
||||
#endif
|
||||
total_len = 1 + png_strlen(wbuf)+1 + png_strlen(hbuf);
|
||||
|
||||
png_debug1(3, "sCAL total length = %d\n", (int)total_len);
|
||||
png_write_chunk_start(png_ptr, (png_bytep)png_sCAL, (png_uint_32)total_len);
|
||||
png_write_chunk_data(png_ptr, (png_bytep)&bunit, 1);
|
||||
png_write_chunk_data(png_ptr, (png_bytep)wbuf, png_strlen(wbuf)+1);
|
||||
png_write_chunk_data(png_ptr, (png_bytep)hbuf, png_strlen(hbuf));
|
||||
|
||||
png_write_chunk_end(png_ptr);
|
||||
png_debug1(3, "sCAL total length = %u\n", (unsigned int)total_len);
|
||||
png_write_chunk(png_ptr, png_sCAL, (png_bytep)buf, total_len);
|
||||
}
|
||||
#else
|
||||
#ifdef PNG_FIXED_POINT_SUPPORTED
|
||||
@@ -1610,23 +1641,26 @@ png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width,
|
||||
#ifdef PNG_USE_LOCAL_ARRAYS
|
||||
PNG_sCAL;
|
||||
#endif
|
||||
png_size_t total_len;
|
||||
char wbuf[32], hbuf[32];
|
||||
png_byte bunit = unit;
|
||||
png_byte buf[64];
|
||||
png_size_t wlen, hlen, total_len;
|
||||
|
||||
png_debug(1, "in png_write_sCAL_s\n");
|
||||
|
||||
png_strcpy(wbuf,(const char *)width);
|
||||
png_strcpy(hbuf,(const char *)height);
|
||||
total_len = 1 + png_strlen(wbuf)+1 + png_strlen(hbuf);
|
||||
wlen = png_strlen(width);
|
||||
hlen = png_strlen(height);
|
||||
total_len = wlen + hlen + 2;
|
||||
if (total_len > 64)
|
||||
{
|
||||
png_warning(png_ptr, "Can't write sCAL (buffer too small)");
|
||||
return;
|
||||
}
|
||||
|
||||
png_debug1(3, "sCAL total length = %d\n", total_len);
|
||||
png_write_chunk_start(png_ptr, (png_bytep)png_sCAL, (png_uint_32)total_len);
|
||||
png_write_chunk_data(png_ptr, (png_bytep)&bunit, 1);
|
||||
png_write_chunk_data(png_ptr, (png_bytep)wbuf, png_strlen(wbuf)+1);
|
||||
png_write_chunk_data(png_ptr, (png_bytep)hbuf, png_strlen(hbuf));
|
||||
buf[0] = (png_byte)unit;
|
||||
png_memcpy(buf + 1, width, wlen + 1); /* append the '\0' here */
|
||||
png_memcpy(buf + wlen + 2, height, hlen); /* do NOT append the '\0' here */
|
||||
|
||||
png_write_chunk_end(png_ptr);
|
||||
png_debug1(3, "sCAL total length = %u\n", (unsigned int)total_len);
|
||||
png_write_chunk(png_ptr, png_sCAL, buf, total_len);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -1652,7 +1686,7 @@ png_write_pHYs(png_structp png_ptr, png_uint_32 x_pixels_per_unit,
|
||||
png_save_uint_32(buf + 4, y_pixels_per_unit);
|
||||
buf[8] = (png_byte)unit_type;
|
||||
|
||||
png_write_chunk(png_ptr, (png_bytep)png_pHYs, buf, (png_size_t)9);
|
||||
png_write_chunk(png_ptr, png_pHYs, buf, (png_size_t)9);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1684,7 +1718,7 @@ png_write_tIME(png_structp png_ptr, png_timep mod_time)
|
||||
buf[5] = mod_time->minute;
|
||||
buf[6] = mod_time->second;
|
||||
|
||||
png_write_chunk(png_ptr, (png_bytep)png_tIME, buf, (png_size_t)7);
|
||||
png_write_chunk(png_ptr, png_tIME, buf, (png_size_t)7);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1718,6 +1752,7 @@ png_write_start_row(png_structp png_ptr)
|
||||
png_ptr->row_buf = (png_bytep)png_malloc(png_ptr, (png_uint_32)buf_size);
|
||||
png_ptr->row_buf[0] = PNG_FILTER_VALUE_NONE;
|
||||
|
||||
#ifndef PNG_NO_WRITE_FILTERING
|
||||
/* set up filtering buffer, if using this filter */
|
||||
if (png_ptr->do_filter & PNG_FILTER_SUB)
|
||||
{
|
||||
@@ -1735,7 +1770,7 @@ png_write_start_row(png_structp png_ptr)
|
||||
|
||||
if (png_ptr->do_filter & PNG_FILTER_UP)
|
||||
{
|
||||
png_ptr->up_row = (png_bytep )png_malloc(png_ptr,
|
||||
png_ptr->up_row = (png_bytep)png_malloc(png_ptr,
|
||||
(png_ptr->rowbytes + 1));
|
||||
png_ptr->up_row[0] = PNG_FILTER_VALUE_UP;
|
||||
}
|
||||
@@ -1749,10 +1784,11 @@ png_write_start_row(png_structp png_ptr)
|
||||
|
||||
if (png_ptr->do_filter & PNG_FILTER_PAETH)
|
||||
{
|
||||
png_ptr->paeth_row = (png_bytep )png_malloc(png_ptr,
|
||||
png_ptr->paeth_row = (png_bytep)png_malloc(png_ptr,
|
||||
(png_ptr->rowbytes + 1));
|
||||
png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH;
|
||||
}
|
||||
#endif /* PNG_NO_WRITE_FILTERING */
|
||||
}
|
||||
|
||||
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
|
||||
@@ -2088,6 +2124,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
|
||||
|
||||
prev_row = png_ptr->prev_row;
|
||||
best_row = row_buf = png_ptr->row_buf;
|
||||
#ifndef PNG_NO_WRITE_FILTER
|
||||
mins = PNG_MAXSUM;
|
||||
|
||||
/* The prediction method we use is to find which method provides the
|
||||
@@ -2662,7 +2699,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
|
||||
best_row = png_ptr->paeth_row;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* PNG_NO_WRITE_FILTER */
|
||||
/* Do the actual writing of the filtered row data from the chosen filter. */
|
||||
|
||||
png_write_filtered_row(png_ptr, best_row);
|
||||
|
||||
@@ -50,7 +50,7 @@ CFG=libpng - Win32 DLL Release
|
||||
CPP=cl.exe
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
||||
# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_BUILD_DLL" /D "PNG_NO_MMX_CODE" /D "ZLIB_DLL" /FD /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
MTL=midl.exe
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
@@ -81,7 +81,7 @@ LINK32=link.exe
|
||||
CPP=cl.exe
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D PNG_DEBUG=1 /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "PNG_NO_MMX_CODE" /D PNG_DEBUG=1 /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
MTL=midl.exe
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
@@ -210,7 +210,7 @@ PostBuild_Cmds=echo Deleting $(targetname) import library and export file (No
|
||||
CPP=cl.exe
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
||||
# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "PNG_NO_MMX_CODE" /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
RSC=rc.exe
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
@@ -237,7 +237,7 @@ LIB32=link.exe -lib
|
||||
CPP=cl.exe
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D PNG_DEBUG=1 /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "PNG_NO_MMX_CODE" /D PNG_DEBUG=1 /FD /GZ /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
RSC=rc.exe
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..;..\..\..\zlib"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;PNG_BUILD_DLL;ZLIB_DLL"
|
||||
PreprocessorDefinitions="WIN32;PNG_NO_MMX_CODE;NDEBUG;PNG_BUILD_DLL;ZLIB_DLL"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
@@ -66,7 +66,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..;..\..\..\zlib"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;PNG_DEBUG=1;PNG_BUILD_DLL;ZLIB_DLL"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;PNG_NO_MMX_CODE;PNG_DEBUG=1;PNG_BUILD_DLL;ZLIB_DLL"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="3"
|
||||
@@ -212,7 +212,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..;..\..\..\zlib"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;PNG_BUILD_DLL;ZLIB_DLL;PNGAPI=__stdcall;PNG_NO_MODULEDEF;PNG_LIBPNG_SPECIALBUILD"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;PNG_BUILD_DLL;ZLIB_DLL;PNGAPI=__stdcall;PNG_NO_MMX_CODE;PNG_NO_MODULEDEF;PNG_LIBPNG_SPECIALBUILD"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
@@ -260,7 +260,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..;..\..\..\zlib"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG"
|
||||
PreprocessorDefinitions="PNG_NO_MMX_CODE;WIN32;NDEBUG"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
@@ -301,7 +301,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..;..\..\..\zlib"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;PNG_DEBUG=1"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;PNG_NO_MMX_CODE;PNG_DEBUG=1"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="3"
|
||||
|
||||
217
scripts/CMakeLists.txt
Normal file
217
scripts/CMakeLists.txt
Normal file
@@ -0,0 +1,217 @@
|
||||
|
||||
project(PNG)
|
||||
|
||||
# Copyright (C) 2007 Glenn Randers-Pehrson
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
set(PNGLIB_MAJOR 1)
|
||||
set(PNGLIB_MINOR 2)
|
||||
set(PNGLIB_RELEASE 20)
|
||||
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
||||
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
|
||||
|
||||
# needed packages
|
||||
find_package(ZLIB REQUIRED)
|
||||
if(NOT WIN32)
|
||||
find_library(M_LIBRARY
|
||||
NAMES m
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
)
|
||||
if(NOT M_LIBRARY)
|
||||
message(STATUS
|
||||
"math library 'libm' not found - floating point support disabled")
|
||||
endif(NOT M_LIBRARY)
|
||||
else(NOT WIN32)
|
||||
# not needed on windows
|
||||
set(M_LIBRARY "")
|
||||
endif(NOT WIN32)
|
||||
|
||||
|
||||
# COMMAND LINE OPTIONS
|
||||
option(PNG_SHARED "Build shared lib" YES)
|
||||
option(PNG_STATIC "Build static lib" YES)
|
||||
if(MSVC)
|
||||
option(PNG_TESTS "Build pngtest" NO)
|
||||
else(MSVC)
|
||||
option(PNG_TESTS "Build pngtest" YES)
|
||||
endif(MSVC)
|
||||
option(PNG_NO_CONSOLE_IO "FIXME" YES)
|
||||
option(PNG_NO_STDIO "FIXME" YES)
|
||||
option(PNG_DEBUG "Build with debug output" YES)
|
||||
option(PNGARG "FIXME" YES)
|
||||
#TODO:
|
||||
# PNG_CONSOLE_IO_SUPPORTED
|
||||
|
||||
# maybe needs improving, but currently I don't know when we can enable what :)
|
||||
set(png_asm_tmp "OFF")
|
||||
if(NOT WIN32)
|
||||
find_program(uname_executable NAMES uname PATHS /bin /usr/bin /usr/local/bin)
|
||||
if(uname_executable)
|
||||
EXEC_PROGRAM(${uname_executable} ARGS --machine OUTPUT_VARIABLE uname_output)
|
||||
if("uname_output" MATCHES "^.*i[1-9]86.*$")
|
||||
set(png_asm_tmp "ON")
|
||||
else("uname_output" MATCHES "^.*i[1-9]86.*$")
|
||||
set(png_asm_tmp "OFF")
|
||||
endif("uname_output" MATCHES "^.*i[1-9]86.*$")
|
||||
endif(uname_executable)
|
||||
else(NOT WIN32)
|
||||
# this env var is normally only set on win64
|
||||
SET(TEXT "ProgramFiles(x86)")
|
||||
if("$ENV{${TEXT}}" STREQUAL "")
|
||||
set(png_asm_tmp "ON")
|
||||
endif("$ENV{${TEXT}}" STREQUAL "")
|
||||
endif(NOT WIN32)
|
||||
|
||||
option(PNG_MMX "Use MMX assembler code (x86 only)" ${png_asm_tmp})
|
||||
|
||||
# SET LIBNAME
|
||||
# msvc does not append 'lib' - do it here to have consistent name
|
||||
if(MSVC)
|
||||
set(PNG_LIB_NAME lib)
|
||||
endif(MSVC)
|
||||
set(PNG_LIB_NAME ${PNG_LIB_NAME}png${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
||||
|
||||
# to distinguish between debug and release lib
|
||||
set(CMAKE_DEBUG_POSTFIX "d")
|
||||
|
||||
|
||||
# OUR SOURCES
|
||||
set(libpng_sources
|
||||
png.h
|
||||
pngconf.h
|
||||
png.c
|
||||
pngerror.c
|
||||
pngget.c
|
||||
pngmem.c
|
||||
pngpread.c
|
||||
pngread.c
|
||||
pngrio.c
|
||||
pngrtran.c
|
||||
pngrutil.c
|
||||
pngset.c
|
||||
pngtrans.c
|
||||
pngwio.c
|
||||
pngwrite.c
|
||||
pngwtran.c
|
||||
pngwutil.c
|
||||
)
|
||||
set(pngtest_sources
|
||||
pngtest.c
|
||||
)
|
||||
# SOME NEEDED DEFINITIONS
|
||||
add_definitions(-DZLIB_DLL)
|
||||
|
||||
if(PNG_MMX)
|
||||
if(MSVC)
|
||||
add_definitions(-DPNG_NO_MODULEDEF -D_CRT_SECURE_NO_DEPRECATE)
|
||||
set(libpng_sources ${libpng_sources}
|
||||
pngvcrd.c
|
||||
)
|
||||
else(MSVC)
|
||||
set(libpng_sources ${libpng_sources}
|
||||
pnggccrd.c
|
||||
)
|
||||
endif(MSVC)
|
||||
else(PNG_MMX)
|
||||
add_definitions(-DLIBPNG_NO_MMX)
|
||||
add_definitions(-DPNG_NO_MMX_CODE)
|
||||
endif(PNG_MMX)
|
||||
|
||||
if(PNG_CONSOLE_IO_SUPPORTED)
|
||||
add_definitions(-DPNG_CONSOLE_IO_SUPPORTED)
|
||||
endif(PNG_CONSOLE_IO_SUPPORTED)
|
||||
|
||||
if(PNG_NO_CONSOLE_IO)
|
||||
add_definitions(-DPNG_NO_CONSOLE_IO)
|
||||
endif(PNG_NO_CONSOLE_IO)
|
||||
|
||||
if(PNG_NO_STDIO)
|
||||
add_definitions(-DPNG_NO_STDIO)
|
||||
endif(PNG_NO_STDIO)
|
||||
|
||||
if(PNG_DEBUG)
|
||||
add_definitions(-DPNG_DEBUG)
|
||||
endif(PNG_DEBUG)
|
||||
|
||||
if(NOT M_LIBRARY AND NOT WIN32)
|
||||
add_definitions(-DPNG_NO_FLOATING_POINT_SUPPORTED)
|
||||
endif(NOT M_LIBRARY AND NOT WIN32)
|
||||
|
||||
# NOW BUILD OUR TARGET
|
||||
include_directories(${PNG_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
|
||||
|
||||
if(PNG_SHARED)
|
||||
add_library(${PNG_LIB_NAME} SHARED ${libpng_sources})
|
||||
target_link_libraries(${PNG_LIB_NAME} ${ZLIB_LIBRARY} ${M_LIBRARY})
|
||||
endif(PNG_SHARED)
|
||||
if(PNG_STATIC)
|
||||
# does not work without changing name
|
||||
set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static)
|
||||
add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources})
|
||||
endif(PNG_STATIC)
|
||||
|
||||
if(PNG_SHARED AND WIN32)
|
||||
set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL)
|
||||
endif(PNG_SHARED AND WIN32)
|
||||
|
||||
if(PNG_TESTS)
|
||||
# does not work with msvc due to png_lib_ver issue
|
||||
add_executable(pngtest ${pngtest_sources})
|
||||
target_link_libraries(pngtest ${PNG_LIB_NAME})
|
||||
# add_test(pngtest ${PNG_SOURCE_DIR}/pngtest.png)
|
||||
endif(PNG_TESTS)
|
||||
|
||||
|
||||
# CREATE PKGCONFIG FILES
|
||||
# we use the same files like ./configure, so we have to set its vars
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
|
||||
|
||||
configure_file(${PNG_SOURCE_DIR}/scripts/libpng.pc.in
|
||||
${PNG_BINARY_DIR}/libpng.pc)
|
||||
configure_file(${PNG_SOURCE_DIR}/scripts/libpng-config.in
|
||||
${PNG_BINARY_DIR}/libpng-config)
|
||||
configure_file(${PNG_SOURCE_DIR}/scripts/libpng.pc.in
|
||||
${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc)
|
||||
configure_file(${PNG_SOURCE_DIR}/scripts/libpng-config.in
|
||||
${PNG_BINARY_DIR}/${PNGLIB_NAME}-config)
|
||||
|
||||
# SET UP LINKS
|
||||
set_target_properties(${PNG_LIB_NAME} PROPERTIES
|
||||
# VERSION 0.${PNGLIB_RELEASE}.1.2.20beta04
|
||||
VERSION 0.${PNGLIB_RELEASE}.0
|
||||
SOVERSION 0
|
||||
CLEAN_DIRECT_OUTPUT 1)
|
||||
if(NOT WIN32)
|
||||
# that's uncool on win32 - it overwrites our static import lib...
|
||||
set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES
|
||||
OUTPUT_NAME ${PNG_LIB_NAME}
|
||||
CLEAN_DIRECT_OUTPUT 1)
|
||||
endif(NOT WIN32)
|
||||
# INSTALL
|
||||
install_targets(/lib ${PNG_LIB_NAME} ${PNG_LIB_NAME_STATIC})
|
||||
install(FILES png.h pngconf.h DESTINATION include)
|
||||
install(FILES png.h pngconf.h DESTINATION include/${PNGLIB_NAME})
|
||||
install(FILES libpng.3 libpngpf.3 DESTINATION man/man3)
|
||||
install(FILES png.5 DESTINATION man/man5)
|
||||
install(FILES ${PNG_BINARY_DIR}/libpng.pc DESTINATION lib/pkgconfig)
|
||||
install(FILES ${PNG_BINARY_DIR}/libpng-config DESTINATION bin)
|
||||
install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc DESTINATION lib/pkgconfig)
|
||||
install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin)
|
||||
|
||||
# what's with libpng.txt and all the extra files?
|
||||
|
||||
|
||||
# UNINSTALL
|
||||
# do we need this?
|
||||
|
||||
|
||||
# DIST
|
||||
# do we need this?
|
||||
|
||||
# to create msvc import lib for mingw compiled shared lib
|
||||
# pexports libpng.dll > libpng.def
|
||||
# lib /def:libpng.def /machine:x86
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
# Modeled after libxml-config.
|
||||
|
||||
version=1.2.10rc1
|
||||
version=1.2.20beta04
|
||||
prefix=""
|
||||
libdir=""
|
||||
libs=""
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# libpng-config
|
||||
# provides configuration info for libpng.
|
||||
|
||||
# Copyright (C) 2002, 2004, 2006 Glenn Randers-Pehrson
|
||||
# Copyright (C) 2002, 2004, 2006, 2007 Glenn Randers-Pehrson
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
# Modeled after libxml-config.
|
||||
@@ -12,14 +12,14 @@ version="@PNGLIB_VERSION@"
|
||||
prefix="@prefix@"
|
||||
exec_prefix="@exec_prefix@"
|
||||
libdir="@libdir@"
|
||||
includedir="@includedir@/libpng@PNGLIB_MAJOR@"
|
||||
libs="-lpng@PNGLIB_MAJOR@"
|
||||
all_libs="-lpng@PNGLIB_MAJOR@ -lz -lm"
|
||||
includedir="@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
|
||||
libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
|
||||
all_libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ -lz -lm"
|
||||
I_opts="-I${includedir}"
|
||||
L_opts="-L${libdir}"
|
||||
R_opts=""
|
||||
cppflags=""
|
||||
ccopts=""
|
||||
ccopts="@LIBPNG_NO_MMX@"
|
||||
ldopts=""
|
||||
|
||||
usage()
|
||||
|
||||
10
scripts/libpng.pc-configure.in
Normal file
10
scripts/libpng.pc-configure.in
Normal file
@@ -0,0 +1,10 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@/libpng12
|
||||
|
||||
Name: libpng
|
||||
Description: Loads and saves PNG files
|
||||
Version: 1.2.20beta04
|
||||
Libs: -L${libdir} -lpng12
|
||||
Cflags: -I${includedir} @LIBPNG_NO_MMX@
|
||||
@@ -1,10 +1,10 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@/libpng@PNGLIB_MAJOR@
|
||||
includedir=@includedir@/libpng12
|
||||
|
||||
Name: libpng
|
||||
Description: Loads and saves PNG files
|
||||
Version: @PNGLIB_VERSION@
|
||||
Libs: -L${libdir} -lpng@PNGLIB_MAJOR@
|
||||
Version: 1.2.20beta04
|
||||
Libs: -L${libdir} -lpng12
|
||||
Cflags: -I${includedir}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# Library name:
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.20beta04
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -16,8 +16,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
CC=cc
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# Library name:
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.20beta04
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -16,8 +16,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
CC=cc
|
||||
|
||||
@@ -20,7 +20,7 @@ LN_SF = ln -f -s
|
||||
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.20beta04
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
prefix=/usr/local
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# Library name:
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.20beta04
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -16,8 +16,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
CC=gcc
|
||||
@@ -185,7 +185,7 @@ test-dd:
|
||||
echo Testing installed dynamic shared library in $(DL).
|
||||
$(CC) -I$(DI) $(CFLAGS) \
|
||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||
-L$(DL) -L$(ZLIBLIB) -W1,-rpath $(ZLIBLIB):$(DL) \
|
||||
-L$(DL) -L$(ZLIBLIB) -Wl,-rpath $(ZLIBLIB):$(DL) \
|
||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||
./pngtestd pngtest.png
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# of the library, and builds two copies of pngtest: one
|
||||
# statically linked and one dynamically linked.
|
||||
#
|
||||
# Copyright (C) 2002, 2006 Soren Anderson, Charles Wilson,
|
||||
# Copyright (C) 2002, 2006, 2007 Soren Anderson, Charles Wilson,
|
||||
# and Glenn Randers-Pehrson, based on makefile for linux-elf w/mmx by:
|
||||
# Copyright (C) 1998-2000 Greg Roelofs
|
||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||
@@ -31,9 +31,8 @@ endif
|
||||
|
||||
DESTDIR=
|
||||
|
||||
# To enable assembler optimizations, add '-DPNG_USE_PNGGCCRD' to
|
||||
# $CFLAGS, and include pnggccrd.o in $OBJS, below, and in the dependency
|
||||
# list at the bottom of this makefile.
|
||||
# To disable assembler optimizations, add '-DPNG_NO_MMX_CODE' to
|
||||
# $CFLAGS. To enable, add pnggccrd.o to the dependencies.
|
||||
|
||||
CC=gcc
|
||||
ifdef MINGW
|
||||
@@ -62,25 +61,23 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||
|
||||
### if you use the asm, add pnggccrd.o to the OBJS list
|
||||
###
|
||||
### if you don't need thread safety, but want the asm accel
|
||||
#CFLAGS= $(strip $(MINGW_CCFLAGS) -DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD \
|
||||
# $(addprefix -I,$(ZLIBINC)) -Wall -O3 $(ALIGN) -funroll-loops \
|
||||
#CFLAGS= $(strip $(MINGW_CCFLAGS) -DPNG_THREAD_UNSAFE_OK \
|
||||
# $(addprefix -I,$(ZLIBINC)) -Wall -O $(ALIGN) -funroll-loops \
|
||||
# -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||
### if you need thread safety and want (minimal) asm accel
|
||||
#CFLAGS= $(strip $(MINGW_CCFLAGS) -DPNG_USE_PNGGCCRD $(addprefix -I,$(ZLIBINC)) \
|
||||
# -Wall -O3 $(ALIGN) -funroll-loops \
|
||||
#CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
|
||||
# -Wall -O $(ALIGN) -funroll-loops \
|
||||
# -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||
### Normal (non-asm) compilation
|
||||
CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
|
||||
-Wall -O3 $(ALIGN) -funroll-loops \
|
||||
-Wall -O3 $(ALIGN) -funroll-loops -DPNG_NO_MMX_CODE \
|
||||
-fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
CYGDLL = 12
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.20beta04
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
SHAREDLIB=cygpng$(CYGDLL).dll
|
||||
@@ -159,19 +156,19 @@ shared: all-shared
|
||||
all-static: $(STATLIB) pngtest-stat$(EXE)
|
||||
all-shared: $(SHAREDLIB) pngtest$(EXE)
|
||||
|
||||
pnggccrd.o: pnggccrd.c png.h pngconf.h
|
||||
@echo ""
|
||||
@echo ' You can ignore the "control reaches end of non-void function"'
|
||||
@echo ' warning and "<variable> defined but not used" warnings:'
|
||||
@echo ""
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
# pnggccrd.o: pnggccrd.c png.h pngconf.h
|
||||
# @echo ""
|
||||
# @echo ' You can ignore the "control reaches end of non-void function"'
|
||||
# @echo ' warning and "<variable> defined but not used" warnings:'
|
||||
# @echo ""
|
||||
# $(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
pnggccrd.pic.o: pnggccrd.c png.h pngconf.h
|
||||
@echo ""
|
||||
@echo ' You can ignore the "control reaches end of non-void function"'
|
||||
@echo ' warning and "<variable> defined but not used" warnings:'
|
||||
@echo ""
|
||||
$(CC) -c $(CFLAGS) -DPNG_BUILD_DLL -o $@ $<
|
||||
# pnggccrd.pic.o: pnggccrd.c png.h pngconf.h
|
||||
# @echo ""
|
||||
# @echo ' You can ignore the "control reaches end of non-void function"'
|
||||
# @echo ' warning and "<variable> defined but not used" warnings:'
|
||||
# @echo ""
|
||||
# $(CC) -c $(CFLAGS) -DPNG_BUILD_DLL -o $@ $<
|
||||
|
||||
$(STATLIB): $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
@@ -308,6 +305,7 @@ pngwrite.o pngwrite.pic.o: png.h pngconf.h pngwrite.c
|
||||
pngwtran.o pngwtran.pic.o: png.h pngconf.h pngwtran.c
|
||||
pngwutil.o pngwutil.pic.o: png.h pngconf.h pngwutil.c
|
||||
pngpread.o pngpread.pic.o: png.h pngconf.h pngpread.c
|
||||
# pnggccrd.o pnggccrd.pic.o: png.h pngconf.h pnggccrd.c
|
||||
|
||||
pngtest.o: png.h pngconf.h pngtest.c
|
||||
pngtest-stat.o: png.h pngconf.h pngtest.c
|
||||
|
||||
@@ -19,7 +19,7 @@ ZLIBINC=../zlib
|
||||
# Library name:
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.20beta04
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -27,8 +27,8 @@ LIBSO=$(LIBNAME).dylib
|
||||
LIBSOMAJ=$(LIBNAME).$(PNGMAJ).dylib
|
||||
LIBSOVER=$(LIBNAME).$(PNGVER).dylib
|
||||
OLDSO=libpng.dylib
|
||||
OLDSOMAJ=libpng.0.dylib
|
||||
OLDSOVER=libpng.0.$(PNGMIN).dylib
|
||||
OLDSOMAJ=libpng.3.dylib
|
||||
OLDSOVER=libpng.3.$(PNGMIN).dylib
|
||||
|
||||
# Utilities:
|
||||
CC=cc
|
||||
@@ -38,7 +38,8 @@ LN_SF=ln -sf
|
||||
RANLIB=ranlib
|
||||
RM_F=/bin/rm -f
|
||||
|
||||
CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops
|
||||
# CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE
|
||||
CFLAGS=-I$(ZLIBINC) -Wall -O -funroll-loops
|
||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
# Library name:
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.20beta04
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
@@ -14,8 +14,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
# Modified for Debian by Junichi Uekawa and Josselin Mouette
|
||||
# Major modifications are:
|
||||
# * link libpng explicitly with libz and libm
|
||||
# * $(OLDSO).%OLDSONUM% is a symlink rather than a different library
|
||||
# * $(OLDSO).3 is a symlink rather than a different library
|
||||
# * versioned symbols
|
||||
|
||||
# Library name:
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.20beta04
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -20,8 +20,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
@@ -229,7 +229,7 @@ test-dd:
|
||||
echo Testing installed dynamic shared library in $(DL).
|
||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||
-L$(DL) -L$(ZLIBLIB) -W1, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||
-L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||
./pngtestd pngtest.png
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# makefile for libpng under FreeBSD
|
||||
# Copyright (C) 2002 Glenn Randers-Pehrson and Andrey A. Chernov
|
||||
# Copyright (C) 2002, 2007 Glenn Randers-Pehrson and Andrey A. Chernov
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
PREFIX?= /usr/local
|
||||
@@ -24,14 +24,14 @@ SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \
|
||||
LDADD+= -lm -lz
|
||||
DPADD+= ${LIBM} ${LIBZ}
|
||||
|
||||
CFLAGS+= -I. -DPNG_USE_PNGGCCRD
|
||||
CFLAGS+= -I.
|
||||
.if (${MACHINE_ARCH} != "i386")
|
||||
CFLAGS+= -DPNG_NO_ASSEMBLER_CODE
|
||||
CFLAGS+= -DPNG_NO_MMX_CODE
|
||||
.endif
|
||||
|
||||
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 pnggccrd.c
|
||||
pngwtran.c pngmem.c pngerror.c pngpread.c
|
||||
|
||||
pngtest: pngtest.o libpng.a
|
||||
${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -lpng -lz -lm
|
||||
|
||||
@@ -18,34 +18,47 @@ CDEBUG = -g -DPNG_DEBUG=5
|
||||
LDDEBUG =
|
||||
CRELEASE = -O2
|
||||
LDRELEASE = -s
|
||||
CFLAGS = -I$(ZLIBINC) -Wall $(CRELEASE)
|
||||
LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm $(LDRELEASE)
|
||||
#CFLAGS = -Wall $(CDEBUG)
|
||||
CFLAGS = -Wall $(CRELEASE)
|
||||
#LDFLAGS = $(LDDEBUG)
|
||||
LDFLAGS = $(LDRELEASE)
|
||||
LIBS = -lz -lm
|
||||
|
||||
# File extensions
|
||||
O=.o
|
||||
A=.a
|
||||
E=
|
||||
EXE=
|
||||
|
||||
# Variables
|
||||
OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
|
||||
pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
|
||||
pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
|
||||
pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
|
||||
pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
|
||||
|
||||
# Targets
|
||||
all: libpng$(A) pngtest$(E)
|
||||
all: static
|
||||
|
||||
.c$(O):
|
||||
$(CC) -c $(CFLAGS) -I$(ZLIBINC) $<
|
||||
|
||||
static: libpng$(A) pngtest$(EXE)
|
||||
|
||||
shared:
|
||||
@echo This is a generic makefile that cannot create shared libraries.
|
||||
@echo Please use a configuration that is specific to your platform.
|
||||
@false
|
||||
|
||||
libpng$(A): $(OBJS)
|
||||
$(AR_RC) $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
test: pngtest$(E)
|
||||
./pngtest$(E)
|
||||
test: pngtest$(EXE)
|
||||
./pngtest$(EXE)
|
||||
|
||||
pngtest$(E): pngtest$(O) libpng$(A)
|
||||
$(LD) -o $@ pngtest$(O) $(LDFLAGS)
|
||||
pngtest$(EXE): pngtest$(O) libpng$(A)
|
||||
$(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest$(O) libpng$(A) $(LIBS)
|
||||
|
||||
clean:
|
||||
$(RM_F) *$(O) libpng$(A) pngtest$(E) pngout.png
|
||||
$(RM_F) *$(O) libpng$(A) pngtest$(EXE) pngout.png
|
||||
|
||||
png$(O): png.h pngconf.h
|
||||
pngerror$(O): png.h pngconf.h
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
# Library name:
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.20beta04
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -24,8 +24,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
CC = gcc
|
||||
@@ -60,15 +60,15 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
|
||||
# Remove -DPNG_THREAD_UNSAFE_OK if you need thread safety
|
||||
### for generic gcc:
|
||||
CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall \
|
||||
-O3 $(ALIGN) -funroll-loops \
|
||||
CFLAGS=-DPNG_THREAD_UNSAFE_OK -I$(ZLIBINC) -Wall -O \
|
||||
$(ALIGN) -funroll-loops \
|
||||
-fomit-frame-pointer # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||
### for gcc 2.95.2 on 686:
|
||||
#CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \
|
||||
#CFLAGS=-DPNG_THREAD_UNSAFE_OK -I$(ZLIBINC) -Wall -O \
|
||||
# -mcpu=i686 -malign-double -ffast-math -fstrict-aliasing \
|
||||
# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer
|
||||
### for gcc 2.7.2.3 on 486 and up:
|
||||
#CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \
|
||||
#CFLAGS=-DPNG_THREAD_UNSAFE_OK -I$(ZLIBINC) -Wall -O \
|
||||
# -m486 -malign-double -ffast-math \
|
||||
# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer
|
||||
|
||||
@@ -120,7 +120,7 @@ libpng-config:
|
||||
( cat scripts/libpng-config-head.in; \
|
||||
echo prefix=\"$(prefix)\"; \
|
||||
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
|
||||
echo cppflags=\"-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD\"; \
|
||||
echo cppflags=\"-DPNG_THREAD_UNSAFE_OK \"; \
|
||||
echo L_opts=\"-L$(LIBPATH)\"; \
|
||||
echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
|
||||
echo libs=\"-lpng12 -lz -lm\"; \
|
||||
@@ -235,7 +235,7 @@ test-dd:
|
||||
echo Testing installed dynamic shared library in $(DL).
|
||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||
-L$(DL) -L$(ZLIBLIB) -W1, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||
-L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||
./pngtestd pngtest.png
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ ZLIBINC=/opt/zlib/include
|
||||
# Library name:
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.20beta04
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -26,8 +26,8 @@ LIBSO=$(LIBNAME).sl
|
||||
LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).sl.$(PNGVER)
|
||||
OLDSO=libpng.sl
|
||||
OLDSOMAJ=libpng.sl.0
|
||||
OLDSOVER=libpng.sl.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.sl.3
|
||||
OLDSOVER=libpng.sl.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker.
|
||||
# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
|
||||
# Copyright (C) 2002, 2006, 2007 Glenn Randers-Pehrson
|
||||
# Copyright (C) 2001, Laurent faillie
|
||||
# Copyright (C) 1998, 1999 Greg Roelofs
|
||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||
@@ -8,7 +8,7 @@
|
||||
# Library name:
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.20beta04
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -16,8 +16,8 @@ LIBSO=$(LIBNAME).sl
|
||||
LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).sl.$(PNGVER)
|
||||
OLDSO=libpng.sl
|
||||
OLDSOMAJ=libpng.sl.0
|
||||
OLDSOVER=libpng.sl.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.sl.3
|
||||
OLDSOVER=libpng.sl.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
CC=gcc
|
||||
@@ -53,7 +53,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
|
||||
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
||||
|
||||
CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
|
||||
CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE \
|
||||
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||
#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
|
||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm
|
||||
@@ -197,7 +197,7 @@ test-dd:
|
||||
echo Testing installed dynamic shared library in $(DL).
|
||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||
-L$(DL) -L$(ZLIBLIB) -W1,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||
-L$(DL) -L$(ZLIBLIB) -Wl,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||
./pngtestd pngtest.png
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ ZLIBINC=/opt/zlib/include
|
||||
# Library name:
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.20beta04
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -26,8 +26,8 @@ LIBSO=$(LIBNAME).sl
|
||||
LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).sl.$(PNGVER)
|
||||
OLDSO=libpng.sl
|
||||
OLDSOMAJ=libpng.sl.0
|
||||
OLDSOVER=libpng.sl.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.sl.3
|
||||
OLDSOVER=libpng.sl.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
@@ -45,7 +45,7 @@ LIBPATH=$(exec_prefix)/lib
|
||||
MANPATH=$(prefix)/man
|
||||
BINPATH=$(exec_prefix)/bin
|
||||
|
||||
CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
|
||||
CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0 -DPNG_NO_MMX_CODE
|
||||
# Caution: be sure you have built zlib with the same CFLAGS.
|
||||
CCFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
|
||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||
|
||||
@@ -8,14 +8,6 @@
|
||||
# To use, do "nmake /f scripts\makefile.intel"
|
||||
|
||||
|
||||
# ------------------- Intel C/C++ Compiler 4.0 and later -------------------
|
||||
|
||||
# Caution: the assembler code was introduced at libpng version 1.0.4 and has
|
||||
# not yet been thoroughly tested.
|
||||
|
||||
# Use assembler code
|
||||
ASMCODE=-DPNG_USE_PNGVCRD
|
||||
|
||||
# Where the zlib library and include files are located
|
||||
ZLIBLIB=..\zlib
|
||||
ZLIBINC=..\zlib
|
||||
@@ -36,7 +28,7 @@ CALLING=r # __fastcall
|
||||
|
||||
|
||||
CC=icl -c
|
||||
CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -I$(ZLIBINC) $(ASMCODE) -nologo
|
||||
CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -I$(ZLIBINC) -nologo
|
||||
LD=link
|
||||
LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO
|
||||
|
||||
@@ -44,8 +36,7 @@ O=.obj
|
||||
|
||||
OBJS=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) \
|
||||
pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) \
|
||||
pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) pngvcrd$(O)
|
||||
|
||||
pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) pngvcrd$(O) pnggccrd$(O)
|
||||
|
||||
all: test
|
||||
|
||||
@@ -70,6 +61,9 @@ pngrtran$(O): png.h pngconf.h
|
||||
pngrutil$(O): png.h pngconf.h
|
||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pnggccrd$(O): png.h pngconf.h
|
||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngvcrd$(O): png.h pngconf.h
|
||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# Library name:
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.20beta04
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -14,8 +14,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
@@ -47,7 +47,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
|
||||
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
||||
|
||||
CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
|
||||
CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE \
|
||||
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||
|
||||
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
|
||||
@@ -203,7 +203,7 @@ test-dd:
|
||||
echo Testing installed dynamic shared library in $(DL).
|
||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||
-L$(DL) -L$(ZLIBLIB) -W1, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||
-L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||
./pngtestd pngtest.png
|
||||
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
# Built from makefile.cygwin
|
||||
# Copyright (C) 2002, 2006 Soren Anderson, Charles Wilson,
|
||||
# and Glenn Randers-Pehrson, based on makefile for linux-elf w/mmx by:
|
||||
# Copyright (C) 1998-2000 Greg Roelofs
|
||||
# Copyright (C) 1998-2000, 2007 Greg Roelofs
|
||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
|
||||
# This makefile intends to support building outside the src directory
|
||||
# if desired. When invoking it, specify an argument to SRCDIR on the
|
||||
# command line that points to the top of the directory where your source
|
||||
# is located.
|
||||
|
||||
ifdef SRCDIR
|
||||
VPATH = $(SRCDIR)
|
||||
else
|
||||
@@ -29,20 +29,24 @@ endif
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
|
||||
DESTDIR=
|
||||
|
||||
# To enable assembler optimizations, add '-DPNG_USE_PNGGCCRD' to
|
||||
# $CFLAGS, and include pnggccrd.o in $OBJS, below, and in the dependency
|
||||
# list at the bottom of this makefile.
|
||||
|
||||
# If you're using a cross-compiler, add the appropriate prefix (e.g.,
|
||||
# "i386-mingw32msvc-") to the following three commands:
|
||||
CC=gcc
|
||||
AR=ar
|
||||
RANLIB=ranlib
|
||||
|
||||
MKDIR_P=/bin/mkdir -pv
|
||||
|
||||
|
||||
# To disable assembler optimizations, add '-DPNG_NO_MMX_CODE' to
|
||||
# $CFLAGS. To enable them, add pnggccrd.o to the dependencies.
|
||||
|
||||
# Where "make install" puts libpng*.a, *png*.dll, png.h, and pngconf.h
|
||||
ifndef prefix
|
||||
prefix=/usr
|
||||
$(warning You haven't specified a 'prefix=' location. Defaulting to "/usr")
|
||||
$(warning "You haven't specified a 'prefix=' location. Defaulting to '/usr'")
|
||||
endif
|
||||
exec_prefix=$(prefix)
|
||||
|
||||
@@ -58,25 +62,23 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||
|
||||
### if you use the asm, add pnggccrd.o to the OBJS list
|
||||
###
|
||||
### if you don't need thread safety, but want the asm accel
|
||||
#CFLAGS= $(strip $(MINGW_CCFLAGS) -DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD \
|
||||
# $(addprefix -I,$(ZLIBINC)) -Wall -O3 $(ALIGN) -funroll-loops \
|
||||
#CFLAGS= $(strip $(MINGW_CCFLAGS) -DPNG_THREAD_UNSAFE_OK \
|
||||
# $(addprefix -I,$(ZLIBINC)) -Wall -O $(ALIGN) -funroll-loops \
|
||||
# -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||
### if you need thread safety and want (minimal) asm accel
|
||||
#CFLAGS= $(strip $(MINGW_CCFLAGS) -DPNG_USE_PNGGCCRD $(addprefix -I,$(ZLIBINC)) \
|
||||
# -Wall -O3 $(ALIGN) -funroll-loops \
|
||||
#CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
|
||||
# -Wall -O $(ALIGN) -funroll-loops \
|
||||
# -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||
### Normal (non-asm) compilation
|
||||
CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
|
||||
-Wall -O3 $(ALIGN) -funroll-loops \
|
||||
-Wall -O3 $(ALIGN) -funroll-loops -DPNG_NO_MMX_CODE \
|
||||
-fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
MINGDLL = 12
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.20beta04
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
SHAREDLIB=libpng$(MINGDLL).dll
|
||||
@@ -90,10 +92,6 @@ LDFLAGS=$(strip -L. $(MINGW_LDFLAGS) -lpng $(addprefix -L,$(ZLIBLIB)) -lz)
|
||||
LDSFLAGS=$(strip -shared -L. $(MINGW_LDFLAGS))
|
||||
LDEXTRA=-Wl,--out-implib=$(IMPLIB) $(addprefix -L,$(ZLIBLIB)) -lz
|
||||
|
||||
MKDIR_P=/bin/mkdir -pv
|
||||
RANLIB=ranlib
|
||||
#RANLIB=echo
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
LIBPATH=$(exec_prefix)/lib
|
||||
|
||||
@@ -155,22 +153,8 @@ shared: all-shared
|
||||
all-static: $(STATLIB) pngtest-stat$(EXE)
|
||||
all-shared: $(SHAREDLIB) pngtest$(EXE)
|
||||
|
||||
pnggccrd.o: pnggccrd.c png.h pngconf.h
|
||||
@echo ""
|
||||
@echo ' You can ignore the "control reaches end of non-void function"'
|
||||
@echo ' warning and "<variable> defined but not used" warnings:'
|
||||
@echo ""
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
pnggccrd.pic.o: pnggccrd.c png.h pngconf.h
|
||||
@echo ""
|
||||
@echo ' You can ignore the "control reaches end of non-void function"'
|
||||
@echo ' warning and "<variable> defined but not used" warnings:'
|
||||
@echo ""
|
||||
$(CC) -c $(CFLAGS) -DPNG_BUILD_DLL -o $@ $<
|
||||
|
||||
$(STATLIB): $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(AR) rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
$(SHAREDDEF): scripts/pngw32.def
|
||||
@@ -186,12 +170,6 @@ pngtest$(EXE): pngtest.pic.o $(SHAREDLIB)
|
||||
pngtest-stat$(EXE): pngtest.o $(STATLIB)
|
||||
$(CC) -static $(CFLAGS) $< $(LDFLAGS) -o $@
|
||||
|
||||
pngtest.pic.o: pngtest.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
pngtest.o: pngtest.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
test: test-static test-shared
|
||||
|
||||
test-static: pngtest-stat$(EXE)
|
||||
@@ -278,8 +256,8 @@ test-installed:
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.pic.o *.o $(STATLIB) $(IMPLIB) $(SHAREDLIB) \
|
||||
pngtest-stat$(EXE) pngtest$(EXE) pngout.png $(SHAREDDEF) \
|
||||
libpng-config libpng.pc pngtesti$(EXE)
|
||||
pngtest-stat$(EXE) pngtest$(EXE) pngout.png $(SHAREDDEF) \
|
||||
libpng-config libpng.pc pngtesti$(EXE)
|
||||
|
||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||
writelock:
|
||||
@@ -304,9 +282,9 @@ pngwrite.o pngwrite.pic.o: png.h pngconf.h pngwrite.c
|
||||
pngwtran.o pngwtran.pic.o: png.h pngconf.h pngwtran.c
|
||||
pngwutil.o pngwutil.pic.o: png.h pngconf.h pngwutil.c
|
||||
pngpread.o pngpread.pic.o: png.h pngconf.h pngpread.c
|
||||
# pnggccrd.o pnggccrd.pic.o: png.h pngconf.h pnggccrd.c
|
||||
|
||||
pngtest.o: png.h pngconf.h pngtest.c
|
||||
pngtest-stat.o: png.h pngconf.h pngtest.c
|
||||
pngtest.o pngtest.pic.o: png.h pngconf.h pngtest.c
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# make obj && make depend && make && make test
|
||||
# make includes && make install
|
||||
# Copyright (C) 2002 Patrick R.L. Welche
|
||||
# Copyright (C) 2007 Glenn Randers-Pehrson
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
# You should also run makefile.netbsd
|
||||
@@ -13,21 +14,21 @@ INCSDIR=${LOCALBASE}/include/libpng12
|
||||
|
||||
LIB= png12
|
||||
SHLIB_MAJOR= 0
|
||||
SHLIB_MINOR= 1.2.10rc1
|
||||
SHLIB_MINOR= 1.2.20beta04
|
||||
SRCS= pnggccrd.c 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
|
||||
INCS= png.h pngconf.h
|
||||
MAN= libpng.3 libpngpf.3 png.5
|
||||
|
||||
CPPFLAGS+=-I${.CURDIR} -DPNG_USE_PNGGCCRD
|
||||
CPPFLAGS+=-I${.CURDIR}
|
||||
|
||||
# something like this for mmx assembler, but it core dumps for me at the moment
|
||||
# .if ${MACHINE_ARCH} == "i386"
|
||||
# CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK
|
||||
# MKLINT= no
|
||||
# .else
|
||||
CPPFLAGS+=-DPNG_NO_ASSEMBLER_CODE
|
||||
CPPFLAGS+=-DPNG_NO_MMX_CODE
|
||||
# .endif
|
||||
|
||||
CLEANFILES+=pngtest.o pngtest
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# make obj && make depend && make && make test
|
||||
# make includes && make install
|
||||
# Copyright (C) 2002 Patrick R.L. Welche
|
||||
# Copyright (C) 2007 Glenn Randers-Pehrson
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
# You should also run makefile.ne0bsd
|
||||
@@ -13,21 +14,21 @@ INCSDIR=${LOCALBASE}/include/libpng
|
||||
|
||||
LIB= png
|
||||
SHLIB_MAJOR= 3
|
||||
SHLIB_MINOR= 1.2.10rc1
|
||||
SHLIB_MINOR= 1.2.20beta04
|
||||
SRCS= pnggccrd.c 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
|
||||
INCS= png.h pngconf.h
|
||||
MAN= libpng.3 libpngpf.3 png.5
|
||||
|
||||
CPPFLAGS+=-I${.CURDIR} -DPNG_USE_PNGGCCRD
|
||||
CPPFLAGS+=-I${.CURDIR}
|
||||
|
||||
# something like this for mmx assembler, but it core dumps for me at the moment
|
||||
# .if ${MACHINE_ARCH} == "i386"
|
||||
# CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK
|
||||
# MKLINT= no
|
||||
# .else
|
||||
CPPFLAGS+=-DPNG_NO_ASSEMBLER_CODE
|
||||
CPPFLAGS+=-DPNG_NO_MMX_CODE
|
||||
# .endif
|
||||
|
||||
CLEANFILES+=pngtest.o pngtest
|
||||
|
||||
247
scripts/makefile.nommx
Normal file
247
scripts/makefile.nommx
Normal file
@@ -0,0 +1,247 @@
|
||||
# makefile for libpng.a and libpng12.so on Linux ELF with gcc
|
||||
# Copyright (C) 1998, 1999, 2002, 2006, 2007 Greg Roelofs and
|
||||
# Glenn Randers-Pehrson
|
||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
# Library name:
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.20beta04
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
CC=gcc
|
||||
MKDIR_P=mkdir -p
|
||||
LN_SF=ln -sf
|
||||
RANLIB=ranlib
|
||||
RM_F=/bin/rm -f
|
||||
|
||||
# where "make install" puts libpng12.a, libpng12.so*,
|
||||
# libpng12/png.h and libpng12/pngconf.h
|
||||
# Prefix must be a full pathname.
|
||||
prefix=/usr/local
|
||||
exec_prefix=$(prefix)
|
||||
|
||||
# Where the zlib library and include files are located.
|
||||
#ZLIBLIB=/usr/local/lib
|
||||
#ZLIBINC=/usr/local/include
|
||||
ZLIBLIB=../zlib
|
||||
ZLIBINC=../zlib
|
||||
|
||||
ALIGN=
|
||||
# for i386:
|
||||
#ALIGN=-malign-loops=2 -malign-functions=2
|
||||
|
||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||
|
||||
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
||||
|
||||
CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE \
|
||||
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||
|
||||
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
|
||||
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
LIBPATH=$(exec_prefix)/lib
|
||||
MANPATH=$(prefix)/man
|
||||
BINPATH=$(exec_prefix)/bin
|
||||
|
||||
# override DESTDIR= on the make install command line to easily support
|
||||
# installing into a temporary location. Example:
|
||||
#
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
DB=$(DESTDIR)$(BINPATH)
|
||||
DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||
|
||||
OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
|
||||
.SUFFIXES: .c .o .pic.o
|
||||
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
$(AR_RC) $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s!@PREFIX@!$(prefix)! \
|
||||
| sed -e "s!Cflags: !Cflags: -DPNG_NO_MMX_CODE !"> libpng.pc
|
||||
|
||||
libpng-config:
|
||||
( cat scripts/libpng-config-head.in; \
|
||||
echo prefix=\"$(prefix)\"; \
|
||||
echo I_opts=\"-I$(INCPATH)/$(LIBNAME) -DPNG_NO_MMX_CODE\"; \
|
||||
echo L_opts=\"-L$(LIBPATH)\"; \
|
||||
echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
|
||||
echo libs=\"-lpng12 -lz -lm\"; \
|
||||
cat scripts/libpng-config-body.in ) > libpng-config
|
||||
chmod +x libpng-config
|
||||
|
||||
$(LIBSO): $(LIBSOMAJ)
|
||||
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
|
||||
|
||||
$(LIBSOMAJ): $(LIBSOVER)
|
||||
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
|
||||
|
||||
$(LIBSOVER): $(OBJSDLL)
|
||||
$(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL)
|
||||
|
||||
$(OLDSOVER): $(OBJSDLL)
|
||||
$(CC) -shared -Wl,-soname,$(OLDSOMAJ) \
|
||||
-o $(OLDSOVER) \
|
||||
$(OBJSDLL)
|
||||
|
||||
pngtest: pngtest.o $(LIBSO)
|
||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||
|
||||
pngtest-static: pngtest.o libpng.a
|
||||
$(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
|
||||
|
||||
test: pngtest pngtest-static
|
||||
@echo ""
|
||||
@echo " Running pngtest dynamically linked with $(LIBSO):"
|
||||
@echo ""
|
||||
./pngtest
|
||||
@echo ""
|
||||
@echo " Running pngtest statically linked with libpng.a:"
|
||||
@echo ""
|
||||
./pngtest-static
|
||||
|
||||
install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||
-@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
|
||||
-@$(RM_F) $(DI)/libpng
|
||||
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||
cp libpng.a $(DL)/$(LIBNAME).a
|
||||
chmod 644 $(DL)/$(LIBNAME).a
|
||||
-@$(RM_F) $(DL)/libpng.a
|
||||
(cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
|
||||
|
||||
install-shared: install-headers $(LIBSOVER) libpng.pc \
|
||||
$(OLDSOVER)
|
||||
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||
-@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
|
||||
-@$(RM_F) $(DL)/$(LIBSOMAJ)
|
||||
-@$(RM_F) $(DL)/$(OLDSO)
|
||||
-@$(RM_F) $(DL)/$(OLDSOMAJ)
|
||||
-@$(RM_F) $(DL)/$(OLDSOVER)*
|
||||
cp $(LIBSOVER) $(DL)
|
||||
cp $(OLDSOVER) $(DL)
|
||||
chmod 755 $(DL)/$(LIBSOVER)
|
||||
chmod 755 $(DL)/$(OLDSOVER)
|
||||
(cd $(DL); \
|
||||
$(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
|
||||
$(LN_SF) $(OLDSOMAJ) $(OLDSO); \
|
||||
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
|
||||
$(LN_SF) $(LIBSOMAJ) $(LIBSO))
|
||||
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
|
||||
-@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
|
||||
-@$(RM_F) $(DL)/pkgconfig/libpng.pc
|
||||
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
||||
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
||||
(cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
|
||||
|
||||
install-man: libpng.3 libpngpf.3 png.5
|
||||
-@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
|
||||
-@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
|
||||
-@$(RM_F) $(DM)/man3/libpng.3
|
||||
-@$(RM_F) $(DM)/man3/libpngpf.3
|
||||
cp libpng.3 $(DM)/man3
|
||||
cp libpngpf.3 $(DM)/man3
|
||||
-@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
|
||||
-@$(RM_F) $(DM)/man5/png.5
|
||||
cp png.5 $(DM)/man5
|
||||
|
||||
install-config: libpng-config
|
||||
-@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
|
||||
-@$(RM_F) $(DB)/libpng-config
|
||||
-@$(RM_F) $(DB)/$(LIBNAME)-config
|
||||
cp libpng-config $(DB)/$(LIBNAME)-config
|
||||
chmod 755 $(DB)/$(LIBNAME)-config
|
||||
(cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
|
||||
|
||||
install: install-static install-shared install-man install-config
|
||||
|
||||
# If you installed in $(DESTDIR), test-installed won't work until you
|
||||
# move the library to its final location. Use test-dd to test it
|
||||
# before then.
|
||||
|
||||
test-dd:
|
||||
echo
|
||||
echo Testing installed dynamic shared library in $(DL).
|
||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||
-L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||
./pngtestd pngtest.png
|
||||
|
||||
test-installed:
|
||||
$(CC) -I$(ZLIBINC) \
|
||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||
./pngtesti pngtest.png
|
||||
|
||||
clean:
|
||||
$(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
|
||||
$(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
|
||||
$(OLDSOVER) \
|
||||
libpng.pc
|
||||
|
||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||
writelock:
|
||||
chmod a-w *.[ch35] $(DOCS) scripts/*
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
png.o png.pic.o: png.h pngconf.h
|
||||
pngerror.o pngerror.pic.o: png.h pngconf.h
|
||||
pngrio.o pngrio.pic.o: png.h pngconf.h
|
||||
pngwio.o pngwio.pic.o: png.h pngconf.h
|
||||
pngmem.o pngmem.pic.o: png.h pngconf.h
|
||||
pngset.o pngset.pic.o: png.h pngconf.h
|
||||
pngget.o pngget.pic.o: png.h pngconf.h
|
||||
pngread.o pngread.pic.o: png.h pngconf.h
|
||||
pngrtran.o pngrtran.pic.o: png.h pngconf.h
|
||||
pngrutil.o pngrutil.pic.o: png.h pngconf.h
|
||||
pngtrans.o pngtrans.pic.o: png.h pngconf.h
|
||||
pngwrite.o pngwrite.pic.o: png.h pngconf.h
|
||||
pngwtran.o pngwtran.pic.o: png.h pngconf.h
|
||||
pngwutil.o pngwutil.pic.o: png.h pngconf.h
|
||||
pngpread.o pngpread.pic.o: png.h pngconf.h
|
||||
|
||||
pngtest.o: png.h pngconf.h
|
||||
@@ -1,5 +1,6 @@
|
||||
# makefile for libpng
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
# Copyright (C) 2007 Glenn Randers-Pehrson
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
PREFIX?= /usr/local
|
||||
@@ -7,7 +8,7 @@ LIBDIR= ${PREFIX}/lib
|
||||
MANDIR= ${PREFIX}/man/cat
|
||||
|
||||
SHLIB_MAJOR= 0
|
||||
SHLIB_MINOR= 1.2.10rc1
|
||||
SHLIB_MINOR= 1.2.20beta04
|
||||
|
||||
LIB= png
|
||||
SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \
|
||||
@@ -17,7 +18,7 @@ SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \
|
||||
HDRS= png.h pngconf.h
|
||||
|
||||
CFLAGS+= -Wall
|
||||
CPPFLAGS+= -I${.CURDIR} -DPNG_NO_ASSEMBLER_CODE -DPNG_USE_PNGGCCRD
|
||||
CPPFLAGS+= -I${.CURDIR} -DPNG_NO_MMX_CODE
|
||||
|
||||
NOPROFILE= Yes
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# Library name:
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.20beta04
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -17,8 +17,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
CC=cc
|
||||
@@ -38,7 +38,7 @@ exec_prefix=$(prefix)
|
||||
ZLIBLIB=../zlib
|
||||
ZLIBINC=../zlib
|
||||
|
||||
CFLAGS= -dy -belf -I$(ZLIBINC) -O3
|
||||
CFLAGS= -dy -belf -I$(ZLIBINC) -O3 -DPNG_NO_MMX_CODE
|
||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm
|
||||
|
||||
INCPATH=$(prefix)/include/libpng
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# Library name:
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.20beta04
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -14,8 +14,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
@@ -44,7 +44,7 @@ ZLIBINC=../zlib
|
||||
ABI=
|
||||
|
||||
WARNMORE= # -g -DPNG_DEBUG=5
|
||||
CFLAGS=$(ABI) -I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32
|
||||
CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -fPIC -mabi=n32 -DPNG_NO_MMX_CODE
|
||||
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
|
||||
-set_version sgi$(PNGMAJ).0
|
||||
@@ -73,7 +73,7 @@ DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
OBJS = pnggccrd.o png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||
|
||||
@@ -93,6 +93,7 @@ libpng-config:
|
||||
echo prefix=\"$(prefix)\"; \
|
||||
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
|
||||
echo ccopts=\"$(ABI)\"; \
|
||||
echo cppflags=\"-DPNG_NO_MMX_CODE\"; \
|
||||
echo ldopts=\"$(ABI)\"; \
|
||||
echo L_opts=\"-L$(LIBPATH)\"; \
|
||||
echo libdir=\"$(LIBPATH)\"; \
|
||||
@@ -234,5 +235,4 @@ pngwrite.o: png.h pngconf.h
|
||||
pngwtran.o: png.h pngconf.h
|
||||
pngwutil.o: png.h pngconf.h
|
||||
pngpread.o: png.h pngconf.h
|
||||
pnggccrd.o: png.h pngconf.h
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# makefile for libpng.a and libpng12.so, SGI IRIX with 'cc'
|
||||
# Copyright (C) 2001-2002, 2006 Glenn Randers-Pehrson
|
||||
# Copyright (C) 2001-2002, 2006, 2007 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
# Library name:
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.20beta04
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -14,8 +14,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
@@ -45,9 +45,8 @@ ABI=
|
||||
|
||||
WARNMORE=-fullwarn
|
||||
# Note: -KPIC is the default anyhow
|
||||
#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC -DPNG_USE_PNGGCCRD # -g -DPNG_DEBUG=5
|
||||
CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -DPNG_USE_PNGGCCRD \
|
||||
-DPNG_NO_ASSEMBLER_CODE
|
||||
#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC -DPNG_NO_MMX_CODE # -g -DPNG_DEBUG=5
|
||||
CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -DPNG_NO_MMX_CODE
|
||||
LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng12 -lz -lm
|
||||
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
|
||||
@@ -77,7 +76,7 @@ DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
OBJS = pnggccrd.o png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||
|
||||
@@ -96,7 +95,7 @@ libpng-config:
|
||||
( cat scripts/libpng-config-head.in; \
|
||||
echo prefix=\"$(prefix)\"; \
|
||||
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
|
||||
echo cppflags=\"-DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE\"; \
|
||||
echo cppflags=\"-DPNG_NO_MMX_CODE\"; \
|
||||
echo ccopts=\"$(ABI)\"; \
|
||||
echo ldopts=\"$(ABI)\"; \
|
||||
echo L_opts=\"-L$(LIBPATH)\"; \
|
||||
@@ -239,5 +238,4 @@ pngwrite.o: png.h pngconf.h
|
||||
pngwtran.o: png.h pngconf.h
|
||||
pngwutil.o: png.h pngconf.h
|
||||
pngpread.o: png.h pngconf.h
|
||||
pnggccrd.o: png.h pngconf.h
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user