Compare commits

..

290 Commits

Author SHA1 Message Date
Glenn Randers-Pehrson
455e8a4281 [master] Imported from libpng-1.2.41beta03.tar 2009-09-30 23:14:24 -05:00
Glenn Randers-Pehrson
5d7fe7a718 [master] Revised png_check_IHDR() again
to check info_ptr members instead of the contents of the returned parameters.
2009-09-30 23:10:28 -05:00
Glenn Randers-Pehrson
64ca95e375 [master] Bump version to 1.2.41beta03 2009-09-30 16:03:06 -05:00
Glenn Randers-Pehrson
837eecbc91 [master] Revised png_check_IHDR()
to avoid bogus complaints about filter method.
2009-09-30 14:45:33 -05:00
Glenn Randers-Pehrson
26cc10a00c [master] Reverted recent test in png_get_IHDR(). 2009-09-30 14:35:05 -05:00
Glenn Randers-Pehrson
f12abe957d [master] Revised png_check_IHDR() 2009-09-30 14:29:00 -05:00
Glenn Randers-Pehrson
caaf688582 [master] Imported from libpng-1.2.41beta02.tar 2009-09-30 13:40:53 -05:00
Glenn Randers-Pehrson
3dfd0cd62a [master] Add a test to make sure the user isn't trying to stuff height into
a 16-bit int (assuming height immediately follows width).
2009-09-30 13:38:37 -05:00
Glenn Randers-Pehrson
18bd86f154 [master] Revise documentation to mention not using TAB character 2009-09-25 14:21:52 -05:00
Glenn Randers-Pehrson
338f465019 [master] Expand TAB characters in pngrtran.c 2009-09-25 14:11:33 -05:00
Glenn Randers-Pehrson
ac13f5e6f9 [master] Imported from libpng-1.2.41beta01.tar 2009-09-25 12:07:58 -05:00
Glenn Randers-Pehrson
1b6f6d80ea [master] Imported from libpng-1.2.40.tar 2009-09-10 09:01:41 -05:00
Glenn Randers-Pehrson
18b078414a [master] Imported from libpng-1.2.40rc01.tar 2009-09-02 07:09:11 -05:00
Glenn Randers-Pehrson
f6ce318061 [master] CMakeLists.txt updated with bugfixes and improvements 2009-08-28 07:06:45 -05:00
Glenn Randers-Pehrson
a21c94e3dc [master] Bump version to libpng-1.2.40beta02 2009-08-22 09:26:42 -05:00
Glenn Randers-Pehrson
38b92d56e7 [master] Imported from libpng-1.2.40beta01.tar 2009-08-20 17:39:42 -05:00
Glenn Randers-Pehrson
a08d95b971 [master] Fixed incorrect #ifdef in pngset.c
PNG_UNKNOWN_CHUNKS_SUPPORTED should be PNG_HANDLE_AS_UNKNOWN_SUPPORTED
2009-08-20 16:13:58 -05:00
Glenn Randers-Pehrson
339416b38b [master] Trivial cosmetic changes in comments 2009-08-19 08:42:06 -05:00
Glenn Randers-Pehrson
7e2f07486a [master] Remove an extra png_debug() statement
that was recently added to png_write_find_filter() in pngwutil.c
2009-08-13 17:54:20 -05:00
Glenn Randers-Pehrson
a3e569cdda [master] Bump libpng.3 and ANNOUNCE to version 1.2.40beta01 2009-08-13 17:52:49 -05:00
Glenn Randers-Pehrson
d68d8d82e6 [master] Bump version to libpng-1.2.40beta01 2009-08-13 17:41:35 -05:00
Glenn Randers-Pehrson
997b4a544d [master] Update ANNOUNCE to mention .tar.xz instead of .tgz 2009-08-13 06:15:22 -05:00
Glenn Randers-Pehrson
176d2b622e [master] Imported from libpng-1.2.39.tar 2009-08-13 05:51:34 -05:00
Glenn Randers-Pehrson
3a9ab23713 [master] Imported from libpng-1.2.39rc01.tar 2009-08-05 21:26:48 -05:00
Glenn Randers-Pehrson
9e88fcd58c [master] Imported from libpng-1.2.39beta05.tar 2009-08-01 08:57:10 -05:00
Glenn Randers-Pehrson
39ffc1c3c7 [master] Imported from libpng-1.2.39beta04.tar 2009-08-01 08:57:08 -05:00
Glenn Randers-Pehrson
69d0e44295 [master] Imported from libpng-1.2.39beta03.tar 2009-07-29 05:50:25 -05:00
Glenn Randers-Pehrson
d2d5e540ac [master] Update configure scripts to autoconf-2.64 2009-07-28 16:51:57 -05:00
Glenn Randers-Pehrson
d7bd2d2b2c [master] Relocated prototype for png_64bit_product()
into png.h and revised the documenatation (in the libpng style section) about
placement of prototypes.
2009-07-28 08:18:31 -05:00
Glenn Randers-Pehrson
ddf5fc8a42 [master] Bump version to libpng-1.2.39beta03 2009-07-28 08:05:11 -05:00
Glenn Randers-Pehrson
0841c63e0d [master] Imported from libpng-1.2.39beta02.tar 2009-07-27 22:31:10 -05:00
Glenn Randers-Pehrson
a4d439b975 [master] Avoid a possible NULL dereference in debug build,
in png_set_text_2() (bug introduced in libpng-0.95, discovered by Evan Rouault)
2009-07-27 22:27:30 -05:00
Glenn Randers-Pehrson
8de509a837 [master] Bump version to libpng-1.2.39beta02 2009-07-27 22:26:15 -05:00
Glenn Randers-Pehrson
219760639a [master] Imported from libpng-1.2.39beta01.tar 2009-07-25 09:27:58 -05:00
Glenn Randers-Pehrson
38ed8795ab [master] Added a prototype for png_16bit_product()
(suggested by Peter Breitenlohner)
2009-07-23 13:18:55 -05:00
Glenn Randers-Pehrson
55697d7dc9 [master] Update some dates. 2009-07-23 13:17:27 -05:00
Glenn Randers-Pehrson
a7fb782aea [master] Bump version to libpng-1.2.39beta01 2009-07-23 13:01:03 -05:00
Glenn Randers-Pehrson
d91c64e428 [master] Imported from libpng-1.2.38.tar 2009-07-16 06:01:45 -05:00
Glenn Randers-Pehrson
4aa911abc6 [master] Imported from libpng-1.2.38rc03.tar 2009-07-11 09:16:28 -05:00
Glenn Randers-Pehrson glennrp@comcast.net
64c72bb919 [master] Updated configuration scripts to autoconf-2.63
from autoconf-2.62
2009-07-11 09:07:35 -05:00
Glenn Randers-Pehrson glennrp@comcast.net
fec191d3cc [master] Revised references to libpng license in contrib/visupng
to be consistent with the rest of the source files.
2009-07-11 07:13:56 -05:00
Glenn Randers-Pehrson
7430bcbc44 [master] Add a reference to the "libpng license" in each source file. 2009-06-28 21:38:35 -05:00
Glenn Randers-Pehrson
eba11d2ba5 [master] Imported from libpng-1.2.38rc02.tar 2009-06-28 20:28:53 -05:00
Glenn Randers-Pehrson
a3a724f805 [master] Imported from libpng-1.2.38rc01.tar 2009-06-24 06:59:36 -05:00
Glenn Randers-Pehrson
a770d71890 [master] Bump version to bump-to-libpng-1.2.38beta02 2009-06-18 16:53:56 -05:00
Glenn Randers-Pehrson
1de866cd09 [master] Imported from libpng-1.2.38beta01.tar 2009-06-17 07:46:44 -05:00
Glenn Randers-Pehrson
54380f53a2 [master] Fixed some indentation in pngset.c 2009-06-16 17:53:00 -05:00
Glenn Randers-Pehrson
7d870524d3 [master] Changed PNG_HANDLE_AS_UNKNOWN to PNG_UNKNOWN_CHUNKS_SUPPORTED
in pngset.c
2009-06-16 17:28:01 -05:00
Glenn Randers-Pehrson
d28aad9a58 [master] Added an "#ifdef PNG_WRITE_SUPPORTED/#endif" block in pngconf.h 2009-06-16 17:27:14 -05:00
Glenn Randers-Pehrson
8be63adbc8 [master] Relocated various UNKNOWN_CHUNK macro definitions
outside of the PNG_READ|WRITE_ANCILLARY_CHUNK_SUPPORTED macros and
updated CHANGES and ANNOUNCE.  The definitions were actually relocated
in the previous commit but I forgot to mention it.
2009-06-16 16:13:42 -05:00
Glenn Randers-Pehrson
7d8f352e0a Added a PNG_NO_HANDLE_AS_UNKNOWN inside the LEGACY block of pngconf.h 2009-06-16 13:54:57 -05:00
Glenn Randers-Pehrson
587382c0ba [master] Added 2 "defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)" tests in png.h 2009-06-16 13:35:47 -05:00
Glenn Randers-Pehrson
0f714ca6bc [master] Reformatted some comments. 2009-06-15 22:01:39 -05:00
Glenn Randers-Pehrson
63da1df6fe [master] png.c should have been included in the previous checkin 2009-06-15 20:58:37 -05:00
Glenn Randers-Pehrson
bbe589da44 [master] Change some instances of PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
to PNG_HANDLE_AS_UNKNOWN to make it possible to build a libpng that can
use the png_set_keep_unknown_chunks() mechanism to ignore unused chunks
without having to save unknown chunks.
2009-06-15 20:50:00 -05:00
Glenn Randers-Pehrson
b278e91338 about calling png_set_IHDR() multiple times and about the order
of color samples in the tRNS chunk.
2009-06-08 08:37:58 -05:00
Glenn Randers-Pehrson
f2609e133d [master] Revise libpng*.txt
about calling png_set_IHDR() multiple times and about the order
of color samples in the tRNS chunk.
2009-06-08 08:33:46 -05:00
Glenn Randers-Pehrson
e14fdbbddb [master] Bump version to bump-to-libpng-1.2.38beta01 2009-06-05 17:27:14 -05:00
Glenn Randers-Pehrson
a162155919 Imported from libpng-1.2.37.tar 2009-06-04 06:11:58 -05:00
Glenn Randers-Pehrson
4d7ae382a8 [master] Added a section in documentation
about using png_set_io_ptr() in configure scripts for detecting libpng
2009-06-02 13:48:22 -05:00
Glenn Randers-Pehrson
0c86eb2dc7 Update pngminim/*/pngusr.h
to add PNG_NO_READ_SWAP, PNG_NO_WRITE_SWAP
2009-06-02 06:50:00 -05:00
Glenn Randers-Pehrson
70c2db8b9f Updated documentation about the git repository and libpng coding style. 2009-06-02 06:41:57 -05:00
Glenn Randers-Pehrson
c1dd118d2c Reformatted several "if () statment;"
and "else statement;" into two lines.
2009-05-30 20:25:20 -05:00
Glenn Randers-Pehrson
2d21d91abd Imported from libpng-1.2.37rc01.tar 2009-05-27 06:47:59 -05:00
Glenn Randers-Pehrson
e5ee05dc0d Imported from libpng-1.2.37beta03.tar 2009-05-20 17:19:00 -05:00
Glenn Randers-Pehrson
c0d53e176b Change version from libpng-1.2.37rc01 to libpng-1.2.37beta03
Because of many cosmetic changes, drop back to beta and do rc01 later.
2009-05-20 17:16:46 -05:00
Glenn Randers-Pehrson
b26d188190 Rename contrib/pngminim/*/makefile.std to makefile. 2009-05-19 18:51:08 -05:00
Glenn Randers-Pehrson
0a6382e2af Bump version to libpng-1.2.37rc01 2009-05-19 18:48:06 -05:00
Glenn Randers-Pehrson
1214d8cd26 Fix "AVE" -> "AVG" typo in libpng docs again.
Evidently the fix didn't go into the real master copy.
2009-05-19 07:18:06 -05:00
Glenn Randers-Pehrson
65a30ab0a2 Imported from libpng-1.2.37beta02.tar 2009-05-19 07:05:20 -05:00
Glenn Randers-Pehrson
61616abef2 Fixed cut-and-paste error in contrib/pngminim/preader/README
"pngminus" should be "gregbook"
2009-05-18 15:19:29 -05:00
Glenn Randers-Pehrson
bb1fcd1ba8 Fixed a glitch in contrib/pngminim/preader/README. 2009-05-18 14:57:07 -05:00
Glenn Randers-Pehrson
6d65121993 Add contrib/pngminim/preader files
(README, gather.sh, makefile.std, and pngusr.h)
2009-05-18 14:50:48 -05:00
Glenn Randers-Pehrson
ecf0bffb79 Added contrib/pngminim/preader demo of gregbook/rpng2-x with embedded libpng
also minor editing of encoder/pngusr.h and decoder/pngusr.h
2009-05-18 14:46:35 -05:00
Glenn Randers-Pehrson
af2ea0a1f2 Revise ANNOUNCE to reflect conditional compile of png_read_finish_row(). 2009-05-18 14:43:36 -05:00
Glenn Randers-Pehrson
286467db82 Restored compiling png_combine_row() for progressive readers.
Only png_read_finish_row() can be omitted.
2009-05-18 13:40:23 -05:00
Glenn Randers-Pehrson
6b60a31ebf Restore png_memset() call
This stuff should be handled in the APNG fork.
2009-05-18 11:55:55 -05:00
Glenn Randers-Pehrson
54028e5943 Revert "png_reset_prev_row" from png.h and pngrutil.c
This should be handled in the APNG fork, not in libpng proper.
2009-05-18 11:49:19 -05:00
Glenn Randers-Pehrson
0c062e839d Conditionally compile png_combine_row() and png_read_finish_row()
which are only used by sequential PNG readers.  This can save some
resources in applications that only do progressive reading.
2009-05-18 10:31:21 -05:00
Glenn Randers-Pehrson
0fcbf05b6d Revert "Set png_ptr->old_prev_row_size=0 to force prev_row to be cleared"
This reverts commit f4276c36c9.
2009-05-18 10:18:00 -05:00
Glenn Randers-Pehrson
f4276c36c9 Set png_ptr->old_prev_row_size=0 to force prev_row to be cleared 2009-05-16 08:47:20 -05:00
Glenn Randers-Pehrson
ba05bddf92 Relocate misplaced #endif directives in pngwrite.c
having to do with sCAL chunk handling
2009-05-16 08:40:25 -05:00
Glenn Randers-Pehrson glennrp@comcast.net
7a63d75a83 Fixed typo in libpng documentation: AVE filter should be AVG filter. 2009-05-15 20:56:43 -05:00
Glenn Randers-Pehrson glennrp@comcast.net
da3f74a70e Bump version to libpng-1.2.37beta02 2009-05-15 20:53:04 -05:00
Glenn Randers-Pehrson
5f26656fc5 Imported from libpng-1.2.37beta01.tar 2009-05-14 05:23:07 -05:00
Glenn Randers-Pehrson
2f76e90d1a Reformatted comments in example.c
Added advice about setting pointers to NULL after png_free(),
capitalized sentences, reformatted long comments in libpng style.
2009-05-13 15:20:53 -05:00
Glenn Randers-Pehrson
1296329f02 Revised commentary in example.c 2009-05-13 07:42:05 -05:00
Glenn Randers-Pehrson
e38b432846 Clarified usage of sig_bit as struct vs sig_bit_p as pointer in example.c
sig_bit was not declared in write_png() and was used differently from
sig_bit in read_png(), as reported by Vincent Torri.  This update changes
sig_bit to sig_bit_p in read_png() and declares sig_bit in write_png().
2009-05-13 05:18:48 -05:00
Glenn Randers-Pehrson
549a5101e7 Fixed inconsistency in use of "row_bytes" in pngrutil.c
The memset() should use "row_bytes" instead of "png_ptr->rowbytes".
This bug was introduced in libpng-1.2.36.
2009-05-12 05:49:10 -05:00
Glenn Randers-Pehrson glennrp@comcast.net
031a8648cb Merged scripts/makefiles and other scripts with libpng-1.4.0beta57.
These are mostly just cosmetic changes.
2009-05-07 17:12:33 -05:00
Glenn Randers-Pehrson glennrp@comcast.net
a8476a8404 Bump internal version to libpng-1.2.37beta01. 2009-05-07 17:09:14 -05:00
Glenn Randers-Pehrson
25c8491fc8 Imported from libpng-1.2.36.tar 2009-05-07 10:59:02 -05:00
Glenn Randers-Pehrson
d0d637dd47 Imported from libpng-1.2.36rc01.tar 2009-04-30 15:29:29 -05:00
Glenn Randers-Pehrson
977c6bd44c Imported from libpng-1.2.36beta05.tar 2009-04-24 15:09:41 -05:00
Glenn Randers-Pehrson
89ad3aa168 Suppress "shadowed declaration" warnings about "gamma" in pngset.c
The variable "gamma" is also defined in math.h on some platforms.
2009-04-20 13:23:24 -05:00
Glenn Randers-Pehrson
55b921dab2 Suppress "shadowed declaration" warnings in pngtest.c
Changed some local variable names such as "buffer" to "buff".
2009-04-20 13:12:07 -05:00
Glenn Randers-Pehrson
92d0fe938f Add PNG_SKIP_SETJMP_CHECK macro 2009-04-20 13:07:01 -05:00
Glenn Randers-Pehrson
d07e9b03c4 Bump versioning to 1.2.36beta05 2009-04-20 13:02:18 -05:00
Glenn Randers-Pehrson
6cbd1cba68 Imported from libpng-1.2.36beta04.tar 2009-04-06 16:18:42 -05:00
Glenn Randers-Pehrson
3b8df1f143 Imported from libpng-1.2.36beta03.tar 2009-04-06 16:18:40 -05:00
Glenn Randers-Pehrson
85f7d0a8d5 Imported from libpng-1.2.36beta02.tar 2009-04-06 16:18:37 -05:00
Glenn Randers-Pehrson
556450a2ff Imported from libpng-1.2.36beta01.tar 2009-04-06 16:18:34 -05:00
Glenn Randers-Pehrson
6048b12510 Imported from libpng-1.2.35.tar 2009-04-06 16:18:32 -05:00
Glenn Randers-Pehrson
8cafc1e1ac Imported from libpng-1.2.35rc02.tar 2009-04-06 16:18:30 -05:00
Glenn Randers-Pehrson
51807d7608 Imported from libpng-1.2.35rc01.tar 2009-04-06 16:18:28 -05:00
Glenn Randers-Pehrson
e104df5bb7 Imported from libpng-1.2.35beta03.tar 2009-04-06 16:18:26 -05:00
Glenn Randers-Pehrson
c6df7e5899 Imported from libpng-1.2.35beta02.tar 2009-04-06 16:18:23 -05:00
Glenn Randers-Pehrson
d0a4300dde Imported from libpng-1.2.35beta01.tar 2009-04-06 16:18:21 -05:00
Glenn Randers-Pehrson
d8865433f9 Imported from libpng-1.2.34.tar 2009-04-06 16:18:19 -05:00
Glenn Randers-Pehrson
9c2bd642ba Imported from libpng-1.2.34rc01.tar 2009-04-06 16:18:17 -05:00
Glenn Randers-Pehrson
09883db208 Imported from libpng-1.2.34beta07.tar 2009-04-06 16:18:14 -05:00
Glenn Randers-Pehrson
f7f68f7160 Imported from libpng-1.2.34beta06.tar 2009-04-06 16:18:12 -05:00
Glenn Randers-Pehrson
31f744a8c0 Imported from libpng-1.2.34beta05.tar 2009-04-06 16:18:10 -05:00
Glenn Randers-Pehrson
bc66c96275 Imported from libpng-1.2.34beta04.tar 2009-04-06 16:18:07 -05:00
Glenn Randers-Pehrson
87c2acdeae Imported from libpng-1.2.34beta03.tar 2009-04-06 16:18:05 -05:00
Glenn Randers-Pehrson
6b90023764 Imported from libpng-1.2.34beta02.tar 2009-04-06 16:18:02 -05:00
Glenn Randers-Pehrson
e502bca962 Imported from libpng-1.2.34beta01.tar 2009-04-06 16:18:00 -05:00
Glenn Randers-Pehrson
c4d44b72e8 Imported from libpng-1.2.33.tar 2009-04-06 16:17:58 -05:00
Glenn Randers-Pehrson
e7324bb94f Imported from libpng-1.2.33rc02.tar 2009-04-06 16:17:56 -05:00
Glenn Randers-Pehrson
8431b2c190 Imported from libpng-1.2.33rc01.tar 2009-04-06 16:17:53 -05:00
Glenn Randers-Pehrson
7d376ccd8c Imported from libpng-1.2.33beta01.tar 2009-04-06 16:17:51 -05:00
Glenn Randers-Pehrson
382410249d Imported from libpng-1.2.32.tar 2009-04-06 16:17:49 -05:00
Glenn Randers-Pehrson
bfb5132362 Imported from libpng-1.2.32rc01.tar 2009-04-06 16:17:47 -05:00
Glenn Randers-Pehrson
4489dbc630 Imported from libpng-1.2.32beta01.tar 2009-04-06 16:17:45 -05:00
Glenn Randers-Pehrson
5c31bc8ffc Imported from libpng-1.2.31.tar 2009-04-06 16:17:42 -05:00
Glenn Randers-Pehrson
baee5f46cf Imported from libpng-1.2.31rc03.tar 2009-04-06 16:17:40 -05:00
Glenn Randers-Pehrson
66ab7ffa15 Imported from libpng-1.2.31rc02.tar 2009-04-06 16:17:37 -05:00
Glenn Randers-Pehrson
32df7eb346 Imported from libpng-1.2.31rc01.tar 2009-04-06 16:17:35 -05:00
Glenn Randers-Pehrson
576b532b45 Imported from libpng-1.2.30.tar 2009-04-06 16:17:33 -05:00
Glenn Randers-Pehrson
b520414d5a Imported from libpng-1.2.30rc08.tar 2009-04-06 16:17:31 -05:00
Glenn Randers-Pehrson
b54fd5c588 Imported from libpng-1.2.30rc07.tar 2009-04-06 16:17:28 -05:00
Glenn Randers-Pehrson
d9b4c01719 Imported from libpng-1.2.30rc06.tar 2009-04-06 16:17:26 -05:00
Glenn Randers-Pehrson
84d5d968a6 Imported from libpng-1.2.30rc05.tar 2009-04-06 16:17:24 -05:00
Glenn Randers-Pehrson
9c8717e42f Imported from libpng-1.2.30rc04.tar 2009-04-06 16:17:21 -05:00
Glenn Randers-Pehrson
3215e97b17 Imported from libpng-1.2.30rc03.tar 2009-04-06 16:17:19 -05:00
Glenn Randers-Pehrson
975e721432 Imported from libpng-1.2.30rc02.tar 2009-04-06 16:17:17 -05:00
Glenn Randers-Pehrson
b8bccdd081 Imported from libpng-1.2.30rc01.tar 2009-04-06 16:17:15 -05:00
Glenn Randers-Pehrson
4310a4d813 Imported from libpng-1.2.30beta04.tar 2009-04-06 16:17:12 -05:00
Glenn Randers-Pehrson
b96b342561 Imported from libpng-1.2.30beta03.tar 2009-04-06 16:17:10 -05:00
Glenn Randers-Pehrson
eb1cd11d57 Imported from libpng-1.2.30beta02.tar 2009-04-06 16:17:07 -05:00
Glenn Randers-Pehrson
a55c72890d Imported from libpng-1.2.30beta01.tar 2009-04-06 16:17:05 -05:00
Glenn Randers-Pehrson
247e230581 Imported from libpng-1.2.29.tar 2009-04-06 16:17:03 -05:00
Glenn Randers-Pehrson
1586ea6fe9 Imported from libpng-1.2.29rc01.tar 2009-04-06 16:17:01 -05:00
Glenn Randers-Pehrson
ae505c50b0 Imported from libpng-1.2.29beta03.tar 2009-04-06 16:16:58 -05:00
Glenn Randers-Pehrson
fce1b4b1fb Imported from libpng-1.2.29beta02.tar 2009-04-06 16:16:55 -05:00
Glenn Randers-Pehrson
c6bcbf4951 Imported from libpng-1.2.29beta01.tar 2009-04-06 16:16:53 -05:00
Glenn Randers-Pehrson
6ed6086da5 Imported from libpng-1.2.28.tar 2009-04-06 16:16:51 -05:00
Glenn Randers-Pehrson
9f7b16ad19 Imported from libpng-1.2.27.tar 2009-04-06 16:16:49 -05:00
Glenn Randers-Pehrson
fc70a92071 Imported from libpng-1.2.27rc01.tar 2009-04-06 16:16:46 -05:00
Glenn Randers-Pehrson
ccaaab2898 Imported from libpng-1.2.27beta06.tar 2009-04-06 16:16:43 -05:00
Glenn Randers-Pehrson
8d36e630f2 Imported from libpng-1.2.27beta05.tar 2009-04-06 16:16:41 -05:00
Glenn Randers-Pehrson
eb1f347bca Imported from libpng-1.2.27beta04.tar 2009-04-06 16:16:38 -05:00
Glenn Randers-Pehrson
7db798186c Imported from libpng-1.2.27beta03.tar 2009-04-06 16:16:36 -05:00
Glenn Randers-Pehrson
a1cd94bfbb Imported from libpng-1.2.27beta02.tar 2009-04-06 16:16:34 -05:00
Glenn Randers-Pehrson
d9d2a6f6d9 Imported from libpng-1.2.27beta01.tar 2009-04-06 16:16:31 -05:00
Glenn Randers-Pehrson
b8c4b82d18 Imported from libpng-1.2.26.tar 2009-04-06 16:16:29 -05:00
Glenn Randers-Pehrson
b8f615d7a1 Imported from libpng-1.2.26rc01.tar 2009-04-06 16:16:27 -05:00
Glenn Randers-Pehrson
35d97eb5c5 Imported from libpng-1.2.26beta06.tar 2009-04-06 16:16:24 -05:00
Glenn Randers-Pehrson
fc15b2e479 Imported from libpng-1.2.26beta05.tar 2009-04-06 16:16:22 -05:00
Glenn Randers-Pehrson
936df0d290 Imported from libpng-1.2.26beta04.tar 2009-04-06 16:16:20 -05:00
Glenn Randers-Pehrson
3236beddf8 Imported from libpng-1.2.26beta03.tar 2009-04-06 16:16:18 -05:00
Glenn Randers-Pehrson
c13f8f10e6 Imported from libpng-1.2.26beta02.tar 2009-04-06 16:16:15 -05:00
Glenn Randers-Pehrson
d8b530b93c Imported from libpng-1.2.26beta01.tar 2009-04-06 16:16:13 -05:00
Glenn Randers-Pehrson
2296f211e8 Imported from libpng-1.2.25.tar 2009-04-06 16:16:10 -05:00
Glenn Randers-Pehrson
a5136b8863 Imported from libpng-1.2.25rc02.tar 2009-04-06 16:16:08 -05:00
Glenn Randers-Pehrson
913bc38217 Imported from libpng-1.2.25beta06.tar 2009-04-06 16:16:05 -05:00
Glenn Randers-Pehrson
4b7dca3d2c Imported from libpng-1.2.25beta05.tar 2009-04-06 16:16:03 -05:00
Glenn Randers-Pehrson
5c58e3ee31 Imported from libpng-1.2.25beta04.tar 2009-04-06 16:16:00 -05:00
Glenn Randers-Pehrson
49f304bd07 Imported from libpng-1.2.25beta03.tar 2009-04-06 16:15:58 -05:00
Glenn Randers-Pehrson
c95be42221 Imported from libpng-1.2.25rc01.tar 2009-04-06 16:15:56 -05:00
Glenn Randers-Pehrson
dbc07e13bb Imported from libpng-1.2.25beta02.tar 2009-04-06 16:15:54 -05:00
Glenn Randers-Pehrson
5ca40ebc22 Imported from libpng-1.2.25beta01.tar 2009-04-06 16:15:51 -05:00
Glenn Randers-Pehrson
a8e07274ae Imported from libpng-1.2.24.tar 2009-04-06 16:15:49 -05:00
Glenn Randers-Pehrson
af99dba018 Imported from libpng-1.2.24rc01.tar 2009-04-06 16:15:46 -05:00
Glenn Randers-Pehrson
03dfa028d2 Imported from libpng-1.2.24beta02.tar 2009-04-06 16:15:44 -05:00
Glenn Randers-Pehrson
541b47ac2a Imported from libpng-1.2.24beta01.tar 2009-04-06 16:15:42 -05:00
Glenn Randers-Pehrson
507a35a9be Imported from libpng-1.2.23.tar 2009-04-06 16:15:39 -05:00
Glenn Randers-Pehrson
1eddb5463e Imported from libpng-1.2.23rc01.tar 2009-04-06 16:15:37 -05:00
Glenn Randers-Pehrson
d91769efd4 Imported from libpng-1.2.23beta05.tar 2009-04-06 16:15:34 -05:00
Glenn Randers-Pehrson
134a8eb272 Imported from libpng-1.2.23beta04.tar 2009-04-06 16:15:32 -05:00
Glenn Randers-Pehrson
930be98598 Imported from libpng-1.2.23beta03.tar 2009-04-06 16:15:30 -05:00
Glenn Randers-Pehrson
28e3cb3e93 Imported from libpng-1.2.23beta02.tar 2009-04-06 16:15:28 -05:00
Glenn Randers-Pehrson
6328671ef8 Imported from libpng-1.2.23beta01.tar 2009-04-06 16:15:25 -05:00
Glenn Randers-Pehrson
fab1959d00 Imported from libpng-1.2.22.tar 2009-04-06 16:15:23 -05:00
Glenn Randers-Pehrson
5ab788cd84 Imported from libpng-1.2.22rc1.tar 2009-04-06 16:15:21 -05:00
Glenn Randers-Pehrson
ce2a6d3739 Imported from libpng-1.2.22beta4.tar 2009-04-06 16:15:18 -05:00
Glenn Randers-Pehrson
40dd10dfb2 Imported from libpng-1.2.22beta3.tar 2009-04-06 16:15:16 -05:00
Glenn Randers-Pehrson
e41076e082 Imported from libpng-1.2.22beta2.tar 2009-04-06 16:15:14 -05:00
Glenn Randers-Pehrson
582fec4e11 Imported from libpng-1.2.22beta1.tar 2009-04-06 16:15:11 -05:00
Glenn Randers-Pehrson
42ae02aa08 Imported from libpng-1.2.21.tar 2009-04-06 16:15:08 -05:00
Glenn Randers-Pehrson
79e3fc64c4 Imported from libpng-1.2.21rc3.tar 2009-04-06 16:15:06 -05:00
Glenn Randers-Pehrson
b188d671d1 Imported from libpng-1.2.21rc2.tar 2009-04-06 16:15:04 -05:00
Glenn Randers-Pehrson
5ecf1b53ea Imported from libpng-1.2.21rc1.tar 2009-04-06 16:15:01 -05:00
Glenn Randers-Pehrson
0636311d37 Imported from libpng-1.2.21beta2.tar 2009-04-06 16:14:59 -05:00
Glenn Randers-Pehrson
219d3b449f Imported from libpng-1.2.21beta1.tar 2009-04-06 16:14:57 -05:00
Glenn Randers-Pehrson
22eaa89c5a Imported from libpng-1.2.20.tar 2009-04-06 16:14:55 -05:00
Glenn Randers-Pehrson
79e28a4c2e Imported from libpng-1.2.20rc6.tar 2009-04-06 16:14:52 -05:00
Glenn Randers-Pehrson
db05b1eb2b Imported from libpng-1.2.20rc5.tar 2009-04-06 16:14:50 -05:00
Glenn Randers-Pehrson
d20666a228 Imported from libpng-1.2.20rc4.tar 2009-04-06 16:14:48 -05:00
Glenn Randers-Pehrson
9cc7b03503 Imported from libpng-1.2.20rc3.tar 2009-04-06 16:14:45 -05:00
Glenn Randers-Pehrson
b38f12d519 Imported from libpng-1.2.20rc2.tar 2009-04-06 16:14:43 -05:00
Glenn Randers-Pehrson
e736f1ead9 Imported from libpng-1.2.20rc1.tar 2009-04-06 16:14:40 -05:00
Glenn Randers-Pehrson
b56c1f6023 Imported from libpng-1.2.20beta04.tar 2009-04-06 16:14:37 -05:00
Glenn Randers-Pehrson
268f0d64fc Imported from libpng-1.2.20beta03.tar 2009-04-06 16:14:35 -05:00
Glenn Randers-Pehrson
b3ea17736b Imported from libpng-1.2.20beta02.tar 2009-04-06 16:14:33 -05:00
Glenn Randers-Pehrson
963daeaec5 Imported from libpng-1.2.20beta01.tar 2009-04-06 16:14:30 -05:00
Glenn Randers-Pehrson
249bd44ebc Imported from libpng-1.2.19.tar 2009-04-06 16:14:28 -05:00
Glenn Randers-Pehrson
04a1b1c123 Imported from libpng-1.2.19rc6.tar 2009-04-06 16:14:25 -05:00
Glenn Randers-Pehrson
3922e7afc3 Imported from libpng-1.2.19rc5.tar 2009-04-06 16:14:23 -05:00
Glenn Randers-Pehrson
f0a97a0d80 Imported from libpng-1.2.19rc4.tar 2009-04-06 16:14:21 -05:00
Glenn Randers-Pehrson
88713fd590 Imported from libpng-1.2.19rc3.tar 2009-04-06 16:14:18 -05:00
Glenn Randers-Pehrson
394759e0c8 Imported from libpng-1.2.19rc2.tar 2009-04-06 16:14:16 -05:00
Glenn Randers-Pehrson
c229f65dcf Imported from libpng-1.2.19rc1.tar 2009-04-06 16:14:13 -05:00
Glenn Randers-Pehrson
f929861609 Imported from libpng-1.2.19beta31.tar 2009-04-06 16:14:10 -05:00
Glenn Randers-Pehrson
f024ce7675 Imported from libpng-1.2.19beta30.tar 2009-04-06 16:14:08 -05:00
Glenn Randers-Pehrson
f3fcf00392 Imported from libpng-1.2.19beta29.tar 2009-04-06 16:14:05 -05:00
Glenn Randers-Pehrson
08313ef870 Imported from libpng-1.2.19beta28.tar 2009-04-06 16:14:03 -05:00
Glenn Randers-Pehrson
911c469d69 Imported from libpng-1.2.19beta27.tar 2009-04-06 16:14:00 -05:00
Glenn Randers-Pehrson
07c089ee04 Imported from libpng-1.2.19beta26.tar 2009-04-06 16:13:58 -05:00
Glenn Randers-Pehrson
dadc944810 Imported from libpng-1.2.19beta25.tar 2009-04-06 16:13:55 -05:00
Glenn Randers-Pehrson
80663032a9 Imported from libpng-1.2.19beta24.tar 2009-04-06 16:13:53 -05:00
Glenn Randers-Pehrson
67c75ee7f0 Imported from libpng-1.2.19beta23.tar 2009-04-06 16:13:51 -05:00
Glenn Randers-Pehrson
62626737a5 Imported from libpng-1.2.19beta22.tar 2009-04-06 16:13:48 -05:00
Glenn Randers-Pehrson
e404eed318 Imported from libpng-1.2.19beta21.tar 2009-04-06 16:13:46 -05:00
Glenn Randers-Pehrson
3c115428ea Imported from libpng-1.2.19beta20.tar 2009-04-06 16:13:43 -05:00
Glenn Randers-Pehrson
db40ca4aca Imported from libpng-1.2.19beta19.tar 2009-04-06 16:13:41 -05:00
Glenn Randers-Pehrson
f456d0d6bb Imported from libpng-1.2.19beta18.tar 2009-04-06 16:13:38 -05:00
Glenn Randers-Pehrson
06fe17eb9f Imported from libpng-1.2.19beta17.tar 2009-04-06 16:13:36 -05:00
Glenn Randers-Pehrson
7945bdb88f Imported from libpng-1.2.19beta16.tar 2009-04-06 16:13:33 -05:00
Glenn Randers-Pehrson
f7794ec181 Imported from libpng-1.2.19beta15.tar 2009-04-06 16:13:31 -05:00
Glenn Randers-Pehrson
16851b3eb3 Imported from libpng-1.2.19beta14.tar 2009-04-06 16:13:29 -05:00
Glenn Randers-Pehrson
c72d8d4d29 Imported from libpng-1.2.19beta13.tar 2009-04-06 16:13:26 -05:00
Glenn Randers-Pehrson
2b7436558e Imported from libpng-1.2.19beta12.tar 2009-04-06 16:13:24 -05:00
Glenn Randers-Pehrson
e59c47d5b1 Imported from libpng-1.2.19beta11.tar 2009-04-06 16:13:22 -05:00
Glenn Randers-Pehrson
c1523ad16d Imported from libpng-1.2.19beta10.tar 2009-04-06 16:13:19 -05:00
Glenn Randers-Pehrson
d0be8e27de Imported from libpng-1.2.19beta9.tar 2009-04-06 16:13:17 -05:00
Glenn Randers-Pehrson
5c66b81289 Imported from libpng-1.2.19beta8.tar 2009-04-06 16:13:15 -05:00
Glenn Randers-Pehrson
1a42cb2013 Imported from libpng-1.2.19beta7.tar 2009-04-06 16:13:12 -05:00
Glenn Randers-Pehrson
cf2978cbbb Imported from libpng-1.2.19beta6.tar 2009-04-06 16:13:10 -05:00
Glenn Randers-Pehrson
8a9733e777 Imported from libpng-1.2.19beta5.tar 2009-04-06 16:13:07 -05:00
Glenn Randers-Pehrson
ba880c5501 Imported from libpng-1.2.19beta4.tar 2009-04-06 16:13:05 -05:00
Glenn Randers-Pehrson
788f962fbd Imported from libpng-1.2.19beta3.tar 2009-04-06 16:13:03 -05:00
Glenn Randers-Pehrson
12f8283560 Imported from libpng-1.2.19beta2.tar 2009-04-06 16:13:01 -05:00
Glenn Randers-Pehrson
4d27f6b77b Imported from libpng-1.2.19beta1.tar 2009-04-06 16:12:58 -05:00
Glenn Randers-Pehrson
413ed28246 Imported from libpng-1.2.18.tar 2009-04-06 16:12:56 -05:00
Glenn Randers-Pehrson
ad084f559a Imported from libpng-1.2.17.tar 2009-04-06 16:12:54 -05:00
Glenn Randers-Pehrson
3832ab1c21 Imported from libpng-1.2.17rc4.tar 2009-04-06 16:12:52 -05:00
Glenn Randers-Pehrson
999bceb413 Imported from libpng-1.2.17rc3.tar 2009-04-06 16:12:49 -05:00
Glenn Randers-Pehrson
e8f6605642 Imported from libpng-1.2.17rc2.tar 2009-04-06 16:12:47 -05:00
Glenn Randers-Pehrson
3148c65323 Imported from libpng-1.2.17rc1.tar 2009-04-06 16:12:45 -05:00
Glenn Randers-Pehrson
0a3d2cc68b Imported from libpng-1.2.17beta2.tar 2009-04-06 16:12:43 -05:00
Glenn Randers-Pehrson
11cf76edb3 Imported from libpng-1.2.17beta1.tar 2009-04-06 16:12:40 -05:00
Glenn Randers-Pehrson
8833ad415c Imported from libpng-1.2.16.tar 2009-04-06 16:12:38 -05:00
Glenn Randers-Pehrson
bc290d8e6c Imported from libpng-1.2.16rc1.tar 2009-04-06 16:12:35 -05:00
Glenn Randers-Pehrson
9c5b3a4060 Imported from libpng-1.2.16beta2.tar 2009-04-06 16:12:33 -05:00
Glenn Randers-Pehrson
04bbba55c7 Imported from libpng-1.2.16beta1.tar 2009-04-06 16:12:31 -05:00
Glenn Randers-Pehrson
40b70d5373 Imported from libpng-1.2.15.tar 2009-04-06 16:12:29 -05:00
Glenn Randers-Pehrson
833d32646e Imported from libpng-1.2.15rc5.tar 2009-04-06 16:12:27 -05:00
Glenn Randers-Pehrson
6cdefb3cac Imported from libpng-1.2.15rc4.tar 2009-04-06 16:12:25 -05:00
Glenn Randers-Pehrson
f959d3ee7a Imported from libpng-1.2.15rc3.tar 2009-04-06 16:12:22 -05:00
Glenn Randers-Pehrson
b0952eabc7 Imported from libpng-1.2.15rc2.tar 2009-04-06 16:12:20 -05:00
Glenn Randers-Pehrson
43bb4ba4bf Imported from libpng-1.2.15rc1.tar 2009-04-06 16:12:18 -05:00
Glenn Randers-Pehrson
c2de22abeb Imported from libpng-1.2.15beta6.tar 2009-04-06 16:12:15 -05:00
Glenn Randers-Pehrson
a0113ee049 Imported from libpng-1.2.15beta5.tar 2009-04-06 16:12:13 -05:00
Glenn Randers-Pehrson
05db10fda3 Imported from libpng-1.2.15beta4.tar 2009-04-06 16:12:11 -05:00
Glenn Randers-Pehrson
948ee23a2a Imported from libpng-1.2.15beta3.tar 2009-04-06 16:12:08 -05:00
Glenn Randers-Pehrson
271a2931b6 Imported from libpng-1.2.15beta2.tar 2009-04-06 16:12:06 -05:00
Glenn Randers-Pehrson
9fe05edd47 Imported from libpng-1.2.15beta1.tar 2009-04-06 16:12:04 -05:00
Glenn Randers-Pehrson
c2573702cf Imported from libpng-1.2.14.tar 2009-04-06 16:12:02 -05:00
Glenn Randers-Pehrson
b8e76b586e Imported from libpng-1.2.14rc1.tar 2009-04-06 16:11:59 -05:00
Glenn Randers-Pehrson
11a89964b9 Imported from libpng-1.2.14beta2.tar 2009-04-06 16:11:57 -05:00
Glenn Randers-Pehrson
b5bfcbae59 Imported from libpng-1.2.14beta1.tar 2009-04-06 16:11:55 -05:00
Glenn Randers-Pehrson
efe95a6953 Imported from libpng-1.2.13.tar 2009-04-06 16:11:53 -05:00
Glenn Randers-Pehrson
e88a5eca8b Imported from libpng-1.2.13rc2.tar 2009-04-06 16:11:51 -05:00
Glenn Randers-Pehrson
2e3980e1de Imported from libpng-1.2.13rc1.tar 2009-04-06 16:11:49 -05:00
Glenn Randers-Pehrson
0ff85c6923 Imported from libpng-1.2.13beta1.tar 2009-04-06 16:11:47 -05:00
Glenn Randers-Pehrson
e3358d1839 Imported from libpng-1.2.12.tar 2009-04-06 16:11:45 -05:00
Glenn Randers-Pehrson
f5eac0c7fa Imported from libpng-1.2.11.tar 2009-04-06 16:11:42 -05:00
Glenn Randers-Pehrson
6034592a27 Imported from libpng-1.2.11rc5.tar 2009-04-06 16:11:40 -05:00
Glenn Randers-Pehrson
7b00d826d3 Imported from libpng-1.2.11rc3.tar 2009-04-06 16:11:37 -05:00
Glenn Randers-Pehrson
52ef3586b9 Imported from libpng-1.2.11rc2.tar 2009-04-06 16:11:35 -05:00
Glenn Randers-Pehrson
4118fcdd14 Imported from libpng-1.2.11rc1.tar 2009-04-06 16:11:33 -05:00
Glenn Randers-Pehrson
d9e18047d3 Imported from libpng-1.2.11beta4.tar 2009-04-06 16:11:31 -05:00
Glenn Randers-Pehrson
734f320ade Imported from libpng-1.2.11beta3.tar 2009-04-06 16:11:29 -05:00
Glenn Randers-Pehrson
79f25cdeb2 Imported from libpng-1.2.11beta2cos.tar 2009-04-06 16:11:27 -05:00
Glenn Randers-Pehrson
413f3db617 Imported from libpng-1.2.11beta2.tar 2009-04-06 16:11:25 -05:00
Glenn Randers-Pehrson
4db11d5143 Imported from libpng-1.2.11beta1.tar 2009-04-06 16:11:23 -05:00
Glenn Randers-Pehrson
78d28c6b96 Imported from libpng-1.2.10.tar 2009-04-06 16:11:21 -05:00
Glenn Randers-Pehrson
24df7333a2 Imported from libpng-1.2.10rc3.tar 2009-04-06 16:11:18 -05:00
Glenn Randers-Pehrson
8694cd8bf5 Imported from libpng-1.2.10rc2.tar 2009-04-06 16:11:16 -05:00
202 changed files with 24437 additions and 37324 deletions

View File

@@ -1,60 +1,62 @@
Libpng 1.5.2 - March 31, 2011 Libpng 1.2.41beta03 - October 1, 2009
This is a public release of libpng, intended for use in production codes. 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.
Files available for download: Files available for download:
Source files with LF line endings (for Unix/Linux) and with a Source files with LF line endings (for Unix/Linux) and with a
"configure" script "configure" script
libpng-1.5.2.tar.xz (LZMA-compressed, recommended) libpng-1.2.41beta03.tar.xz (LZMA-compressed, recommended)
libpng-1.5.2.tar.gz libpng-1.2.41beta03.tar.gz
libpng-1.5.2.tar.bz2 libpng-1.2.41beta03.tar.bz2
Source files with LF line endings (for Unix/Linux) without the
"configure" script
libpng-1.2.41beta03-no-config.tar.xz (LZMA-compressed, recommended)
libpng-1.2.41beta03-no-config.tar.gz
libpng-1.2.41beta03-no-config.tar.bz2
Source files with CRLF line endings (for Windows), without the Source files with CRLF line endings (for Windows), without the
"configure" script "configure" script
lpng152.7z (LZMA-compressed, recommended) lp1241b03.zip
lpng152.zip lp1241b03.7z
lp1241b03.tar.bz2
Project files
libpng-1.2.41beta03-project-netware.zip
libpng-1.2.41beta03-project-wince.zip
Other information: Other information:
libpng-1.5.2-README.txt libpng-1.2.41beta03-README.txt
libpng-1.5.2-LICENSE.txt libpng-1.2.41beta03-KNOWNBUGS.txt
libpng-1.2.41beta03-LICENSE.txt
libpng-1.2.41beta03-Y2K-compliance.txt
libpng-1.2.41beta03-[previous version]-diff.txt
Changes since the last public release (1.5.2): Changes since the last public release (1.2.40):
More -Wshadow fixes for older gcc compilers. Older gcc versions apparently version 1.2.41beta01 [September 25, 2009]
check formal parameters names in function declarations (as well as Moved redundant IHDR checking into new png_check_IHDR() in png.c
definitions) to see if they match a name in the global namespace. and report all errors found in the IHDR data.
Revised PNG_EXPORTA macro to not use an empty parameter, to accommodate the Eliminated useless call to png_check_cHRM() from pngset.c
old VisualC++ preprocessor. Expanded TAB characters in pngrtran.c
Turned on interlace handling in png_read_png().
Fixed gcc pendantic warnings. version 1.2.41beta02 [September 30, 2009]
Handle longjmp in Cygwin. Revised png_check_IHDR().
Fixed png_get_current_row_number() in the interlaced case.
Cleaned up ALPHA flags and transformations. version 1.2.41beta03 [October 1, 2009]
Implemented expansion to 16 bits. Revised png_check_IHDR() again, to check info_ptr members instead of
Fixed mistake in the descriptions of user read_transform and write_transform the contents of the returned parameters.
function prototypes in the manual. The row_info struct is png_row_infop.
Corrected png_get_current_row_number documentation
Fixed the read/write row callback documentation.
This documents the current behavior, where the callback is called after
every row with information pertaining to the next row.
Fixed scripts/makefile.vcwin32
Updated contrib/pngsuite/README to add the word "modify".
Define PNG_ALLOCATED and other attributes to blank when _MSC_VER<1300.
ifdef out mask arrays in pngread.c when interlacing is not supported.
Added a hint to try CPP=/bin/cpp if "cpp -E" fails in scripts/pnglibconf.mak
and in contrib/pngminim/*/makefile, eg., on SunOS 5.10, and removed "strip"
from the makefiles.
Fixed a bug (present since libpng-1.0.7) that makes png_handle_sPLT() fail
to compile when PNG_NO_POINTER_INDEXING is defined (Chubanov Kirill)
Don't include standard header files in png.h while building the symbol table,
to avoid cpp failure on SunOS (introduced PNG_BUILDING_SYMBOL_TABLE macro).
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe) or to glennrp at users.sourceforge.net to subscribe) or to glennrp at users.sourceforge.net

2790
CHANGES

File diff suppressed because it is too large Load Diff

View File

@@ -1,406 +0,0 @@
cmake_minimum_required(VERSION 2.4.4)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
if(UNIX AND NOT DEFINED CMAKE_BUILD_TYPE)
if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4)
# workaround CMake 2.4.x bug
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
"Choose the type of build, options are:
None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used)
Debug
Release
RelWithDebInfo
MinSizeRel.")
else()
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
"Choose the type of build, options are:
None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used)
Debug
Release
RelWithDebInfo
MinSizeRel.")
endif()
endif()
project(libpng C)
enable_testing()
# Copyright (C) 2007-2011 Glenn Randers-Pehrson
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 5)
set(PNGLIB_RELEASE 2)
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
# needed packages
find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIR})
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()
else()
# not needed on windows
set(M_LIBRARY "")
endif()
# COMMAND LINE OPTIONS
if(DEFINED PNG_SHARED)
option(PNG_SHARED "Build shared lib" ${PNG_SHARED})
else()
option(PNG_SHARED "Build shared lib" ON)
endif()
if(DEFINED PNG_STATIC)
option(PNG_STATIC "Build static lib" ${PNG_STATIC})
else()
option(PNG_STATIC "Build static lib" ON)
endif()
if(MINGW)
option(PNG_TESTS "Build pngtest" NO)
else()
option(PNG_TESTS "Build pngtest" YES)
endif()
option(PNG_NO_CONSOLE_IO "FIXME" YES)
option(PNG_NO_STDIO "FIXME" YES)
option(PNG_DEBUG "Build with debug output" NO)
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()
# 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()
# SET LIBNAME
set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})
# to distinguish between debug and release lib
set(CMAKE_DEBUG_POSTFIX "d")
# Use the prebuilt pnglibconf.h file from the scripts folder
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt
${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
# OUR SOURCES
set(libpng_public_hdrs
png.h
pngconf.h
${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h
)
set(libpng_sources
${libpng_public_hdrs}
pngdebug.h
pnginfo.h
pngpriv.h
pngstruct.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(-DPNG_CONFIGURE_LIBPNG)
if(_AIX)
add_definitions(-D_ALL_SOURCE)
endif(_AIX)
if(MSVC)
add_definitions(-DPNG_NO_MODULEDEF -D_CRT_SECURE_NO_DEPRECATE)
endif(MSVC)
if(PNG_SHARED OR NOT MSVC)
#if building msvc static this has NOT to be defined
add_definitions(-DZLIB_DLL)
endif()
if(PNG_CONSOLE_IO_SUPPORTED)
add_definitions(-DPNG_CONSOLE_IO_SUPPORTED)
endif()
if(PNG_NO_CONSOLE_IO)
add_definitions(-DPNG_NO_CONSOLE_IO)
endif()
if(PNG_NO_STDIO)
add_definitions(-DPNG_NO_STDIO)
endif()
if(PNG_DEBUG)
add_definitions(-DPNG_DEBUG)
endif()
if(NOT M_LIBRARY AND NOT WIN32)
add_definitions(-DPNG_NO_FLOATING_POINT_SUPPORTED)
endif()
# NOW BUILD OUR TARGET
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
if(PNG_SHARED)
add_library(${PNG_LIB_NAME} SHARED ${libpng_sources})
if(MSVC)
# msvc does not append 'lib' - do it here to have consistent name
set_target_properties(${PNG_LIB_NAME} PROPERTIES PREFIX "lib")
set_target_properties(${PNG_LIB_NAME} PROPERTIES IMPORT_PREFIX "lib")
endif()
target_link_libraries(${PNG_LIB_NAME} ${ZLIB_LIBRARY} ${M_LIBRARY})
endif()
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})
if(MSVC)
# msvc does not append 'lib' - do it here to have consistent name
set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES PREFIX "lib")
endif()
target_link_libraries(${PNG_LIB_NAME_STATIC} ${ZLIB_LIBRARY} ${M_LIBRARY})
endif()
if(PNG_SHARED AND WIN32)
set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL)
endif()
if(PNG_TESTS AND PNG_SHARED)
# 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 ./pngtest ${CMAKE_CURRENT_SOURCE_DIR}/pngtest.png)
endif()
#
# Set a variable with CMake code which:
# Creates a symlink from src to dest (if possible) or alternatively
# copies if different.
macro(_png_generate_symlink_code CODE SRC DEST)
if(WIN32 AND NOT CYGWIN)
set(_png_gsc_message "Copying ${SRC} to ${DEST} if needed")
set(_png_gsc_operation "copy_if_different")
else()
set(_png_gsc_message "Symlinking ${SRC} to ${DEST}")
set(_png_gsc_operation "create_symlink")
endif()
set(${CODE} "
message(STATUS \"${_png_gsc_message}\")
execute_process(COMMAND \${CMAKE_COMMAND} -E ${_png_gsc_operation}
\"${SRC}\" \"${DEST}\")
")
endmacro()
# CREATE PKGCONFIG FILES
# we use the same files like ./configure, so we have to set its vars
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR lib)
endif(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
set(LIBS "-lz -lm")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY)
_png_generate_symlink_code(PNG_PC_INSTALL_CODE
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
${CMAKE_CURRENT_BINARY_DIR}/libpng.pc)
install(CODE ${PNG_PC_INSTALL_CODE})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY)
_png_generate_symlink_code(PNG_CONFIG_INSTALL_CODE
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
${CMAKE_CURRENT_BINARY_DIR}/libpng-config)
install(CODE ${PNG_CONFIG_INSTALL_CODE})
# SET UP LINKS
if(PNG_SHARED)
set_target_properties(${PNG_LIB_NAME} PROPERTIES
# VERSION 15.${PNGLIB_RELEASE}.1.5.2
VERSION 15.${PNGLIB_RELEASE}.0
SOVERSION 15
CLEAN_DIRECT_OUTPUT 1)
endif()
if(PNG_STATIC)
# MSVC doesn't use a different file extension for shared vs. static
# libs. We are able to change OUTPUT_NAME to remove the _static
# for all other platforms.
if(NOT MSVC)
set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES
OUTPUT_NAME ${PNG_LIB_NAME}
CLEAN_DIRECT_OUTPUT 1)
endif()
endif()
# If CMake > 2.4.x, we set a variable used below to export
# targets to an export file.
# TODO: Use VERSION_GREATER after our cmake_minimum_required >= 2.6.2
if(CMAKE_MAJOR_VERSION GREATER 1 AND CMAKE_MINOR_VERSION GREATER 4)
set(PNG_EXPORT_RULE EXPORT libpng)
elseif(CMAKE_MAJOR_VERSION GREATER 2) # future proof
set(PNG_EXPORT_RULE EXPORT libpng)
endif()
# INSTALL
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
if(PNG_SHARED)
install(TARGETS ${PNG_LIB_NAME}
${PNG_EXPORT_RULE}
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
# Create a symlink for libpng.dll.a => libpng15.dll.a on Cygwin
if(CYGWIN)
_png_generate_symlink_code(PNG_SHARED_IMPLIB_INSTALL_CODE
${PNGLIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}
libpng${CMAKE_IMPORT_LIBRARY_SUFFIX})
install(CODE ${PNG_SHARED_IMPLIB_INSTALL_CODE})
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
if(NOT WIN32)
IF(CMAKE_LIBRARY_OUTPUT_DIRECTORY)
_png_generate_symlink_code(PNG_SHARED_INSTALL_CODE
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${PNGLIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX})
install(CODE ${PNG_SHARED_INSTALL_CODE})
install(FILES
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
ELSE(CMAKE_LIBRARY_OUTPUT_DIRECTORY)
_png_generate_symlink_code(PNG_SHARED_INSTALL_CODE
${PNGLIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
libpng${CMAKE_SHARED_LIBRARY_SUFFIX})
install(CODE ${PNG_SHARED_INSTALL_CODE})
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
ENDIF(CMAKE_LIBRARY_OUTPUT_DIRECTORY)
endif()
endif()
if(PNG_STATIC)
install(TARGETS ${PNG_LIB_NAME_STATIC}
${PNG_EXPORT_RULE}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(NOT WIN32 OR CYGWIN)
IF(CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
_png_generate_symlink_code(PNG_STATIC_INSTALL_CODE
${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/${PNGLIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX})
install(CODE ${PNG_STATIC_INSTALL_CODE})
install(FILES
${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
ELSE(CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
_png_generate_symlink_code(PNG_STATIC_INSTALL_CODE
${PNGLIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
libpng${CMAKE_STATIC_LIBRARY_SUFFIX})
install(CODE ${PNG_STATIC_INSTALL_CODE})
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
ENDIF(CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
endif()
endif()
endif()
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
install(FILES ${libpng_public_hdrs} DESTINATION include)
install(FILES ${libpng_public_hdrs} DESTINATION include/${PNGLIB_NAME})
endif()
if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL )
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
DESTINATION bin)
endif()
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
# Install man pages
if(NOT PNG_MAN_DIR)
set(PNG_MAN_DIR "share/man")
endif()
install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3)
install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5)
# Install pkg-config files
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config
DESTINATION bin)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
DESTINATION bin)
endif()
# On versions of CMake that support it, create an export file CMake
# users can include() to import our targets
if(PNG_EXPORT_RULE AND NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL )
install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake)
endif()
# what's with libpng-$VER%.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

160
INSTALL
View File

@@ -1,5 +1,5 @@
Installing libpng Installing libpng version 1.2.41beta03 - October 1, 2009
On Unix/Linux and similar systems, you can simply type On Unix/Linux and similar systems, you can simply type
@@ -13,16 +13,10 @@ 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 up-to-date set of tools, running ./autogen.sh before running ./configure
may fix the problem. You can also run the individual commands in may fix the problem. You can also run the individual commands in
autogen.sh with the --force option, if supported by your version of autogen.sh with the --force option, if supported by your version of
the tools. To be really sure that you aren't using any of the included the tools. If you run 'libtoolize --force', though, this will replace
pre-built scripts, you can do this: the distributed, patched, version of ltmain.sh with an unpatched version
and your shared library builds may fail to produce libraries with the
./configure --enable-maintainer-mode correct version numbers.
make maintainer-clean
./autogen.sh
./configure [--prefix=/path] [other options]
make
make install
make check
Instead, you can use one of the custom-built makefiles in the Instead, you can use one of the custom-built makefiles in the
"scripts" directory "scripts" directory
@@ -31,29 +25,27 @@ Instead, you can use one of the custom-built makefiles in the
make test make test
make install make install
The files that are presently available in the scripts directory
are listed and described in scripts/README.txt.
Or you can use one of the "projects" in the "projects" directory. 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 Before installing libpng, you must first install zlib, if it
is not already on your system. zlib can usually be found is not already on your system. zlib can usually be found
wherever you got libpng. zlib can be placed in another directory, wherever you got libpng. zlib can be placed in another directory,
at the same level as libpng. at the same level as libpng.
If you want to use "cmake" (see www.cmake.org), type
cmake . -DCMAKE_INSTALL_PREFIX=/path
make
make install
If your system already has a preinstalled zlib you will still need If your system already has a preinstalled zlib you will still need
to have access to the zlib.h and zconf.h include files that to have access to the zlib.h and zconf.h include files that
correspond to the version of zlib that's installed. correspond to the version of zlib that's installed.
You can rename the directories that you downloaded (they You can rename the directories that you downloaded (they
might be called "libpng-x.y.z" or "libpngNN" and "zlib-1.2.5" might be called "libpng-1.2.41beta03" or "lpng109" and "zlib-1.2.1"
or "zlib125") so that you have directories called "zlib" and "libpng". or "zlib121") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this: Your directory structure should look like this:
@@ -63,25 +55,19 @@ Your directory structure should look like this:
README README
*.h *.h
*.c *.c
CMakeLists.txt => "cmake" script
configuration files:
configure.ac, configure, Makefile.am, Makefile.in,
autogen.sh, config.guess, ltmain.sh, missing, libpng.pc.in,
libpng-config.in, aclocal.m4, config.h.in, config.sub,
depcomp, install-sh, mkinstalldirs, test-pngtest.sh
contrib contrib
gregbook gregbook
pngminim
pngminus pngminus
pngsuite pngsuite
visupng visupng
projects projects
visualc71 beos
vstudio c5builder (Borland)
visualc6 (msvc)
netware.txt
wince.txt
scripts scripts
makefile.* makefile.*
*.def (module definition files)
etc.
pngtest.png pngtest.png
etc. etc.
zlib zlib
@@ -96,13 +82,80 @@ distribution of libpng. It is available in both tar.gz (UNIX style line
endings) and zip (DOS style line endings) formats. endings) and zip (DOS style line endings) formats.
If you are building libpng with MSVC, you can enter the If you are building libpng with MSVC, you can enter the
libpng projects\visualc6 or visualc71 directory and follow the instructions libpng projects\visualc6 directory and follow the instructions in
in README.txt. projects\visualc6\README.txt.
Otherwise enter the zlib directory and follow the instructions in zlib/README, You can build libpng for WindowsCE by downloading and installing
the projects\wince directory as instructed in the projects\wince.txt file, and
then following the instructions in the README* files. Similarly, you can
build libpng for Netware or Beos as instructed in projects\netware.txt
or projects\beos.
Else enter the zlib directory and follow the instructions in zlib/README,
then come back here and run "configure" or choose the appropriate then come back here and run "configure" or choose the appropriate
makefile.sys in the scripts directory. 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.41beta03)
makefile.linux => Linux/ELF makefile
(gcc, creates libpng12.so.0.1.2.41beta03)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
ftp://ftp.cs.wisc.edu/ghost)
makefile.aix => AIX/gcc makefile
makefile.cygwin => Cygwin/gcc makefile
makefile.darwin => Darwin makefile, can use on MacosX
makefile.dec => DEC Alpha UNIX makefile
makefile.freebsd => FreeBSD makefile
makefile.hpgcc => HPUX makefile using gcc
makefile.hpux => HPUX (10.20 and 11.00) makefile
makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64-bit
makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static)
makefile.intel => Intel C/C++ version 4.0 and later
libpng.icc => Project file for IBM VisualAge/C++ version 4.0 or later
makefile.netbsd => NetBSD/cc makefile, uses PNGGCCRD, makes libpng.so.
makefile.ne12bsd => NetBSD/cc makefile, uses PNGGCCRD,
makes libpng12.so
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.41beta03)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile (gcc,
creates libpng12.so.0.1.2.41beta03)
makefile.solaris-x86 => Solaris/intelMMX 2.X makefile (gcc,
creates libpng12.so.0.1.2.41beta03)
makefile.so9 => Solaris 9 makefile (gcc,
creates libpng12.so.0.1.2.41beta03)
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
makefile.mips => MIPS makefile
makefile.acorn => Acorn makefile
makefile.amiga => Amiga makefile
smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC compiler
(Requires SCOPTIONS, copied from scripts/SCOPTIONS.ppc)
makefile.atari => Atari makefile
makefile.beos => BEOS makefile for X86
makefile.bor => Borland makefile (uses bcc)
makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode)
makefile.tc3 => Turbo C 3.0 makefile
makefile.dj2 => DJGPP 2 makefile
makefile.msc => Microsoft C makefile
makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and later
makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
pngos2.def => OS/2 module definition file used by makefile.os2
makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model
makevms.com => VMS build script
descrip.mms => VMS makefile for MMS or MMK
SCOPTIONS.ppc => Used with smakefile.ppc
Copy the file (or files) that you need from the Copy the file (or files) that you need from the
scripts directory into this directory, for example scripts directory into this directory, for example
@@ -112,7 +165,7 @@ scripts directory into this directory, for example
Read the makefile to see if you need to change any source or Read the makefile to see if you need to change any source or
target directories to match your preferences. target directories to match your preferences.
Then read pnglibconf.dfa to see if you want to make any configuration Then read pngconf.h to see if you want to make any configuration
changes. changes.
Then just run "make" which will create the libpng library in Then just run "make" which will create the libpng library in
@@ -130,6 +183,37 @@ do that, run "make install" in the zlib directory first if necessary).
Some also allow you to run "make test-installed" after you have Some also allow you to run "make test-installed" after you have
run "make install". run "make install".
Further information can be found in the README and libpng-manual.txt If you encounter a compiler error message complaining about the
lines
__png.h__ already includes setjmp.h;
__dont__ include it again.;
This means you have compiled another module that includes setjmp.h,
which is hazardous because the two modules might not include exactly
the same setjmp.h. If you are sure that you know what you are doing
and that they are exactly the same, then you can comment out or
delete the two lines. Better yet, use the cexcept interface
instead, as demonstrated in contrib/visupng of the libpng distribution.
Further information can be found in the README and libpng.txt
files, in the individual makefiles, in png.h, and the manual pages files, in the individual makefiles, in png.h, and the manual pages
libpng.3 and png.5. libpng.3 and png.5.
Using the ./configure script -- 16 December 2002.
=================================================
The ./configure script should work compatibly with what scripts/makefile.*
did, however there are some options you need to add to configure explicitly,
which previously was done semi-automatically (if you didn't edit
scripts/makefile.* yourself, that is)
CFLAGS="-Wall -O -funroll-loops \
-malign-loops=2 -malign-functions=2" ./configure --prefix=/usr/include \
--with-pkgconfigdir=/usr/lib/pkgconfig --includedir=/usr/include
You can alternatively specify --includedir=/usr/include, /usr/local/include,
/usr/include/png12, or whatever.

22
KNOWNBUG Normal file
View File

@@ -0,0 +1,22 @@
Known bugs in libpng version 1.2.41beta03
1. February 23, 2006: The custom makefiles don't build libpng with -lz.
STATUS: This is a subject of debate. The change will probably be made
as a part of a major overhaul of the makefiles in libpng version 1.4.0.
2. February 24, 2006: The Makefile generated by the "configure" script
fails to install symbolic links
libpng12.so => libpng12.so.0.1.2.9betaN
that are generated by the custom makefiles.
3. September 4, 2007: There is a report that pngtest crashes on MacOS 10.
STATUS: workarounds are
1) Compile without optimization (crashes are observed with
-arch i386 and -O2 or -O3, using gcc-4.0.1).
2) Compile pngtest.c with PNG_DEBUG defined (the bug goes away if
you try to look at it).
3) Ignore the crash. The library itself seems to be OK.

View File

@@ -10,8 +10,8 @@ this sentence.
This code is released under the libpng license. This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.5.2, March 31, 2011, are libpng versions 1.2.6, August 15, 2004, through 1.2.41beta03, October 1, 2009, are
Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5 distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors with the following individual added to the list of Contributing Authors
@@ -108,4 +108,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson Glenn Randers-Pehrson
glennrp at users.sourceforge.net glennrp at users.sourceforge.net
March 31, 2011 October 1, 2009

View File

@@ -1,202 +1,138 @@
# Makefile.am: # Makefile.am:
# Source file for Makefile.in (and hence Makefile) # Source file for Makefile.in (and hence Makefile)
# #
# Makefile.am need only be changed on a major version number
# change (e.g. libpng12 --> libpng14). In that case seach
# this file for every instance of the old base name (libpng12)
# and change to the new one (libpng14), then change the
# -version-number settings below so that the new values have
# the correct major part (first field).
PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
# libpng does not follow GNU file name conventions # libpng does not follow GNU file name conventions
# "color-tests" requires automake 1.11.1 or later. Enable it if you like,
# to get red "FAIL" and green "PASS" notations during tests.
# AUTOMAKE_OPTIONS = foreign color-tests
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign
# test programs - run on make check, make distcheck # test programs - run on make check, make distcheck
check_PROGRAMS= pngtest pngvalid check_PROGRAMS= pngtest
pngtest_SOURCES = pngtest.c pngtest_SOURCES = pngtest.c
pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la pngtest_LDADD = libpng12.la
pngvalid_SOURCES = pngvalid.c TESTS = test-pngtest.sh
pngvalid_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
TESTS = test-pngtest.sh test-pngvalid-simple.sh test-pngvalid-full.sh
TESTS_ENVIRONMENT= srcdir=$(srcdir) TESTS_ENVIRONMENT= srcdir=$(srcdir)
# man pages # man pages
dist_man_MANS= libpng.3 libpngpf.3 png.5 dist_man_MANS= libpng.3 libpngpf.3 png.5
# generate the -config scripts if required # generate the -config scripts if required
binconfigs= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config binconfigs= libpng12-config
EXTRA_SCRIPTS= libpng-config libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config EXTRA_SCRIPTS= libpng-config libpng12-config
bin_SCRIPTS= @binconfigs@ bin_SCRIPTS= @binconfigs@
# rules to build libpng, only build the old library on request # rules to build libpng, only build the old library on request
lib_LTLIBRARIES=libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la lib_LTLIBRARIES=libpng12.la @compatlib@
# EXTRA_LTLIBRARIES= libpng.la EXTRA_LTLIBRARIES= libpng.la
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c\ libpng12_la_SOURCES = png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c pngrutil.c\ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c\ pngwtran.c pngmem.c pngerror.c pngpread.c \
png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h png.h pngconf.h
libpng_la_SOURCES = $(libpng12_la_SOURCES)
nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h libpng_la_CPPFLAGS = @LIBPNG_DEFINES@
libpng12_la_CPPFLAGS = @LIBPNG_DEFINES@
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS = @LIBPNG_DEFINES@ # MAJOR UPGRADE: the version-number settings below must be changed.
libpng12_la_LDFLAGS = -no-undefined -export-dynamic \
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \ -version-number 0:@PNGLIB_RELEASE@:0
-version-number @PNGLIB_MAJOR@@PNGLIB_MINOR@:@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_RELEASE@:0
if HAVE_LD_VERSION_SCRIPT if HAVE_LD_VERSION_SCRIPT
# Versioned symbols and restricted exports # Versioned symbols and restricted exports
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -Wl,--version-script=libpng.vers libpng12_la_LDFLAGS += -Wl,--version-script=libpng.vers
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.vers libpng12_la_DEPENDENCIES = libpng.vers
else else
# Only restricted exports when possible # Only restricted exports when possible
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -export-symbols libpng.sym libpng12_la_LDFLAGS += -export-symbols libpng.sym
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym libpng12_la_DEPENDENCIES = libpng.sym
endif endif
libpng_la_DEPENDENCIES = $(libpng12_la_DEPENDENCIES)
# Avoid depending upon Character Ranges.
AN = '_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
#distribute headers in /usr/include/libpng/* #distribute headers in /usr/include/libpng/*
pkgincludedir= $(includedir)/$(PNGLIB_BASENAME) pkgincludedir= $(includedir)/$(PNGLIB_BASENAME)
pkginclude_HEADERS= png.h pngconf.h pkginclude_HEADERS= png.h pngconf.h
nodist_pkginclude_HEADERS= pnglibconf.h
# pkg-config stuff, note that libpng.pc is always required in order # pkg-config stuff, note that libpng.pc is always required in order
# to get the correct library # to get the correct library
pkgconfigdir = @pkgconfigdir@ pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc pkgconfig_DATA = libpng12.pc
#extra source distribution files. #extra source distribution files.
EXTRA_DIST= \ EXTRA_DIST= \
ANNOUNCE CHANGES INSTALL LICENSE README TODO \ ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \
pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \ pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \
${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \ ${srcdir}/projects/cbuilder5/* \
${srcdir}/projects/beos/* \
${srcdir}/projects/visualc6/* \
${srcdir}/projects/visualc71/* \
${srcdir}/projects/wince.txt \
${srcdir}/projects/netware.txt \
${srcdir}/scripts/* \
${srcdir}/contrib/gregbook/* \
${srcdir}/contrib/pngminus/* \
${srcdir}/contrib/pngsuite/* \
${srcdir}/contrib/visupng/* \
$(TESTS) \ $(TESTS) \
CMakeLists.txt example.c libpng-manual.txt example.c libpng-1.2.41beta03.txt pngvcrd.c
SCRIPT_CLEANFILES=scripts/*.out scripts/*.chk scripts/pnglibconf.dfn CLEANFILES= pngout.png libpng12.pc libpng12-config libpng.vers \
libpng.sym
CLEANFILES= dfn.c dfn?.out pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers libpng.sym \
check.new pnglibconf.* symbols.new pngtest-log.txt \
$(SCRIPT_CLEANFILES)
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
config.sub configure depcomp install-sh ltmain.sh missing config.sub configure depcomp install-sh ltmain.sh missing
# DFNCPP is normally just CPP - the C preprocessor - but on Solaris and maybe
# other operating systems (NeXT?) the C preprocessor selected by configure
# checks input tokens for validity - effectively it performs part of the ANSI-C
# parsing - and therefore fails with the .df files. configure.ac has special
# checks for this and sets DFNCPP appropriately.
DFNCPP = @DFNCPP@
SUFFIXES = .chk .dfn .out
$(PNGLIB_BASENAME).pc: libpng.pc $(PNGLIB_BASENAME).pc: libpng.pc
cp libpng.pc $@ cp libpng.pc $@
$(PNGLIB_BASENAME)-config: libpng-config $(PNGLIB_BASENAME)-config: libpng-config
cp libpng-config $@ cp libpng-config $@
scripts/sym.out scripts/vers.out: png.h pngconf.h pnglibconf.h libpng.sym: png.h pngconf.h
scripts/symbols.out: png.h pngconf.h scripts/pnglibconf.h.prebuilt rm -f $@ $@.new
$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \
$(SED) -n -e \
's|^.*PNG_FUNCTION_EXPORT[ ]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \
-e 's|^.*PNG_DATA_EXPORT[ ]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \
>$@.new
mv $@.new $@
libpng.sym: scripts/sym.out libpng.vers: libpng.sym
rm -f $@ rm -f $@ $@.new
cp $? $@ echo PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0 '{global:' > $@.new
libpng.vers: scripts/vers.out $(SED) s/$$/\;/ libpng.sym >> $@.new
rm -f $@ echo 'local: *; };' >> $@.new
cp $? $@ mv $@.new $@
pnglibconf.h: pnglibconf.out
rm -f $@
cp $? $@
scripts/pnglibconf.h.prebuilt:
@echo "This is a machine generated file, but if you want to make" >&2
@echo "a new one simply make 'scripts/pnglibconf.out' and copy that" >&2
@exit 1
# The following is necessary to ensure that the local pnglibconf.h is used, not test: check
# an installed one (this can happen immediately after on a clean system if
# 'make test' is the first thing the user does.)
pngvalid.o pngtest.o: pnglibconf.h
# We must use -DPNG_NO_USE_READ_MACROS here even when the library may actually
# be built with PNG_USE_READ_MACROS; this stops the read macros interfering
# with the symbol file format.
SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0'\
-DPNGLIB_VERSION='@PNGLIB_VERSION@'\
-DSYMBOL_PREFIX='$(SYMBOL_PREFIX)'\
-DPNG_NO_USE_READ_MACROS -DPNG_BUILDING_SYMBOL_TABLE
.dfn.out:
rm -f $@ dfn.c dfn?.out
test -d scripts || mkdir scripts
echo '#include "$<"' >dfn.c
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) @LIBPNG_DEFINES@\
$(CPPFLAGS) $(SYMBOL_CFLAGS) dfn.c > dfn1.out
$(SED) -n -e 's|^.*PNG_DEFN_MAGIC-\(.*\)-PNG_DEFN_END.*$$|\1|p'\
dfn1.out >dfn2.out
$(SED) -e 's| *@@@ *||g' -e 's| *$$||' dfn2.out >dfn3.out
rm -f dfn.c dfn[12].out
mv dfn3.out $@
# The .dfn file for pnglibconf.h is machine generated
pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk
rm -f $@ dfn?.out
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn1.out\
${srcdir}/scripts/pnglibconf.dfa $(DFA_XTRA) 1>&2
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn2.out dfn1.out 1>&2
rm dfn1.out
mv dfn2.out $@
# Symbol checks (.def and .out files should match)
scripts/symbols.chk: scripts/checksym.awk scripts/symbols.def scripts/symbols.out
.out.chk:
rm -f $@ symbols.new
$(AWK) -f ${srcdir}/scripts/checksym.awk ${srcdir}/scripts/${*F}.def\
$< >&2
mv symbols.new $@
# used on demand to regenerate the standard header, CPPFLAGS should
# be empty - no non-standard defines
scripts/pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk
rm -f $@ dfn?.out
test -z "$(CPPFLAGS)"
echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn1.out\
logunsupported=2 - ${srcdir}/scripts/pnglibconf.dfa 1>&2
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn2.out dfn1.out 1>&2
rm dfn1.out
mv dfn2.out $@
$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS): png.h pngconf.h \
pnglibconf.h pngpriv.h pngdebug.h pnginfo.h pngstruct.h
test: check-am
# Extra checks
check: scripts/symbols.chk
# Don't distribute the generated script files
dist-hook:
cd '$(top_distdir)'; rm -f $(SCRIPT_CLEANFILES)
# install the .../include headers as links to the new ones # install the .../include headers as links to the new ones
install-data-hook: install-data-hook:
cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h pnglibconf.h cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h
cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/png.h png.h cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/png.h png.h
cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/pngconf.h \ cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/pngconf.h pngconf.h
pngconf.h
cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/pnglibconf.h \
pnglibconf.h
cd $(DESTDIR)$(pkgconfigdir); rm -f libpng.pc cd $(DESTDIR)$(pkgconfigdir); rm -f libpng.pc
cd $(DESTDIR)$(pkgconfigdir); $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc cd $(DESTDIR)$(pkgconfigdir); $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc
# do evil things to libpng to cause libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ to be used # do evil things to libpng to cause libpng12 to be used
install-exec-hook: install-exec-hook:
cd $(DESTDIR)$(bindir); rm -f libpng-config cd $(DESTDIR)$(bindir); rm -f libpng-config
cd $(DESTDIR)$(bindir); $(LN_S) $(PNGLIB_BASENAME)-config libpng-config cd $(DESTDIR)$(bindir); $(LN_S) $(PNGLIB_BASENAME)-config libpng-config
@set -x;\ @set -x;\
cd $(DESTDIR)$(libdir);\ cd $(DESTDIR)$(libdir);\
for ext in a la so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@ sl dylib dll.a; do\ for ext in a la so sl dylib; do\
rm -f libpng.$$ext;\ rm -f libpng.$$ext;\
if test -f $(PNGLIB_BASENAME).$$ext; then\ if test -f $(PNGLIB_BASENAME).$$ext; then\
$(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\ $(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\
@@ -204,8 +140,13 @@ install-exec-hook:
done done
uninstall-hook: uninstall-hook:
cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h pnglibconf.h cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h
rm -f $(DESTDIR)$(pkgconfigdir)/libpng.pc rm -f $(DESTDIR)$(pkgconfigdir)/libpng.pc
rm -f $(DESTDIR)$(bindir)/libpng-config rm -f $(DESTDIR)$(bindir)/libpng-config
rm -f $(DESTDIR)$(libdir)/libpng.a @if test -n "@compatlib@"; then\
rm -f $(DESTDIR)$(libdir)/libpng.la set -x;\
cd $(DESTDIR)$(libdir);\
for ext in a la so sl dylib; do\
rm -f libpng.$$ext;\
done;\
fi

View File

@@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -18,6 +18,12 @@
# Makefile.am: # Makefile.am:
# Source file for Makefile.in (and hence Makefile) # Source file for Makefile.in (and hence Makefile)
# #
# Makefile.am need only be changed on a major version number
# change (e.g. libpng12 --> libpng14). In that case seach
# this file for every instance of the old base name (libpng12)
# and change to the new one (libpng14), then change the
# -version-number settings below so that the new values have
# the correct major part (first field).
@@ -40,23 +46,24 @@ PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_triplet = @build@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
check_PROGRAMS = pngtest$(EXEEXT) pngvalid$(EXEEXT) check_PROGRAMS = pngtest$(EXEEXT)
@HAVE_LD_VERSION_SCRIPT_TRUE@am__append_1 = -Wl,--version-script=libpng.vers @HAVE_LD_VERSION_SCRIPT_TRUE@am__append_1 = -Wl,--version-script=libpng.vers
@HAVE_LD_VERSION_SCRIPT_FALSE@am__append_2 = -export-symbols libpng.sym @HAVE_LD_VERSION_SCRIPT_FALSE@am__append_2 = -export-symbols libpng.sym
subdir = . subdir = .
DIST_COMMON = README $(am__configure_deps) $(dist_man_MANS) \ DIST_COMMON = README $(am__configure_deps) $(dist_man_MANS) \
$(pkginclude_HEADERS) $(srcdir)/Makefile.am \ $(pkginclude_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(srcdir)/libpng-config.in $(srcdir)/libpng.pc.in \ $(top_srcdir)/configure $(top_srcdir)/scripts/libpng-config.in \
$(top_srcdir)/configure INSTALL TODO config.guess config.sub \ $(top_srcdir)/scripts/libpng.pc-configure.in INSTALL TODO \
depcomp install-sh ltmain.sh missing config.guess config.sub depcomp install-sh ltmain.sh missing \
mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = libpng.pc libpng-config CONFIG_CLEAN_FILES = libpng.pc libpng-config
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
@@ -83,41 +90,37 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
"$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" \ "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" \
"$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)" \ "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)"
"$(DESTDIR)$(pkgincludedir)"
LTLIBRARIES = $(lib_LTLIBRARIES) LTLIBRARIES = $(lib_LTLIBRARIES)
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD = libpng_la_LIBADD =
am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = \ am__objects_1 = libpng_la-png.lo libpng_la-pngset.lo \
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-png.lo \ libpng_la-pngget.lo libpng_la-pngrutil.lo \
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngerror.lo \ libpng_la-pngtrans.lo libpng_la-pngwutil.lo \
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngget.lo \ libpng_la-pngread.lo libpng_la-pngrio.lo libpng_la-pngwio.lo \
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngmem.lo \ libpng_la-pngwrite.lo libpng_la-pngrtran.lo \
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngpread.lo \ libpng_la-pngwtran.lo libpng_la-pngmem.lo \
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngread.lo \ libpng_la-pngerror.lo libpng_la-pngpread.lo
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrio.lo \ am_libpng_la_OBJECTS = $(am__objects_1)
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrtran.lo \ libpng_la_OBJECTS = $(am_libpng_la_OBJECTS)
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrutil.lo \ libpng_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngset.lo \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngtrans.lo \ $(libpng_la_LDFLAGS) $(LDFLAGS) -o $@
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwio.lo \ libpng12_la_LIBADD =
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwrite.lo \ am_libpng12_la_OBJECTS = libpng12_la-png.lo \
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwtran.lo \ libpng12_la-pngset.lo libpng12_la-pngget.lo \
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.lo libpng12_la-pngrutil.lo libpng12_la-pngtrans.lo \
nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = libpng12_la-pngwutil.lo libpng12_la-pngread.lo \
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = \ libpng12_la-pngrio.lo libpng12_la-pngwio.lo \
$(am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) \ libpng12_la-pngwrite.lo libpng12_la-pngrtran.lo \
$(nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) libpng12_la-pngwtran.lo libpng12_la-pngmem.lo \
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LINK = $(LIBTOOL) --tag=CC \ libpng12_la-pngerror.lo libpng12_la-pngpread.lo
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ libpng12_la_OBJECTS = $(am_libpng12_la_OBJECTS)
$(AM_CFLAGS) $(CFLAGS) \ libpng12_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS) $(LDFLAGS) -o \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$@ $(libpng12_la_LDFLAGS) $(LDFLAGS) -o $@
am_pngtest_OBJECTS = pngtest.$(OBJEXT) am_pngtest_OBJECTS = pngtest.$(OBJEXT)
pngtest_OBJECTS = $(am_pngtest_OBJECTS) pngtest_OBJECTS = $(am_pngtest_OBJECTS)
pngtest_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la pngtest_DEPENDENCIES = libpng12.la
am_pngvalid_OBJECTS = pngvalid.$(OBJEXT)
pngvalid_OBJECTS = $(am_pngvalid_OBJECTS)
pngvalid_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
SCRIPTS = $(bin_SCRIPTS) SCRIPTS = $(bin_SCRIPTS)
DEFAULT_INCLUDES = -I.@am__isrc@ DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -132,17 +135,16 @@ CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@ $(LDFLAGS) -o $@
SOURCES = $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \ SOURCES = $(libpng_la_SOURCES) $(libpng12_la_SOURCES) \
$(nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \ $(pngtest_SOURCES)
$(pngtest_SOURCES) $(pngvalid_SOURCES) DIST_SOURCES = $(libpng_la_SOURCES) $(libpng12_la_SOURCES) \
DIST_SOURCES = $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \ $(pngtest_SOURCES)
$(pngtest_SOURCES) $(pngvalid_SOURCES)
man3dir = $(mandir)/man3 man3dir = $(mandir)/man3
man5dir = $(mandir)/man5 man5dir = $(mandir)/man5
NROFF = nroff NROFF = nroff
MANS = $(dist_man_MANS) MANS = $(dist_man_MANS)
DATA = $(pkgconfig_DATA) DATA = $(pkgconfig_DATA)
HEADERS = $(nodist_pkginclude_HEADERS) $(pkginclude_HEADERS) HEADERS = $(pkginclude_HEADERS)
ETAGS = etags ETAGS = etags
CTAGS = ctags CTAGS = ctags
am__tty_colors = \ am__tty_colors = \
@@ -177,13 +179,6 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
# DFNCPP is normally just CPP - the C preprocessor - but on Solaris and maybe
# other operating systems (NeXT?) the C preprocessor selected by configure
# checks input tokens for validity - effectively it performs part of the ANSI-C
# parsing - and therefore fails with the .df files. configure.ac has special
# checks for this and sets DFNCPP appropriately.
DFNCPP = @DFNCPP@
DLLTOOL = @DLLTOOL@ DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@ DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@ DUMPBIN = @DUMPBIN@
@@ -203,6 +198,7 @@ LD = @LD@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBPNG_DEFINES = @LIBPNG_DEFINES@ LIBPNG_DEFINES = @LIBPNG_DEFINES@
LIBPNG_NO_MMX = @LIBPNG_NO_MMX@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@ LIPO = @LIPO@
@@ -210,7 +206,6 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
@@ -242,7 +237,6 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
@@ -252,7 +246,7 @@ am__tar = @am__tar@
am__untar = @am__untar@ am__untar = @am__untar@
# generate the -config scripts if required # generate the -config scripts if required
binconfigs = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config binconfigs = libpng12-config
bindir = @bindir@ bindir = @bindir@
build = @build@ build = @build@
build_alias = @build_alias@ build_alias = @build_alias@
@@ -260,6 +254,7 @@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
builddir = @builddir@ builddir = @builddir@
compatlib = @compatlib@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
docdir = @docdir@ docdir = @docdir@
@@ -278,6 +273,7 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@@ -300,75 +296,75 @@ top_srcdir = @top_srcdir@
PNGLIB_BASENAME = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ PNGLIB_BASENAME = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
# libpng does not follow GNU file name conventions # libpng does not follow GNU file name conventions
# "color-tests" requires automake 1.11.1 or later. Enable it if you like,
# to get red "FAIL" and green "PASS" notations during tests.
# AUTOMAKE_OPTIONS = foreign color-tests
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign
pngtest_SOURCES = pngtest.c pngtest_SOURCES = pngtest.c
pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la pngtest_LDADD = libpng12.la
pngvalid_SOURCES = pngvalid.c TESTS = test-pngtest.sh
pngvalid_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
TESTS = test-pngtest.sh test-pngvalid-simple.sh test-pngvalid-full.sh
TESTS_ENVIRONMENT = srcdir=$(srcdir) TESTS_ENVIRONMENT = srcdir=$(srcdir)
# man pages # man pages
dist_man_MANS = libpng.3 libpngpf.3 png.5 dist_man_MANS = libpng.3 libpngpf.3 png.5
EXTRA_SCRIPTS = libpng-config libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config EXTRA_SCRIPTS = libpng-config libpng12-config
bin_SCRIPTS = @binconfigs@ bin_SCRIPTS = @binconfigs@
# rules to build libpng, only build the old library on request # rules to build libpng, only build the old library on request
lib_LTLIBRARIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la lib_LTLIBRARIES = libpng12.la @compatlib@
# EXTRA_LTLIBRARIES= libpng.la EXTRA_LTLIBRARIES = libpng.la
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c\ libpng12_la_SOURCES = png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c pngrutil.c\ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c\ pngwtran.c pngmem.c pngerror.c pngpread.c \
png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h png.h pngconf.h
nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h libpng_la_SOURCES = $(libpng12_la_SOURCES)
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS = @LIBPNG_DEFINES@ libpng_la_CPPFLAGS = @LIBPNG_DEFINES@
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined \ libpng12_la_CPPFLAGS = @LIBPNG_DEFINES@
-export-dynamic -version-number \
@PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0 \ # MAJOR UPGRADE: the version-number settings below must be changed.
$(am__append_1) $(am__append_2) libpng12_la_LDFLAGS = -no-undefined -export-dynamic \
@HAVE_LD_VERSION_SCRIPT_FALSE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym -version-number 0:@PNGLIB_RELEASE@:0 $(am__append_1) \
@HAVE_LD_VERSION_SCRIPT_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.vers $(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_RELEASE@:0
@HAVE_LD_VERSION_SCRIPT_FALSE@libpng12_la_DEPENDENCIES = libpng.sym
@HAVE_LD_VERSION_SCRIPT_TRUE@libpng12_la_DEPENDENCIES = libpng.vers
libpng_la_DEPENDENCIES = $(libpng12_la_DEPENDENCIES)
# Avoid depending upon Character Ranges.
AN = '_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
pkginclude_HEADERS = png.h pngconf.h pkginclude_HEADERS = png.h pngconf.h
nodist_pkginclude_HEADERS = pnglibconf.h pkgconfig_DATA = libpng12.pc
pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc
#extra source distribution files. #extra source distribution files.
EXTRA_DIST = \ EXTRA_DIST = \
ANNOUNCE CHANGES INSTALL LICENSE README TODO \ ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \
pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \ pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \
${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \ ${srcdir}/projects/cbuilder5/* \
${srcdir}/projects/beos/* \
${srcdir}/projects/visualc6/* \
${srcdir}/projects/visualc71/* \
${srcdir}/projects/wince.txt \
${srcdir}/projects/netware.txt \
${srcdir}/scripts/* \
${srcdir}/contrib/gregbook/* \
${srcdir}/contrib/pngminus/* \
${srcdir}/contrib/pngsuite/* \
${srcdir}/contrib/visupng/* \
$(TESTS) \ $(TESTS) \
CMakeLists.txt example.c libpng-manual.txt example.c libpng-1.2.41beta03.txt pngvcrd.c
SCRIPT_CLEANFILES = scripts/*.out scripts/*.chk scripts/pnglibconf.dfn CLEANFILES = pngout.png libpng12.pc libpng12-config libpng.vers \
CLEANFILES = dfn.c dfn?.out pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \ libpng.sym
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers libpng.sym \
check.new pnglibconf.* symbols.new pngtest-log.txt \
$(SCRIPT_CLEANFILES)
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
config.sub configure depcomp install-sh ltmain.sh missing config.sub configure depcomp install-sh ltmain.sh missing
SUFFIXES = .chk .dfn .out
# We must use -DPNG_NO_USE_READ_MACROS here even when the library may actually
# be built with PNG_USE_READ_MACROS; this stops the read macros interfering
# with the symbol file format.
SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0'\
-DPNGLIB_VERSION='@PNGLIB_VERSION@'\
-DSYMBOL_PREFIX='$(SYMBOL_PREFIX)'\
-DPNG_NO_USE_READ_MACROS -DPNG_BUILDING_SYMBOL_TABLE
all: config.h all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am $(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES: .SUFFIXES:
.SUFFIXES: .chk .dfn .out .c .lo .o .obj .SUFFIXES: .c .lo .o .obj
am--refresh: am--refresh:
@: @:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@@ -420,9 +416,9 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
distclean-hdr: distclean-hdr:
-rm -f config.h stamp-h1 -rm -f config.h stamp-h1
libpng.pc: $(top_builddir)/config.status $(srcdir)/libpng.pc.in libpng.pc: $(top_builddir)/config.status $(top_srcdir)/scripts/libpng.pc-configure.in
cd $(top_builddir) && $(SHELL) ./config.status $@ cd $(top_builddir) && $(SHELL) ./config.status $@
libpng-config: $(top_builddir)/config.status $(srcdir)/libpng-config.in libpng-config: $(top_builddir)/config.status $(top_srcdir)/scripts/libpng-config.in
cd $(top_builddir) && $(SHELL) ./config.status $@ cd $(top_builddir) && $(SHELL) ./config.status $@
install-libLTLIBRARIES: $(lib_LTLIBRARIES) install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
@@ -455,8 +451,10 @@ clean-libLTLIBRARIES:
echo "rm -f \"$${dir}/so_locations\""; \ echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \ rm -f "$${dir}/so_locations"; \
done done
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la: $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES) libpng.la: $(libpng_la_OBJECTS) $(libpng_la_DEPENDENCIES)
$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LINK) -rpath $(libdir) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD) $(LIBS) $(libpng_la_LINK) $(libpng_la_OBJECTS) $(libpng_la_LIBADD) $(LIBS)
libpng12.la: $(libpng12_la_OBJECTS) $(libpng12_la_DEPENDENCIES)
$(libpng12_la_LINK) -rpath $(libdir) $(libpng12_la_OBJECTS) $(libpng12_la_LIBADD) $(LIBS)
clean-checkPROGRAMS: clean-checkPROGRAMS:
@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
@@ -469,9 +467,6 @@ clean-checkPROGRAMS:
pngtest$(EXEEXT): $(pngtest_OBJECTS) $(pngtest_DEPENDENCIES) pngtest$(EXEEXT): $(pngtest_OBJECTS) $(pngtest_DEPENDENCIES)
@rm -f pngtest$(EXEEXT) @rm -f pngtest$(EXEEXT)
$(LINK) $(pngtest_OBJECTS) $(pngtest_LDADD) $(LIBS) $(LINK) $(pngtest_OBJECTS) $(pngtest_LDADD) $(LIBS)
pngvalid$(EXEEXT): $(pngvalid_OBJECTS) $(pngvalid_DEPENDENCIES)
@rm -f pngvalid$(EXEEXT)
$(LINK) $(pngvalid_OBJECTS) $(pngvalid_LDADD) $(LIBS)
install-binSCRIPTS: $(bin_SCRIPTS) install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@@ -513,23 +508,37 @@ mostlyclean-compile:
distclean-compile: distclean-compile:
-rm -f *.tab.c -rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-png.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng12_la-png.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngerror.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng12_la-pngerror.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngget.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng12_la-pngget.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngmem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng12_la-pngmem.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngpread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng12_la-pngpread.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng12_la-pngread.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng12_la-pngrio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrtran.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng12_la-pngrtran.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrutil.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng12_la-pngrutil.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng12_la-pngset.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngtrans.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng12_la-pngtrans.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng12_la-pngwio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwrite.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng12_la-pngwrite.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwtran.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng12_la-pngwtran.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng12_la-pngwutil.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng_la-png.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng_la-pngerror.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng_la-pngget.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng_la-pngmem.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng_la-pngpread.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng_la-pngread.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng_la-pngrio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng_la-pngrtran.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng_la-pngrutil.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng_la-pngset.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng_la-pngtrans.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng_la-pngwio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng_la-pngwrite.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng_la-pngwtran.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng_la-pngwutil.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngtest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngtest.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngvalid.Po@am__quote@
.c.o: .c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -552,110 +561,215 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-png.lo: png.c libpng_la-png.lo: png.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-png.lo -MD -MP -MF $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-png.Tpo -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-png.lo `test -f 'png.c' || echo '$(srcdir)/'`png.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-png.Tpo $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-png.Plo @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpng_la-png.Tpo $(DEPDIR)/libpng_la-png.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='png.c' object='libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-png.lo' libtool=yes @AMDEPBACKSLASH@ @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@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-png.lo `test -f 'png.c' || echo '$(srcdir)/'`png.c @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngerror.lo: pngerror.c libpng_la-pngset.lo: pngset.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngerror.lo -MD -MP -MF $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngerror.Tpo -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngerror.lo `test -f 'pngerror.c' || echo '$(srcdir)/'`pngerror.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngerror.Tpo $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngerror.Plo @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpng_la-pngset.Tpo $(DEPDIR)/libpng_la-pngset.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngerror.c' object='libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngerror.lo' libtool=yes @AMDEPBACKSLASH@ @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@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngerror.lo `test -f 'pngerror.c' || echo '$(srcdir)/'`pngerror.c @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngget.lo: pngget.c libpng_la-pngget.lo: pngget.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngget.lo -MD -MP -MF $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngget.Tpo -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngget.lo `test -f 'pngget.c' || echo '$(srcdir)/'`pngget.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngget.Tpo $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngget.Plo @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpng_la-pngget.Tpo $(DEPDIR)/libpng_la-pngget.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngget.c' object='libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngget.lo' libtool=yes @AMDEPBACKSLASH@ @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@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngget.lo `test -f 'pngget.c' || echo '$(srcdir)/'`pngget.c @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngmem.lo: pngmem.c libpng_la-pngrutil.lo: pngrutil.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngmem.lo -MD -MP -MF $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngmem.Tpo -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngmem.lo `test -f 'pngmem.c' || echo '$(srcdir)/'`pngmem.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngmem.Tpo $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngmem.Plo @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpng_la-pngrutil.Tpo $(DEPDIR)/libpng_la-pngrutil.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngmem.c' object='libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngmem.lo' libtool=yes @AMDEPBACKSLASH@ @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@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngmem.lo `test -f 'pngmem.c' || echo '$(srcdir)/'`pngmem.c @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngpread.lo: pngpread.c libpng_la-pngtrans.lo: pngtrans.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngpread.lo -MD -MP -MF $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngpread.Tpo -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngpread.lo `test -f 'pngpread.c' || echo '$(srcdir)/'`pngpread.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngpread.Tpo $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngpread.Plo @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpng_la-pngtrans.Tpo $(DEPDIR)/libpng_la-pngtrans.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngpread.c' object='libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngpread.lo' libtool=yes @AMDEPBACKSLASH@ @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@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngpread.lo `test -f 'pngpread.c' || echo '$(srcdir)/'`pngpread.c @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngread.lo: pngread.c libpng_la-pngwutil.lo: pngwutil.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngread.lo -MD -MP -MF $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngread.Tpo -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngread.lo `test -f 'pngread.c' || echo '$(srcdir)/'`pngread.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngread.Tpo $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngread.Plo @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpng_la-pngwutil.Tpo $(DEPDIR)/libpng_la-pngwutil.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngread.c' object='libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngread.lo' libtool=yes @AMDEPBACKSLASH@ @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@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngread.lo `test -f 'pngread.c' || echo '$(srcdir)/'`pngread.c @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrio.lo: pngrio.c libpng_la-pngread.lo: pngread.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrio.lo -MD -MP -MF $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrio.Tpo -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrio.lo `test -f 'pngrio.c' || echo '$(srcdir)/'`pngrio.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrio.Tpo $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrio.Plo @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpng_la-pngread.Tpo $(DEPDIR)/libpng_la-pngread.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngrio.c' object='libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrio.lo' libtool=yes @AMDEPBACKSLASH@ @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@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrio.lo `test -f 'pngrio.c' || echo '$(srcdir)/'`pngrio.c @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrtran.lo: pngrtran.c libpng_la-pngrio.lo: pngrio.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrtran.lo -MD -MP -MF $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrtran.Tpo -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrtran.lo `test -f 'pngrtran.c' || echo '$(srcdir)/'`pngrtran.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrtran.Tpo $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrtran.Plo @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpng_la-pngrio.Tpo $(DEPDIR)/libpng_la-pngrio.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngrtran.c' object='libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrtran.lo' libtool=yes @AMDEPBACKSLASH@ @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@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrtran.lo `test -f 'pngrtran.c' || echo '$(srcdir)/'`pngrtran.c @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrutil.lo: pngrutil.c libpng_la-pngwio.lo: pngwio.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrutil.lo -MD -MP -MF $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrutil.Tpo -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrutil.lo `test -f 'pngrutil.c' || echo '$(srcdir)/'`pngrutil.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrutil.Tpo $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrutil.Plo @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpng_la-pngwio.Tpo $(DEPDIR)/libpng_la-pngwio.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngrutil.c' object='libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrutil.lo' libtool=yes @AMDEPBACKSLASH@ @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@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngrutil.lo `test -f 'pngrutil.c' || echo '$(srcdir)/'`pngrutil.c @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngset.lo: pngset.c libpng_la-pngwrite.lo: pngwrite.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngset.lo -MD -MP -MF $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngset.Tpo -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngset.lo `test -f 'pngset.c' || echo '$(srcdir)/'`pngset.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngset.Tpo $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngset.Plo @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpng_la-pngwrite.Tpo $(DEPDIR)/libpng_la-pngwrite.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngset.c' object='libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngset.lo' libtool=yes @AMDEPBACKSLASH@ @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@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngset.lo `test -f 'pngset.c' || echo '$(srcdir)/'`pngset.c @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngtrans.lo: pngtrans.c libpng_la-pngrtran.lo: pngrtran.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngtrans.lo -MD -MP -MF $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngtrans.Tpo -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngtrans.lo `test -f 'pngtrans.c' || echo '$(srcdir)/'`pngtrans.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngtrans.Tpo $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngtrans.Plo @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpng_la-pngrtran.Tpo $(DEPDIR)/libpng_la-pngrtran.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngtrans.c' object='libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngtrans.lo' libtool=yes @AMDEPBACKSLASH@ @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@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngtrans.lo `test -f 'pngtrans.c' || echo '$(srcdir)/'`pngtrans.c @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwio.lo: pngwio.c libpng_la-pngwtran.lo: pngwtran.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwio.lo -MD -MP -MF $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwio.Tpo -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwio.lo `test -f 'pngwio.c' || echo '$(srcdir)/'`pngwio.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwio.Tpo $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwio.Plo @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpng_la-pngwtran.Tpo $(DEPDIR)/libpng_la-pngwtran.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngwio.c' object='libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwio.lo' libtool=yes @AMDEPBACKSLASH@ @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@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwio.lo `test -f 'pngwio.c' || echo '$(srcdir)/'`pngwio.c @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwrite.lo: pngwrite.c libpng_la-pngmem.lo: pngmem.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwrite.lo -MD -MP -MF $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwrite.Tpo -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwrite.lo `test -f 'pngwrite.c' || echo '$(srcdir)/'`pngwrite.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwrite.Tpo $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwrite.Plo @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpng_la-pngmem.Tpo $(DEPDIR)/libpng_la-pngmem.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngwrite.c' object='libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwrite.lo' libtool=yes @AMDEPBACKSLASH@ @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@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwrite.lo `test -f 'pngwrite.c' || echo '$(srcdir)/'`pngwrite.c @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwtran.lo: pngwtran.c libpng_la-pngerror.lo: pngerror.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwtran.lo -MD -MP -MF $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwtran.Tpo -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwtran.lo `test -f 'pngwtran.c' || echo '$(srcdir)/'`pngwtran.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwtran.Tpo $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwtran.Plo @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpng_la-pngerror.Tpo $(DEPDIR)/libpng_la-pngerror.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngwtran.c' object='libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwtran.lo' libtool=yes @AMDEPBACKSLASH@ @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@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwtran.lo `test -f 'pngwtran.c' || echo '$(srcdir)/'`pngwtran.c @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.lo: pngwutil.c libpng_la-pngpread.lo: pngpread.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.lo -MD -MP -MF $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.Tpo -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.lo `test -f 'pngwutil.c' || echo '$(srcdir)/'`pngwutil.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.Tpo $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.Plo @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpng_la-pngpread.Tpo $(DEPDIR)/libpng_la-pngpread.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngwutil.c' object='libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.lo' libtool=yes @AMDEPBACKSLASH@ @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@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.lo `test -f 'pngwutil.c' || echo '$(srcdir)/'`pngwutil.c @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng12_la-png.lo: png.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng12_la-png.Tpo $(DEPDIR)/libpng12_la-png.Plo
@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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng12_la-pngset.lo: pngset.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng12_la-pngset.Tpo $(DEPDIR)/libpng12_la-pngset.Plo
@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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng12_la-pngget.lo: pngget.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng12_la-pngget.Tpo $(DEPDIR)/libpng12_la-pngget.Plo
@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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng12_la-pngrutil.lo: pngrutil.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng12_la-pngrutil.Tpo $(DEPDIR)/libpng12_la-pngrutil.Plo
@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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng12_la-pngtrans.lo: pngtrans.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng12_la-pngtrans.Tpo $(DEPDIR)/libpng12_la-pngtrans.Plo
@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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng12_la-pngwutil.lo: pngwutil.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng12_la-pngwutil.Tpo $(DEPDIR)/libpng12_la-pngwutil.Plo
@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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng12_la-pngread.lo: pngread.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng12_la-pngread.Tpo $(DEPDIR)/libpng12_la-pngread.Plo
@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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng12_la-pngrio.lo: pngrio.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng12_la-pngrio.Tpo $(DEPDIR)/libpng12_la-pngrio.Plo
@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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng12_la-pngwio.lo: pngwio.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng12_la-pngwio.Tpo $(DEPDIR)/libpng12_la-pngwio.Plo
@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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng12_la-pngwrite.lo: pngwrite.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng12_la-pngwrite.Tpo $(DEPDIR)/libpng12_la-pngwrite.Plo
@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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng12_la-pngrtran.lo: pngrtran.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng12_la-pngrtran.Tpo $(DEPDIR)/libpng12_la-pngrtran.Plo
@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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng12_la-pngwtran.lo: pngwtran.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng12_la-pngwtran.Tpo $(DEPDIR)/libpng12_la-pngwtran.Plo
@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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng12_la-pngmem.lo: pngmem.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng12_la-pngmem.Tpo $(DEPDIR)/libpng12_la-pngmem.Plo
@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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng12_la-pngerror.lo: pngerror.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng12_la-pngerror.Tpo $(DEPDIR)/libpng12_la-pngerror.Plo
@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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
libpng12_la-pngpread.lo: pngpread.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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@ $(am__mv) $(DEPDIR)/libpng12_la-pngpread.Tpo $(DEPDIR)/libpng12_la-pngpread.Plo
@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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
mostlyclean-libtool: mostlyclean-libtool:
-rm -f *.lo -rm -f *.lo
@@ -761,26 +875,6 @@ uninstall-pkgconfigDATA:
test -n "$$files" || exit 0; \ test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
install-nodist_pkgincludeHEADERS: $(nodist_pkginclude_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
@list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
done
uninstall-nodist_pkgincludeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files
install-pkgincludeHEADERS: $(pkginclude_HEADERS) install-pkgincludeHEADERS: $(pkginclude_HEADERS)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
@@ -991,12 +1085,8 @@ distdir: $(DISTFILES)
|| exit 1; \ || exit 1; \
fi; \ fi; \
done done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
-test -n "$(am__skip_mode_fix)" \ -test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \ || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
-exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
@@ -1040,17 +1130,17 @@ dist dist-all: distdir
distcheck: dist distcheck: dist
case '$(DIST_ARCHIVES)' in \ case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \ *.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \ *.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \ *.tar.lzma*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.xz*) \ *.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \ *.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \ *.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \ *.zip*) \
unzip $(distdir).zip ;;\ unzip $(distdir).zip ;;\
esac esac
@@ -1116,7 +1206,7 @@ check: check-am
all-am: Makefile $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(DATA) $(HEADERS) \ all-am: Makefile $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(DATA) $(HEADERS) \
config.h config.h
installdirs: installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"; do \ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done done
install: install-am install: install-am
@@ -1170,8 +1260,8 @@ info: info-am
info-am: info-am:
install-data-am: install-man install-nodist_pkgincludeHEADERS \ install-data-am: install-man install-pkgconfigDATA \
install-pkgconfigDATA install-pkgincludeHEADERS install-pkgincludeHEADERS
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook $(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am install-dvi: install-dvi-am
@@ -1222,8 +1312,8 @@ ps: ps-am
ps-am: ps-am:
uninstall-am: uninstall-binSCRIPTS uninstall-libLTLIBRARIES \ uninstall-am: uninstall-binSCRIPTS uninstall-libLTLIBRARIES \
uninstall-man uninstall-nodist_pkgincludeHEADERS \ uninstall-man uninstall-pkgconfigDATA \
uninstall-pkgconfigDATA uninstall-pkgincludeHEADERS uninstall-pkgincludeHEADERS
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
uninstall-man: uninstall-man3 uninstall-man5 uninstall-man: uninstall-man3 uninstall-man5
@@ -1234,24 +1324,23 @@ uninstall-man: uninstall-man3 uninstall-man5
.PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \ .PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \
clean clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ clean clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
clean-libtool ctags dist dist-all dist-bzip2 dist-gzip \ clean-libtool ctags dist dist-all dist-bzip2 dist-gzip \
dist-hook dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
distcheck distclean distclean-compile distclean-generic \ distclean distclean-compile distclean-generic distclean-hdr \
distclean-hdr distclean-libtool distclean-tags distcleancheck \ distclean-libtool distclean-tags distcleancheck distdir \
distdir distuninstallcheck dvi dvi-am html html-am info \ distuninstallcheck dvi dvi-am html html-am info info-am \
info-am install install-am install-binSCRIPTS install-data \ install install-am install-binSCRIPTS install-data \
install-data-am install-data-hook install-dvi install-dvi-am \ install-data-am install-data-hook install-dvi install-dvi-am \
install-exec install-exec-am install-exec-hook install-html \ install-exec install-exec-am install-exec-hook install-html \
install-html-am install-info install-info-am \ install-html-am install-info install-info-am \
install-libLTLIBRARIES install-man install-man3 install-man5 \ install-libLTLIBRARIES install-man install-man3 install-man5 \
install-nodist_pkgincludeHEADERS install-pdf install-pdf-am \ install-pdf install-pdf-am install-pkgconfigDATA \
install-pkgconfigDATA install-pkgincludeHEADERS install-ps \ install-pkgincludeHEADERS install-ps install-ps-am \
install-ps-am install-strip installcheck installcheck-am \ install-strip installcheck installcheck-am installdirs \
installdirs maintainer-clean maintainer-clean-generic \ maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-am uninstall-binSCRIPTS uninstall-hook \ uninstall-binSCRIPTS uninstall-hook uninstall-libLTLIBRARIES \
uninstall-libLTLIBRARIES uninstall-man uninstall-man3 \ uninstall-man uninstall-man3 uninstall-man5 \
uninstall-man5 uninstall-nodist_pkgincludeHEADERS \
uninstall-pkgconfigDATA uninstall-pkgincludeHEADERS uninstall-pkgconfigDATA uninstall-pkgincludeHEADERS
@@ -1264,99 +1353,39 @@ $(PNGLIB_BASENAME).pc: libpng.pc
$(PNGLIB_BASENAME)-config: libpng-config $(PNGLIB_BASENAME)-config: libpng-config
cp libpng-config $@ cp libpng-config $@
scripts/sym.out scripts/vers.out: png.h pngconf.h pnglibconf.h libpng.sym: png.h pngconf.h
scripts/symbols.out: png.h pngconf.h scripts/pnglibconf.h.prebuilt rm -f $@ $@.new
$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \
$(SED) -n -e \
's|^.*PNG_FUNCTION_EXPORT[ ]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \
-e 's|^.*PNG_DATA_EXPORT[ ]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \
>$@.new
mv $@.new $@
libpng.sym: scripts/sym.out libpng.vers: libpng.sym
rm -f $@ rm -f $@ $@.new
cp $? $@ echo PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0 '{global:' > $@.new
libpng.vers: scripts/vers.out $(SED) s/$$/\;/ libpng.sym >> $@.new
rm -f $@ echo 'local: *; };' >> $@.new
cp $? $@ mv $@.new $@
pnglibconf.h: pnglibconf.out
rm -f $@
cp $? $@
scripts/pnglibconf.h.prebuilt:
@echo "This is a machine generated file, but if you want to make" >&2
@echo "a new one simply make 'scripts/pnglibconf.out' and copy that" >&2
@exit 1
# The following is necessary to ensure that the local pnglibconf.h is used, not test: check
# an installed one (this can happen immediately after on a clean system if
# 'make test' is the first thing the user does.)
pngvalid.o pngtest.o: pnglibconf.h
.dfn.out:
rm -f $@ dfn.c dfn?.out
test -d scripts || mkdir scripts
echo '#include "$<"' >dfn.c
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) @LIBPNG_DEFINES@\
$(CPPFLAGS) $(SYMBOL_CFLAGS) dfn.c > dfn1.out
$(SED) -n -e 's|^.*PNG_DEFN_MAGIC-\(.*\)-PNG_DEFN_END.*$$|\1|p'\
dfn1.out >dfn2.out
$(SED) -e 's| *@@@ *||g' -e 's| *$$||' dfn2.out >dfn3.out
rm -f dfn.c dfn[12].out
mv dfn3.out $@
# The .dfn file for pnglibconf.h is machine generated
pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk
rm -f $@ dfn?.out
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn1.out\
${srcdir}/scripts/pnglibconf.dfa $(DFA_XTRA) 1>&2
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn2.out dfn1.out 1>&2
rm dfn1.out
mv dfn2.out $@
# Symbol checks (.def and .out files should match)
scripts/symbols.chk: scripts/checksym.awk scripts/symbols.def scripts/symbols.out
.out.chk:
rm -f $@ symbols.new
$(AWK) -f ${srcdir}/scripts/checksym.awk ${srcdir}/scripts/${*F}.def\
$< >&2
mv symbols.new $@
# used on demand to regenerate the standard header, CPPFLAGS should
# be empty - no non-standard defines
scripts/pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk
rm -f $@ dfn?.out
test -z "$(CPPFLAGS)"
echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn1.out\
logunsupported=1 - ${srcdir}/scripts/pnglibconf.dfa 1>&2
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn2.out dfn1.out 1>&2
rm dfn1.out
mv dfn2.out $@
$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS): png.h pngconf.h \
pnglibconf.h pngpriv.h pngdebug.h pnginfo.h pngstruct.h
test: check-am
# Extra checks
check: scripts/symbols.chk
# Don't distribute the generated script files
dist-hook:
cd '$(top_distdir)'; rm -f $(SCRIPT_CLEANFILES)
# install the .../include headers as links to the new ones # install the .../include headers as links to the new ones
install-data-hook: install-data-hook:
cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h pnglibconf.h cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h
cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/png.h png.h cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/png.h png.h
cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/pngconf.h \ cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/pngconf.h pngconf.h
pngconf.h
cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/pnglibconf.h \
pnglibconf.h
cd $(DESTDIR)$(pkgconfigdir); rm -f libpng.pc cd $(DESTDIR)$(pkgconfigdir); rm -f libpng.pc
cd $(DESTDIR)$(pkgconfigdir); $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc cd $(DESTDIR)$(pkgconfigdir); $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc
# do evil things to libpng to cause libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ to be used # do evil things to libpng to cause libpng12 to be used
install-exec-hook: install-exec-hook:
cd $(DESTDIR)$(bindir); rm -f libpng-config cd $(DESTDIR)$(bindir); rm -f libpng-config
cd $(DESTDIR)$(bindir); $(LN_S) $(PNGLIB_BASENAME)-config libpng-config cd $(DESTDIR)$(bindir); $(LN_S) $(PNGLIB_BASENAME)-config libpng-config
@set -x;\ @set -x;\
cd $(DESTDIR)$(libdir);\ cd $(DESTDIR)$(libdir);\
for ext in a la so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@ sl dylib dll.a; do\ for ext in a la so sl dylib; do\
rm -f libpng.$$ext;\ rm -f libpng.$$ext;\
if test -f $(PNGLIB_BASENAME).$$ext; then\ if test -f $(PNGLIB_BASENAME).$$ext; then\
$(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\ $(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\
@@ -1364,11 +1393,16 @@ install-exec-hook:
done done
uninstall-hook: uninstall-hook:
cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h pnglibconf.h cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h
rm -f $(DESTDIR)$(pkgconfigdir)/libpng.pc rm -f $(DESTDIR)$(pkgconfigdir)/libpng.pc
rm -f $(DESTDIR)$(bindir)/libpng-config rm -f $(DESTDIR)$(bindir)/libpng-config
rm -f $(DESTDIR)$(libdir)/libpng.a @if test -n "@compatlib@"; then\
rm -f $(DESTDIR)$(libdir)/libpng.la set -x;\
cd $(DESTDIR)$(libdir);\
for ext in a la so sl dylib; do\
rm -f libpng.$$ext;\
done;\
fi
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.

144
README
View File

@@ -1,11 +1,15 @@
README for libpng version 1.5.2 - March 31, 2011 (shared library 15.0) README for libpng version 1.2.41beta03 - October 1, 2009 (shared library 12.0)
See the note about version numbers near the top of png.h See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng. See INSTALL for instructions on how to install libpng.
Libpng comes in several distribution formats. Get libpng-*.tar.gz, Libpng comes in several distribution formats. Get libpng-*.tar.gz,
libpng-*.tar.xz or libpng-*.tar.bz2 if you want UNIX-style line endings libpng-*.tar.lzma, or libpng-*.tar.bz2 if you want UNIX-style line
in the text files, or lpng*.zip if you want DOS-style line endings. endings in the text files, or lpng*.7z or lpng*.zip if you want DOS-style
line endings. You can get UNIX-style line endings from the *.zip file
by using "unzip -a" but there seems to be no simple way to recover
UNIX-style line endings from the *.7z file. The *.tar.lzma file is
recommended for *NIX users instead.
Version 0.89 was the first official release of libpng. Don't let the Version 0.89 was the first official release of libpng. Don't let the
fact that it's the first release fool you. The libpng library has been in fact that it's the first release fool you. The libpng library has been in
@@ -54,11 +58,11 @@ to set different actions based on whether the CRC error occurred in a
critical or an ancillary chunk. critical or an ancillary chunk.
The changes made to the library, and bugs fixed are based on discussions The changes made to the library, and bugs fixed are based on discussions
on the PNG-implement mailing list and not on material submitted on the png-mng-implement mailing list
privately to Guy, Andreas, or Glenn. They will forward any good and not on material submitted privately to Guy, Andreas, or Glenn. They will
suggestions to the list. forward any good suggestions to the list.
For a detailed description on using libpng, read libpng-manual.txt. For For a detailed description on using libpng, read libpng.txt. For
examples of libpng in a program, see example.c and pngtest.c. For usage examples of libpng in a program, see example.c and pngtest.c. For usage
information and restrictions (what little they are) on libpng, see information and restrictions (what little they are) on libpng, see
png.h. For a description on using zlib (the compression library used by png.h. For a description on using zlib (the compression library used by
@@ -77,12 +81,12 @@ compression library that is useful for more things than just PNG files.
You can use zlib as a drop-in replacement for fread() and fwrite() if You can use zlib as a drop-in replacement for fread() and fwrite() if
you are so inclined. you are so inclined.
zlib should be available at the same place that libpng is, or at. zlib should be available at the same place that libpng is, or at
ftp://ftp.info-zip.org/pub/infozip/zlib ftp://ftp.simplesystems.org/pub/png/src/
You may also want a copy of the PNG specification. It is available You may also want a copy of the PNG specification. It is available
as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find
these at http://www.libpng.org/pub/png/documents/ these at http://www.libpng.org/pub/png/pngdocs.html
This code is currently being archived at libpng.sf.net in the This code is currently being archived at libpng.sf.net in the
[DOWNLOAD] area, and on CompuServe, Lib 20 (PNG SUPPORT) [DOWNLOAD] area, and on CompuServe, Lib 20 (PNG SUPPORT)
@@ -101,24 +105,23 @@ Finally, if you get any warning messages when compiling libpng
fix. Please mention "libpng" somewhere in the subject line. Thanks. fix. Please mention "libpng" somewhere in the subject line. Thanks.
This release was created and will be supported by myself (of course This release was created and will be supported by myself (of course
based in a large way on Guy's and Andreas' earlier work), and the PNG based in a large way on Guy's and Andreas' earlier work), and the PNG group.
development group.
Send comments/corrections/commendations to png-mng-implement at Send comments/corrections/commendations to png-mng-implement at lists.sf.net
lists.sourceforge.net (subscription required; visit (subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe) or to glennrp at users.sourceforge.net to subscribe) or to glennrp at users.sourceforge.net
You can't reach Guy, the original libpng author, at the addresses You can't reach Guy, the original libpng author, at the addresses
given in previous versions of this document. He and Andreas will given in previous versions of this document. He and Andreas will read mail
read mail addressed to the png-implement list, however. addressed to the png-mng-implement list, however.
Please do not send general questions about PNG. Send them to Please do not send general questions about PNG. Send them to
the (png-list at ccrc.wustl.edu, subscription required, write to the (png-mng-misc at lists.sourceforge.net, subscription required, visit
majordomo at ccrc.wustl.edu with "subscribe png-list" in your message). https://lists.sourceforge.net/lists/listinfo/png-mng-implement to subscribe)
On the other hand, On the other hand,
please do not send libpng questions to that address, send them to me please do not send libpng questions to that address, send them to me
or to the png-implement list. I'll or to the png-mng-implement list. I'll
get them in the end anyway. If you have a question about something get them in the end anyway. If you have a question about something
in the PNG specification that is related to using libpng, send it in the PNG specification that is related to using libpng, send it
to me. Send me any questions that start with "I was using libpng, to me. Send me any questions that start with "I was using libpng,
@@ -126,7 +129,7 @@ and ...". If in doubt, send questions to me. I'll bounce them
to others, if necessary. to others, if necessary.
Please do not send suggestions on how to change PNG. We have Please do not send suggestions on how to change PNG. We have
been discussing PNG for nine years now, and it is official and been discussing PNG for twelve years now, and it is official and
finished. If you have suggestions for libpng, however, I'll finished. If you have suggestions for libpng, however, I'll
gladly listen. Even if your suggestion is not used immediately, gladly listen. Even if your suggestion is not used immediately,
it may be used later. it may be used later.
@@ -141,17 +144,14 @@ Files in this distribution:
TODO => Things not implemented in the current library TODO => Things not implemented in the current library
Y2KINFO => Statement of Y2K compliance Y2KINFO => Statement of Y2K compliance
example.c => Example code for using libpng functions example.c => Example code for using libpng functions
libpng.3 => manual page for libpng (includes libpng-manual.txt) libpng-*-*-diff.txt => Diff from previous release
libpng-manual.txt => Description of libpng and its functions libpng.3 => manual page for libpng (includes libpng.txt)
libpng.txt => Description of libpng and its functions
libpngpf.3 => manual page for libpng's private functions libpngpf.3 => manual page for libpng's private functions
png.5 => manual page for the PNG format png.5 => manual page for the PNG format
png.c => Basic interface functions common to library png.c => Basic interface functions common to library
png.h => Library function and interface declarations (public) png.h => Library function and interface declarations
pngpriv.h => Library function and interface declarations (private) pngconf.h => System specific library configuration
pngconf.h => System specific library configuration (public)
pngstruct.h => png_struct declaration (private)
pnginfo.h => png_info struct declaration (private)
pngdebug.h => debugging macros (private)
pngerror.c => Error/warning message I/O functions pngerror.c => Error/warning message I/O functions
pngget.c => Functions for retrieving info from struct pngget.c => Functions for retrieving info from struct
pngmem.c => Memory handling functions pngmem.c => Memory handling functions
@@ -178,27 +178,89 @@ Files in this distribution:
pngminus => Simple pnm2png and png2pnm programs pngminus => Simple pnm2png and png2pnm programs
pngsuite => Test images pngsuite => Test images
visupng => Contains a MSVC workspace for VisualPng visupng => Contains a MSVC workspace for VisualPng
projects => Contains project files and workspaces for projects => Contains project files and workspaces for building DLL
building a DLL beos => Contains a Beos workspace for building libpng
cbuilder5 => Contains a Borland workspace for building c5builder => Contains a Borland workspace for building libpng
libpng and zlib and zlib
visualc6 => Contains a Microsoft Visual C++ (MSVC) visualc6 => Contains a Microsoft Visual C++ (MSVC) workspace
workspace for building libpng and zlib for building libpng and zlib
visualc71 => Contains a Microsoft Visual C++ (MSVC) netware.txt => Contains instructions for downloading a set of
workspace for building libpng and zlib project files for building libpng and zlib on
xcode => Contains an Apple xcode Netware.
workspace for building libpng and zlib wince.txt => Contains instructions for downloading a Microsoft
Visual C++ (Windows CD Toolkit) workspace for
building libpng and zlib on WindowsCE
scripts => Directory containing scripts for building libpng: scripts => Directory containing scripts for building libpng:
(see scripts/README.txt for the list of scripts) 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.41beta03)
makefile.linux => Linux/ELF makefile
(gcc, creates libpng12.so.0.1.2.41beta03)
makefile.gcmmx => Linux/ELF makefile
(gcc, creates libpng12.so.0.1.2.41beta03,
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
ansi2knr (Requires ansi2knr.c from
ftp://ftp.cs.wisc.edu/ghost)
makefile.aix => AIX makefile
makefile.cygwin => Cygwin/gcc makefile
makefile.darwin => Darwin makefile
makefile.dec => DEC Alpha UNIX makefile
makefile.freebsd => FreeBSD makefile
makefile.hpgcc => HPUX makefile using gcc
makefile.hpux => HPUX (10.20 and 11.00) makefile
makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64 bit
makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static)
makefile.intel => Intel C/C++ version 4.0 and later
libpng.icc => Project file, IBM VisualAge/C++ 4.0 or later
makefile.netbsd => NetBSD/cc makefile, PNGGCCRD, makes libpng.so.
makefile.ne12bsd => NetBSD/cc makefile, PNGGCCRD, makes libpng12.so
makefile.openbsd => OpenBSD makefile
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
makefile.sggcc => Silicon Graphics
(gcc, creates libpng12.so.0.1.2.41beta03)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile
(gcc, creates libpng12.so.0.1.2.41beta03)
makefile.so9 => Solaris 9 makefile
(gcc, creates libpng12.so.0.1.2.41beta03)
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
makefile.mips => MIPS makefile
makefile.acorn => Acorn makefile
makefile.amiga => Amiga makefile
smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC
compiler (Requires SCOPTIONS, copied from
scripts/SCOPTIONS.ppc)
makefile.atari => Atari makefile
makefile.beos => BEOS makefile for X86
makefile.bor => Borland makefile (uses bcc)
makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode)
makefile.tc3 => Turbo C 3.0 makefile
makefile.dj2 => DJGPP 2 makefile
makefile.msc => Microsoft C makefile
makefile.vcawin32=> makefile for Microsoft Visual C++ 5.0 and
later (uses assembler code tuned for Intel MMX
platform)
makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and
later (does not use assembler code)
makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
pngos2.def => OS/2 module definition file used by makefile.os2
makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model
makevms.com => VMS build script
SCOPTIONS.ppc => Used with smakefile.ppc
Good luck, and happy coding. Good luck, and happy coding.
-Glenn Randers-Pehrson (current maintainer, since 1998) -Glenn Randers-Pehrson (current maintainer)
Internet: glennrp at users.sourceforge.net Internet: glennrp at users.sourceforge.net
-Andreas Eric Dilger (former maintainer, 1996-1997) -Andreas Eric Dilger (former maintainer, 1996-1997)
Internet: adilger at enel.ucalgary.ca Internet: adilger at enel.ucalgary.ca
Web: http://www-mddsp.enel.ucalgary.ca/People/adilger/ Web: http://members.shaw.ca/adilger/
-Guy Eric Schalnat (original author and former maintainer, 1995-1996) -Guy Eric Schalnat (original author and former maintainer, 1995-1996)
(formerly of Group 42, Inc) (formerly of Group 42, Inc)

12
TODO
View File

@@ -1,11 +1,12 @@
/*
TODO - list of things to do for libpng: TODO - list of things to do for libpng:
Final bug fixes. Final bug fixes.
Improve API by hiding the png_struct and png_info structs.
Finish work on the no-floating-point version (including gamma compensation)
Better C++ wrapper/full C++ implementation? Better C++ wrapper/full C++ implementation?
Fix problem with C++ and EXTERN "C". Fix problem with C++ and EXTERN "C".
cHRM transformation. cHRM transformation.
Remove setjmp/longjmp usage in favor of returning error codes. Improve setjmp/longjmp usage or remove it in favor of returning error codes.
Add "grayscale->palette" transformation and "palette->grayscale" detection. Add "grayscale->palette" transformation and "palette->grayscale" detection.
Improved dithering. Improved dithering.
Multi-lingual error and warning message support. Multi-lingual error and warning message support.
@@ -16,12 +17,9 @@ Better filter selection
(counting huffman bits/precompression? filter inertia? filter costs?). (counting huffman bits/precompression? filter inertia? filter costs?).
Histogram creation. Histogram creation.
Text conversion between different code pages (Latin-1 -> Mac and DOS). Text conversion between different code pages (Latin-1 -> Mac and DOS).
Avoid building gamma tables whenever possible. Should we always malloc 2^bit_depth PLTE/tRNS/hIST entries for safety?
Build gamma tables using fixed point (and do away with floating point entirely).
Use greater precision when changing to linear gamma for compositing against Use greater precision when changing to linear gamma for compositing against
background and doing rgb-to-gray transformation. background and doing rgb-to-gray transformation.
Investigate pre-incremented loop counters and other loop constructions. Investigate pre-incremented loop counters and other loop constructions.
Add interpolated method of handling interlacing. Add interpolated method of handling interlacing.
Switch to the simpler zlib (zlib/libpng) license if legally possible.
Extend pngvalid.c to validate more of the libpng transformations.
*/

55
Y2KINFO Normal file
View File

@@ -0,0 +1,55 @@
Y2K compliance in libpng:
=========================
October 1, 2009
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.41beta03 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 will hold years up to 65535. The other two hold the date in text
format, and will hold years up to 9999.
The integer is
"png_uint_16 year" in png_time_struct.
The strings are
"png_charp time_buffer" in png_struct and
"near_time_buffer", which is a local character string in png.c.
There are seven time-related functions:
png_convert_to_rfc_1123() in png.c
(formerly png_convert_to_rfc_1152() in error)
png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c
png_convert_from_time_t() in pngwrite.c
png_get_tIME() in pngget.c
png_handle_tIME() in pngrutil.c, called in pngread.c
png_set_tIME() in pngset.c
png_write_tIME() in pngwutil.c, called in pngwrite.c
All appear to handle dates properly in a Y2K environment. The
png_convert_from_time_t() function calls gmtime() to convert from system
clock time, which returns (year - 1900), which we properly convert to
the full 4-digit year. There is a possibility that applications using
libpng are not passing 4-digit years into the png_convert_to_rfc_1123()
function, or that they are incorrectly passing only a 2-digit year
instead of "year - 1900" into the png_convert_from_struct_tm() function,
but this is not under our control. The libpng documentation has always
stated that it works with 4-digit years, and the APIs have been
documented as such.
The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned
integer to hold the year, and can hold years as large as 65535.
zlib, upon which libpng depends, is also Y2K compliant. It contains
no date-related code.
Glenn Randers-Pehrson
libpng maintainer
PNG Development Group

2047
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

View File

@@ -4,31 +4,22 @@
# #
# WARNING: if you run this you will change the versions # WARNING: if you run this you will change the versions
# of the tools which are used and, maybe, required! # of the tools which are used and, maybe, required!
touch Makefile.am configure.ac
# You can define your own replacements in your environment.
# $AUTOCONF, $AUTOMAKE, $AUTOHEADER, $AUTOPOINT, $ACLOCAL and $LIBTOOLIZE
touch Makefile.am configure.ac
{ {
LT=${LIBTOOLIZE-libtoolize} echo "running libtoolize" >&2
echo "running $LT" >&2 libtoolize --force --copy --automake
$LT --force --copy --automake
} && { } && {
AL=${ACLOCAL-aclocal} echo "running aclocal" >&2
echo "running $AL" >&2 aclocal
$AL
} && { } && {
AH=${AUTOHEADER-autoheader} echo "running autoheader [ignore the warnings]" >&2
echo "running $AH [ignore the warnings]" >&2 autoheader
$AH
} && { } && {
AM=${AUTOMAKE-automake} echo "running automake" >&2
echo "running $AM" >&2 automake --force-missing --foreign -a -c
$AM --force-missing --foreign -a -c
} && { } && {
AC=${AUTOCONF-autoconf} echo "running autoconf" >&2
echo "running $AC" >&2 autoconf
$AC
} && } &&
echo "autogen complete" >&2 || echo "autogen complete" >&2 ||
echo "ERROR: autogen.sh failed, autogen is incomplete" >&2 echo "ERROR: autogen.sh failed, autogen is incomplete" >&2

196
config.guess vendored Normal file → Executable file
View File

@@ -1,10 +1,10 @@
#! /bin/sh #! /bin/sh
# Attempt to guess a canonical system name. # Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
timestamp='2009-11-20' timestamp='2009-04-27'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@@ -27,16 +27,16 @@ timestamp='2009-11-20'
# the same distribution terms that you use for the rest of that program. # the same distribution terms that you use for the rest of that program.
# Originally written by Per Bothner. Please send patches (context # Originally written by Per Bothner <per@bothner.com>.
# diff format) to <config-patches@gnu.org> and include a ChangeLog # Please send patches to <config-patches@gnu.org>. Submit a context
# entry. # diff and a properly formatted ChangeLog entry.
# #
# This script attempts to guess a canonical system name similar to # This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and # config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1. # exits with 0. Otherwise, it exits with 1.
# #
# You can get the latest version of this script from: # The plan is that this can be called by configure scripts if you
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # don't specify an explicit build system type.
me=`echo "$0" | sed -e 's,.*/,,'` me=`echo "$0" | sed -e 's,.*/,,'`
@@ -170,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*|i386|m68k|ns32k|sh3*|sparc|vax) arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__ | grep __ELF__ >/dev/null
then then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX? # Return netbsd for either. FIX?
@@ -333,9 +333,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;; exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
echo i386-pc-auroraux${UNAME_RELEASE}
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build eval $set_cc_for_build
SUN_ARCH="i386" SUN_ARCH="i386"
@@ -659,7 +656,7 @@ EOF
# => hppa64-hp-hpux11.23 # => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__ grep __LP64__ >/dev/null
then then
HP_ARCH="hppa2.0w" HP_ARCH="hppa2.0w"
else else
@@ -810,12 +807,12 @@ EOF
i*:PW*:*) i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32 echo ${UNAME_MACHINE}-pc-pw32
exit ;; exit ;;
*:Interix*:*) *:Interix*:[3456]*)
case ${UNAME_MACHINE} in case ${UNAME_MACHINE} in
x86) x86)
echo i586-pc-interix${UNAME_RELEASE} echo i586-pc-interix${UNAME_RELEASE}
exit ;; exit ;;
authenticamd | genuineintel | EM64T) EM64T | authenticamd | genuineintel)
echo x86_64-unknown-interix${UNAME_RELEASE} echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;; exit ;;
IA64) IA64)
@@ -825,9 +822,6 @@ EOF
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks echo i${UNAME_MACHINE}-pc-mks
exit ;; exit ;;
8664:Windows_NT:*)
echo x86_64-pc-mks
exit ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*) i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem? # How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -857,20 +851,6 @@ EOF
i*86:Minix:*:*) i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix echo ${UNAME_MACHINE}-pc-minix
exit ;; exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
PCA57) UNAME_MACHINE=alphapca56 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
exit ;;
arm*:Linux:*:*) arm*:Linux:*:*)
eval $set_cc_for_build eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -893,17 +873,6 @@ EOF
frv:Linux:*:*) frv:Linux:*:*)
echo frv-unknown-linux-gnu echo frv-unknown-linux-gnu
exit ;; exit ;;
i*86:Linux:*:*)
LIBC=gnu
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit ;;
ia64:Linux:*:*) ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;; exit ;;
@@ -913,34 +882,78 @@ EOF
m68*:Linux:*:*) m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;; exit ;;
mips:Linux:*:* | mips64:Linux:*:*) mips:Linux:*:*)
eval $set_cc_for_build eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c sed 's/^ //' << EOF >$dummy.c
#undef CPU #undef CPU
#undef ${UNAME_MACHINE} #undef mips
#undef ${UNAME_MACHINE}el #undef mipsel
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=${UNAME_MACHINE}el CPU=mipsel
#else #else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=${UNAME_MACHINE} CPU=mips
#else #else
CPU= CPU=
#endif #endif
#endif #endif
EOF EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips64
#undef mips64el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mips64el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips64
#else
CPU=
#endif
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;; ;;
or32:Linux:*:*) or32:Linux:*:*)
echo or32-unknown-linux-gnu echo or32-unknown-linux-gnu
exit ;; exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
PCA57) UNAME_MACHINE=alphapca56 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
exit ;;
padre:Linux:*:*) padre:Linux:*:*)
echo sparc-unknown-linux-gnu echo sparc-unknown-linux-gnu
exit ;; exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*) parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level # Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -949,11 +962,8 @@ EOF
*) echo hppa-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;;
esac esac
exit ;; exit ;;
ppc64:Linux:*:*) parisc64:Linux:*:* | hppa64:Linux:*:*)
echo powerpc64-unknown-linux-gnu echo hppa64-unknown-linux-gnu
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
exit ;; exit ;;
s390:Linux:*:* | s390x:Linux:*:*) s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux echo ${UNAME_MACHINE}-ibm-linux
@@ -976,6 +986,66 @@ EOF
xtensa*:Linux:*:*) xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;; exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
# Set LC_ALL=C to ensure ld outputs messages in English.
ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
| sed -ne '/supported targets:/!d
s/[ ][ ]*/ /g
s/.*supported targets: *//
s/ .*//
p'`
case "$ld_supported_targets" in
elf32-i386)
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
exit ;;
esac
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <features.h>
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
LIBC=gnu
# else
LIBC=gnulibc1
# endif
# else
LIBC=gnulibc1
# endif
#else
#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu
#else
LIBC=gnuaout
#endif
#endif
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^LIBC/{
s: ::g
p
}'`"
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
}
test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
;;
i*86:DYNIX/ptx:4*:*) i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both # earlier versions are messed up and put the nodename in both
@@ -1004,7 +1074,7 @@ EOF
i*86:syllable:*:*) i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable echo ${UNAME_MACHINE}-pc-syllable
exit ;; exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE} echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;; exit ;;
i*86:*DOS:*:*) i*86:*DOS:*:*)
@@ -1112,7 +1182,7 @@ EOF
rs6000:LynxOS:2.*:*) rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE} echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;; exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE} echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;; exit ;;
SM[BE]S:UNIX_SV:*:*) SM[BE]S:UNIX_SV:*:*)
@@ -1205,16 +1275,6 @@ EOF
*:Darwin:*:*) *:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in case $UNAME_PROCESSOR in
i386)
eval $set_cc_for_build
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
UNAME_PROCESSOR="x86_64"
fi
fi ;;
unknown) UNAME_PROCESSOR=powerpc ;; unknown) UNAME_PROCESSOR=powerpc ;;
esac esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}

43
config.sub vendored Normal file → Executable file
View File

@@ -1,10 +1,10 @@
#! /bin/sh #! /bin/sh
# Configuration validation subroutine script. # Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
timestamp='2009-11-20' timestamp='2009-04-17'
# This file is (in principle) common to ALL GNU software. # This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software # The presence of a machine in this file suggests that SOME GNU software
@@ -32,16 +32,13 @@ timestamp='2009-11-20'
# Please send patches to <config-patches@gnu.org>. Submit a context # Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted GNU ChangeLog entry. # diff and a properly formatted ChangeLog entry.
# #
# Configuration subroutine to validate and canonicalize a configuration type. # Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument. # Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1. # If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed. # Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
# This file is supposed to be the same for all GNU packages # This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases # and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software. # that are meaningful with *any* GNU software.
@@ -152,13 +149,10 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray | -microblaze) -apple | -axis | -knuth | -cray)
os= os=
basic_machine=$1 basic_machine=$1
;; ;;
-bluegene*)
os=-cnk
;;
-sim | -cisco | -oki | -wec | -winbond) -sim | -cisco | -oki | -wec | -winbond)
os= os=
basic_machine=$1 basic_machine=$1
@@ -287,7 +281,6 @@ case $basic_machine in
| pdp10 | pdp11 | pj | pjl \ | pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \ | pyramid \
| rx \
| score \ | score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \ | sh64 | sh64le \
@@ -295,14 +288,13 @@ case $basic_machine in
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \ | spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \ | tahoe | thumb | tic4x | tic80 | tron \
| ubicom32 \
| v850 | v850e \ | v850 | v850e \
| we32k \ | we32k \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k | z80) | z8k | z80)
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
;; ;;
m6811 | m68hc11 | m6812 | m68hc12 | picochip) m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12. # Motorola 68HC11/12.
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
os=-none os=-none
@@ -345,7 +337,7 @@ case $basic_machine in
| lm32-* \ | lm32-* \
| m32c-* | m32r-* | m32rle-* \ | m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \ | mips16-* \
| mips64-* | mips64el-* \ | mips64-* | mips64el-* \
@@ -373,7 +365,7 @@ case $basic_machine in
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \ | pyramid-* \
| romp-* | rs6000-* | rx-* \ | romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
@@ -382,7 +374,6 @@ case $basic_machine in
| tahoe-* | thumb-* \ | tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
| tron-* \ | tron-* \
| ubicom32-* \
| v850-* | v850e-* | vax-* \ | v850-* | v850e-* | vax-* \
| we32k-* \ | we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
@@ -476,10 +467,6 @@ case $basic_machine in
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux os=-linux
;; ;;
bluegene*)
basic_machine=powerpc-ibm
os=-cnk
;;
c90) c90)
basic_machine=c90-cray basic_machine=c90-cray
os=-unicos os=-unicos
@@ -732,9 +719,6 @@ case $basic_machine in
basic_machine=ns32k-utek basic_machine=ns32k-utek
os=-sysv os=-sysv
;; ;;
microblaze)
basic_machine=microblaze-xilinx
;;
mingw32) mingw32)
basic_machine=i386-pc basic_machine=i386-pc
os=-mingw32 os=-mingw32
@@ -1256,9 +1240,6 @@ case $os in
# First match some system type aliases # First match some system type aliases
# that might get confused with valid system types. # that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception. # -solaris* is a basic system type, with this one exception.
-auroraux)
os=-auroraux
;;
-solaris1 | -solaris1.*) -solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'` os=`echo $os | sed -e 's|solaris1|sunos4|'`
;; ;;
@@ -1279,9 +1260,9 @@ case $os in
# Each alternative MUST END IN A *, to match a version number. # Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4. # -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -sym* | -kopensolaris* \ | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \ | -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@@ -1302,7 +1283,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
# Remember, each alternative MUST END IN *, to match a version number. # Remember, each alternative MUST END IN *, to match a version number.
;; ;;
-qnx*) -qnx*)
@@ -1632,7 +1613,7 @@ case $basic_machine in
-sunos*) -sunos*)
vendor=sun vendor=sun
;; ;;
-cnk*|-aix*) -aix*)
vendor=ibm vendor=ibm
;; ;;
-beos*) -beos*)

3902
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -18,15 +18,15 @@ AC_PREREQ(2.59)
dnl Version number stuff here: dnl Version number stuff here:
AC_INIT([libpng], [1.5.2], [png-mng-implement@lists.sourceforge.net]) AC_INIT([libpng], [1.2.41beta03], [png-mng-implement@lists.sourceforge.net])
AM_INIT_AUTOMAKE AM_INIT_AUTOMAKE
dnl stop configure from automagically running automake dnl stop configure from automagically running automake
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
PNGLIB_VERSION=1.5.2 PNGLIB_VERSION=1.2.41beta03
PNGLIB_MAJOR=1 PNGLIB_MAJOR=1
PNGLIB_MINOR=5 PNGLIB_MINOR=2
PNGLIB_RELEASE=2 PNGLIB_RELEASE=41
dnl End of version number stuff dnl End of version number stuff
@@ -34,38 +34,15 @@ AC_CONFIG_SRCDIR([pngget.c])
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
# Checks for programs. # Checks for programs.
AC_LANG([C])
AC_PROG_CC AC_PROG_CC
AC_PROG_LD AC_PROG_LD
AC_PROG_CPP AC_PROG_CPP
AC_CHECK_TOOL(SED, sed, :) AC_CHECK_TOOL(SED, sed, :)
AC_CHECK_TOOL(AWK, awk, :) AC_LIBTOOL_WIN32_DLL
AC_PROG_INSTALL AC_PROG_INSTALL
AC_PROG_LN_S AC_PROG_LN_S
AC_PROG_MAKE_SET AC_PROG_MAKE_SET
LT_INIT([win32-dll]) AC_PROG_LIBTOOL
# On Solaris 10 and 12 CPP gets set to cc -E, however this still
# does some input parsing. We need strict ANSI-C style tokenization,
# check this:
AC_REQUIRE_CPP
AC_MSG_CHECKING([for a C preprocessor that does not parse its input])
AC_TRY_CPP([1.5.0 16BIT],
[DFNCPP="$CPP"],
[DFNCPP=""
sav_CPP="$CPP"
for CPP in "${CC-cc} -E" "${CC-cc} -E -traditional-cpp" "/lib/cpp" "cpp"; do
AC_TRY_CPP([1.5.0 16BIT],
[DFNCPP="$CPP"]
[break],,)
done
CPP="$sav_CPP"])
if test -n "$DFNCPP"; then
AC_MSG_RESULT([$DFNCPP])
AC_SUBST(DFNCPP)
else
AC_MSG_FAILURE([not found], 1)
fi
# Checks for header files. # Checks for header files.
AC_HEADER_STDC AC_HEADER_STDC
@@ -80,30 +57,23 @@ AC_STRUCT_TM
AC_FUNC_STRTOD AC_FUNC_STRTOD
AC_CHECK_FUNCS([memset], , AC_ERROR([memset not found in libc])) 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_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_ERROR([cannot find pow])) )
AC_ARG_WITH(zlib-prefix, AC_CHECK_LIB(z, zlibVersion, , AC_ERROR([zlib not installed]))
AC_HELP_STRING([--with-zlib-prefix],
[prefix that may have been used in installed zlib]),
[ZPREFIX=${withval}],
[ZPREFIX='z_'])
AC_CHECK_LIB(z, zlibVersion, ,
AC_CHECK_LIB(z, ${ZPREFIX}zlibVersion, ,
AC_ERROR([zlib not installed])))
LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
LIBPNG_DEFINES=$LIBPNG_DEFINES AC_MSG_CHECKING(
[if assembler code in pnggccrd.c can be compiled without PNG_NO_MMX_CODE])
AC_TRY_COMPILE(
[#include "$srcdir/pnggccrd.c"],
[return 0;],
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_DEFINES)
AC_SUBST(LIBPNG_NO_MMX)
AC_MSG_CHECKING([if libraries can be versioned]) AC_MSG_CHECKING([if libraries can be versioned])
# Special case for PE/COFF platforms: ld reports
# support for version-script, but doesn't actually
# DO anything with it.
case $host in
*cygwin* | *mingw32* | *interix* )
have_ld_version_script=no
AC_MSG_RESULT(no)
;;
* )
GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script` GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
if test "$GLD"; then if test "$GLD"; then
have_ld_version_script=yes have_ld_version_script=yes
@@ -113,9 +83,6 @@ else
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
AC_MSG_WARN(*** You have not enabled versioned symbols.) AC_MSG_WARN(*** You have not enabled versioned symbols.)
fi fi
;;
esac
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes") AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
if test "$have_ld_version_script" = "yes"; then if test "$have_ld_version_script" = "yes"; then
@@ -159,9 +126,23 @@ AC_ARG_WITH(binconfigs,
[binconfigs='${binconfigs}']) [binconfigs='${binconfigs}'])
AC_SUBST([binconfigs]) AC_SUBST([binconfigs])
# Allow the old version number library, libpng.so, to be removed from
# the build
AC_ARG_WITH(libpng-compat,
AC_HELP_STRING([--with-libpng-compat],
[Generate the obsolete libpng.so library @<:@default=yes@:>@]),
[if test "${withval}" = no; then
compatlib=
AC_MSG_NOTICE([libpng.so will not be built])
else
compatlib=libpng.la
fi],
[compatlib=libpng.la])
AC_SUBST([compatlib])
# Config files, substituting as above # Config files, substituting as above
AC_CONFIG_FILES([Makefile libpng.pc:libpng.pc.in]) AC_CONFIG_FILES([Makefile libpng.pc:scripts/libpng.pc-configure.in])
AC_CONFIG_FILES([libpng-config:libpng-config.in], AC_CONFIG_FILES([libpng-config:scripts/libpng-config.in],
[chmod +x libpng-config]) [chmod +x libpng-config])
AC_OUTPUT AC_OUTPUT

View File

@@ -1,12 +1,12 @@
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 2, June 1991 Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc. Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
Preamble Preamble
The licenses for most software are designed to take away your The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public freedom to share and change it. By contrast, the GNU General Public
@@ -56,7 +56,7 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and The precise terms and conditions for copying, distribution and
modification follow. modification follow.
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains 0. This License applies to any program or other work which contains
@@ -255,7 +255,7 @@ 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 preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally. of promoting the sharing and reuse of software generally.
NO WARRANTY NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS 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 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@@ -277,9 +277,9 @@ 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 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES. POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest 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 possible use to the public, the best way to achieve this is to make it

View File

@@ -23,9 +23,9 @@
# macros -------------------------------------------------------------------- # macros --------------------------------------------------------------------
PNGINC = -I/usr/local/include/libpng15 PNGINC = -I/usr/local/include/libpng12
PNGLIB = -L/usr/local/lib -lpng15 # dynamically linked against libpng PNGLIB = -L/usr/local/lib -lpng12 # dynamically linked against libpng
#PNGLIB = /usr/local/lib/libpng15.a # statically linked against libpng #PNGLIB = /usr/local/lib/libpng12.a # statically linked against libpng
# or: # or:
#PNGINC = -I../.. #PNGINC = -I../..
#PNGLIB = -L../.. -lpng #PNGLIB = -L../.. -lpng

View File

@@ -26,14 +26,14 @@
# macros -------------------------------------------------------------------- # macros --------------------------------------------------------------------
#PNGDIR = /usr/local/lib #PNGDIR = /usr/local/lib
#PNGINC = -I/usr/local/include/libpng15 #PNGINC = -I/usr/local/include/libpng12
#PNGLIBd = -L$(PNGDIR) -lpng15 # dynamically linked, installed libpng #PNGLIBd = -L$(PNGDIR) -lpng12 # dynamically linked, installed libpng
#PNGLIBs = $(PNGDIR)/libpng15.a # statically linked, installed libpng #PNGLIBs = $(PNGDIR)/libpng12.a # statically linked, installed libpng
# or: # or:
PNGDIR = ../..# this one is for libpng-x.y.z/contrib/gregbook builds PNGDIR = ../..# this one is for libpng-x.y.z/contrib/gregbook builds
#PNGDIR = ../libpng #PNGDIR = ../libpng
PNGINC = -I$(PNGDIR) PNGINC = -I$(PNGDIR)
PNGLIBd = -Wl,-rpath,$(PNGDIR) -L$(PNGDIR) -lpng15 # dynamically linked PNGLIBd = -Wl,-rpath,$(PNGDIR) -L$(PNGDIR) -lpng12 # dynamically linked
PNGLIBs = $(PNGDIR)/libpng.a # statically linked, local libpng PNGLIBs = $(PNGDIR)/libpng.a # statically linked, local libpng
ZDIR = /usr/local/lib ZDIR = /usr/local/lib

View File

@@ -63,9 +63,9 @@ BUILD INSTRUCTIONS
- Prerequisites (in order of compilation): - Prerequisites (in order of compilation):
- zlib http://zlib.net/ - zlib http://zlib.net/
- libpng http://www.libpng.org/pub/png/libpng.html - libpng http://www.libpng.org/pub/png/libpng.html
- pngbook http://www.libpng.org/pub/png/book/sources.html - pngbook http://www.libpng.org/pub/png/book/sources.html
The pngbook demo programs are explicitly designed to demonstrate proper The pngbook demo programs are explicitly designed to demonstrate proper
coding techniques for using the libpng reference library. As a result, coding techniques for using the libpng reference library. As a result,
@@ -165,19 +165,19 @@ RUNNING THE PROGRAMS: (VERY) BRIEF INTRO
rpng is a simple PNG viewer that can display transparent PNGs with a rpng is a simple PNG viewer that can display transparent PNGs with a
specified background color; for example, specified background color; for example,
rpng -bgcolor \#ff0000 toucan.png rpng -bgcolor #ff0000 toucan.png
would display the image with a red background. rpng2 is a progressive would display the image with a red background. rpng2 is a progressive
viewer that simulates a web browser in some respects; it can display viewer that simulates a web browser in some respects; it can display
images against either a background color or a dynamically generated images against either a background color or a dynamically generated
background image. For example: background image. For example:
rpng2 -bgpat 16 toucan.png rpng2 -bgpat 16 toucan.png
wpng is a purely command-line image converter from binary PBMPLUS/NetPBM wpng is a purely command-line image converter from binary PBMPLUS/NetPBM
format (.pgm or .ppm) to PNG; for example, format (.pgm or .ppm) to PNG; for example,
wpng -time < toucan-notrans.ppm > toucan-notrans.png wpng -time < toucan-notrans.ppm > toucan-notrans.png
would convert the specified PPM file (using redirection) to PNG, auto- would convert the specified PPM file (using redirection) to PNG, auto-
matically setting the PNG modification-time chunk. matically setting the PNG modification-time chunk.

View File

@@ -93,7 +93,7 @@ int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight)
* have used slightly more general png_sig_cmp() function instead */ * have used slightly more general png_sig_cmp() function instead */
fread(sig, 1, 8, infile); fread(sig, 1, 8, infile);
if (png_sig_cmp(sig, 0, 8)) if (!png_check_sig(sig, 8))
return 1; /* bad signature */ return 1; /* bad signature */
@@ -263,8 +263,7 @@ uch *readpng_get_image(double display_exponent, int *pChannels, ulg *pRowbytes)
return NULL; return NULL;
} }
Trace((stderr, "readpng_get_image: channels = %d, rowbytes = %ld, height = %ld\n", Trace((stderr, "readpng_get_image: channels = %d, rowbytes = %ld, height = %ld\n", *pChannels, rowbytes, height));
*pChannels, rowbytes, height));
/* set the individual row_pointers to point at the correct offsets */ /* set the individual row_pointers to point at the correct offsets */

View File

@@ -55,10 +55,8 @@
#include <stdlib.h> /* for exit() prototype */ #include <stdlib.h> /* for exit() prototype */
#include <setjmp.h>
#include <zlib.h> #include "png.h" /* libpng header; includes zlib.h and setjmp.h */
#include "png.h" /* libpng header from the local directory */
#include "readpng2.h" /* typedefs, common macros, public prototypes */ #include "readpng2.h" /* typedefs, common macros, public prototypes */
@@ -75,10 +73,84 @@ static void readpng2_error_handler(png_structp png_ptr, png_const_charp msg);
void readpng2_version_info(void) void readpng2_version_info(void)
{ {
fprintf(stderr, " Compiled with libpng %s; using libpng %s\n", #if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && \
PNG_LIBPNG_VER_STRING, png_libpng_ver); (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
* cannot be used with a libpng DLL older than 1.2.0--the
* compiled-in symbols for the new functions will not exist.
* (Could use dlopen() and dlsym() on Unix and corresponding
* calls for Windows, but not portable...)
*/
{
int mmxsupport = png_mmx_support();
if (mmxsupport < 0)
fprintf(stderr, " Compiled with libpng %s; using libpng %s "
"without MMX support.\n", PNG_LIBPNG_VER_STRING, png_libpng_ver);
else {
int compilerID;
png_uint_32 mmx_mask = png_get_mmx_flagmask(
PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID);
fprintf(stderr, " and with zlib %s; using zlib %s.\n", fprintf(stderr, " Compiled with libpng %s; using libpng %s "
"with MMX support\n (%s version).", PNG_LIBPNG_VER_STRING,
png_libpng_ver, compilerID == 1? "MSVC++" :
(compilerID == 2? "GNU C" : "unknown"));
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;
fprintf(stderr,
" Potential MMX optimizations supported by libpng:\n");
if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)
++num_optims;
if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_UP)
++num_optims;
if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)
++num_optims;
if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)
++num_optims;
if (num_optims)
fprintf(stderr,
" decoding %s row filters (reading)\n",
(num_optims == 4)? "all non-trivial" : "some");
if (mmx_mask & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) {
fprintf(stderr, " combining rows (reading)\n");
++num_optims;
}
if (mmx_mask & PNG_ASM_FLAG_MMX_READ_INTERLACE) {
fprintf(stderr,
" expanding interlacing (reading)\n");
++num_optims;
}
mmx_mask &= ~( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \
| PNG_ASM_FLAG_MMX_READ_INTERLACE \
| PNG_ASM_FLAG_MMX_READ_FILTER_SUB \
| PNG_ASM_FLAG_MMX_READ_FILTER_UP \
| PNG_ASM_FLAG_MMX_READ_FILTER_AVG \
| PNG_ASM_FLAG_MMX_READ_FILTER_PAETH );
if (mmx_mask) {
fprintf(stderr, " other (unknown)\n");
++num_optims;
}
if (num_optims == 0)
fprintf(stderr, " (none)\n");
}
}
}
#else
fprintf(stderr, " Compiled with libpng %s; using libpng %s "
"without MMX support.\n", PNG_LIBPNG_VER_STRING, png_libpng_ver);
#endif
fprintf(stderr, " Compiled with zlib %s; using zlib %s.\n",
ZLIB_VERSION, zlib_version); ZLIB_VERSION, zlib_version);
} }
@@ -87,7 +159,7 @@ void readpng2_version_info(void)
int readpng2_check_sig(uch *sig, int num) int readpng2_check_sig(uch *sig, int num)
{ {
return !png_sig_cmp(sig, 0, num); return png_check_sig(sig, num);
} }
@@ -131,7 +203,7 @@ int readpng2_init(mainprog_info *mainprog_ptr)
} }
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
/* prepare the reader to ignore all recognized chunks whose data won't be /* 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, * used, i.e., all chunks recognized by libpng except for IHDR, PLTE, IDAT,
* IEND, tRNS, bKGD, gAMA, and sRGB (small performance improvement) */ * IEND, tRNS, bKGD, gAMA, and sRGB (small performance improvement) */
@@ -140,7 +212,7 @@ int readpng2_init(mainprog_info *mainprog_ptr)
* version recognizes more chunks, add them to this list. If a * version recognizes more chunks, add them to this list. If a
* future version of readpng2.c recognizes more chunks, delete them * future version of readpng2.c recognizes more chunks, delete them
* from this list. */ * from this list. */
static /* const */ png_byte chunks_to_ignore[] = { static const png_byte chunks_to_ignore[] = {
99, 72, 82, 77, '\0', /* cHRM */ 99, 72, 82, 77, '\0', /* cHRM */
104, 73, 83, 84, '\0', /* hIST */ 104, 73, 83, 84, '\0', /* hIST */
105, 67, 67, 80, '\0', /* iCCP */ 105, 67, 67, 80, '\0', /* iCCP */
@@ -160,7 +232,7 @@ int readpng2_init(mainprog_info *mainprog_ptr)
png_set_keep_unknown_chunks(png_ptr, 1 /* PNG_HANDLE_CHUNK_NEVER */, png_set_keep_unknown_chunks(png_ptr, 1 /* PNG_HANDLE_CHUNK_NEVER */,
chunks_to_ignore, sizeof(chunks_to_ignore)/5); chunks_to_ignore, sizeof(chunks_to_ignore)/5);
} }
#endif /* PNG_HANDLE_AS_UNKNOWN_SUPPORTED */ #endif /* PNG_UNKNOWN_CHUNKS_SUPPORTED */
/* instead of doing png_init_io() here, now we set up our callback /* instead of doing png_init_io() here, now we set up our callback
@@ -170,6 +242,96 @@ int readpng2_init(mainprog_info *mainprog_ptr)
readpng2_info_callback, readpng2_row_callback, readpng2_end_callback); readpng2_info_callback, readpng2_row_callback, readpng2_end_callback);
/*
* may as well enable or disable MMX routines here, if supported;
*
* to enable all: mask = png_get_mmx_flagmask (
* PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID);
* flags = png_get_asm_flags (png_ptr);
* flags |= mask;
* png_set_asm_flags (png_ptr, flags);
*
* to disable all: mask = png_get_mmx_flagmask (
* PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID);
* flags = png_get_asm_flags (png_ptr);
* flags &= ~mask;
* png_set_asm_flags (png_ptr, flags);
*/
#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
* cannot be used with a libpng DLL older than 1.2.0--the
* compiled-in symbols for the new functions will not exist.
* (Could use dlopen() and dlsym() on Unix and corresponding
* calls for Windows, but not portable...)
*/
{
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
png_uint_32 mmx_disable_mask = 0;
png_uint_32 asm_flags, mmx_mask;
int compilerID;
if (mainprog_ptr->nommxfilters)
mmx_disable_mask |= ( PNG_ASM_FLAG_MMX_READ_FILTER_SUB \
| PNG_ASM_FLAG_MMX_READ_FILTER_UP \
| PNG_ASM_FLAG_MMX_READ_FILTER_AVG \
| PNG_ASM_FLAG_MMX_READ_FILTER_PAETH );
if (mainprog_ptr->nommxcombine)
mmx_disable_mask |= PNG_ASM_FLAG_MMX_READ_COMBINE_ROW;
if (mainprog_ptr->nommxinterlace)
mmx_disable_mask |= PNG_ASM_FLAG_MMX_READ_INTERLACE;
asm_flags = png_get_asm_flags(png_ptr);
png_set_asm_flags(png_ptr, asm_flags & ~mmx_disable_mask);
/* Now query libpng's asm settings, just for yuks. Note that this
* differs from the querying of its *potential* MMX capabilities
* in readpng2_version_info(); this is true runtime verification. */
asm_flags = png_get_asm_flags(png_ptr);
mmx_mask = png_get_mmx_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE,
&compilerID);
if (asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_COMPILED)
fprintf(stderr,
" MMX support (%s version) is compiled into libpng\n",
compilerID == 1? "MSVC++" :
(compilerID == 2? "GNU C" : "unknown"));
else
fprintf(stderr, " MMX support is not compiled into libpng\n");
fprintf(stderr, " MMX instructions are %ssupported by CPU\n",
(asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU)? "" : "not ");
fprintf(stderr, " MMX read support for combining rows is %sabled\n",
(asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)? "en" : "dis");
fprintf(stderr,
" MMX read support for expanding interlacing is %sabled\n",
(asm_flags & PNG_ASM_FLAG_MMX_READ_INTERLACE)? "en" : "dis");
fprintf(stderr, " MMX read support for \"sub\" filter is %sabled\n",
(asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "en" : "dis");
fprintf(stderr, " MMX read support for \"up\" filter is %sabled\n",
(asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP)? "en" : "dis");
fprintf(stderr, " MMX read support for \"avg\" filter is %sabled\n",
(asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)? "en" : "dis");
fprintf(stderr, " MMX read support for \"Paeth\" filter is %sabled\n",
(asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)? "en" : "dis");
asm_flags &= (mmx_mask & ~( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \
| PNG_ASM_FLAG_MMX_READ_INTERLACE \
| PNG_ASM_FLAG_MMX_READ_FILTER_SUB \
| PNG_ASM_FLAG_MMX_READ_FILTER_UP \
| PNG_ASM_FLAG_MMX_READ_FILTER_AVG \
| PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ));
if (asm_flags)
fprintf(stderr,
" additional MMX support is also enabled (0x%02lx)\n",
asm_flags);
#else /* !PNG_ASSEMBLER_CODE_SUPPORTED */
fprintf(stderr, " MMX querying is disabled in libpng.\n");
#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
}
#endif
/* make sure we save our pointers for use in readpng2_decode_data() */ /* make sure we save our pointers for use in readpng2_decode_data() */
mainprog_ptr->png_ptr = png_ptr; mainprog_ptr->png_ptr = png_ptr;
@@ -217,12 +379,7 @@ static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr)
{ {
mainprog_info *mainprog_ptr; mainprog_info *mainprog_ptr;
int color_type, bit_depth; int color_type, bit_depth;
png_uint_32 width, height;
#ifdef PNG_FLOATING_POINT_SUPPORTED
double gamma; double gamma;
#else
png_fixed_point gamma;
#endif
/* setjmp() doesn't make sense here, because we'd either have to exit(), /* setjmp() doesn't make sense here, because we'd either have to exit(),
@@ -257,10 +414,8 @@ static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr)
/* this is just like in the non-progressive case */ /* this is just like in the non-progressive case */
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, png_get_IHDR(png_ptr, info_ptr, &mainprog_ptr->width,
NULL, NULL, NULL); &mainprog_ptr->height, &bit_depth, &color_type, NULL, NULL, NULL);
mainprog_ptr->width = (ulg)width;
mainprog_ptr->height = (ulg)height;
/* since we know we've read all of the PNG file's "header" (i.e., up /* since we know we've read all of the PNG file's "header" (i.e., up
@@ -333,19 +488,11 @@ static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr)
* "gamma" value for the entire display system, i.e., the product of * "gamma" value for the entire display system, i.e., the product of
* LUT_exponent and CRT_exponent. */ * LUT_exponent and CRT_exponent. */
#ifdef PNG_FLOATING_POINT_SUPPORTED
if (png_get_gAMA(png_ptr, info_ptr, &gamma)) if (png_get_gAMA(png_ptr, info_ptr, &gamma))
png_set_gamma(png_ptr, mainprog_ptr->display_exponent, gamma); png_set_gamma(png_ptr, mainprog_ptr->display_exponent, gamma);
else else
png_set_gamma(png_ptr, mainprog_ptr->display_exponent, 0.45455); png_set_gamma(png_ptr, mainprog_ptr->display_exponent, 0.45455);
#else
if (png_get_gAMA_fixed(png_ptr, info_ptr, &gamma))
png_set_gamma_fixed(png_ptr,
(png_fixed_point)(100000*mainprog_ptr->display_exponent+.5), gamma);
else
png_set_gamma_fixed(png_ptr,
(png_fixed_point)(100000*mainprog_ptr->display_exponent+.5), 45455);
#endif
/* we'll let libpng expand interlaced images, too */ /* we'll let libpng expand interlaced images, too */
@@ -494,12 +641,5 @@ static void readpng2_error_handler(png_structp png_ptr, png_const_charp msg)
exit(99); exit(99);
} }
/* Now we have our data structure we can use the information in it
* to return control to our own higher level code (all the points
* where 'setjmp' is called in this file.) This will work with other
* error handling mechanisms as well - libpng always calls png_error
* when it can proceed no further, thus, so long as the error handler
* is intercepted, application code can do its own error recovery.
*/
longjmp(mainprog_ptr->jmpbuf, 1); longjmp(mainprog_ptr->jmpbuf, 1);
} }

View File

@@ -96,6 +96,11 @@ typedef struct _mainprog_info {
int rowbytes; int rowbytes;
int channels; int channels;
int need_bgcolor; int need_bgcolor;
#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__))
int nommxfilters;
int nommxcombine;
int nommxinterlace;
#endif
int state; int state;
uch bg_red; uch bg_red;
uch bg_green; uch bg_green;

View File

@@ -85,33 +85,7 @@
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include <windows.h> #include <windows.h>
#ifdef __CYGWIN__
/* getch replacement. Turns out, we don't really need this,
* but leave it here if we ever enable any of the uses of
* _getch in the main code
*/
#include <unistd.h>
#include <termio.h>
#include <sys/ioctl.h>
int repl_getch( void )
{
char ch;
int fd = fileno(stdin);
struct termio old_tty, new_tty;
ioctl(fd, TCGETA, &old_tty);
new_tty = old_tty;
new_tty.c_lflag &= ~(ICANON | ECHO | ISIG);
ioctl(fd, TCSETA, &new_tty);
fread(&ch, 1, sizeof(ch), stdin);
ioctl(fd, TCSETA, &old_tty);
return ch;
}
#define _getch repl_getch
#else
#include <conio.h> /* only for _getch() */ #include <conio.h> /* only for _getch() */
#endif
/* #define DEBUG : this enables the Trace() macros */ /* #define DEBUG : this enables the Trace() macros */
@@ -179,7 +153,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
filename = (char *)NULL; filename = (char *)NULL;
#ifndef __CYGWIN__
/* First reenable console output, which normally goes to the bit bucket /* First reenable console output, which normally goes to the bit bucket
* for windowed apps. Closing the console window will terminate the * for windowed apps. Closing the console window will terminate the
* app. Thanks to David.Geldreich@realviz.com for supplying the magical * app. Thanks to David.Geldreich@realviz.com for supplying the magical
@@ -188,7 +162,6 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
AllocConsole(); AllocConsole();
freopen("CONOUT$", "a", stderr); freopen("CONOUT$", "a", stderr);
freopen("CONOUT$", "a", stdout); freopen("CONOUT$", "a", stdout);
#endif
/* Next set the default value for our display-system exponent, i.e., /* Next set the default value for our display-system exponent, i.e.,
@@ -306,9 +279,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
/* print usage screen if any errors up to this point */ /* print usage screen if any errors up to this point */
if (error) { if (error) {
#ifndef __CYGWIN__
int ch; int ch;
#endif
fprintf(stderr, "\n%s %s: %s\n\n", PROGNAME, VERSION, appname); fprintf(stderr, "\n%s %s: %s\n\n", PROGNAME, VERSION, appname);
readpng_version_info(); readpng_version_info();
@@ -322,15 +293,11 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
"\t\t (e.g., ``#ff7700'' for orange: same as HTML colors);\n" "\t\t (e.g., ``#ff7700'' for orange: same as HTML colors);\n"
"\t\t used with transparent images\n" "\t\t used with transparent images\n"
"\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n" "\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n"
#ifndef __CYGWIN__
"Press Q or Esc to quit this usage screen.\n" "Press Q or Esc to quit this usage screen.\n"
#endif
"\n", PROGNAME, default_display_exponent); "\n", PROGNAME, default_display_exponent);
#ifndef __CYGWIN__
do do
ch = _getch(); ch = _getch();
while (ch != 'q' && ch != 'Q' && ch != 0x1B); while (ch != 'q' && ch != 'Q' && ch != 0x1B);
#endif
exit(1); exit(1);
} }
@@ -366,24 +333,18 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
if (error) { if (error) {
#ifndef __CYGWIN__
int ch; int ch;
#endif
fprintf(stderr, PROGNAME ": aborting.\n"); fprintf(stderr, PROGNAME ": aborting.\n");
#ifndef __CYGWIN__
do do
ch = _getch(); ch = _getch();
while (ch != 'q' && ch != 'Q' && ch != 0x1B); while (ch != 'q' && ch != 'Q' && ch != 0x1B);
#endif
exit(2); exit(2);
} else { } else {
fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, appname); fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, appname);
#ifndef __CYGWIN__
fprintf(stderr, fprintf(stderr,
"\n [console window: closing this window will terminate %s]\n\n", "\n [console window: closing this window will terminate %s]\n\n",
PROGNAME); PROGNAME);
#endif
} }
@@ -456,12 +417,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
/* wait for the user to tell us when to quit */ /* wait for the user to tell us when to quit */
printf( printf(
#ifndef __CYGWIN__ "Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n");
"Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n"
#else
"Done. Press mouse button 1 (within image window) to quit.\n"
#endif
);
fflush(stdout); fflush(stdout);
while (GetMessage(&msg, NULL, 0, 0)) { while (GetMessage(&msg, NULL, 0, 0)) {

View File

@@ -81,8 +81,8 @@
#define PROGNAME "rpng-x" #define PROGNAME "rpng-x"
#define LONGNAME "Simple PNG Viewer for X" #define LONGNAME "Simple PNG Viewer for X"
#define VERSION "2.01 of 16 March 2008" #define VERSION "2.01 of 16 March 2008"
#define RESNAME "rpng" /* our X resource application name */ #define RESNAME "rpng" /* our X resource application name */
#define RESCLASS "Rpng" /* our X resource class name */ #define RESCLASS "Rpng" /* our X resource class name */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View File

@@ -32,7 +32,6 @@
- 2.01: fixed 64-bit typo in readpng2.c - 2.01: fixed 64-bit typo in readpng2.c
- 2.02: fixed improper display of usage screen on PNG error(s); fixed - 2.02: fixed improper display of usage screen on PNG error(s); fixed
unexpected-EOF and file-read-error cases unexpected-EOF and file-read-error cases
- 2.03: removed runtime MMX-enabling/disabling and obsolete -mmx* options
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
@@ -96,33 +95,7 @@
#include <time.h> #include <time.h>
#include <math.h> /* only for PvdM background code */ #include <math.h> /* only for PvdM background code */
#include <windows.h> #include <windows.h>
#ifdef __CYGWIN__
/* getch replacement. Turns out, we don't really need this,
* but leave it here if we ever enable any of the uses of
* _getch in the main code
*/
#include <unistd.h>
#include <termio.h>
#include <sys/ioctl.h>
int repl_getch( void )
{
char ch;
int fd = fileno(stdin);
struct termio old_tty, new_tty;
ioctl(fd, TCGETA, &old_tty);
new_tty = old_tty;
new_tty.c_lflag &= ~(ICANON | ECHO | ISIG);
ioctl(fd, TCSETA, &new_tty);
fread(&ch, 1, sizeof(ch), stdin);
ioctl(fd, TCSETA, &old_tty);
return ch;
}
#define _getch repl_getch
#else
#include <conio.h> /* only for _getch() */ #include <conio.h> /* only for _getch() */
#endif
/* all for PvdM background code: */ /* all for PvdM background code: */
#ifndef PI #ifndef PI
@@ -296,7 +269,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
filename = (char *)NULL; filename = (char *)NULL;
memset(&rpng2_info, 0, sizeof(mainprog_info)); memset(&rpng2_info, 0, sizeof(mainprog_info));
#ifndef __CYGWIN__
/* Next reenable console output, which normally goes to the bit bucket /* Next reenable console output, which normally goes to the bit bucket
* for windowed apps. Closing the console window will terminate the * for windowed apps. Closing the console window will terminate the
* app. Thanks to David.Geldreich@realviz.com for supplying the magical * app. Thanks to David.Geldreich@realviz.com for supplying the magical
@@ -305,7 +278,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
AllocConsole(); AllocConsole();
freopen("CONOUT$", "a", stderr); freopen("CONOUT$", "a", stderr);
freopen("CONOUT$", "a", stdout); freopen("CONOUT$", "a", stdout);
#endif
/* Set the default value for our display-system exponent, i.e., the /* Set the default value for our display-system exponent, i.e., the
* product of the CRT exponent and the exponent corresponding to * product of the CRT exponent and the exponent corresponding to
@@ -422,6 +395,18 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
} }
} else if (!strncmp(*argv, "-timing", 2)) { } else if (!strncmp(*argv, "-timing", 2)) {
timing = TRUE; timing = TRUE;
#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)) {
rpng2_info.nommxcombine = TRUE;
} else if (!strncmp(*argv, "-nommxinterlace", 7)) {
rpng2_info.nommxinterlace = TRUE;
} else if (!strcmp(*argv, "-nommx")) {
rpng2_info.nommxfilters = TRUE;
rpng2_info.nommxcombine = TRUE;
rpng2_info.nommxinterlace = TRUE;
#endif
} else { } else {
if (**argv != '-') { if (**argv != '-') {
filename = *argv; filename = *argv;
@@ -439,14 +424,15 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
/* print usage screen if any errors up to this point */ /* print usage screen if any errors up to this point */
if (error) { if (error) {
#ifndef __CYGWIN__
int ch; int ch;
#endif
fprintf(stderr, "\n%s %s: %s\n\n", PROGNAME, VERSION, appname); fprintf(stderr, "\n%s %s: %s\n\n", PROGNAME, VERSION, appname);
readpng2_version_info(); readpng2_version_info();
fprintf(stderr, "\n" fprintf(stderr, "\n"
"Usage: %s [-gamma exp] [-bgcolor bg | -bgpat pat] [-timing]\n" "Usage: %s [-gamma exp] [-bgcolor bg | -bgpat pat] [-timing]\n"
#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__))
" %*s [[-nommxfilters] [-nommxcombine] [-nommxinterlace] | -nommx]\n"
#endif
" %*s file.png\n\n" " %*s file.png\n\n"
" exp \ttransfer-function exponent (``gamma'') of the display\n" " exp \ttransfer-function exponent (``gamma'') of the display\n"
"\t\t system in floating-point format (e.g., ``%.1f''); equal\n" "\t\t system in floating-point format (e.g., ``%.1f''); equal\n"
@@ -459,24 +445,21 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
"\t\t transparent images; overrides -bgcolor option\n" "\t\t transparent images; overrides -bgcolor option\n"
" -timing\tenables delay for every block read, to simulate modem\n" " -timing\tenables delay for every block read, to simulate modem\n"
"\t\t download of image (~36 Kbps)\n" "\t\t download of image (~36 Kbps)\n"
"\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n" #if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__))
#ifndef __CYGWIN__ " -nommx*\tdisable optimized MMX routines for decoding row filters,\n"
"Press Q or Esc to quit this usage screen. ", "\t\t combining rows, and expanding interlacing, respectively\n"
#else
,
#endif #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, PROGNAME,
#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__)) && \ #if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__))
!(defined(__CYGWIN__) || defined(__MINGW32__))
(int)strlen(PROGNAME), " ", (int)strlen(PROGNAME), " ",
#endif #endif
(int)strlen(PROGNAME), " ", default_display_exponent, num_bgpat); (int)strlen(PROGNAME), " ", default_display_exponent, num_bgpat);
fflush(stderr); fflush(stderr);
#ifndef __CYGWIN__
do do
ch = _getch(); ch = _getch();
while (ch != 'q' && ch != 'Q' && ch != 0x1B); while (ch != 'q' && ch != 'Q' && ch != 0x1B);
#endif
exit(1); exit(1);
} }
@@ -513,24 +496,18 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
if (error) { if (error) {
#ifndef __CYGWIN__
int ch; int ch;
#endif
fprintf(stderr, PROGNAME ": aborting.\n"); fprintf(stderr, PROGNAME ": aborting.\n");
#ifndef __CYGWIN__
do do
ch = _getch(); ch = _getch();
while (ch != 'q' && ch != 'Q' && ch != 0x1B); while (ch != 'q' && ch != 'Q' && ch != 0x1B);
#endif
exit(2); exit(2);
} else { } else {
fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, appname); fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, appname);
#ifndef __CYGWIN__
fprintf(stderr, fprintf(stderr,
"\n [console window: closing this window will terminate %s]\n\n", "\n [console window: closing this window will terminate %s]\n\n",
PROGNAME); PROGNAME);
#endif
fflush(stderr); fflush(stderr);
} }
@@ -1173,12 +1150,7 @@ static void rpng2_win_finish_display()
rpng2_info.state = kDone; rpng2_info.state = kDone;
printf( printf(
#ifndef __CYGWIN__ "Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n");
"Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n"
#else
"Done. Press mouse button 1 (within image window) to quit.\n"
#endif
);
fflush(stdout); fflush(stdout);
} }

View File

@@ -40,7 +40,6 @@
- 2.02: fixed improper display of usage screen on PNG error(s); fixed - 2.02: fixed improper display of usage screen on PNG error(s); fixed
unexpected-EOF and file-read-error cases; fixed Trace() cut-and- unexpected-EOF and file-read-error cases; fixed Trace() cut-and-
paste bugs paste bugs
- 2.03: deleted runtime MMX-enabling/disabling and obsolete -mmx* options
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
@@ -95,9 +94,9 @@
#define PROGNAME "rpng2-x" #define PROGNAME "rpng2-x"
#define LONGNAME "Progressive PNG Viewer for X" #define LONGNAME "Progressive PNG Viewer for X"
#define VERSION "2.03 of 25 February 2010" #define VERSION "2.02 of 16 March 2008"
#define RESNAME "rpng2" /* our X resource application name */ #define RESNAME "rpng2" /* our X resource application name */
#define RESCLASS "Rpng" /* our X resource class name */ #define RESCLASS "Rpng" /* our X resource class name */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@@ -132,7 +131,7 @@
(e.type == KeyPress && /* v--- or 1 for shifted keys */ \ (e.type == KeyPress && /* v--- or 1 for shifted keys */ \
((k = XLookupKeysym(&e.xkey, 0)) == XK_q || k == XK_Escape))) ((k = XLookupKeysym(&e.xkey, 0)) == XK_q || k == XK_Escape)))
#define NO_24BIT_MASKS /* undef case not fully written--only for redisplay() */ #define NO_24BIT_MASKS /* undef case not fully written--only for redisplay() */
#define rgb1_max bg_freq #define rgb1_max bg_freq
#define rgb1_min bg_gray #define rgb1_min bg_gray
@@ -302,7 +301,7 @@ int main(int argc, char **argv)
int have_bg = FALSE; int have_bg = FALSE;
#ifdef FEATURE_LOOP #ifdef FEATURE_LOOP
int loop = FALSE; int loop = FALSE;
long loop_interval = -1; /* seconds (100,000 max) */ long loop_interval = -1; /* seconds (100,000 max) */
#endif #endif
double LUT_exponent; /* just the lookup table */ double LUT_exponent; /* just the lookup table */
double CRT_exponent = 2.2; /* just the monitor */ double CRT_exponent = 2.2; /* just the monitor */
@@ -435,6 +434,18 @@ int main(int argc, char **argv)
else if (loop_interval > 100000) /* bit more than one day */ else if (loop_interval > 100000) /* bit more than one day */
loop_interval = 100000; loop_interval = 100000;
} }
#endif
#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)) {
rpng2_info.nommxcombine = TRUE;
} else if (!strncmp(*argv, "-nommxinterlace", 7)) {
rpng2_info.nommxinterlace = TRUE;
} else if (!strcmp(*argv, "-nommx")) {
rpng2_info.nommxfilters = TRUE;
rpng2_info.nommxcombine = TRUE;
rpng2_info.nommxinterlace = TRUE;
#endif #endif
} else { } else {
if (**argv != '-') { if (**argv != '-') {
@@ -457,6 +468,9 @@ int main(int argc, char **argv)
readpng2_version_info(); readpng2_version_info();
fprintf(stderr, "\n" fprintf(stderr, "\n"
"Usage: %s [-display xdpy] [-gamma exp] [-bgcolor bg | -bgpat pat]\n" "Usage: %s [-display xdpy] [-gamma exp] [-bgcolor bg | -bgpat pat]\n"
#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__))
" %*s [[-nommxfilters] [-nommxcombine] [-nommxinterlace] | -nommx]\n"
#endif
#ifdef FEATURE_LOOP #ifdef FEATURE_LOOP
" %*s [-usleep dur | -timing] [-pause] [-loop [sec]] file.png\n\n" " %*s [-usleep dur | -timing] [-pause] [-loop [sec]] file.png\n\n"
#else #else
@@ -476,6 +490,10 @@ int main(int argc, char **argv)
" -loop\tloops through background images after initial display\n" " -loop\tloops through background images after initial display\n"
"\t\t is complete (depends on -bgpat)\n" "\t\t is complete (depends on -bgpat)\n"
" sec \tseconds to display each background image (default = 2)\n" " sec \tseconds to display each background image (default = 2)\n"
#endif
#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 #endif
" dur \tduration in microseconds to wait after displaying each\n" " dur \tduration in microseconds to wait after displaying each\n"
"\t\t row (for demo purposes)\n" "\t\t row (for demo purposes)\n"
@@ -485,6 +503,9 @@ int main(int argc, char **argv)
"\nPress Q, Esc or mouse button 1 (within image window, after image\n" "\nPress Q, Esc or mouse button 1 (within image window, after image\n"
"is displayed) to quit.\n" "is displayed) to quit.\n"
"\n", PROGNAME, "\n", PROGNAME,
#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__))
(int)strlen(PROGNAME), " ",
#endif
(int)strlen(PROGNAME), " ", default_display_exponent, num_bgpat-1); (int)strlen(PROGNAME), " ", default_display_exponent, num_bgpat-1);
exit(1); exit(1);
} }
@@ -781,9 +802,8 @@ static void rpng2_x_init(void)
if (rpng2_x_create_window()) { if (rpng2_x_create_window()) {
/* GRR TEMPORARY HACK: this is fundamentally no different from cases /* GRR TEMPORARY HACK: this is fundamentally no different from cases
* above; libpng should call our error handler to longjmp() back to us * above; libpng should longjmp() back to us when png_ptr goes away.
* when png_ptr goes away. If we/it segfault instead, seems like a * If we/it segfault instead, seems like a libpng bug... */
* libpng bug... */
/* we're here via libpng callback, so if window fails, clean and bail */ /* we're here via libpng callback, so if window fails, clean and bail */
readpng2_cleanup(&rpng2_info); readpng2_cleanup(&rpng2_info);
@@ -1277,7 +1297,7 @@ static int rpng2_x_load_bg_image(void)
for (row = 0; row < rpng2_info.height; ++row) { for (row = 0; row < rpng2_info.height; ++row) {
src = bg_data + row*bg_rowbytes; src = bg_data + row*bg_rowbytes;
dest = ximage->data + row*ximage_rowbytes; dest = ximage->data + row*ximage_rowbytes;
if (bpp == 32) { /* slightly optimized version */ if (bpp == 32) { /* slightly optimized version */
for (i = rpng2_info.width; i > 0; --i) { for (i = rpng2_info.width; i > 0; --i) {
red = *src++; red = *src++;
green = *src++; green = *src++;

View File

@@ -104,8 +104,7 @@ int writepng_init(mainprog_info *mainprog_ptr)
/* setjmp() must be called in every function that calls a PNG-writing /* setjmp() must be called in every function that calls a PNG-writing
* libpng function, unless an alternate error handler was installed-- * libpng function, unless an alternate error handler was installed--
* but compatible error handlers must either use longjmp() themselves * but compatible error handlers must either use longjmp() themselves
* (as in this program) or some other method to return control to * (as in this program) or exit immediately, so here we go: */
* application code, so here we go: */
if (setjmp(mainprog_ptr->jmpbuf)) { if (setjmp(mainprog_ptr->jmpbuf)) {
png_destroy_write_struct(&png_ptr, &info_ptr); png_destroy_write_struct(&png_ptr, &info_ptr);
@@ -389,12 +388,5 @@ static void writepng_error_handler(png_structp png_ptr, png_const_charp msg)
exit(99); exit(99);
} }
/* Now we have our data structure we can use the information in it
* to return control to our own higher level code (all the points
* where 'setjmp' is called in this file.) This will work with other
* error handling mechanisms as well - libpng always calls png_error
* when it can proceed no further, thus, so long as the error handler
* is intercepted, application code can do its own error recovery.
*/
longjmp(mainprog_ptr->jmpbuf, 1); longjmp(mainprog_ptr->jmpbuf, 1);
} }

View File

@@ -1,4 +0,0 @@
This demonstrates the use of PNG_USER_CONFIG, pngusr.h and pngusr.dfa
to build minimal decoder, encoder, and progressive reader applications.
See the individual README and pngusr.dfa files for more explanation.

View File

@@ -1,10 +1,9 @@
This demonstrates the use of PNG_USER_CONFIG, pngusr.h and pngusr.dfa This demonstrates the use of PNG_USER_CONFIG and pngusr.h
The makefile builds a minimal read-only decoder with embedded libpng To build a minimal read-only decoder with embedded libpng and zlib, run
and zlib.
Specify the location of the zlib source (1.2.1 or later) as ZLIBSRC gather.sh # to collect needed files from pngminus, libpng, and zlib
on the make command line. make
If you prefer to use the shared libraries, go to contrib/pngminus If you prefer to use the shared libraries, go to contrib/pngminus
and build the png2pnm application there. and build the png2pnm application there.

View File

@@ -0,0 +1,8 @@
cp ../../pngminus/png2pnm.c pngm2pnm.c
cp ../../../*.h .
cp ../../../*.c .
rm example.c pnggccrd.c pngvcrd.c pngtest.c pngpread.c pngw*.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

View File

@@ -5,82 +5,27 @@
CC=gcc CC=gcc
LD=$(CC) LD=$(CC)
# If awk fails try
# make AWK=nawk
# If cpp fails try
# make CPP=/lib/cpp
RM=rm -f RM=rm -f
COPY=cp
CFLAGS=-DPNG_USER_CONFIG -DNO_GZCOMPRESS -DNO_GZIP -I. -O1 CFLAGS=-DPNG_USER_CONFIG -DNO_GZCOMPRESS -DNO_GZIP \
-DdeflateParams\(a,b,c\)=Z_OK -I. -O1
C=.c C=.c
O=.o O=.o
L=.a L=.a
E= E=
# Where to find the source code: ZOBJS = adler32$(O) crc32$(O) gzio$(O) \
PNGSRC =../../.. infback$(O) inffast$(O) inflate$(O) inftrees$(O) \
ZLIBSRC=$(PNGSRC)/../zlib trees$(O) uncompr$(O) zutil$(O)
PROGSRC=$(PNGSRC)/contrib/pngminus
# Zlib (minimal inflate requirements - crc32 is used by libpng) OBJS = pngm2pnm$(O) png$(O) pngerror$(O) pngget$(O) pngmem$(O) \
# zutil can be eliminated if you provide your own zcalloc and zcfree
ZSRCS = adler32$(C) crc32$(C) \
inffast$(C) inflate$(C) inftrees$(C) \
zutil$(C)
# Standard headers
ZH = zlib.h crc32.h inffast.h inffixed.h \
inflate.h inftrees.h zutil.h
# Machine generated headers
ZCONF = zconf.h
# Headers callers use
ZINC = zlib.h $(ZCONF)
# Headers the Zlib source uses
ZHDRS = $(ZH) $(ZCONF)
ZOBJS = adler32$(O) crc32$(O) \
inffast$(O) inflate$(O) inftrees$(O) \
zutil$(O)
# libpng
PNGSRCS=png$(C) pngerror$(C) pngget$(C) pngmem$(C) \
pngread$(C) pngrio$(C) pngrtran$(C) pngrutil$(C) \
pngset$(C) pngtrans$(C)
# Standard headers
PNGH =png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h
# Machine generated headers
PNGCONF=pnglibconf.h
# Headers callers use
PNGINC= png.h pngconf.h pngusr.h $(PNGCONF)
# Headers the PNG library uses
PNGHDRS=$(PNGH) $(PNGCONF) pngusr.h
PNGOBJS=png$(O) pngerror$(O) pngget$(O) pngmem$(O) \
pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) \ pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) \
pngset$(O) pngtrans$(O) pngset$(O) pngtrans$(O) $(ZOBJS)
PROGSRCS= pngm2pnm$(C)
PROGHDRS=
PROGDOCS=
PROGOBJS= pngm2pnm$(O)
OBJS = $(PROGOBJS) $(PNGOBJS) $(ZOBJS)
# implicit make rules ------------------------------------------------------- # implicit make rules -------------------------------------------------------
# note: dependencies do not work on implicit rule lines .c$(O): png.h pngconf.h pngusr.h zlib.h
.c$(O):
$(CC) -c $(CFLAGS) $< $(CC) -c $(CFLAGS) $<
# dependencies # dependencies
@@ -89,62 +34,11 @@ all: pngm2pnm$(E)
pngm2pnm$(E): $(OBJS) pngm2pnm$(E): $(OBJS)
$(LD) -o pngm2pnm$(E) $(OBJS) $(LD) -o pngm2pnm$(E) $(OBJS)
strip pngm2pnm$(E)
# The DFA_XTRA setting turns all libpng options off then
# turns on those required for this minimal build.
# The CPP_FLAGS setting causes pngusr.h to be included in
# both the build of pnglibconf.h and, subsequently, when
# building libpng itself.
$(PNGCONF): $(PNGSRC)/scripts/pnglibconf.mak\
$(PNGSRC)/scripts/pnglibconf.dfa \
$(PNGSRC)/scripts/options.awk pngusr.h pngusr.dfa
$(RM) pnglibconf.h pnglibconf.dfn
$(MAKE) $(MAKEFLAGS) -f $(PNGSRC)/scripts/pnglibconf.mak\
srcdir=$(PNGSRC) CPPFLAGS="-DPNG_USER_CONFIG"\
DFA_XTRA="pngusr.dfa" $@
clean: clean:
$(MAKE) $(MAKEFLAGS) -f $(PNGSRC)/scripts/pnglibconf.mak\
srcdir=$(PNGSRC) clean
$(RM) pngm2pnm$(O) $(RM) pngm2pnm$(O)
$(RM) pngm2pnm$(E) $(RM) pngm2pnm$(E)
$(RM) $(OBJS) $(RM) $(OBJS)
# distclean also removes the copied source and headers
distclean: clean
$(RM) -r scripts # historical reasons
$(RM) $(PNGSRCS) $(PNGH)
$(RM) $(ZSRCS) $(ZH) $(ZCONF)
$(RM) $(PROGSRCS) $(PROGHDRS) $(PROGDOCS)
# Header file dependencies:
$(PROGOBJS): $(PROGHDRS) $(PNGINC) $(ZINC)
$(PNGOBJS): $(PNGHDRS) $(ZINC)
$(ZOBJS): $(ZHDRS)
# Gather the source code from the respective directories
$(PNGSRCS) $(PNGH): $(PNGSRC)/$@
$(RM) $@
$(COPY) $(PNGSRC)/$@ $@
# No dependency on the ZLIBSRC target so that it only needs
# to be specified once.
$(ZSRCS) $(ZH):
$(RM) $@
$(COPY) $(ZLIBSRC)/$@ $@
# The unconfigured zconf.h varies in name according to the
# zlib release
$(ZCONF):
$(RM) $@
@for f in zconf.h.in zconf.in.h zconf.h; do\
test -r $(ZLIBSRC)/$$f &&\
echo $(COPY) $(ZLIBSRC)/$$f $@ &&\
$(COPY) $(ZLIBSRC)/$$f $@ && exit 0;\
done; echo copy: $(ZLIBSRC)/zconf.h not found; exit 1
pngm2pnm.c: $(PROGSRC)/png2pnm.c
$(RM) $@
$(COPY) $(PROGSRC)/png2pnm.c $@
# End of makefile for pngm2pnm # End of makefile for pngm2pnm

View File

@@ -1,39 +0,0 @@
# pngminim/decoder/pngusr.dfa
#
# Copyright (c) 2010-2011 Glenn Randers-Pehrson
#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
# First all the build options off:
everything = off
# All that is required is some read code. This example switches
# on the sequential read code (see ../preader for a progressive
# read example).
option SEQUENTIAL_READ on
# You must choose fixed or floating point arithmetic:
# option FLOATING_POINT on
option FIXED_POINT on
# You must chose the internal fixed point implementation or to
# use the system floating point. The latter is considerably
# smaller (by about 1kbyte on an x86 system):
# option FLOATING_ARITHMETIC on
option FLOATING_ARITHMETIC off
# Your program will probably need other options. The example
# program here, pngm2pnm, requires the following. Take a look
# at pnglibconf.h to find out the full set of what has to be
# enabled to make the following work.
option SETJMP on
option STDIO on
option READ_EXPAND on
option READ_16_TO_8 on

View File

@@ -1,8 +1,8 @@
/* minrdpngconf.h: headers to make a minimal png-read-only library /* minrdpngconf.h: headers to make a minimal png-read-only library
* *
* Copyright (c) 2007, 2010-2011 Glenn Randers-Pehrson * Copyright (c) 2007, 2009 Glenn Randers-Pehrson
* *
* This code is released under the libpng license. * This code is released under the zlib/libpng license.
* For conditions of distribution and use, see the disclaimer * For conditions of distribution and use, see the disclaimer
* and license in png.h * and license in png.h
* *
@@ -12,12 +12,67 @@
#ifndef MINRDPNGCONF_H #ifndef MINRDPNGCONF_H
#define MINRDPNGCONF_H #define MINRDPNGCONF_H
/* To include pngusr.h set -DPNG_USER_CONFIG in CPPFLAGS */ #ifdef NJET
/* No 16-bit support beyond reading with strip_16 */
#endif
/* List options to turn off features of the build that do not #define PNG_NO_GLOBAL_ARRAYS
* affect the API (so are not recorded in pnglibconf.h)
*/
#define PNG_NO_WARNINGS #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
#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_sRGB
#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 */ #endif /* MINRDPNGCONF_H */

View File

@@ -1,10 +1,9 @@
This demonstrates the use of PNG_USER_CONFIG and pngusr.h This demonstrates the use of PNG_USER_CONFIG and pngusr.h
The makefile builds a minimal write-only decoder with embedded libpng To build a minimal write-only decoder with embedded libpng and zlib, run
and zlib.
Specify the location of the zlib source (1.2.1 or later) as ZLIBSRC
on the make command line.
gather.sh # to collect needed files from pngminus, libpng, and zlib
make
If you prefer to use the shared libraries, go to contrib/pngminus If you prefer to use the shared libraries, go to contrib/pngminus
and build the pnm2png application there. and build the pnm2png application there.

View 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 ; }

View File

@@ -0,0 +1,9 @@
cp ../../pngminus/pnm2png.c pnm2pngm.c
cp ../../../*.h .
cp ../../../*.c .
rm example.c pnggccrd.c pngvcrd.c pngtest.c pngr*.c pngpread.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

View File

@@ -5,14 +5,7 @@
CC=gcc CC=gcc
LD=$(CC) LD=$(CC)
# If awk fails try
# make AWK=nawk
# If cpp fails try
# make CPP=/lib/cpp
RM=rm -f RM=rm -f
COPY=cp
CFLAGS=-DPNG_USER_CONFIG -DNO_GZIP -I. -O1 CFLAGS=-DPNG_USER_CONFIG -DNO_GZIP -I. -O1
@@ -21,65 +14,17 @@ O=.o
L=.a L=.a
E= E=
# Where to find the source code: ZOBJS = adler32$(O) compress$(O) crc32$(O) deflate$(O) gzio$(O) \
PNGSRC =../../.. dummy_inflate$(O) \
ZLIBSRC=$(PNGSRC)/../zlib trees$(O) uncompr$(O) zutil$(O)
PROGSRC=$(PNGSRC)/contrib/pngminus
# Zlib OBJS = pnm2pngm$(O) png$(O) pngerror$(O) pngget$(O) pngmem$(O) \
ZSRCS = adler32$(C) compress$(C) crc32$(C) deflate$(C) \
trees$(C) zutil$(C)
# Standard headers
#ZH = zlib.h crc32.h deflate.h trees.h zutil.h
ZH = zlib.h crc32.h deflate.h trees.h zutil.h
# Machine generated headers
ZCONF = zconf.h
# Headers callers use
ZINC = zlib.h $(ZCONF)
# Headers the Zlib source uses
ZHDRS = $(ZH) $(ZCONF)
# compress is not required; it is needed to link the zlib
# code because deflate defines an unused API function deflateBound
# which itself calls compressBound from compress.
ZOBJS = adler32$(O) compress$(O) crc32$(O) deflate$(O) \
trees$(O) zutil$(O)
# libpng
PNGSRCS=png$(C) pngerror$(C) pngget$(C) pngmem$(C) \
pngset$(C) pngtrans$(C) pngwio$(C) pngwrite$(C) \
pngwtran$(C) pngwutil$(C)
# Standard headers
PNGH =png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h
# Machine generated headers
PNGCONF=pnglibconf.h
# Headers callers use
PNGINC= png.h pngconf.h pngusr.h $(PNGCONF)
# Headers the PNG library uses
PNGHDRS=$(PNGH) $(PNGCONF) pngusr.h
PNGOBJS=png$(O) pngerror$(O) pngget$(O) pngmem$(O) \
pngset$(O) pngtrans$(O) pngwio$(O) pngwrite$(O) \ pngset$(O) pngtrans$(O) pngwio$(O) pngwrite$(O) \
pngwtran$(O) pngwutil$(O) pngwtran$(O) pngwutil$(O) $(ZOBJS)
PROGSRCS= pnm2pngm$(C)
PROGHDRS=
PROGDOCS=
PROGOBJS= pnm2pngm$(O)
OBJS = $(PROGOBJS) $(PNGOBJS) $(ZOBJS)
# implicit make rules ------------------------------------------------------- # implicit make rules -------------------------------------------------------
.c$(O): .c$(O): png.h pngconf.h pngusr.h zlib.h
$(CC) -c $(CFLAGS) $< $(CC) -c $(CFLAGS) $<
# dependencies # dependencies
@@ -88,62 +33,11 @@ all: pnm2pngm$(E)
pnm2pngm$(E): $(OBJS) pnm2pngm$(E): $(OBJS)
$(LD) -o pnm2pngm$(E) $(OBJS) $(LD) -o pnm2pngm$(E) $(OBJS)
strip pnm2pngm$(E)
# The DFA_XTRA setting turns all libpng options off then
# turns on those required for this minimal build.
# The CPP_FLAGS setting causes pngusr.h to be included in
# both the build of pnglibconf.h and, subsequently, when
# building libpng itself.
$(PNGCONF): $(PNGSRC)/scripts/pnglibconf.mak\
$(PNGSRC)/scripts/pnglibconf.dfa \
$(PNGSRC)/scripts/options.awk pngusr.h pngusr.dfa
$(RM) pnglibconf.h pnglibconf.dfn
$(MAKE) $(MAKEFLAGS) -f $(PNGSRC)/scripts/pnglibconf.mak\
srcdir=$(PNGSRC) CPPFLAGS="-DPNG_USER_CONFIG"\
DFA_XTRA="pngusr.dfa" $@
clean: clean:
$(MAKE) $(MAKEFLAGS) -f $(PNGSRC)/scripts/pnglibconf.mak\
srcdir=$(PNGSRC) clean
$(RM) pnm2pngm$(O) $(RM) pnm2pngm$(O)
$(RM) pnm2pngm$(E) $(RM) pnm2pngm$(E)
$(RM) $(OBJS) $(RM) $(OBJS)
# distclean also removes the copied source and headers
distclean: clean
$(RM) -r scripts # historical reasons
$(RM) $(PNGSRCS) $(PNGH)
$(RM) $(ZSRCS) $(ZH) $(ZCONF)
$(RM) $(PROGSRCS) $(PROGHDRS) $(PROGDOCS)
# Header file dependencies:
$(PROGOBJS): $(PROGHDRS) $(PNGINC) $(ZINC)
$(PNGOBJS): $(PNGHDRS) $(ZINC)
$(ZOBJS): $(ZHDRS)
# Gather the source code from the respective directories
$(PNGSRCS) $(PNGH): $(PNGSRC)/$@
$(RM) $@
$(COPY) $(PNGSRC)/$@ $@
# No dependency on the ZLIBSRC target so that it only needs
# to be specified once.
$(ZSRCS) $(ZH):
$(RM) $@
$(COPY) $(ZLIBSRC)/$@ $@
# The unconfigured zconf.h varies in name according to the
# zlib release
$(ZCONF):
$(RM) $@
@for f in zconf.h.in zconf.in.h zconf.h; do\
test -r $(ZLIBSRC)/$$f &&\
echo $(COPY) $(ZLIBSRC)/$$f $@ &&\
$(COPY) $(ZLIBSRC)/$$f $@ && exit 0;\
done; echo copy: $(ZLIBSRC)/zconf.h not found; exit 1
pnm2pngm.c: $(PROGSRC)/pnm2png.c
$(RM) $@
$(COPY) $(PROGSRC)/pnm2png.c $@
# End of makefile for pnm2pngm # End of makefile for pnm2pngm

View File

@@ -1,35 +0,0 @@
# pngminim/encoder/pngusr.dfa
#
# Copyright (c) 2010-2011 Glenn Randers-Pehrson
#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
# First all the build options off:
everything = off
# Switch on the write code - this makes a minimalist encoder
option WRITE on
# You must choose fixed or floating point arithmetic:
# option FLOATING_POINT on
option FIXED_POINT on
# You must chose the internal fixed point implementation or to
# use the system floating point. The latter is considerably
# smaller (by about 1kbyte on an x86 system):
# option FLOATING_ARITHMETIC on
option FLOATING_ARITHMETIC off
# Your program will probably need other options. The example
# program here, pnm2pngm, requires the following. Take a look
# at pnglibconf.h to find out the full set of what has to be
# enabled to make the following work.
option SETJMP on
option STDIO on

View File

@@ -1,8 +1,8 @@
/* minwrpngconf.h: headers to make a minimal png-write-only library /* minwrpngconf.h: headers to make a minimal png-write-only library
* *
* Copyright (c) 2007, 2010-2011 Glenn Randers-Pehrson * Copyright (c) 2007, 2009 Glenn Randers-Pehrson
* *
* This code is released under the libpng license. * This code is released under the zlib/libpng license.
* For conditions of distribution and use, see the disclaimer * For conditions of distribution and use, see the disclaimer
* and license in png.h * and license in png.h
* *
@@ -12,12 +12,62 @@
#ifndef MINWRPNGCONF_H #ifndef MINWRPNGCONF_H
#define MINWRPNGCONF_H #define MINWRPNGCONF_H
/* To include pngusr.h set -DPNG_USER_CONFIG in CPPFLAGS */ #define PNG_NO_GLOBAL_ARRAYS
/* List options to turn off features of the build that do not #define PNG_NO_READ_SUPPORTED
* affect the API (so are not recorded in pnglibconf.h)
*/
#define PNG_NO_WARNINGS #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
#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_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_sRGB
#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
#define PNG_NO_WRITE_FLUSH
#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 */ #endif /* MINWRPNGCONF_H */

View File

@@ -1,15 +1,14 @@
This demonstrates the use of PNG_USER_CONFIG and pngusr.h This demonstrates the use of PNG_USER_CONFIG and pngusr.h
The makefile builds a minimal read-only progressive decoder with To build a minimal read-only progressive decoder embedded libpng and
embedded libpng, zlib and your system's X library. zlib and with your system's X library, run
Specify the location of the zlib source (1.2.1 or later) as ZLIBSRC gather.sh # to collect needed files from gregbook, libpng, and zlib
on the make command line.
Edit makefile if required, to find your X library and include files, Edit makefile if required, to find your X library and include files,
then then
make ZLIBSRC=directory make
If you prefer to use the shared libraries, go to contrib/gregbook If you prefer to use the shared libraries, go to contrib/gregbook
and build the rpng2-x application there. and build the rpng2-x application there.

View File

@@ -0,0 +1,9 @@
cp ../../gregbook/rpng2-x.c ../../gregbook/readpng2.[ch] .
cp ../../gregbook/COPYING ../../gregbook/LICENSE .
cp ../../../*.h .
cp ../../../*.c .
rm example.c pnggccrd.c pngvcrd.c pngtest.c pngw*.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

View File

@@ -5,14 +5,7 @@
CC=gcc CC=gcc
LD=$(CC) LD=$(CC)
# If awk fails try
# make AWK=nawk
# If cpp fails try
# make CPP=/lib/cpp
RM=rm -f RM=rm -f
COPY=cp
#XINC = -I/usr/include # old-style, stock X distributions #XINC = -I/usr/include # old-style, stock X distributions
#XLIB = -L/usr/lib/X11 -lX11 # (including SGI IRIX) #XLIB = -L/usr/lib/X11 -lX11 # (including SGI IRIX)
@@ -30,136 +23,38 @@ XLIB = -L/usr/X11R6/lib -lX11
#LIBS = $(XLIB) #LIBS = $(XLIB)
LIBS = $(XLIB) -lm #platforms that need libm LIBS = $(XLIB) -lm #platforms that need libm
CFLAGS=-DPNG_USER_CONFIG -DNO_GZCOMPRESS -DNO_GZIP -I. $(XINC) -O1 CFLAGS=-DPNG_USER_CONFIG -DNO_GZCOMPRESS -DNO_GZIP \
-DdeflateParams\(a,b,c\)=Z_OK -I. $(XINC) -O1
C=.c C=.c
O=.o O=.o
L=.a L=.a
E= E=
# Where to find the source code: ZOBJS = adler32$(O) crc32$(O) gzio$(O) \
PNGSRC =../../.. infback$(O) inffast$(O) inflate$(O) inftrees$(O) \
ZLIBSRC=$(PNGSRC)/../zlib trees$(O) uncompr$(O) zutil$(O)
PROGSRC=$(PNGSRC)/contrib/gregbook
# Zlib (minimal inflate requirements - crc32 is used by libpng) OBJS = rpng2-x$(O) readpng2$(O) png$(O) pngerror$(O) pngget$(O) pngmem$(O) \
# zutil can be eliminated if you provide your own zcalloc and zcfree
ZSRCS = adler32$(C) crc32$(C) \
inffast$(C) inflate$(C) inftrees$(C) \
zutil$(C)
# Standard headers
ZH = zlib.h crc32.h inffast.h inffixed.h \
inflate.h inftrees.h zutil.h
# Machine generated headers
ZCONF = zconf.h
# Headers callers use
ZINC = zlib.h $(ZCONF)
# Headers the Zlib source uses
ZHDRS = $(ZH) $(ZCONF)
ZOBJS = adler32$(O) crc32$(O) \
inffast$(O) inflate$(O) inftrees$(O) \
zutil$(O)
# libpng
PNGSRCS=png$(C) pngerror$(C) pngget$(C) pngmem$(C) \
pngpread$(C) pngread$(C) pngrio$(C) pngrtran$(C) pngrutil$(C) \
pngset$(C) pngtrans$(C)
# Standard headers
PNGH =png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h
# Machine generated headers
PNGCONF=pnglibconf.h
# Headers callers use
PNGINC= png.h pngconf.h pngusr.h $(PNGCONF)
# Headers the PNG library uses
PNGHDRS=$(PNGH) $(PNGCONF) pngusr.h
PNGOBJS=png$(O) pngerror$(O) pngget$(O) pngmem$(O) \
pngpread$(O) pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) \ pngpread$(O) pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) \
pngset$(O) pngtrans$(O) pngset$(O) pngtrans$(O) $(ZOBJS)
PROGSRCS= rpng2-x$(C) readpng2$(C)
PROGHDRS= readpng2.h
PROGDOCS= COPYING LICENSE
PROGOBJS= rpng2-x$(O) readpng2$(O)
OBJS = $(PROGOBJS) $(PNGOBJS) $(ZOBJS)
# implicit make rules ------------------------------------------------------- # implicit make rules -------------------------------------------------------
.c$(O): .c$(O): png.h pngconf.h readpng2.h pngusr.h zlib.h
$(CC) -c $(CFLAGS) $< $(CC) -c $(CFLAGS) $<
# dependencies # dependencies
all: $(PROGDOCS) rpng2-x$(E) all: rpng2-x$(E)
rpng2-x$(E): $(OBJS) rpng2-x$(E): $(OBJS)
$(LD) -o rpng2-x$(E) $(OBJS) $(LIBS) $(LD) -o rpng2-x$(E) $(OBJS) $(LIBS)
strip rpng2-x$(E)
# The DFA_XTRA setting turns all libpng options off then
# turns on those required for this minimal build.
# The CPP_FLAGS setting causes pngusr.h to be included in
# both the build of pnglibconf.h and, subsequently, when
# building libpng itself.
$(PNGCONF): $(PNGSRC)/scripts/pnglibconf.mak\
$(PNGSRC)/scripts/pnglibconf.dfa \
$(PNGSRC)/scripts/options.awk pngusr.h pngusr.dfa
$(RM) pnglibconf.h pnglibconf.dfn
$(MAKE) $(MAKEFLAGS) -f $(PNGSRC)/scripts/pnglibconf.mak\
srcdir=$(PNGSRC) CPPFLAGS="-DPNG_USER_CONFIG"\
DFA_XTRA="pngusr.dfa" $@
clean: clean:
$(MAKE) $(MAKEFLAGS) -f $(PNGSRC)/scripts/pnglibconf.mak\
srcdir=$(PNGSRC) clean
$(RM) rpng2-x$(O) $(RM) rpng2-x$(O)
$(RM) rpng2-x$(E) $(RM) rpng2-x$(E)
$(RM) $(OBJS) $(RM) $(OBJS)
# distclean also removes the copied source and headers
distclean: clean
$(RM) -r scripts # historical reasons
$(RM) $(PNGSRCS) $(PNGH)
$(RM) $(ZSRCS) $(ZH) $(ZCONF)
$(RM) $(PROGSRCS) $(PROGHDRS) $(PROGDOCS)
# Header file dependencies:
$(PROGOBJS): $(PROGHDRS) $(PNGINC) $(ZINC)
$(PNGOBJS): $(PNGHDRS) $(ZINC)
$(ZOBJS): $(ZHDRS)
# Gather the source code from the respective directories
$(PNGSRCS) $(PNGH): $(PNGSRC)/$@
$(RM) $@
$(COPY) $(PNGSRC)/$@ $@
# No dependency on the ZLIBSRC target so that it only needs
# to be specified once.
$(ZSRCS) $(ZH):
$(RM) $@
$(COPY) $(ZLIBSRC)/$@ $@
# The unconfigured zconf.h varies in name according to the
# zlib release
$(ZCONF):
$(RM) $@
@for f in zconf.h.in zconf.in.h zconf.h; do\
test -r $(ZLIBSRC)/$$f &&\
echo $(COPY) $(ZLIBSRC)/$$f $@ &&\
$(COPY) $(ZLIBSRC)/$$f $@ && exit 0;\
done; echo copy: $(ZLIBSRC)/zconf.h not found; exit 1
$(PROGSRCS) $(PROGHDRS) $(PROGDOCS): $(PROGSRC)/$@
$(RM) $@
$(COPY) $(PROGSRC)/$@ $@
# End of makefile for rpng2-x # End of makefile for rpng2-x

View File

@@ -1,40 +0,0 @@
# pngminim/preader/pngusr.dfa
#
# Copyright (c) 2010-2011 Glenn Randers-Pehrson
#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
# First all the build options off:
everything = off
# Just switch on the progressive read code
option PROGRESSIVE_READ on
# You may choose fixed or floating point APIs:
# option FLOATING_POINT on
option FIXED_POINT on
# You must chose the internal fixed point implementation or to
# use the system floating point. The latter is considerably
# smaller (by about 1kbyte on an x86 system):
option FLOATING_ARITHMETIC on
# option FLOATING_ARITHMETIC off
# Your program will probably need other options. The example
# program here, rpng2-x, requires the following. Take a look
# at pnglibconf.h to find out the full set of what has to be
# enabled to make the following work.
option SETJMP on
option STDIO on
option READ_bKGD on
option READ_GAMMA on
option READ_EXPAND on
option READ_16_TO_8 on
option READ_GRAY_TO_RGB on

View File

@@ -1,8 +1,8 @@
/* minrdpngconf.h: headers to make a minimal png-read-only library /* minrdpngconf.h: headers to make a minimal png-read-only library
* *
* Copyright (c) 2009, 2010-2011 Glenn Randers-Pehrson * Copyright (c) 2009 Glenn Randers-Pehrson
* *
* This code is released under the libpng license. * This code is released under the zlib/libpng license.
* For conditions of distribution and use, see the disclaimer * For conditions of distribution and use, see the disclaimer
* and license in png.h * and license in png.h
* *
@@ -12,12 +12,57 @@
#ifndef MINPRDPNGCONF_H #ifndef MINPRDPNGCONF_H
#define MINPRDPNGCONF_H #define MINPRDPNGCONF_H
/* To include pngusr.h set -DPNG_USER_CONFIG in CPPFLAGS */ #define PNG_NO_GLOBAL_ARRAYS
/* List options to turn off features of the build that do not
* affect the API (so are not recorded in pnglibconf.h)
*/
#define PNG_NO_WARNINGS #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_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
#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_cHRM
#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
#endif /* MINPRDPNGCONF_H */ #endif /* MINPRDPNGCONF_H */

View File

@@ -188,7 +188,7 @@ void usage()
BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL alpha) BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL alpha)
{ {
png_struct *png_ptr = NULL; png_struct *png_ptr = NULL;
png_info *info_ptr = NULL; png_info *info_ptr = NULL;
png_byte buf[8]; png_byte buf[8];
png_byte *png_pixels = NULL; png_byte *png_pixels = NULL;
png_byte **row_pointers = NULL; png_byte **row_pointers = NULL;
@@ -211,8 +211,8 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL a
if (ret != 8) if (ret != 8)
return FALSE; return FALSE;
ret = png_sig_cmp (buf, 0, 8); ret = png_check_sig (buf, 8);
if (ret) if (!ret)
return FALSE; return FALSE;
/* create png and info structures */ /* create png and info structures */
@@ -381,7 +381,7 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL a
fputc ((int) *pix_ptr++ , pnm_file); fputc ((int) *pix_ptr++ , pnm_file);
else else
if (bit_depth == 16){ if (bit_depth == 16){
dep_16 = (long) *pix_ptr++; dep_16 = (long) *pix_ptr++;
fprintf (pnm_file, "%ld ", (dep_16 << 8) + ((long) *pix_ptr++)); fprintf (pnm_file, "%ld ", (dep_16 << 8) + ((long) *pix_ptr++));
} }
else else
@@ -401,9 +401,9 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL a
fputc ((int) *pix_ptr++ , alpha_file); fputc ((int) *pix_ptr++ , alpha_file);
else else
if (bit_depth == 16){ if (bit_depth == 16){
dep_16 = (long) *pix_ptr++; dep_16 = (long) *pix_ptr++;
fprintf (alpha_file, "%ld ", (dep_16 << 8) + (long) *pix_ptr++); fprintf (alpha_file, "%ld ", (dep_16 << 8) + (long) *pix_ptr++);
} }
else else
fprintf (alpha_file, "%ld ", (long) *pix_ptr++); fprintf (alpha_file, "%ld ", (long) *pix_ptr++);
} }

View File

@@ -1,58 +1,41 @@
pngsuite pngsuite
-------- --------
(c) Willem van Schaik, 1999, 2011 (c) Willem van Schaik, 1999
Permission to use, copy, modify, and distribute these images for any Permission to use, copy, and distribute these images for any purpose and
purpose and without fee is hereby granted. without fee is hereby granted.
The 15 "bas*.png" images are part of the much larger PngSuite test-set of These 15 images are part of the much larger PngSuite test-set of
images, available for developers of PNG supporting software. The images, available for developers of PNG supporting software. The
complete set, available at http:/www.schaik.com/pngsuite/, contains complete set, available at http:/www.schaik.com/pngsuite/, contains
a variety of images to test interlacing, gamma settings, ancillary a variety of images to test interlacing, gamma settings, ancillary
chunks, etc. chunks, etc.
The "ft*.png" images are "free/libre" replacements for the transparent
corresponding t*.png images in the PngSuite.
The images in this directory represent the basic PNG color-types: The images in this directory represent the basic PNG color-types:
grayscale (1-16 bit deep), full color (8 or 16 bit), paletted grayscale (1-16 bit deep), full color (8 or 16 bit), paletted
(1-8 bit) and grayscale or color images with alpha channel. You (1-8 bit) and grayscale or color images with alpha channel. You
can use them to test the proper functioning of PNG software. can use them to test the proper functioning of PNG software.
filename depth type filename depth type
------------ ------ -------------- ------------ ------ --------------
basn0g01.png 1-bit grayscale basn0g01.png 1-bit grayscale
basn0g02.png 2-bit grayscale basn0g02.png 2-bit grayscale
basn0g04.png 4-bit grayscale basn0g04.png 4-bit grayscale
basn0g08.png 8-bit grayscale basn0g08.png 8-bit grayscale
basn0g16.png 16-bit grayscale basn0g16.png 16-bit grayscale
basn2c08.png 8-bit truecolor basn2c08.png 8-bit truecolor
basn2c16.png 16-bit truecolor basn2c16.png 16-bit truecolor
basn3p01.png 1-bit paletted basn3p01.png 1-bit paletted
basn3p02.png 2-bit paletted basn3p02.png 2-bit paletted
basn3p04.png 4-bit paletted basn3p04.png 4-bit paletted
basn3p08.png 8-bit paletted basn3p08.png 8-bit paletted
basn4a08.png 8-bit gray with alpha basn4a08.png 8-bit gray with alpha
basn4a16.png 16-bit gray with alpha basn4a16.png 16-bit gray with alpha
basn6a08.png 8-bit RGBA basn6a08.png 8-bit RGBA
basn6a16.png 16-bit RGBA basn6a16.png 16-bit RGBA
ftbbn0g04.png 4-bit grayscale, black bKGD Here is the correct result of typing "pngtest -m *.png" in
ftbbn2c16.png 16-bit truecolor, black bKGD
ftbbn3p08.png 8-bit paletted, black bKGD
ftbgn2c16.png 16-bit truecolor, gray bKGD
ftbgn3p08.png 8-bit paletted, gray bKGD
ftbrn2c08.png 8-bit truecolor, red bKGD
ftbwn0g16.png 16-bit gray, white bKGD
ftbwn3p08.png 8-bit paletted, white bKGD
ftbyn3p08.png 8-bit paletted, yellow bKGD
ftp0n0g08.png 8-bit grayscale, opaque
ftp0n2c08.png 8-bit truecolor, opaque
ftp0n3p08.png 8-bit paletted, opaque
ftp1n3p08.png 8-bit paletted, no bKGD
Here is the correct result of typing "pngtest -m bas*.png" in
this directory: this directory:
Testing basn0g01.png: PASS (524 zero samples) Testing basn0g01.png: PASS (524 zero samples)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -35,7 +35,7 @@ png_cexcept_error(png_structp png_ptr, png_const_charp msg)
{ {
if(png_ptr) if(png_ptr)
; ;
#ifdef PNG_CONSOLE_IO_SUPPORTED #ifndef PNG_NO_CONSOLE_IO
fprintf(stderr, "libpng error: %s\n", msg); fprintf(stderr, "libpng error: %s\n", msg);
#endif #endif
{ {
@@ -126,7 +126,7 @@ BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData,
// first check the eight byte PNG signature // first check the eight byte PNG signature
fread(pbSig, 1, 8, pfFile); fread(pbSig, 1, 8, pfFile);
if (png_sig_cmp(pbSig, 0, 8)) if (!png_check_sig(pbSig, 8))
{ {
*ppbImageData = pbImageData = NULL; *ppbImageData = pbImageData = NULL;
return FALSE; return FALSE;
@@ -155,7 +155,7 @@ BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData,
// initialize the png structure // initialize the png structure
#ifdef PNG_STDIO_SUPPORTED #if !defined(PNG_NO_STDIO)
png_init_io(png_ptr, pfFile); png_init_io(png_ptr, pfFile);
#else #else
png_set_read_fn(png_ptr, (png_voidp)pfFile, png_read_data); png_set_read_fn(png_ptr, (png_voidp)pfFile, png_read_data);
@@ -324,7 +324,7 @@ BOOL PngSaveImage (PTSTR pstrFileName, png_byte *pDiData,
{ {
// initialize the png structure // initialize the png structure
#ifdef PNG_STDIO_SUPPORTED #if !defined(PNG_NO_STDIO)
png_init_io(png_ptr, pfFile); png_init_io(png_ptr, pfFile);
#else #else
png_set_write_fn(png_ptr, (png_voidp)pfFile, png_write_data, png_flush); png_set_write_fn(png_ptr, (png_voidp)pfFile, png_write_data, png_flush);
@@ -395,7 +395,7 @@ BOOL PngSaveImage (PTSTR pstrFileName, png_byte *pDiData,
return TRUE; return TRUE;
} }
#ifndef PNG_STDIO_SUPPORTED #ifdef PNG_NO_STDIO
static void static void
png_read_data(png_structp png_ptr, png_bytep data, png_size_t length) png_read_data(png_structp png_ptr, png_bytep data, png_size_t length)

View File

@@ -22,7 +22,7 @@ BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData,
BOOL PngSaveImage (PTSTR pstrFileName, png_byte *pDiData, BOOL PngSaveImage (PTSTR pstrFileName, png_byte *pDiData,
int iWidth, int iHeight, png_color BkgColor); int iWidth, int iHeight, png_color BkgColor);
#ifndef PNG_STDIO_SUPPORTED #if defined(PNG_NO_STDIO)
static void png_read_data(png_structp png_ptr, png_bytep data, png_size_t length); static void png_read_data(png_structp png_ptr, png_bytep data, png_size_t length);
static void png_write_data(png_structp png_ptr, png_bytep data, png_size_t length); static void png_write_data(png_structp png_ptr, png_bytep data, png_size_t length);
static void png_flush(png_structp png_ptr); static void png_flush(png_structp png_ptr);

View File

@@ -43,9 +43,9 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release" # PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_NO_STDIO" /FD /c # ADD BASE CPP /nologo /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c
# SUBTRACT BASE CPP /YX # SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_NO_STDIO" /FD /c # ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c
# SUBTRACT CPP /YX # SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -77,9 +77,9 @@ PostBuild_Cmds=$(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png
# PROP Intermediate_Dir "Debug" # PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_NO_STDIO" /FD /GZ /c # ADD BASE CPP /nologo /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c
# SUBTRACT BASE CPP /YX # SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_NO_STDIO" /FD /GZ /c # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c
# SUBTRACT CPP /YX # SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32

View File

@@ -2,15 +2,15 @@
#if 0 /* in case someone actually tries to compile this */ #if 0 /* in case someone actually tries to compile this */
/* example.c - an example of using libpng /* example.c - an example of using libpng
* Last changed in libpng 1.5.2 [March 31, 2011] * Last changed in libpng 1.2.37 [June 4, 2009]
* This file has been placed in the public domain by the authors. * This file has been placed in the public domain by the authors.
* Maintained 1998-2011 Glenn Randers-Pehrson * Maintained 1998-2009 Glenn Randers-Pehrson
* Maintained 1996, 1997 Andreas Dilger) * Maintained 1996, 1997 Andreas Dilger)
* Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*/ */
/* This is an example of how to use libpng to read and write PNG files. /* This is an example of how to use libpng to read and write PNG files.
* The file libpng-manual.txt is much more verbose then this. If you have not * The file libpng.txt is much more verbose then this. If you have not
* read it, do so first. This was designed to be a starting point of an * read it, do so first. This was designed to be a starting point of an
* implementation. This is not officially part of libpng, is hereby placed * implementation. This is not officially part of libpng, is hereby placed
* in the public domain, and therefore does not require a copyright notice. * in the public domain, and therefore does not require a copyright notice.
@@ -31,7 +31,7 @@
*/ */
#ifndef png_jmpbuf #ifndef png_jmpbuf
# define png_jmpbuf(png_ptr) ((png_ptr)->png_jmpbuf) # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
#endif #endif
/* Check to see if a file is a PNG file using png_sig_cmp(). png_sig_cmp() /* Check to see if a file is a PNG file using png_sig_cmp(). png_sig_cmp()
@@ -121,7 +121,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
if (info_ptr == NULL) if (info_ptr == NULL)
{ {
fclose(fp); fclose(fp);
png_destroy_read_struct(&png_ptr, NULL, NULL); png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
return (ERROR); return (ERROR);
} }
@@ -133,7 +133,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
if (setjmp(png_jmpbuf(png_ptr))) if (setjmp(png_jmpbuf(png_ptr)))
{ {
/* Free all of the memory associated with the png_ptr and info_ptr */ /* Free all of the memory associated with the png_ptr and info_ptr */
png_destroy_read_struct(&png_ptr, &info_ptr, NULL); png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
fclose(fp); fclose(fp);
/* If we get here, we had a problem reading the file */ /* If we get here, we had a problem reading the file */
return (ERROR); return (ERROR);
@@ -160,11 +160,11 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
* If you have enough memory to read in the entire image at once, * If you have enough memory to read in the entire image at once,
* and you need to specify only transforms that can be controlled * and you need to specify only transforms that can be controlled
* with one of the PNG_TRANSFORM_* bits (this presently excludes * with one of the PNG_TRANSFORM_* bits (this presently excludes
* quantizing, filling, setting background, and doing gamma * dithering, filling, setting background, and doing gamma
* adjustment), then you can read the entire image (including * adjustment), then you can read the entire image (including
* pixels) into the info structure with this call: * pixels) into the info structure with this call:
*/ */
png_read_png(png_ptr, info_ptr, png_transforms, NULL); png_read_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL);
#else #else
/* OK, you're doing it the hard way, with the lower-level functions */ /* OK, you're doing it the hard way, with the lower-level functions */
@@ -175,7 +175,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
png_read_info(png_ptr, info_ptr); png_read_info(png_ptr, info_ptr);
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
&interlace_type, NULL, NULL); &interlace_type, int_p_NULL, int_p_NULL);
/* Set up the data transformations you want. Note that these are all /* Set up the data transformations you want. Note that these are all
* optional. Only call them if you want/need them. Many of the * optional. Only call them if you want/need them. Many of the
@@ -271,8 +271,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
png_set_gamma(png_ptr, screen_gamma, 0.45455); png_set_gamma(png_ptr, screen_gamma, 0.45455);
} }
#ifdef PNG_READ_QUANTIZE_SUPPORTED /* Dither RGB files down to 8 bit palette or reduce palettes
/* Quantize RGB files down to 8 bit palette or reduce palettes
* to the number of colors available on your screen. * to the number of colors available on your screen.
*/ */
if (color_type & PNG_COLOR_MASK_COLOR) if (color_type & PNG_COLOR_MASK_COLOR)
@@ -283,11 +282,11 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
/* This reduces the image to the application supplied palette */ /* This reduces the image to the application supplied palette */
if (/* We have our own palette */) if (/* We have our own palette */)
{ {
/* An array of colors to which the image should be quantized */ /* An array of colors to which the image should be dithered */
png_color std_color_cube[MAX_SCREEN_COLORS]; png_color std_color_cube[MAX_SCREEN_COLORS];
png_set_quantize(png_ptr, std_color_cube, MAX_SCREEN_COLORS, png_set_dither(png_ptr, std_color_cube, MAX_SCREEN_COLORS,
MAX_SCREEN_COLORS, NULL, 0); MAX_SCREEN_COLORS, png_uint_16p_NULL, 0);
} }
/* This reduces the image to the palette supplied in the file */ /* This reduces the image to the palette supplied in the file */
else if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette)) else if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette))
@@ -296,11 +295,10 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
png_get_hIST(png_ptr, info_ptr, &histogram); png_get_hIST(png_ptr, info_ptr, &histogram);
png_set_quantize(png_ptr, palette, num_palette, png_set_dither(png_ptr, palette, num_palette,
max_screen_colors, histogram, 0); max_screen_colors, histogram, 0);
} }
} }
#endif /* PNG_READ_QUANTIZE_SUPPORTED */
/* Invert monochrome files to have 0 as white and 1 as black */ /* Invert monochrome files to have 0 as white and 1 as black */
png_set_invert_mono(png_ptr); png_set_invert_mono(png_ptr);
@@ -367,17 +365,17 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
#ifdef single /* Read the image a single row at a time */ #ifdef single /* Read the image a single row at a time */
for (y = 0; y < height; y++) for (y = 0; y < height; y++)
{ {
png_read_rows(png_ptr, &row_pointers[y], NULL, 1); png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL, 1);
} }
#else no_single /* Read the image several rows at a time */ #else no_single /* Read the image several rows at a time */
for (y = 0; y < height; y += number_of_rows) for (y = 0; y < height; y += number_of_rows)
{ {
#ifdef sparkle /* Read the image using the "sparkle" effect. */ #ifdef sparkle /* Read the image using the "sparkle" effect. */
png_read_rows(png_ptr, &row_pointers[y], NULL, png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL,
number_of_rows); number_of_rows);
#else no_sparkle /* Read the image using the "rectangle" effect */ #else no_sparkle /* Read the image using the "rectangle" effect */
png_read_rows(png_ptr, NULL, &row_pointers[y], png_read_rows(png_ptr, png_bytepp_NULL, &row_pointers[y],
number_of_rows); number_of_rows);
#endif no_sparkle /* Use only one of these two methods */ #endif no_sparkle /* Use only one of these two methods */
} }
@@ -394,7 +392,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
/* At this point you have read the entire image */ /* At this point you have read the entire image */
/* Clean up after the read, and free any memory allocated - REQUIRED */ /* Clean up after the read, and free any memory allocated - REQUIRED */
png_destroy_read_struct(&png_ptr, &info_ptr, NULL); png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
/* Close the file */ /* Close the file */
fclose(fp); fclose(fp);
@@ -427,13 +425,13 @@ initialize_png_reader(png_structp *png_ptr, png_infop *info_ptr)
if (*info_ptr == NULL) if (*info_ptr == NULL)
{ {
png_destroy_read_struct(png_ptr, info_ptr, NULL); png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);
return (ERROR); return (ERROR);
} }
if (setjmp(png_jmpbuf((*png_ptr)))) if (setjmp(png_jmpbuf((*png_ptr))))
{ {
png_destroy_read_struct(png_ptr, info_ptr, NULL); png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);
return (ERROR); return (ERROR);
} }
@@ -462,7 +460,7 @@ process_data(png_structp *png_ptr, png_infop *info_ptr,
if (setjmp(png_jmpbuf((*png_ptr)))) if (setjmp(png_jmpbuf((*png_ptr))))
{ {
/* Free the png_ptr and info_ptr memory on error */ /* Free the png_ptr and info_ptr memory on error */
png_destroy_read_struct(png_ptr, info_ptr, NULL); png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);
return (ERROR); return (ERROR);
} }
@@ -511,17 +509,20 @@ row_callback(png_structp png_ptr, png_bytep new_row,
* shown below: * shown below:
*/ */
/* Get pointer to corresponding row in our /* Check if row_num is in bounds. */
* PNG read buffer. if ((row_num >= 0) && (row_num < height))
*/ {
png_bytep old_row = ((png_bytep *)our_data)[row_num]; /* Get pointer to corresponding row in our
* PNG read buffer.
/* If both rows are allocated then copy the new row */
* data to the corresponding row data. png_bytep old_row = ((png_bytep *)our_data)[row_num];
*/
if ((old_row != NULL) && (new_row != NULL))
png_progressive_combine_row(png_ptr, old_row, new_row);
/* If both rows are allocated then copy the new row
* data to the corresponding row data.
*/
if ((old_row != NULL) && (new_row != NULL))
png_progressive_combine_row(png_ptr, old_row, new_row);
}
/* /*
* The rows and passes are called in order, so you don't really * The rows and passes are called in order, so you don't really
* need the row_num and pass, but I'm supplying them because it * need the row_num and pass, but I'm supplying them because it
@@ -592,7 +593,7 @@ void write_png(char *file_name /* , ... other image information ... */)
if (info_ptr == NULL) if (info_ptr == NULL)
{ {
fclose(fp); fclose(fp);
png_destroy_write_struct(&png_ptr, NULL); png_destroy_write_struct(&png_ptr, png_infopp_NULL);
return (ERROR); return (ERROR);
} }
@@ -627,7 +628,7 @@ void write_png(char *file_name /* , ... other image information ... */)
* image info living in the structure. You could "|" many * image info living in the structure. You could "|" many
* PNG_TRANSFORM flags into the png_transforms integer here. * PNG_TRANSFORM flags into the png_transforms integer here.
*/ */
png_write_png(png_ptr, info_ptr, png_transforms, NULL); png_write_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL);
#else #else
/* This is the hard way */ /* This is the hard way */
@@ -655,18 +656,14 @@ void write_png(char *file_name /* , ... other image information ... */)
/* Optional significant bit (sBIT) chunk */ /* Optional significant bit (sBIT) chunk */
png_color_8 sig_bit; png_color_8 sig_bit;
/* If we are dealing with a grayscale image then */ /* If we are dealing with a grayscale image then */
sig_bit.gray = true_bit_depth; sig_bit.gray = true_bit_depth;
/* Otherwise, if we are dealing with a color image then */ /* Otherwise, if we are dealing with a color image then */
sig_bit.red = true_red_bit_depth; sig_bit.red = true_red_bit_depth;
sig_bit.green = true_green_bit_depth; sig_bit.green = true_green_bit_depth;
sig_bit.blue = true_blue_bit_depth; sig_bit.blue = true_blue_bit_depth;
/* If the image has an alpha channel then */ /* If the image has an alpha channel then */
sig_bit.alpha = true_alpha_bit_depth; sig_bit.alpha = true_alpha_bit_depth;
png_set_sBIT(png_ptr, info_ptr, &sig_bit); png_set_sBIT(png_ptr, info_ptr, &sig_bit);
@@ -679,21 +676,17 @@ void write_png(char *file_name /* , ... other image information ... */)
text_ptr[0].key = "Title"; text_ptr[0].key = "Title";
text_ptr[0].text = "Mona Lisa"; text_ptr[0].text = "Mona Lisa";
text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE; text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE;
text_ptr[0].itxt_length = 0;
text_ptr[0].lang = NULL;
text_ptr[0].lang_key = NULL;
text_ptr[1].key = "Author"; text_ptr[1].key = "Author";
text_ptr[1].text = "Leonardo DaVinci"; text_ptr[1].text = "Leonardo DaVinci";
text_ptr[1].compression = PNG_TEXT_COMPRESSION_NONE; text_ptr[1].compression = PNG_TEXT_COMPRESSION_NONE;
text_ptr[1].itxt_length = 0;
text_ptr[1].lang = NULL;
text_ptr[1].lang_key = NULL;
text_ptr[2].key = "Description"; text_ptr[2].key = "Description";
text_ptr[2].text = "<long text>"; text_ptr[2].text = "<long text>";
text_ptr[2].compression = PNG_TEXT_COMPRESSION_zTXt; text_ptr[2].compression = PNG_TEXT_COMPRESSION_zTXt;
text_ptr[2].itxt_length = 0; #ifdef PNG_iTXt_SUPPORTED
text_ptr[0].lang = NULL;
text_ptr[1].lang = NULL;
text_ptr[2].lang = NULL; text_ptr[2].lang = NULL;
text_ptr[2].lang_key = NULL; #endif
png_set_text(png_ptr, info_ptr, text_ptr, 3); png_set_text(png_ptr, info_ptr, text_ptr, 3);
/* Other optional chunks like cHRM, bKGD, tRNS, tIME, oFFs, pHYs */ /* Other optional chunks like cHRM, bKGD, tRNS, tIME, oFFs, pHYs */
@@ -758,7 +751,6 @@ void write_png(char *file_name /* , ... other image information ... */)
/* Turn on interlace handling if you are not using png_write_image() */ /* Turn on interlace handling if you are not using png_write_image() */
if (interlacing) if (interlacing)
number_passes = png_set_interlace_handling(png_ptr); number_passes = png_set_interlace_handling(png_ptr);
else else
number_passes = 1; number_passes = 1;

File diff suppressed because it is too large Load Diff

2295
libpng.3

File diff suppressed because it is too large Load Diff

View File

@@ -1,30 +1,806 @@
.TH LIBPNGPF 3 "March 31, 2011" .TH LIBPNGPF 3 "October 1, 2009"
.SH NAME .SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.2 libpng \- Portable Network Graphics (PNG) Reference Library 1.2.41beta03
(private functions) (private functions)
.SH SYNOPSIS .SH SYNOPSIS
\fB#include \fI"pngpriv.h" \fB#include <png.h>\fP
\fI\fB \fI\fB
\fBAs of libpng version \fP\fI1.5.1\fP\fB, this section is no longer \fP\fImaintained\fP\fB, now \fIthat \fBvoid png_64bit_product (long \fP\fIv1\fP\fB, long \fP\fIv2\fP\fB, unsigned long \fI*hi_product,
\fBthe private function prototypes are hidden in pngpriv.h and not \fIaccessible \fBunsigned long \fI*lo_product\fP\fB);\fP
\fBto applications. Look in pngpriv.h for the prototypes and a short \fIdescription \fI\fB
\fBof each \fIfunction. \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
\fBint png_check_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_fixed_point \fP\fIint_white_x\fP\fB, png_fixed_point \fP\fIint_white_y\fP\fB, png_fixed_point \fP\fIint_red_x\fP\fB, png_fixed_point \fP\fIint_red_y\fP\fB, png_fixed_point \fP\fIint_green_x\fP\fB, png_fixed_point \fP\fIint_green_y\fP\fB, png_fixed_point \fP\fIint_blue_x\fP\fB, png_fixed_point \fIint_blue_y\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_check_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\fIinterlace_type\fP\fB, int \fP\fIcompression_type\fP\fB, int \fIfilter_type\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
\fBvoid 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
\fBpng_uint_32 png_read_chunk_header (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 \fI\fB
.SH DESCRIPTION .SH DESCRIPTION
The functions previously listed here are used privately by libpng The functions listed above are used privately by libpng
and are not recommended for use by applications. They are and are not recommended for use by applications. They are
not "exported" to applications using shared libraries. They not "exported" to applications using shared libraries. They
are listed alphabetically here as an aid to libpng maintainers. are listed alphabetically here as an aid to libpng maintainers.
See pngpriv.h for more information on these functions. See png.h for more information on these functions.
.SH SEE ALSO .SH SEE ALSO
.BR "png"(5), " libpng"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5) .IR libpng(3) ", " png(5)
.SH AUTHOR .SH AUTHOR
Glenn Randers-Pehrson Glenn Randers-Pehrson

3988
ltmain.sh Executable file → Normal file

File diff suppressed because it is too large Load Diff

162
mkinstalldirs Executable file
View File

@@ -0,0 +1,162 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2009-04-28.21; # UTC
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
IFS=" "" $nl"
errstatus=0
dirmode=
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit $?
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit $?
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
for file
do
case $file in
/*) pathcomp=/ ;;
*) pathcomp= ;;
esac
oIFS=$IFS
IFS=/
set fnord $file
shift
IFS=$oIFS
for d
do
test "x$d" = x && continue
pathcomp=$pathcomp$d
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp=$pathcomp/
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

6
png.5
View File

@@ -1,4 +1,4 @@
.TH PNG 5 "March 31, 2011" .TH PNG 5 "October 1, 2009"
.SH NAME .SH NAME
png \- Portable Network Graphics (PNG) format png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION .SH DESCRIPTION
@@ -18,7 +18,7 @@ gamma and chromaticity data for improved color matching on heterogeneous
platforms. platforms.
.SH "SEE ALSO" .SH "SEE ALSO"
.BR "libpng"(3), " libpngpf"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5) .IR libpng(3) ", " zlib(3) ", " deflate(5) ", and " zlib(5)
.LP .LP
PNG specification (second edition), November 2003: PNG specification (second edition), November 2003:
.IP .IP
@@ -35,7 +35,7 @@ PNG 1.0 specification, October 1996:
RFC 2083 RFC 2083
.IP .IP
.br .br
ftp://ds.internic.net/rfc/rfc2083.txt ftp://ftp.rfc-editor.org:/in-notes/rfc2083.txt
.br .br
or (as a W3C Recommendation) at or (as a W3C Recommendation) at
.br .br

1962
png.c

File diff suppressed because it is too large Load Diff

3608
png.h

File diff suppressed because it is too large Load Diff

1818
pngconf.h

File diff suppressed because it is too large Load Diff

View File

@@ -1,157 +0,0 @@
/* pngdebug.h - Debugging macros for libpng, also used in pngtest.c
*
* Copyright (c) 1998-2011 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.)
*
* Last changed in libpng 1.5.0 [January 6, 2011]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
*/
/* Define PNG_DEBUG at compile time for debugging information. Higher
* numbers for PNG_DEBUG mean more debugging information. This has
* only been added since version 0.95 so it is not implemented throughout
* libpng yet, but more support will be added as needed.
*
* png_debug[1-2]?(level, message ,arg{0-2})
* Expands to a statement (either a simple expression or a compound
* do..while(0) statement) that outputs a message with parameter
* substitution if PNG_DEBUG is defined to 2 or more. If PNG_DEBUG
* is undefined, 0 or 1 every png_debug expands to a simple expression
* (actually ((void)0)).
*
* level: level of detail of message, starting at 0. A level 'n'
* message is preceded by 'n' tab characters (not implemented
* on Microsoft compilers unless PNG_DEBUG_FILE is also
* defined, to allow debug DLL compilation with no standard IO).
* message: a printf(3) style text string. A trailing '\n' is added
* to the message.
* arg: 0 to 2 arguments for printf(3) style substitution in message.
*/
#ifndef PNGDEBUG_H
#define PNGDEBUG_H
/* These settings control the formatting of messages in png.c and pngerror.c */
/* Moved to pngdebug.h at 1.5.0 */
# ifndef PNG_LITERAL_SHARP
# define PNG_LITERAL_SHARP 0x23
# endif
# ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET
# define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b
# endif
# ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET
# define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d
# endif
# ifndef PNG_STRING_NEWLINE
# define PNG_STRING_NEWLINE "\n"
# endif
#ifdef PNG_DEBUG
# if (PNG_DEBUG > 0)
# if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER)
# include <crtdbg.h>
# if (PNG_DEBUG > 1)
# ifndef _DEBUG
# define _DEBUG
# endif
# ifndef png_debug
# define png_debug(l,m) _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE)
# endif
# ifndef png_debug1
# define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1)
# endif
# ifndef png_debug2
# define png_debug2(l,m,p1,p2) \
_RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2)
# endif
# endif
# else /* PNG_DEBUG_FILE || !_MSC_VER */
# ifndef PNG_STDIO_SUPPORTED
# include <stdio.h> /* not included yet */
# endif
# ifndef PNG_DEBUG_FILE
# define PNG_DEBUG_FILE stderr
# endif /* PNG_DEBUG_FILE */
# if (PNG_DEBUG > 1)
/* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on
* non-ISO compilers
*/
# ifdef __STDC__
# ifndef png_debug
# define png_debug(l,m) \
do { \
int num_tabs=l; \
fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \
} while (0)
# endif
# ifndef png_debug1
# define png_debug1(l,m,p1) \
do { \
int num_tabs=l; \
fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \
} while (0)
# endif
# ifndef png_debug2
# define png_debug2(l,m,p1,p2) \
do { \
int num_tabs=l; \
fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \
} while (0)
# endif
# else /* __STDC __ */
# ifndef png_debug
# define png_debug(l,m) \
do { \
int num_tabs=l; \
char format[256]; \
snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
m,PNG_STRING_NEWLINE); \
fprintf(PNG_DEBUG_FILE,format); \
} while (0)
# endif
# ifndef png_debug1
# define png_debug1(l,m,p1) \
do { \
int num_tabs=l; \
char format[256]; \
snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
m,PNG_STRING_NEWLINE); \
fprintf(PNG_DEBUG_FILE,format,p1); \
} while (0)
# endif
# ifndef png_debug2
# define png_debug2(l,m,p1,p2) \
do { \
int num_tabs=l; \
char format[256]; \
snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
m,PNG_STRING_NEWLINE); \
fprintf(PNG_DEBUG_FILE,format,p1,p2); \
} while (0)
# endif
# endif /* __STDC __ */
# endif /* (PNG_DEBUG > 1) */
# endif /* _MSC_VER */
# endif /* (PNG_DEBUG > 0) */
#endif /* PNG_DEBUG */
#ifndef png_debug
# define png_debug(l, m) ((void)0)
#endif
#ifndef png_debug1
# define png_debug1(l, m, p1) ((void)0)
#endif
#ifndef png_debug2
# define png_debug2(l, m, p1, p2) ((void)0)
#endif
#endif /* PNGDEBUG_H */

View File

@@ -1,8 +1,8 @@
/* pngerror.c - stub functions for i/o and memory allocation /* pngerror.c - stub functions for i/o and memory allocation
* *
* Last changed in libpng 1.5.1 [February 3, 2011] * Last changed in libpng 1.2.37 [June 4, 2009]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
* *
@@ -16,64 +16,61 @@
* at each function. * at each function.
*/ */
#include "pngpriv.h" #define PNG_INTERNAL
#include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
static PNG_FUNCTION(void, png_default_error,PNGARG((png_structp png_ptr, static void /* PRIVATE */
png_const_charp error_message)),PNG_NORETURN); png_default_error PNGARG((png_structp png_ptr,
png_const_charp error_message));
#ifdef PNG_WARNINGS_SUPPORTED #ifndef PNG_NO_WARNINGS
static void /* PRIVATE */ static void /* PRIVATE */
png_default_warning PNGARG((png_structp png_ptr, png_default_warning PNGARG((png_structp png_ptr,
png_const_charp warning_message)); png_const_charp warning_message));
#endif /* PNG_WARNINGS_SUPPORTED */ #endif /* PNG_NO_WARNINGS */
/* This function is called whenever there is a fatal error. This function /* 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, * 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() * you should supply a replacement error function and use png_set_error_fn()
* to replace the error function at run-time. * to replace the error function at run-time.
*/ */
#ifdef PNG_ERROR_TEXT_SUPPORTED #ifndef PNG_NO_ERROR_TEXT
PNG_FUNCTION(void,PNGAPI void PNGAPI
png_error,(png_structp png_ptr, png_const_charp error_message),PNG_NORETURN) png_error(png_structp png_ptr, png_const_charp error_message)
{ {
#ifdef PNG_ERROR_NUMBERS_SUPPORTED #ifdef PNG_ERROR_NUMBERS_SUPPORTED
char msg[16]; char msg[16];
if (png_ptr != NULL) if (png_ptr != NULL)
{ {
if (png_ptr->flags& if (png_ptr->flags&
(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT)) (PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
{ {
if (*error_message == PNG_LITERAL_SHARP) if (*error_message == '#')
{ {
/* Strip "#nnnn " from beginning of error message. */ /* Strip "#nnnn " from beginning of error message. */
int offset; int offset;
for (offset = 1; offset<15; offset++) for (offset = 1; offset<15; offset++)
if (error_message[offset] == ' ') if (error_message[offset] == ' ')
break; break;
if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)
if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT) {
{ int i;
int i; for (i = 0; i < offset - 1; i++)
for (i = 0; i < offset - 1; i++) msg[i] = error_message[i + 1];
msg[i] = error_message[i + 1]; msg[i - 1] = '\0';
msg[i - 1] = '\0'; error_message = msg;
error_message = msg; }
} else
error_message += offset;
else }
error_message += offset; else
} {
if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)
else {
{ msg[0] = '0';
if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT) msg[1] = '\0';
{ error_message = msg;
msg[0] = '0'; }
msg[1] = '\0';
error_message = msg;
}
} }
} }
} }
@@ -86,8 +83,8 @@ png_error,(png_structp png_ptr, png_const_charp error_message),PNG_NORETURN)
png_default_error(png_ptr, error_message); png_default_error(png_ptr, error_message);
} }
#else #else
PNG_FUNCTION(void,PNGAPI void PNGAPI
png_err,(png_structp png_ptr),PNG_NORETURN) png_err(png_structp png_ptr)
{ {
if (png_ptr != NULL && png_ptr->error_fn != NULL) if (png_ptr != NULL && png_ptr->error_fn != NULL)
(*(png_ptr->error_fn))(png_ptr, '\0'); (*(png_ptr->error_fn))(png_ptr, '\0');
@@ -96,9 +93,9 @@ png_err,(png_structp png_ptr),PNG_NORETURN)
use the default handler, which will not return. */ use the default handler, which will not return. */
png_default_error(png_ptr, '\0'); png_default_error(png_ptr, '\0');
} }
#endif /* PNG_ERROR_TEXT_SUPPORTED */ #endif /* PNG_NO_ERROR_TEXT */
#ifdef PNG_WARNINGS_SUPPORTED #ifndef PNG_NO_WARNINGS
/* This function is called whenever there is a non-fatal error. This function /* 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, * should not be changed. If there is a need to handle warnings differently,
* you should supply a replacement warning function and use * you should supply a replacement warning function and use
@@ -112,34 +109,24 @@ png_warning(png_structp png_ptr, png_const_charp warning_message)
{ {
#ifdef PNG_ERROR_NUMBERS_SUPPORTED #ifdef PNG_ERROR_NUMBERS_SUPPORTED
if (png_ptr->flags& if (png_ptr->flags&
(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT)) (PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
#endif #endif
{ {
if (*warning_message == PNG_LITERAL_SHARP) if (*warning_message == '#')
{ {
for (offset = 1; offset < 15; offset++) for (offset = 1; offset < 15; offset++)
if (warning_message[offset] == ' ') if (warning_message[offset] == ' ')
break; break;
} }
} }
} }
if (png_ptr != NULL && png_ptr->warning_fn != NULL) if (png_ptr != NULL && png_ptr->warning_fn != NULL)
(*(png_ptr->warning_fn))(png_ptr, warning_message + offset); (*(png_ptr->warning_fn))(png_ptr, warning_message + offset);
else else
png_default_warning(png_ptr, warning_message + offset); png_default_warning(png_ptr, warning_message + offset);
} }
#endif /* PNG_WARNINGS_SUPPORTED */ #endif /* PNG_NO_WARNINGS */
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
void PNGAPI
png_benign_error(png_structp png_ptr, png_const_charp error_message)
{
if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN)
png_warning(png_ptr, error_message);
else
png_error(png_ptr, error_message);
}
#endif
/* These utilities are used internally to build an error message that relates /* 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, * to the current chunk. The chunk name comes from png_ptr->chunk_name,
@@ -154,10 +141,11 @@ static PNG_CONST char png_digit[16] = {
}; };
#define PNG_MAX_ERROR_TEXT 64 #define PNG_MAX_ERROR_TEXT 64
#if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_ERROR_TEXT_SUPPORTED)
#if !defined(PNG_NO_WARNINGS) || !defined(PNG_NO_ERROR_TEXT)
static void /* PRIVATE */ static void /* PRIVATE */
png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp
error_message) error_message)
{ {
int iout = 0, iin = 0; int iout = 0, iin = 0;
@@ -166,12 +154,11 @@ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp
int c = png_ptr->chunk_name[iin++]; int c = png_ptr->chunk_name[iin++];
if (isnonalpha(c)) if (isnonalpha(c))
{ {
buffer[iout++] = PNG_LITERAL_LEFT_SQUARE_BRACKET; buffer[iout++] = '[';
buffer[iout++] = png_digit[(c & 0xf0) >> 4]; buffer[iout++] = png_digit[(c & 0xf0) >> 4];
buffer[iout++] = png_digit[c & 0x0f]; buffer[iout++] = png_digit[c & 0x0f];
buffer[iout++] = PNG_LITERAL_RIGHT_SQUARE_BRACKET; buffer[iout++] = ']';
} }
else else
{ {
buffer[iout++] = (png_byte)c; buffer[iout++] = (png_byte)c;
@@ -180,7 +167,6 @@ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp
if (error_message == NULL) if (error_message == NULL)
buffer[iout] = '\0'; buffer[iout] = '\0';
else else
{ {
buffer[iout++] = ':'; buffer[iout++] = ':';
@@ -189,130 +175,73 @@ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp
buffer[iout + PNG_MAX_ERROR_TEXT - 1] = '\0'; buffer[iout + PNG_MAX_ERROR_TEXT - 1] = '\0';
} }
} }
#endif /* PNG_WARNINGS_SUPPORTED || PNG_ERROR_TEXT_SUPPORTED */
#if defined(PNG_READ_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED) #ifdef PNG_READ_SUPPORTED
PNG_FUNCTION(void,PNGAPI void PNGAPI
png_chunk_error,(png_structp png_ptr, png_const_charp error_message), png_chunk_error(png_structp png_ptr, png_const_charp error_message)
PNG_NORETURN)
{ {
char msg[18+PNG_MAX_ERROR_TEXT]; char msg[18+PNG_MAX_ERROR_TEXT];
if (png_ptr == NULL) if (png_ptr == NULL)
png_error(png_ptr, error_message); png_error(png_ptr, error_message);
else else
{ {
png_format_buffer(png_ptr, msg, error_message); png_format_buffer(png_ptr, msg, error_message);
png_error(png_ptr, msg); png_error(png_ptr, msg);
} }
} }
#endif /* PNG_READ_SUPPORTED && PNG_ERROR_TEXT_SUPPORTED */ #endif /* PNG_READ_SUPPORTED */
#endif /* !defined(PNG_NO_WARNINGS) || !defined(PNG_NO_ERROR_TEXT) */
#ifdef PNG_WARNINGS_SUPPORTED #ifndef PNG_NO_WARNINGS
void PNGAPI void PNGAPI
png_chunk_warning(png_structp png_ptr, png_const_charp warning_message) png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
{ {
char msg[18+PNG_MAX_ERROR_TEXT]; char msg[18+PNG_MAX_ERROR_TEXT];
if (png_ptr == NULL) if (png_ptr == NULL)
png_warning(png_ptr, warning_message); png_warning(png_ptr, warning_message);
else else
{ {
png_format_buffer(png_ptr, msg, warning_message); png_format_buffer(png_ptr, msg, warning_message);
png_warning(png_ptr, msg); png_warning(png_ptr, msg);
} }
} }
#endif /* PNG_WARNINGS_SUPPORTED */ #endif /* PNG_NO_WARNINGS */
#ifdef PNG_READ_SUPPORTED
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
void PNGAPI
png_chunk_benign_error(png_structp png_ptr, png_const_charp error_message)
{
if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN)
png_chunk_warning(png_ptr, error_message);
else
png_chunk_error(png_ptr, error_message);
}
#endif
#endif /* PNG_READ_SUPPORTED */
#ifdef PNG_ERROR_TEXT_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
PNG_FUNCTION(void,
png_fixed_error,(png_structp png_ptr, png_const_charp name),PNG_NORETURN)
{
# define fixed_message "fixed point overflow in "
# define fixed_message_ln ((sizeof fixed_message)-1)
int iin;
char msg[fixed_message_ln+PNG_MAX_ERROR_TEXT];
png_memcpy(msg, fixed_message, fixed_message_ln);
iin = 0;
if (name != NULL) while (iin < (PNG_MAX_ERROR_TEXT-1) && name[iin] != 0)
{
msg[fixed_message_ln + iin] = name[iin];
++iin;
}
msg[fixed_message_ln + iin] = 0;
png_error(png_ptr, msg);
}
#endif
#endif
#ifdef PNG_SETJMP_SUPPORTED
/* This API only exists if ANSI-C style error handling is used,
* otherwise it is necessary for png_default_error to be overridden.
*/
jmp_buf* PNGAPI
png_set_longjmp_fn(png_structp png_ptr, png_longjmp_ptr longjmp_fn,
size_t jmp_buf_size)
{
if (png_ptr == NULL || jmp_buf_size != png_sizeof(jmp_buf))
return NULL;
png_ptr->longjmp_fn = longjmp_fn;
return &png_ptr->png_jmpbuf;
}
#endif
/* This is the default error handling function. Note that replacements for /* This is the default error handling function. Note that replacements for
* this function MUST NOT RETURN, or the program will likely crash. This * this function MUST NOT RETURN, or the program will likely crash. This
* function is used by default, or if the program supplies NULL for the * function is used by default, or if the program supplies NULL for the
* error function pointer in png_set_error_fn(). * error function pointer in png_set_error_fn().
*/ */
static PNG_FUNCTION(void /* PRIVATE */, static void /* PRIVATE */
png_default_error,(png_structp png_ptr, png_const_charp error_message), png_default_error(png_structp png_ptr, png_const_charp error_message)
PNG_NORETURN)
{ {
#ifdef PNG_CONSOLE_IO_SUPPORTED #ifndef PNG_NO_CONSOLE_IO
#ifdef PNG_ERROR_NUMBERS_SUPPORTED #ifdef PNG_ERROR_NUMBERS_SUPPORTED
if (*error_message == PNG_LITERAL_SHARP) if (*error_message == '#')
{ {
/* Strip "#nnnn " from beginning of error message. */ /* Strip "#nnnn " from beginning of error message. */
int offset; int offset;
char error_number[16]; char error_number[16];
for (offset = 0; offset<15; offset++) for (offset = 0; offset<15; offset++)
{ {
error_number[offset] = error_message[offset + 1]; error_number[offset] = error_message[offset + 1];
if (error_message[offset] == ' ') if (error_message[offset] == ' ')
break; break;
} }
if ((offset > 1) && (offset < 15))
if ((offset > 1) && (offset < 15)) {
{ error_number[offset - 1] = '\0';
error_number[offset - 1] = '\0'; fprintf(stderr, "libpng error no. %s: %s",
fprintf(stderr, "libpng error no. %s: %s", error_number, error_message + offset + 1);
error_number, error_message + offset + 1); fprintf(stderr, PNG_STRING_NEWLINE);
fprintf(stderr, PNG_STRING_NEWLINE); }
} else
{
else fprintf(stderr, "libpng error: %s, offset=%d",
{ error_message, offset);
fprintf(stderr, "libpng error: %s, offset=%d", fprintf(stderr, PNG_STRING_NEWLINE);
error_message, offset); }
fprintf(stderr, PNG_STRING_NEWLINE);
}
} }
else else
#endif #endif
@@ -321,35 +250,29 @@ png_default_error,(png_structp png_ptr, png_const_charp error_message),
fprintf(stderr, PNG_STRING_NEWLINE); fprintf(stderr, PNG_STRING_NEWLINE);
} }
#endif #endif
#ifndef PNG_CONSOLE_IO_SUPPORTED
PNG_UNUSED(error_message) /* Make compiler happy */
#endif
png_longjmp(png_ptr, 1);
}
PNG_FUNCTION(void,PNGAPI
png_longjmp,(png_structp png_ptr, int val),PNG_NORETURN)
{
#ifdef PNG_SETJMP_SUPPORTED #ifdef PNG_SETJMP_SUPPORTED
if (png_ptr && png_ptr->longjmp_fn) if (png_ptr)
{ {
# ifdef USE_FAR_KEYWORD # ifdef USE_FAR_KEYWORD
{ {
jmp_buf png_jmpbuf; jmp_buf jmpbuf;
png_memcpy(png_jmpbuf, png_ptr->png_jmpbuf, png_sizeof(jmp_buf)); png_memcpy(jmpbuf, png_ptr->jmpbuf, png_sizeof(jmp_buf));
png_ptr->longjmp_fn(png_jmpbuf, val); longjmp(jmpbuf, 1);
} }
# else # else
png_ptr->longjmp_fn(png_ptr->png_jmpbuf, val); longjmp(png_ptr->jmpbuf, 1);
# endif # endif
} }
#endif #else
/* Here if not setjmp support or if png_ptr is null. */
PNG_ABORT(); PNG_ABORT();
#endif
#ifdef PNG_NO_CONSOLE_IO
error_message = error_message; /* Make compiler happy */
#endif
} }
#ifdef PNG_WARNINGS_SUPPORTED #ifndef PNG_NO_WARNINGS
/* This function is called when there is a warning, but the library thinks /* 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 * 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 * here if you don't want them to. In the default configuration, png_ptr is
@@ -358,60 +281,56 @@ png_longjmp,(png_structp png_ptr, int val),PNG_NORETURN)
static void /* PRIVATE */ static void /* PRIVATE */
png_default_warning(png_structp png_ptr, png_const_charp warning_message) png_default_warning(png_structp png_ptr, png_const_charp warning_message)
{ {
#ifdef PNG_CONSOLE_IO_SUPPORTED #ifndef PNG_NO_CONSOLE_IO
# ifdef PNG_ERROR_NUMBERS_SUPPORTED # ifdef PNG_ERROR_NUMBERS_SUPPORTED
if (*warning_message == PNG_LITERAL_SHARP) if (*warning_message == '#')
{ {
int offset; int offset;
char warning_number[16]; char warning_number[16];
for (offset = 0; offset < 15; offset++) for (offset = 0; offset < 15; offset++)
{ {
warning_number[offset] = warning_message[offset + 1]; warning_number[offset] = warning_message[offset + 1];
if (warning_message[offset] == ' ') if (warning_message[offset] == ' ')
break; break;
} }
if ((offset > 1) && (offset < 15))
if ((offset > 1) && (offset < 15)) {
{ warning_number[offset + 1] = '\0';
warning_number[offset + 1] = '\0'; fprintf(stderr, "libpng warning no. %s: %s",
fprintf(stderr, "libpng warning no. %s: %s", warning_number, warning_message + offset);
warning_number, warning_message + offset); fprintf(stderr, PNG_STRING_NEWLINE);
fprintf(stderr, PNG_STRING_NEWLINE); }
} else
{
else fprintf(stderr, "libpng warning: %s",
{ warning_message);
fprintf(stderr, "libpng warning: %s", fprintf(stderr, PNG_STRING_NEWLINE);
warning_message); }
fprintf(stderr, PNG_STRING_NEWLINE);
}
} }
else else
# endif # endif
{ {
fprintf(stderr, "libpng warning: %s", warning_message); fprintf(stderr, "libpng warning: %s", warning_message);
fprintf(stderr, PNG_STRING_NEWLINE); fprintf(stderr, PNG_STRING_NEWLINE);
} }
#else #else
PNG_UNUSED(warning_message) /* Make compiler happy */ warning_message = warning_message; /* Make compiler happy */
#endif #endif
PNG_UNUSED(png_ptr) /* Make compiler happy */ png_ptr = png_ptr; /* Make compiler happy */
} }
#endif /* PNG_WARNINGS_SUPPORTED */ #endif /* PNG_NO_WARNINGS */
/* This function is called when the application wants to use another method /* This function is called when the application wants to use another method
* of handling errors and warnings. Note that the error function MUST NOT * of handling errors and warnings. Note that the error function MUST NOT
* return to the calling routine or serious problems will occur. The return * return to the calling routine or serious problems will occur. The return
* method used in the default routine calls longjmp(png_ptr->png_jmpbuf, 1) * method used in the default routine calls longjmp(png_ptr->jmpbuf, 1)
*/ */
void PNGAPI void PNGAPI
png_set_error_fn(png_structp png_ptr, png_voidp error_ptr, png_set_error_fn(png_structp png_ptr, png_voidp error_ptr,
png_error_ptr error_fn, png_error_ptr warning_fn) png_error_ptr error_fn, png_error_ptr warning_fn)
{ {
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
png_ptr->error_ptr = error_ptr; png_ptr->error_ptr = error_ptr;
png_ptr->error_fn = error_fn; png_ptr->error_fn = error_fn;
png_ptr->warning_fn = warning_fn; png_ptr->warning_fn = warning_fn;
@@ -423,11 +342,10 @@ png_set_error_fn(png_structp png_ptr, png_voidp error_ptr,
* pointer before png_write_destroy and png_read_destroy are called. * pointer before png_write_destroy and png_read_destroy are called.
*/ */
png_voidp PNGAPI png_voidp PNGAPI
png_get_error_ptr(png_const_structp png_ptr) png_get_error_ptr(png_structp png_ptr)
{ {
if (png_ptr == NULL) if (png_ptr == NULL)
return NULL; return NULL;
return ((png_voidp)png_ptr->error_ptr); return ((png_voidp)png_ptr->error_ptr);
} }
@@ -438,9 +356,8 @@ png_set_strip_error_numbers(png_structp png_ptr, png_uint_32 strip_mode)
{ {
if (png_ptr != NULL) if (png_ptr != NULL)
{ {
png_ptr->flags &= png_ptr->flags &=
((~(PNG_FLAG_STRIP_ERROR_NUMBERS | ((~(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))&strip_mode);
PNG_FLAG_STRIP_ERROR_TEXT))&strip_mode);
} }
} }
#endif #endif

103
pnggccrd.c Normal file
View File

@@ -0,0 +1,103 @@
/* pnggccrd.c was removed from libpng-1.2.20. */
/* This code snippet is for use by configure's compilation test. */
#if (!defined _MSC_VER) && \
defined(PNG_ASSEMBLER_CODE_SUPPORTED) && \
defined(PNG_MMX_CODE_SUPPORTED)
int PNGAPI png_dummy_mmx_support(void);
static int _mmx_supported = 2; // 0: no MMX; 1: MMX supported; 2: not tested
int PNGAPI
png_dummy_mmx_support(void) __attribute__((noinline));
int PNGAPI
png_dummy_mmx_support(void)
{
int result;
#if defined(PNG_MMX_CODE_SUPPORTED) // superfluous, but what the heck
__asm__ __volatile__ (
#if defined(__x86_64__)
"pushq %%rbx \n\t" // rbx gets clobbered by CPUID instruction
"pushq %%rcx \n\t" // so does rcx...
"pushq %%rdx \n\t" // ...and rdx (but rcx & rdx safe on Linux)
"pushfq \n\t" // save Eflag to stack
"popq %%rax \n\t" // get Eflag from stack into rax
"movq %%rax, %%rcx \n\t" // make another copy of Eflag in rcx
"xorl $0x200000, %%eax \n\t" // toggle ID bit in Eflag (i.e., bit 21)
"pushq %%rax \n\t" // save modified Eflag back to stack
"popfq \n\t" // restore modified value to Eflag reg
"pushfq \n\t" // save Eflag to stack
"popq %%rax \n\t" // get Eflag from stack
"pushq %%rcx \n\t" // save original Eflag to stack
"popfq \n\t" // restore original Eflag
#else
"pushl %%ebx \n\t" // ebx gets clobbered by CPUID instruction
"pushl %%ecx \n\t" // so does ecx...
"pushl %%edx \n\t" // ...and edx (but ecx & edx safe on Linux)
"pushfl \n\t" // save Eflag to stack
"popl %%eax \n\t" // get Eflag from stack into eax
"movl %%eax, %%ecx \n\t" // make another copy of Eflag in ecx
"xorl $0x200000, %%eax \n\t" // toggle ID bit in Eflag (i.e., bit 21)
"pushl %%eax \n\t" // save modified Eflag back to stack
"popfl \n\t" // restore modified value to Eflag reg
"pushfl \n\t" // save Eflag to stack
"popl %%eax \n\t" // get Eflag from stack
"pushl %%ecx \n\t" // save original Eflag to stack
"popfl \n\t" // restore original Eflag
#endif
"xorl %%ecx, %%eax \n\t" // compare new Eflag with original Eflag
"jz 0f \n\t" // if same, CPUID instr. is not supported
"xorl %%eax, %%eax \n\t" // set eax to zero
// ".byte 0x0f, 0xa2 \n\t" // CPUID instruction (two-byte opcode)
"cpuid \n\t" // get the CPU identification info
"cmpl $1, %%eax \n\t" // make sure eax return non-zero value
"jl 0f \n\t" // if eax is zero, MMX is not supported
"xorl %%eax, %%eax \n\t" // set eax to zero and...
"incl %%eax \n\t" // ...increment eax to 1. This pair is
// faster than the instruction "mov eax, 1"
"cpuid \n\t" // get the CPU identification info again
"andl $0x800000, %%edx \n\t" // mask out all bits but MMX bit (23)
"cmpl $0, %%edx \n\t" // 0 = MMX not supported
"jz 0f \n\t" // non-zero = yes, MMX IS supported
"movl $1, %%eax \n\t" // set return value to 1
"jmp 1f \n\t" // DONE: have MMX support
"0: \n\t" // .NOT_SUPPORTED: target label for jump instructions
"movl $0, %%eax \n\t" // set return value to 0
"1: \n\t" // .RETURN: target label for jump instructions
#if defined(__x86_64__)
"popq %%rdx \n\t" // restore rdx
"popq %%rcx \n\t" // restore rcx
"popq %%rbx \n\t" // restore rbx
#else
"popl %%edx \n\t" // restore edx
"popl %%ecx \n\t" // restore ecx
"popl %%ebx \n\t" // restore ebx
#endif
// "ret \n\t" // DONE: no MMX support
// (fall through to standard C "ret")
: "=a" (result) // output list
: // any variables used on input (none)
// no clobber list
// , "%ebx", "%ecx", "%edx" // GRR: we handle these manually
// , "memory" // if write to a variable gcc thought was in a reg
// , "cc" // "condition codes" (flag bits)
);
_mmx_supported = result;
#else
_mmx_supported = 0;
#endif /* PNG_MMX_CODE_SUPPORTED */
return _mmx_supported;
}
#endif

909
pngget.c

File diff suppressed because it is too large Load Diff

270
pnginfo.h
View File

@@ -1,270 +0,0 @@
/* pnginfo.h - header file for PNG reference library
*
* Copyright (c) 1998-2011 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.)
*
* Last changed in libpng 1.5.0 [January 6, 2011]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
*/
/* png_info is a structure that holds the information in a PNG file so
* that the application can find out the characteristics of the image.
* If you are reading the file, this structure will tell you what is
* in the PNG file. If you are writing the file, fill in the information
* you want to put into the PNG file, using png_set_*() functions, then
* call png_write_info().
*
* The names chosen should be very close to the PNG specification, so
* consult that document for information about the meaning of each field.
*
* With libpng < 0.95, it was only possible to directly set and read the
* the values in the png_info_struct, which meant that the contents and
* order of the values had to remain fixed. With libpng 0.95 and later,
* however, there are now functions that abstract the contents of
* png_info_struct from the application, so this makes it easier to use
* libpng with dynamic libraries, and even makes it possible to use
* libraries that don't have all of the libpng ancillary chunk-handing
* functionality. In libpng-1.5.0 this was moved into a separate private
* file that is not visible to applications.
*
* The following members may have allocated storage attached that should be
* cleaned up before the structure is discarded: palette, trans, text,
* pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile,
* splt_palettes, scal_unit, row_pointers, and unknowns. By default, these
* are automatically freed when the info structure is deallocated, if they were
* allocated internally by libpng. This behavior can be changed by means
* of the png_data_freer() function.
*
* More allocation details: all the chunk-reading functions that
* change these members go through the corresponding png_set_*
* functions. A function to clear these members is available: see
* png_free_data(). The png_set_* functions do not depend on being
* able to point info structure members to any of the storage they are
* passed (they make their own copies), EXCEPT that the png_set_text
* functions use the same storage passed to them in the text_ptr or
* itxt_ptr structure argument, and the png_set_rows and png_set_unknowns
* functions do not make their own copies.
*/
#ifndef PNGINFO_H
#define PNGINFO_H
struct png_info_def
{
/* the following are necessary for every PNG file */
png_uint_32 width; /* width of image in pixels (from IHDR) */
png_uint_32 height; /* height of image in pixels (from IHDR) */
png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */
png_size_t rowbytes; /* bytes needed to hold an untransformed row */
png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */
png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */
png_uint_16 num_trans; /* number of transparent palette color (tRNS) */
png_byte bit_depth; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */
png_byte color_type; /* see PNG_COLOR_TYPE_ below (from IHDR) */
/* The following three should have been named *_method not *_type */
png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */
png_byte filter_type; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */
png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
/* The following is informational only on read, and not used on writes. */
png_byte channels; /* number of data channels per pixel (1, 2, 3, 4) */
png_byte pixel_depth; /* number of bits per pixel */
png_byte spare_byte; /* to align the data, and for future use */
png_byte signature[8]; /* magic bytes read by libpng from start of file */
/* The rest of the data is optional. If you are reading, check the
* valid field to see if the information in these are valid. If you
* are writing, set the valid field to those chunks you want written,
* and initialize the appropriate fields below.
*/
#if defined(PNG_gAMA_SUPPORTED)
/* The gAMA chunk describes the gamma characteristics of the system
* on which the image was created, normally in the range [1.0, 2.5].
* Data is valid if (valid & PNG_INFO_gAMA) is non-zero.
*/
png_fixed_point gamma;
#endif
#ifdef PNG_sRGB_SUPPORTED
/* GR-P, 0.96a */
/* Data valid if (valid & PNG_INFO_sRGB) non-zero. */
png_byte srgb_intent; /* sRGB rendering intent [0, 1, 2, or 3] */
#endif
#ifdef PNG_TEXT_SUPPORTED
/* The tEXt, and zTXt chunks contain human-readable textual data in
* uncompressed, compressed, and optionally compressed forms, respectively.
* The data in "text" is an array of pointers to uncompressed,
* null-terminated C strings. Each chunk has a keyword that describes the
* textual data contained in that chunk. Keywords are not required to be
* unique, and the text string may be empty. Any number of text chunks may
* be in an image.
*/
int num_text; /* number of comments read or comments to write */
int max_text; /* current size of text array */
png_textp text; /* array of comments read or comments to write */
#endif /* PNG_TEXT_SUPPORTED */
#ifdef PNG_tIME_SUPPORTED
/* The tIME chunk holds the last time the displayed image data was
* modified. See the png_time struct for the contents of this struct.
*/
png_time mod_time;
#endif
#ifdef PNG_sBIT_SUPPORTED
/* The sBIT chunk specifies the number of significant high-order bits
* in the pixel data. Values are in the range [1, bit_depth], and are
* only specified for the channels in the pixel data. The contents of
* the low-order bits is not specified. Data is valid if
* (valid & PNG_INFO_sBIT) is non-zero.
*/
png_color_8 sig_bit; /* significant bits in color channels */
#endif
#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \
defined(PNG_READ_BACKGROUND_SUPPORTED)
/* The tRNS chunk supplies transparency data for paletted images and
* other image types that don't need a full alpha channel. There are
* "num_trans" transparency values for a paletted image, stored in the
* same order as the palette colors, starting from index 0. Values
* for the data are in the range [0, 255], ranging from fully transparent
* to fully opaque, respectively. For non-paletted images, there is a
* single color specified that should be treated as fully transparent.
* Data is valid if (valid & PNG_INFO_tRNS) is non-zero.
*/
png_bytep trans; /* alpha values for paletted image */
png_bytep trans_alpha; /* alpha values for paletted image */
png_color_16 trans_color; /* transparent color for non-palette image */
#endif
#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
/* The bKGD chunk gives the suggested image background color if the
* display program does not have its own background color and the image
* is needs to composited onto a background before display. The colors
* in "background" are normally in the same color space/depth as the
* pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero.
*/
png_color_16 background;
#endif
#ifdef PNG_oFFs_SUPPORTED
/* The oFFs chunk gives the offset in "offset_unit_type" units rightwards
* and downwards from the top-left corner of the display, page, or other
* application-specific co-ordinate space. See the PNG_OFFSET_ defines
* below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero.
*/
png_int_32 x_offset; /* x offset on page */
png_int_32 y_offset; /* y offset on page */
png_byte offset_unit_type; /* offset units type */
#endif
#ifdef PNG_pHYs_SUPPORTED
/* The pHYs chunk gives the physical pixel density of the image for
* display or printing in "phys_unit_type" units (see PNG_RESOLUTION_
* defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero.
*/
png_uint_32 x_pixels_per_unit; /* horizontal pixel density */
png_uint_32 y_pixels_per_unit; /* vertical pixel density */
png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */
#endif
#ifdef PNG_hIST_SUPPORTED
/* The hIST chunk contains the relative frequency or importance of the
* various palette entries, so that a viewer can intelligently select a
* reduced-color palette, if required. Data is an array of "num_palette"
* values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST)
* is non-zero.
*/
png_uint_16p hist;
#endif
#ifdef PNG_cHRM_SUPPORTED
/* The cHRM chunk describes the CIE color characteristics of the monitor
* on which the PNG was created. This data allows the viewer to do gamut
* mapping of the input image to ensure that the viewer sees the same
* colors in the image as the creator. Values are in the range
* [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero.
*/
png_fixed_point x_white;
png_fixed_point y_white;
png_fixed_point x_red;
png_fixed_point y_red;
png_fixed_point x_green;
png_fixed_point y_green;
png_fixed_point x_blue;
png_fixed_point y_blue;
#endif
#ifdef PNG_pCAL_SUPPORTED
/* The pCAL chunk describes a transformation between the stored pixel
* values and original physical data values used to create the image.
* The integer range [0, 2^bit_depth - 1] maps to the floating-point
* range given by [pcal_X0, pcal_X1], and are further transformed by a
* (possibly non-linear) transformation function given by "pcal_type"
* and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_
* defines below, and the PNG-Group's PNG extensions document for a
* complete description of the transformations and how they should be
* implemented, and for a description of the ASCII parameter strings.
* Data values are valid if (valid & PNG_INFO_pCAL) non-zero.
*/
png_charp pcal_purpose; /* pCAL chunk description string */
png_int_32 pcal_X0; /* minimum value */
png_int_32 pcal_X1; /* maximum value */
png_charp pcal_units; /* Latin-1 string giving physical units */
png_charpp pcal_params; /* ASCII strings containing parameter values */
png_byte pcal_type; /* equation type (see PNG_EQUATION_ below) */
png_byte pcal_nparams; /* number of parameters given in pcal_params */
#endif
/* New members added in libpng-1.0.6 */
png_uint_32 free_me; /* flags items libpng is responsible for freeing */
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \
defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
/* Storage for unknown chunks that the library doesn't recognize. */
png_unknown_chunkp unknown_chunks;
int unknown_chunks_num;
#endif
#ifdef PNG_iCCP_SUPPORTED
/* iCCP chunk data. */
png_charp iccp_name; /* profile name */
png_bytep iccp_profile; /* International Color Consortium profile data */
png_uint_32 iccp_proflen; /* ICC profile data length */
png_byte iccp_compression; /* Always zero */
#endif
#ifdef PNG_sPLT_SUPPORTED
/* Data on sPLT chunks (there may be more than one). */
png_sPLT_tp splt_palettes;
png_uint_32 splt_palettes_num;
#endif
#ifdef PNG_sCAL_SUPPORTED
/* The sCAL chunk describes the actual physical dimensions of the
* subject matter of the graphic. The chunk contains a unit specification
* a byte value, and two ASCII strings representing floating-point
* values. The values are width and height corresponsing to one pixel
* in the image. Data values are valid if (valid & PNG_INFO_sCAL) is
* non-zero.
*/
png_byte scal_unit; /* unit of physical scale */
png_charp scal_s_width; /* string containing height */
png_charp scal_s_height; /* string containing width */
#endif
#ifdef PNG_INFO_IMAGE_SUPPORTED
/* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS)
non-zero */
/* Data valid if (valid & PNG_INFO_IDAT) non-zero */
png_bytepp row_pointers; /* the image bits */
#endif
};
#endif /* PNGINFO_H */

312
pngmem.c
View File

@@ -1,8 +1,8 @@
/* pngmem.c - stub functions for memory allocation /* pngmem.c - stub functions for memory allocation
* *
* Last changed in libpng 1.5.1 [February 3, 2011] * Last changed in libpng 1.2.37 [June 4, 2009]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
* *
@@ -17,8 +17,8 @@
* identify the replacement functions. * identify the replacement functions.
*/ */
#include "pngpriv.h" #define PNG_INTERNAL
#include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
/* Borland DOS special memory handler */ /* Borland DOS special memory handler */
@@ -27,32 +27,29 @@
/* Allocate memory for a png_struct. The malloc and memset can be replaced /* Allocate memory for a png_struct. The malloc and memset can be replaced
by a single call to calloc() if this is thought to improve performance. */ by a single call to calloc() if this is thought to improve performance. */
PNG_FUNCTION(png_voidp /* PRIVATE */, png_voidp /* PRIVATE */
png_create_struct,(int type),PNG_ALLOCATED) png_create_struct(int type)
{ {
# ifdef PNG_USER_MEM_SUPPORTED #ifdef PNG_USER_MEM_SUPPORTED
return (png_create_struct_2(type, NULL, NULL)); return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL));
} }
/* Alternate version of png_create_struct, for use with user-defined malloc. */ /* Alternate version of png_create_struct, for use with user-defined malloc. */
PNG_FUNCTION(png_voidp /* PRIVATE */, png_voidp /* PRIVATE */
png_create_struct_2,(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr), png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)
PNG_ALLOCATED)
{ {
# endif /* PNG_USER_MEM_SUPPORTED */ #endif /* PNG_USER_MEM_SUPPORTED */
png_size_t size; png_size_t size;
png_voidp struct_ptr; png_voidp struct_ptr;
if (type == PNG_STRUCT_INFO) if (type == PNG_STRUCT_INFO)
size = png_sizeof(png_info); size = png_sizeof(png_info);
else if (type == PNG_STRUCT_PNG) else if (type == PNG_STRUCT_PNG)
size = png_sizeof(png_struct); size = png_sizeof(png_struct);
else else
return (png_get_copyright(NULL)); return (png_get_copyright(NULL));
# ifdef PNG_USER_MEM_SUPPORTED #ifdef PNG_USER_MEM_SUPPORTED
if (malloc_fn != NULL) if (malloc_fn != NULL)
{ {
png_struct dummy_struct; png_struct dummy_struct;
@@ -60,13 +57,11 @@ png_create_struct_2,(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr),
png_ptr->mem_ptr=mem_ptr; png_ptr->mem_ptr=mem_ptr;
struct_ptr = (*(malloc_fn))(png_ptr, (png_uint_32)size); struct_ptr = (*(malloc_fn))(png_ptr, (png_uint_32)size);
} }
else else
# endif /* PNG_USER_MEM_SUPPORTED */ #endif /* PNG_USER_MEM_SUPPORTED */
struct_ptr = (png_voidp)farmalloc(size); struct_ptr = (png_voidp)farmalloc(size);
if (struct_ptr != NULL) if (struct_ptr != NULL)
png_memset(struct_ptr, 0, size); png_memset(struct_ptr, 0, size);
return (struct_ptr); return (struct_ptr);
} }
@@ -74,8 +69,8 @@ png_create_struct_2,(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr),
void /* PRIVATE */ void /* PRIVATE */
png_destroy_struct(png_voidp struct_ptr) png_destroy_struct(png_voidp struct_ptr)
{ {
# ifdef PNG_USER_MEM_SUPPORTED #ifdef PNG_USER_MEM_SUPPORTED
png_destroy_struct_2(struct_ptr, NULL, NULL); png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL);
} }
/* Free memory allocated by a png_create_struct() call */ /* Free memory allocated by a png_create_struct() call */
@@ -83,10 +78,10 @@ void /* PRIVATE */
png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn, png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
png_voidp mem_ptr) png_voidp mem_ptr)
{ {
# endif #endif
if (struct_ptr != NULL) if (struct_ptr != NULL)
{ {
# ifdef PNG_USER_MEM_SUPPORTED #ifdef PNG_USER_MEM_SUPPORTED
if (free_fn != NULL) if (free_fn != NULL)
{ {
png_struct dummy_struct; png_struct dummy_struct;
@@ -95,8 +90,7 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
(*(free_fn))(png_ptr, struct_ptr); (*(free_fn))(png_ptr, struct_ptr);
return; return;
} }
#endif /* PNG_USER_MEM_SUPPORTED */
# endif /* PNG_USER_MEM_SUPPORTED */
farfree (struct_ptr); farfree (struct_ptr);
} }
} }
@@ -120,62 +114,45 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
* result, we would be truncating potentially larger memory requests * result, we would be truncating potentially larger memory requests
* (which should cause a fatal error) and introducing major problems. * (which should cause a fatal error) and introducing major problems.
*/ */
PNG_FUNCTION(png_voidp,PNGAPI
png_calloc,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED)
{
png_voidp ret;
ret = (png_malloc(png_ptr, size)); png_voidp PNGAPI
png_malloc(png_structp png_ptr, png_uint_32 size)
if (ret != NULL)
png_memset(ret,0,(png_size_t)size);
return (ret);
}
PNG_FUNCTION(png_voidp,PNGAPI
png_malloc,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED)
{ {
png_voidp ret; png_voidp ret;
if (png_ptr == NULL || size == 0) if (png_ptr == NULL || size == 0)
return (NULL); return (NULL);
# ifdef PNG_USER_MEM_SUPPORTED #ifdef PNG_USER_MEM_SUPPORTED
if (png_ptr->malloc_fn != NULL) if (png_ptr->malloc_fn != NULL)
ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size)); ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size));
else else
ret = (png_malloc_default(png_ptr, size)); ret = (png_malloc_default(png_ptr, size));
if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of memory"); png_error(png_ptr, "Out of memory!");
return (ret); return (ret);
} }
PNG_FUNCTION(png_voidp,PNGAPI png_voidp PNGAPI
png_malloc_default,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) png_malloc_default(png_structp png_ptr, png_uint_32 size)
{ {
png_voidp ret; png_voidp ret;
# endif /* PNG_USER_MEM_SUPPORTED */ #endif /* PNG_USER_MEM_SUPPORTED */
if (png_ptr == NULL || size == 0) if (png_ptr == NULL || size == 0)
return (NULL); return (NULL);
# ifdef PNG_MAX_MALLOC_64K #ifdef PNG_MAX_MALLOC_64K
if (size > (png_uint_32)65536L) if (size > (png_uint_32)65536L)
{ {
png_warning(png_ptr, "Cannot Allocate > 64K"); png_warning(png_ptr, "Cannot Allocate > 64K");
ret = NULL; ret = NULL;
} }
else else
# endif #endif
if (size != (size_t)size) if (size != (size_t)size)
ret = NULL; ret = NULL;
else if (size == (png_uint_32)65536L) else if (size == (png_uint_32)65536L)
{ {
if (png_ptr->offset_table == NULL) if (png_ptr->offset_table == NULL)
@@ -198,13 +175,10 @@ png_malloc_default,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED)
if (png_ptr->zlib_window_bits > 14) if (png_ptr->zlib_window_bits > 14)
num_blocks = (int)(1 << (png_ptr->zlib_window_bits - 14)); num_blocks = (int)(1 << (png_ptr->zlib_window_bits - 14));
else else
num_blocks = 1; num_blocks = 1;
if (png_ptr->zlib_mem_level >= 7) if (png_ptr->zlib_mem_level >= 7)
num_blocks += (int)(1 << (png_ptr->zlib_mem_level - 7)); num_blocks += (int)(1 << (png_ptr->zlib_mem_level - 7));
else else
num_blocks++; num_blocks++;
@@ -214,27 +188,25 @@ png_malloc_default,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED)
if (table == NULL) if (table == NULL)
{ {
# ifndef PNG_USER_MEM_SUPPORTED #ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out Of Memory"); /* Note "O", "M" */ png_error(png_ptr, "Out Of Memory."); /* Note "O" and "M" */
else else
png_warning(png_ptr, "Out Of Memory"); png_warning(png_ptr, "Out Of Memory.");
# endif #endif
return (NULL); return (NULL);
} }
if ((png_size_t)table & 0xfff0) if ((png_size_t)table & 0xfff0)
{ {
# ifndef PNG_USER_MEM_SUPPORTED #ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, png_error(png_ptr,
"Farmalloc didn't return normalized pointer"); "Farmalloc didn't return normalized pointer");
else else
png_warning(png_ptr, png_warning(png_ptr,
"Farmalloc didn't return normalized pointer"); "Farmalloc didn't return normalized pointer");
# endif #endif
return (NULL); return (NULL);
} }
@@ -244,13 +216,12 @@ png_malloc_default,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED)
if (png_ptr->offset_table_ptr == NULL) if (png_ptr->offset_table_ptr == NULL)
{ {
# ifndef PNG_USER_MEM_SUPPORTED #ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out Of memory"); /* Note "O", "m" */ png_error(png_ptr, "Out Of memory."); /* Note "O" and "M" */
else else
png_warning(png_ptr, "Out Of memory"); png_warning(png_ptr, "Out Of memory.");
# endif #endif
return (NULL); return (NULL);
} }
@@ -260,7 +231,6 @@ png_malloc_default,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED)
hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L); hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L);
hptr = hptr + 16L; /* "hptr += 16L" fails on Turbo C++ 3.0 */ hptr = hptr + 16L; /* "hptr += 16L" fails on Turbo C++ 3.0 */
} }
for (i = 0; i < num_blocks; i++) for (i = 0; i < num_blocks; i++)
{ {
png_ptr->offset_table_ptr[i] = (png_bytep)hptr; png_ptr->offset_table_ptr[i] = (png_bytep)hptr;
@@ -275,32 +245,29 @@ png_malloc_default,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED)
if (png_ptr->offset_table_count >= png_ptr->offset_table_number) if (png_ptr->offset_table_count >= png_ptr->offset_table_number)
{ {
# ifndef PNG_USER_MEM_SUPPORTED #ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of Memory"); /* Note "o" and "M" */ png_error(png_ptr, "Out of Memory."); /* Note "o" and "M" */
else else
png_warning(png_ptr, "Out of Memory"); png_warning(png_ptr, "Out of Memory.");
# endif #endif
return (NULL); return (NULL);
} }
ret = png_ptr->offset_table_ptr[png_ptr->offset_table_count++]; ret = png_ptr->offset_table_ptr[png_ptr->offset_table_count++];
} }
else else
ret = farmalloc(size); ret = farmalloc(size);
# ifndef PNG_USER_MEM_SUPPORTED #ifndef PNG_USER_MEM_SUPPORTED
if (ret == NULL) if (ret == NULL)
{ {
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of memory"); /* Note "o" and "m" */ png_error(png_ptr, "Out of memory."); /* Note "o" and "m" */
else else
png_warning(png_ptr, "Out of memory"); /* Note "o" and "m" */ png_warning(png_ptr, "Out of memory."); /* Note "o" and "m" */
} }
# endif #endif
return (ret); return (ret);
} }
@@ -315,13 +282,12 @@ png_free(png_structp png_ptr, png_voidp ptr)
if (png_ptr == NULL || ptr == NULL) if (png_ptr == NULL || ptr == NULL)
return; return;
# ifdef PNG_USER_MEM_SUPPORTED #ifdef PNG_USER_MEM_SUPPORTED
if (png_ptr->free_fn != NULL) if (png_ptr->free_fn != NULL)
{ {
(*(png_ptr->free_fn))(png_ptr, ptr); (*(png_ptr->free_fn))(png_ptr, ptr);
return; return;
} }
else else
png_free_default(png_ptr, ptr); png_free_default(png_ptr, ptr);
} }
@@ -329,7 +295,7 @@ png_free(png_structp png_ptr, png_voidp ptr)
void PNGAPI void PNGAPI
png_free_default(png_structp png_ptr, png_voidp ptr) png_free_default(png_structp png_ptr, png_voidp ptr)
{ {
# endif /* PNG_USER_MEM_SUPPORTED */ #endif /* PNG_USER_MEM_SUPPORTED */
if (png_ptr == NULL || ptr == NULL) if (png_ptr == NULL || ptr == NULL)
return; return;
@@ -357,7 +323,9 @@ png_free_default(png_structp png_ptr, png_voidp ptr)
} }
if (ptr != NULL) if (ptr != NULL)
{
farfree(ptr); farfree(ptr);
}
} }
#else /* Not the Borland DOS special memory handler */ #else /* Not the Borland DOS special memory handler */
@@ -365,58 +333,52 @@ png_free_default(png_structp png_ptr, png_voidp ptr)
/* Allocate memory for a png_struct or a png_info. The malloc and /* Allocate memory for a png_struct or a png_info. The malloc and
memset can be replaced by a single call to calloc() if this is thought memset can be replaced by a single call to calloc() if this is thought
to improve performance noticably. */ to improve performance noticably. */
PNG_FUNCTION(png_voidp /* PRIVATE */, png_voidp /* PRIVATE */
png_create_struct,(int type),PNG_ALLOCATED) png_create_struct(int type)
{ {
# ifdef PNG_USER_MEM_SUPPORTED #ifdef PNG_USER_MEM_SUPPORTED
return (png_create_struct_2(type, NULL, NULL)); return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL));
} }
/* Allocate memory for a png_struct or a png_info. The malloc and /* Allocate memory for a png_struct or a png_info. The malloc and
memset can be replaced by a single call to calloc() if this is thought memset can be replaced by a single call to calloc() if this is thought
to improve performance noticably. */ to improve performance noticably. */
PNG_FUNCTION(png_voidp /* PRIVATE */, png_voidp /* PRIVATE */
png_create_struct_2,(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr), png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)
PNG_ALLOCATED)
{ {
# endif /* PNG_USER_MEM_SUPPORTED */ #endif /* PNG_USER_MEM_SUPPORTED */
png_size_t size; png_size_t size;
png_voidp struct_ptr; png_voidp struct_ptr;
if (type == PNG_STRUCT_INFO) if (type == PNG_STRUCT_INFO)
size = png_sizeof(png_info); size = png_sizeof(png_info);
else if (type == PNG_STRUCT_PNG) else if (type == PNG_STRUCT_PNG)
size = png_sizeof(png_struct); size = png_sizeof(png_struct);
else else
return (NULL); return (NULL);
# ifdef PNG_USER_MEM_SUPPORTED #ifdef PNG_USER_MEM_SUPPORTED
if (malloc_fn != NULL) if (malloc_fn != NULL)
{ {
png_struct dummy_struct; png_struct dummy_struct;
png_structp png_ptr = &dummy_struct; png_structp png_ptr = &dummy_struct;
png_ptr->mem_ptr=mem_ptr; png_ptr->mem_ptr=mem_ptr;
struct_ptr = (*(malloc_fn))(png_ptr, size); struct_ptr = (*(malloc_fn))(png_ptr, size);
if (struct_ptr != NULL) if (struct_ptr != NULL)
png_memset(struct_ptr, 0, size); png_memset(struct_ptr, 0, size);
return (struct_ptr); return (struct_ptr);
} }
# endif /* PNG_USER_MEM_SUPPORTED */ #endif /* PNG_USER_MEM_SUPPORTED */
# if defined(__TURBOC__) && !defined(__FLAT__) #if defined(__TURBOC__) && !defined(__FLAT__)
struct_ptr = (png_voidp)farmalloc(size); struct_ptr = (png_voidp)farmalloc(size);
# else #else
# if defined(_MSC_VER) && defined(MAXSEG_64K) # if defined(_MSC_VER) && defined(MAXSEG_64K)
struct_ptr = (png_voidp)halloc(size, 1); struct_ptr = (png_voidp)halloc(size, 1);
# else # else
struct_ptr = (png_voidp)malloc(size); struct_ptr = (png_voidp)malloc(size);
# endif # endif
# endif #endif
if (struct_ptr != NULL) if (struct_ptr != NULL)
png_memset(struct_ptr, 0, size); png_memset(struct_ptr, 0, size);
@@ -428,8 +390,8 @@ png_create_struct_2,(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr),
void /* PRIVATE */ void /* PRIVATE */
png_destroy_struct(png_voidp struct_ptr) png_destroy_struct(png_voidp struct_ptr)
{ {
# ifdef PNG_USER_MEM_SUPPORTED #ifdef PNG_USER_MEM_SUPPORTED
png_destroy_struct_2(struct_ptr, NULL, NULL); png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL);
} }
/* Free memory allocated by a png_create_struct() call */ /* Free memory allocated by a png_create_struct() call */
@@ -437,10 +399,10 @@ void /* PRIVATE */
png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn, png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
png_voidp mem_ptr) png_voidp mem_ptr)
{ {
# endif /* PNG_USER_MEM_SUPPORTED */ #endif /* PNG_USER_MEM_SUPPORTED */
if (struct_ptr != NULL) if (struct_ptr != NULL)
{ {
# ifdef PNG_USER_MEM_SUPPORTED #ifdef PNG_USER_MEM_SUPPORTED
if (free_fn != NULL) if (free_fn != NULL)
{ {
png_struct dummy_struct; png_struct dummy_struct;
@@ -449,19 +411,16 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
(*(free_fn))(png_ptr, struct_ptr); (*(free_fn))(png_ptr, struct_ptr);
return; return;
} }
# endif /* PNG_USER_MEM_SUPPORTED */ #endif /* PNG_USER_MEM_SUPPORTED */
# if defined(__TURBOC__) && !defined(__FLAT__) #if defined(__TURBOC__) && !defined(__FLAT__)
farfree(struct_ptr); farfree(struct_ptr);
#else
# else # if defined(_MSC_VER) && defined(MAXSEG_64K)
# if defined(_MSC_VER) && defined(MAXSEG_64K)
hfree(struct_ptr); hfree(struct_ptr);
# else
# else
free(struct_ptr); free(struct_ptr);
# endif
# endif #endif
# endif
} }
} }
@@ -472,92 +431,70 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
* have the ability to do that. * have the ability to do that.
*/ */
PNG_FUNCTION(png_voidp,PNGAPI
png_calloc,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) png_voidp PNGAPI
png_malloc(png_structp png_ptr, png_uint_32 size)
{ {
png_voidp ret; png_voidp ret;
ret = (png_malloc(png_ptr, size)); #ifdef PNG_USER_MEM_SUPPORTED
if (ret != NULL)
png_memset(ret,0,(png_size_t)size);
return (ret);
}
PNG_FUNCTION(png_voidp,PNGAPI
png_malloc,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED)
{
png_voidp ret;
# ifdef PNG_USER_MEM_SUPPORTED
if (png_ptr == NULL || size == 0) if (png_ptr == NULL || size == 0)
return (NULL); return (NULL);
if (png_ptr->malloc_fn != NULL) if (png_ptr->malloc_fn != NULL)
ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size)); ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size));
else else
ret = (png_malloc_default(png_ptr, size)); ret = (png_malloc_default(png_ptr, size));
if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of Memory"); png_error(png_ptr, "Out of Memory!");
return (ret); return (ret);
} }
PNG_FUNCTION(png_voidp,PNGAPI png_voidp PNGAPI
png_malloc_default,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) png_malloc_default(png_structp png_ptr, png_uint_32 size)
{ {
png_voidp ret; png_voidp ret;
# endif /* PNG_USER_MEM_SUPPORTED */ #endif /* PNG_USER_MEM_SUPPORTED */
if (png_ptr == NULL || size == 0) if (png_ptr == NULL || size == 0)
return (NULL); return (NULL);
# ifdef PNG_MAX_MALLOC_64K #ifdef PNG_MAX_MALLOC_64K
if (size > (png_uint_32)65536L) if (size > (png_uint_32)65536L)
{ {
# ifndef PNG_USER_MEM_SUPPORTED #ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Cannot Allocate > 64K"); png_error(png_ptr, "Cannot Allocate > 64K");
else else
# endif #endif
return NULL; return NULL;
} }
# endif #endif
/* Check for overflow */ /* Check for overflow */
# if defined(__TURBOC__) && !defined(__FLAT__) #if defined(__TURBOC__) && !defined(__FLAT__)
if (size != (unsigned long)size) if (size != (unsigned long)size)
ret = NULL; ret = NULL;
else else
ret = farmalloc(size); ret = farmalloc(size);
#else
# else # if defined(_MSC_VER) && defined(MAXSEG_64K)
# if defined(_MSC_VER) && defined(MAXSEG_64K)
if (size != (unsigned long)size) if (size != (unsigned long)size)
ret = NULL; ret = NULL;
else else
ret = halloc(size, 1); ret = halloc(size, 1);
# else
# else
if (size != (size_t)size) if (size != (size_t)size)
ret = NULL; ret = NULL;
else else
ret = malloc((size_t)size); ret = malloc((size_t)size);
# endif # endif
# endif #endif
# ifndef PNG_USER_MEM_SUPPORTED #ifndef PNG_USER_MEM_SUPPORTED
if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of Memory"); png_error(png_ptr, "Out of Memory");
# endif #endif
return (ret); return (ret);
} }
@@ -571,47 +508,46 @@ png_free(png_structp png_ptr, png_voidp ptr)
if (png_ptr == NULL || ptr == NULL) if (png_ptr == NULL || ptr == NULL)
return; return;
# ifdef PNG_USER_MEM_SUPPORTED #ifdef PNG_USER_MEM_SUPPORTED
if (png_ptr->free_fn != NULL) if (png_ptr->free_fn != NULL)
{ {
(*(png_ptr->free_fn))(png_ptr, ptr); (*(png_ptr->free_fn))(png_ptr, ptr);
return; return;
} }
else else
png_free_default(png_ptr, ptr); png_free_default(png_ptr, ptr);
} }
void PNGAPI void PNGAPI
png_free_default(png_structp png_ptr, png_voidp ptr) png_free_default(png_structp png_ptr, png_voidp ptr)
{ {
if (png_ptr == NULL || ptr == NULL) if (png_ptr == NULL || ptr == NULL)
return; return;
# endif /* PNG_USER_MEM_SUPPORTED */ #endif /* PNG_USER_MEM_SUPPORTED */
# if defined(__TURBOC__) && !defined(__FLAT__) #if defined(__TURBOC__) && !defined(__FLAT__)
farfree(ptr); farfree(ptr);
#else
# else # if defined(_MSC_VER) && defined(MAXSEG_64K)
# if defined(_MSC_VER) && defined(MAXSEG_64K)
hfree(ptr); hfree(ptr);
# else
# else
free(ptr); free(ptr);
# endif
# endif #endif
# endif
} }
#endif /* Not Borland DOS special memory handler */ #endif /* Not Borland DOS special memory handler */
#if defined(PNG_1_0_X)
# define png_malloc_warn png_malloc
#else
/* This function was added at libpng version 1.2.3. The png_malloc_warn() /* This function was added at libpng version 1.2.3. The png_malloc_warn()
* function will set up png_malloc() to issue a png_warning and return NULL * function will set up png_malloc() to issue a png_warning and return NULL
* instead of issuing a png_error, if it fails to allocate the requested * instead of issuing a png_error, if it fails to allocate the requested
* memory. * memory.
*/ */
PNG_FUNCTION(png_voidp,PNGAPI png_voidp PNGAPI
png_malloc_warn,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) png_malloc_warn(png_structp png_ptr, png_uint_32 size)
{ {
png_voidp ptr; png_voidp ptr;
png_uint_32 save_flags; png_uint_32 save_flags;
@@ -624,7 +560,34 @@ png_malloc_warn,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED)
png_ptr->flags=save_flags; png_ptr->flags=save_flags;
return(ptr); return(ptr);
} }
#endif
png_voidp PNGAPI
png_memcpy_check (png_structp png_ptr, png_voidp s1, png_voidp s2,
png_uint_32 length)
{
png_size_t size;
size = (png_size_t)length;
if ((png_uint_32)size != length)
png_error(png_ptr, "Overflow in png_memcpy_check.");
return(png_memcpy (s1, s2, size));
}
png_voidp PNGAPI
png_memset_check (png_structp png_ptr, png_voidp s1, int value,
png_uint_32 length)
{
png_size_t size;
size = (png_size_t)length;
if ((png_uint_32)size != length)
png_error(png_ptr, "Overflow in png_memset_check.");
return (png_memset (s1, value, size));
}
#ifdef PNG_USER_MEM_SUPPORTED #ifdef PNG_USER_MEM_SUPPORTED
/* This function is called when the application wants to use another method /* This function is called when the application wants to use another method
@@ -647,11 +610,10 @@ png_set_mem_fn(png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr
* pointer before png_write_destroy and png_read_destroy are called. * pointer before png_write_destroy and png_read_destroy are called.
*/ */
png_voidp PNGAPI png_voidp PNGAPI
png_get_mem_ptr(png_const_structp png_ptr) png_get_mem_ptr(png_structp png_ptr)
{ {
if (png_ptr == NULL) if (png_ptr == NULL)
return (NULL); return (NULL);
return ((png_voidp)png_ptr->mem_ptr); return ((png_voidp)png_ptr->mem_ptr);
} }
#endif /* PNG_USER_MEM_SUPPORTED */ #endif /* PNG_USER_MEM_SUPPORTED */

File diff suppressed because it is too large Load Diff

1246
pngpriv.h

File diff suppressed because it is too large Load Diff

978
pngread.c

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
/* pngrio.c - functions for data input /* pngrio.c - functions for data input
* *
* Last changed in libpng 1.5.0 [January 6, 2011] * Last changed in libpng 1.2.37 [June 4, 2009]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
* *
@@ -18,9 +18,9 @@
* libpng use it at run time with png_set_read_fn(...). * libpng use it at run time with png_set_read_fn(...).
*/ */
#include "pngpriv.h" #define PNG_INTERNAL
#include "png.h"
#ifdef PNG_READ_SUPPORTED #if defined(PNG_READ_SUPPORTED)
/* Read the data from whatever input you are using. The default routine /* Read the data from whatever input you are using. The default routine
* reads from a file pointer. Note that this routine sometimes gets called * reads from a file pointer. Note that this routine sometimes gets called
@@ -32,38 +32,41 @@ void /* PRIVATE */
png_read_data(png_structp png_ptr, png_bytep data, png_size_t length) png_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
{ {
png_debug1(4, "reading %d bytes", (int)length); png_debug1(4, "reading %d bytes", (int)length);
if (png_ptr->read_data_fn != NULL) if (png_ptr->read_data_fn != NULL)
(*(png_ptr->read_data_fn))(png_ptr, data, length); (*(png_ptr->read_data_fn))(png_ptr, data, length);
else else
png_error(png_ptr, "Call to NULL read function"); png_error(png_ptr, "Call to NULL read function");
} }
#ifdef PNG_STDIO_SUPPORTED #if !defined(PNG_NO_STDIO)
/* This is the function that does the actual reading of data. If you are /* This is the function that does the actual reading of data. If you are
* not reading from a standard C stream, you should create a replacement * not reading from a standard C stream, you should create a replacement
* read_data function and use it at run time with png_set_read_fn(), rather * read_data function and use it at run time with png_set_read_fn(), rather
* than changing the library. * than changing the library.
*/ */
# ifndef USE_FAR_KEYWORD #ifndef USE_FAR_KEYWORD
void PNGCBAPI void PNGAPI
png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
{ {
png_size_t check; png_size_t check;
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
/* fread() returns 0 on error, so it is OK to store this in a png_size_t /* 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. * instead of an int, which is what fread() actually returns.
*/ */
check = fread(data, 1, length, (png_FILE_p)png_ptr->io_ptr); #if defined(_WIN32_WCE)
if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
check = 0;
#else
check = (png_size_t)fread(data, (png_size_t)1, length,
(png_FILE_p)png_ptr->io_ptr);
#endif
if (check != length) if (check != length)
png_error(png_ptr, "Read Error"); png_error(png_ptr, "Read Error");
} }
# else #else
/* This is the model-independent version. Since the standard I/O library /* This is the model-independent version. Since the standard I/O library
can't handle far buffers in the medium and small models, we have to copy can't handle far buffers in the medium and small models, we have to copy
the data. the data.
@@ -72,66 +75,65 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
#define NEAR_BUF_SIZE 1024 #define NEAR_BUF_SIZE 1024
#define MIN(a,b) (a <= b ? a : b) #define MIN(a,b) (a <= b ? a : b)
static void PNGCBAPI static void PNGAPI
png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
{ {
png_size_t check; int check;
png_byte *n_data; png_byte *n_data;
png_FILE_p io_ptr; png_FILE_p io_ptr;
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
/* Check if data really is near. If so, use usual code. */ /* Check if data really is near. If so, use usual code. */
n_data = (png_byte *)CVT_PTR_NOCHECK(data); n_data = (png_byte *)CVT_PTR_NOCHECK(data);
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
if ((png_bytep)n_data == data) if ((png_bytep)n_data == data)
{ {
#if defined(_WIN32_WCE)
if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
check = 0;
#else
check = fread(n_data, 1, length, io_ptr); check = fread(n_data, 1, length, io_ptr);
#endif
} }
else else
{ {
png_byte buf[NEAR_BUF_SIZE]; png_byte buf[NEAR_BUF_SIZE];
png_size_t read, remaining, err; png_size_t read, remaining, err;
check = 0; check = 0;
remaining = length; remaining = length;
do do
{ {
read = MIN(NEAR_BUF_SIZE, remaining); read = MIN(NEAR_BUF_SIZE, remaining);
err = fread(buf, 1, read, io_ptr); #if defined(_WIN32_WCE)
if ( !ReadFile((HANDLE)(io_ptr), buf, read, &err, NULL) )
err = 0;
#else
err = fread(buf, (png_size_t)1, read, io_ptr);
#endif
png_memcpy(data, buf, read); /* copy far buffer to near buffer */ png_memcpy(data, buf, read); /* copy far buffer to near buffer */
if (err != read) if (err != read)
break; break;
else else
check += err; check += err;
data += read; data += read;
remaining -= read; remaining -= read;
} }
while (remaining != 0); while (remaining != 0);
} }
if ((png_uint_32)check != (png_uint_32)length) if ((png_uint_32)check != (png_uint_32)length)
png_error(png_ptr, "read Error"); png_error(png_ptr, "read Error");
} }
# endif #endif
#endif #endif
/* This function allows the application to supply a new input function /* This function allows the application to supply a new input function
* for libpng if standard C streams aren't being used. * for libpng if standard C streams aren't being used.
* *
* This function takes as its arguments: * This function takes as its arguments:
*
* png_ptr - pointer to a png input data structure * png_ptr - pointer to a png input data structure
*
* io_ptr - pointer to user supplied structure containing info about * io_ptr - pointer to user supplied structure containing info about
* the input functions. May be NULL. * the input functions. May be NULL.
*
* read_data_fn - pointer to a new input function that takes as its * read_data_fn - pointer to a new input function that takes as its
* arguments a pointer to a png_struct, a pointer to * arguments a pointer to a png_struct, a pointer to
* a location where input data can be stored, and a 32-bit * a location where input data can be stored, and a 32-bit
@@ -147,13 +149,11 @@ png_set_read_fn(png_structp png_ptr, png_voidp io_ptr,
{ {
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
png_ptr->io_ptr = io_ptr; png_ptr->io_ptr = io_ptr;
#ifdef PNG_STDIO_SUPPORTED #if !defined(PNG_NO_STDIO)
if (read_data_fn != NULL) if (read_data_fn != NULL)
png_ptr->read_data_fn = read_data_fn; png_ptr->read_data_fn = read_data_fn;
else else
png_ptr->read_data_fn = png_default_read_data; png_ptr->read_data_fn = png_default_read_data;
#else #else
@@ -165,11 +165,12 @@ png_set_read_fn(png_structp png_ptr, png_voidp io_ptr,
{ {
png_ptr->write_data_fn = NULL; png_ptr->write_data_fn = NULL;
png_warning(png_ptr, png_warning(png_ptr,
"Can't set both read_data_fn and write_data_fn in the" "It's an error to set both read_data_fn and write_data_fn in the ");
" same structure"); png_warning(png_ptr,
"same structure. Resetting write_data_fn to NULL.");
} }
#ifdef PNG_WRITE_FLUSH_SUPPORTED #if defined(PNG_WRITE_FLUSH_SUPPORTED)
png_ptr->output_flush_fn = NULL; png_ptr->output_flush_fn = NULL;
#endif #endif
} }

2114
pngrtran.c

File diff suppressed because it is too large Load Diff

1924
pngrutil.c

File diff suppressed because it is too large Load Diff

887
pngset.c

File diff suppressed because it is too large Load Diff

View File

@@ -1,308 +0,0 @@
/* pngstruct.h - header file for PNG reference library
*
* Copyright (c) 1998-2011 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.)
*
* Last changed in libpng 1.5.0 [January 6, 2011]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
*/
/* The structure that holds the information to read and write PNG files.
* The only people who need to care about what is inside of this are the
* people who will be modifying the library for their own special needs.
* It should NOT be accessed directly by an application.
*/
#ifndef PNGSTRUCT_H
#define PNGSTRUCT_H
/* zlib.h defines the structure z_stream, an instance of which is included
* in this structure and is required for decompressing the LZ compressed
* data in PNG files.
*/
#include "zlib.h"
struct png_struct_def
{
#ifdef PNG_SETJMP_SUPPORTED
jmp_buf png_jmpbuf; /* used in png_error */
png_longjmp_ptr longjmp_fn;/* setjmp non-local goto function. */
#endif
png_error_ptr error_fn; /* function for printing errors and aborting */
png_error_ptr warning_fn; /* function for printing warnings */
png_voidp error_ptr; /* user supplied struct for error functions */
png_rw_ptr write_data_fn; /* function for writing output data */
png_rw_ptr read_data_fn; /* function for reading input data */
png_voidp io_ptr; /* ptr to application struct for I/O functions */
#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
png_user_transform_ptr read_user_transform_fn; /* user read transform */
#endif
#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
png_user_transform_ptr write_user_transform_fn; /* user write transform */
#endif
/* These were added in libpng-1.0.2 */
#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
png_voidp user_transform_ptr; /* user supplied struct for user transform */
png_byte user_transform_depth; /* bit depth of user transformed pixels */
png_byte user_transform_channels; /* channels in user transformed pixels */
#endif
#endif
png_uint_32 mode; /* tells us where we are in the PNG file */
png_uint_32 flags; /* flags indicating various things to libpng */
png_uint_32 transformations; /* which transformations to perform */
z_stream zstream; /* pointer to decompression structure (below) */
png_bytep zbuf; /* buffer for zlib */
uInt zbuf_size; /* size of zbuf (typically 65536) */
int zlib_level; /* holds zlib compression level */
int zlib_method; /* holds zlib compression method */
int zlib_window_bits; /* holds zlib compression window bits */
int zlib_mem_level; /* holds zlib compression memory level */
int zlib_strategy; /* holds zlib compression strategy */
png_uint_32 width; /* width of image in pixels */
png_uint_32 height; /* height of image in pixels */
png_uint_32 num_rows; /* number of rows in current pass */
png_uint_32 usr_width; /* width of row at start of write */
png_size_t rowbytes; /* size of row in bytes */
png_uint_32 iwidth; /* width of current interlaced row in pixels */
png_uint_32 row_number; /* current row in interlace pass */
png_bytep prev_row; /* buffer to save previous (unfiltered) row */
png_bytep row_buf; /* buffer to save current (unfiltered) row */
png_bytep sub_row; /* buffer to save "sub" row when filtering */
png_bytep up_row; /* buffer to save "up" row when filtering */
png_bytep avg_row; /* buffer to save "avg" row when filtering */
png_bytep paeth_row; /* buffer to save "Paeth" row when filtering */
png_row_info row_info; /* used for transformation routines */
png_uint_32 idat_size; /* current IDAT size for read */
png_uint_32 crc; /* current chunk CRC value */
png_colorp palette; /* palette from the input file */
png_uint_16 num_palette; /* number of color entries in palette */
png_uint_16 num_trans; /* number of transparency values */
png_byte chunk_name[5]; /* null-terminated name of current chunk */
png_byte compression; /* file compression type (always 0) */
png_byte filter; /* file filter type (always 0) */
png_byte interlaced; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
png_byte pass; /* current interlace pass (0 - 6) */
png_byte do_filter; /* row filter flags (see PNG_FILTER_ below ) */
png_byte color_type; /* color type of file */
png_byte bit_depth; /* bit depth of file */
png_byte usr_bit_depth; /* bit depth of users row */
png_byte pixel_depth; /* number of bits per pixel */
png_byte channels; /* number of channels in file */
png_byte usr_channels; /* channels at start of write */
png_byte sig_bytes; /* magic bytes read/written from start of file */
#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
png_uint_16 filler; /* filler bytes for pixel expansion */
#endif
#ifdef PNG_bKGD_SUPPORTED
png_byte background_gamma_type;
png_fixed_point background_gamma;
png_color_16 background; /* background color in screen gamma space */
#ifdef PNG_READ_GAMMA_SUPPORTED
png_color_16 background_1; /* background normalized to gamma 1.0 */
#endif
#endif /* PNG_bKGD_SUPPORTED */
#ifdef PNG_WRITE_FLUSH_SUPPORTED
png_flush_ptr output_flush_fn; /* Function for flushing output */
png_uint_32 flush_dist; /* how many rows apart to flush, 0 - no flush */
png_uint_32 flush_rows; /* number of rows written since last flush */
#endif
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
int gamma_shift; /* number of "insignificant" bits in 16-bit gamma */
png_fixed_point gamma; /* file gamma value */
png_fixed_point screen_gamma; /* screen gamma value (display_exponent) */
#endif
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
png_bytep gamma_table; /* gamma table for 8-bit depth files */
png_bytep gamma_from_1; /* converts from 1.0 to screen */
png_bytep gamma_to_1; /* converts from file to 1.0 */
png_uint_16pp gamma_16_table; /* gamma table for 16-bit depth files */
png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */
png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */
#endif
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED)
png_color_8 sig_bit; /* significant bits in each available channel */
#endif
#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
png_color_8 shift; /* shift for significant bit tranformation */
#endif
#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \
|| defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
png_bytep trans_alpha; /* alpha values for paletted files */
png_color_16 trans_color; /* transparent color for non-paletted files */
#endif
png_read_status_ptr read_row_fn; /* called after each row is decoded */
png_write_status_ptr write_row_fn; /* called after each row is encoded */
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
png_progressive_info_ptr info_fn; /* called after header data fully read */
png_progressive_row_ptr row_fn; /* called after a prog. row is decoded */
png_progressive_end_ptr end_fn; /* called after image is complete */
png_bytep save_buffer_ptr; /* current location in save_buffer */
png_bytep save_buffer; /* buffer for previously read data */
png_bytep current_buffer_ptr; /* current location in current_buffer */
png_bytep current_buffer; /* buffer for recently used data */
png_uint_32 push_length; /* size of current input chunk */
png_uint_32 skip_length; /* bytes to skip in input data */
png_size_t save_buffer_size; /* amount of data now in save_buffer */
png_size_t save_buffer_max; /* total size of save_buffer */
png_size_t buffer_size; /* total amount of available input data */
png_size_t current_buffer_size; /* amount of data now in current_buffer */
int process_mode; /* what push library is currently doing */
int cur_palette; /* current push library palette index */
# ifdef PNG_TEXT_SUPPORTED
png_size_t current_text_size; /* current size of text input data */
png_size_t current_text_left; /* how much text left to read in input */
png_charp current_text; /* current text chunk buffer */
png_charp current_text_ptr; /* current location in current_text */
# endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
/* For the Borland special 64K segment handler */
png_bytepp offset_table_ptr;
png_bytep offset_table;
png_uint_16 offset_table_number;
png_uint_16 offset_table_count;
png_uint_16 offset_table_count_free;
#endif
#ifdef PNG_READ_QUANTIZE_SUPPORTED
png_bytep palette_lookup; /* lookup table for quantizing */
png_bytep quantize_index; /* index translation for palette files */
#endif
#if defined(PNG_READ_QUANTIZE_SUPPORTED) || defined(PNG_hIST_SUPPORTED)
png_uint_16p hist; /* histogram */
#endif
#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
png_byte heuristic_method; /* heuristic for row filter selection */
png_byte num_prev_filters; /* number of weights for previous rows */
png_bytep prev_filters; /* filter type(s) of previous row(s) */
png_uint_16p filter_weights; /* weight(s) for previous line(s) */
png_uint_16p inv_filter_weights; /* 1/weight(s) for previous line(s) */
png_uint_16p filter_costs; /* relative filter calculation cost */
png_uint_16p inv_filter_costs; /* 1/relative filter calculation cost */
#endif
#ifdef PNG_TIME_RFC1123_SUPPORTED
png_charp time_buffer; /* String to hold RFC 1123 time text */
#endif
/* New members added in libpng-1.0.6 */
png_uint_32 free_me; /* flags items libpng is responsible for freeing */
#ifdef PNG_USER_CHUNKS_SUPPORTED
png_voidp user_chunk_ptr;
png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */
#endif
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
int num_chunk_list;
png_bytep chunk_list;
#endif
/* New members added in libpng-1.0.3 */
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
png_byte rgb_to_gray_status;
/* These were changed from png_byte in libpng-1.0.6 */
png_uint_16 rgb_to_gray_red_coeff;
png_uint_16 rgb_to_gray_green_coeff;
png_uint_16 rgb_to_gray_blue_coeff;
#endif
/* New member added in libpng-1.0.4 (renamed in 1.0.9) */
#if defined(PNG_MNG_FEATURES_SUPPORTED) || \
defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
/* Changed from png_byte to png_uint_32 at version 1.2.0 */
png_uint_32 mng_features_permitted;
#endif
/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */
#ifdef PNG_MNG_FEATURES_SUPPORTED
png_byte filter_type;
#endif
/* New members added in libpng-1.2.0 */
/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */
#ifdef PNG_USER_MEM_SUPPORTED
png_voidp mem_ptr; /* user supplied struct for mem functions */
png_malloc_ptr malloc_fn; /* function for allocating memory */
png_free_ptr free_fn; /* function for freeing memory */
#endif
/* New member added in libpng-1.0.13 and 1.2.0 */
png_bytep big_row_buf; /* buffer to save current (unfiltered) row */
#ifdef PNG_READ_QUANTIZE_SUPPORTED
/* The following three members were added at version 1.0.14 and 1.2.4 */
png_bytep quantize_sort; /* working sort array */
png_bytep index_to_palette; /* where the original index currently is
in the palette */
png_bytep palette_to_index; /* which original index points to this
palette color */
#endif
/* New members added in libpng-1.0.16 and 1.2.6 */
png_byte compression_type;
#ifdef PNG_USER_LIMITS_SUPPORTED
png_uint_32 user_width_max;
png_uint_32 user_height_max;
/* Added in libpng-1.4.0: Total number of sPLT, text, and unknown
* chunks that can be stored (0 means unlimited).
*/
png_uint_32 user_chunk_cache_max;
/* Total memory that a zTXt, sPLT, iTXt, iCCP, or unknown chunk
* can occupy when decompressed. 0 means unlimited.
*/
png_alloc_size_t user_chunk_malloc_max;
#endif
/* New member added in libpng-1.0.25 and 1.2.17 */
#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
/* Storage for unknown chunk that the library doesn't recognize. */
png_unknown_chunk unknown_chunk;
#endif
/* New members added in libpng-1.2.26 */
png_size_t old_big_row_buf_size;
png_size_t old_prev_row_size;
/* New member added in libpng-1.2.30 */
png_charp chunkdata; /* buffer for reading chunk data */
#ifdef PNG_IO_STATE_SUPPORTED
/* New member added in libpng-1.4.0 */
png_uint_32 io_state;
#endif
};
#endif /* PNGSTRUCT_H */

617
pngtest.c

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

@@ -1,8 +1,8 @@
/* pngtrans.c - transforms the data in a row (used by both readers and writers) /* pngtrans.c - transforms the data in a row (used by both readers and writers)
* *
* Last changed in libpng 1.5.2 [March 31, 2011] * Last changed in libpng 1.2.36 [May 14, 2009]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
* *
@@ -11,8 +11,8 @@
* and license in png.h * and license in png.h
*/ */
#include "pngpriv.h" #define PNG_INTERNAL
#include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
@@ -21,10 +21,8 @@ void PNGAPI
png_set_bgr(png_structp png_ptr) png_set_bgr(png_structp png_ptr)
{ {
png_debug(1, "in png_set_bgr"); png_debug(1, "in png_set_bgr");
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
png_ptr->transformations |= PNG_BGR; png_ptr->transformations |= PNG_BGR;
} }
#endif #endif
@@ -35,10 +33,8 @@ void PNGAPI
png_set_swap(png_structp png_ptr) png_set_swap(png_structp png_ptr)
{ {
png_debug(1, "in png_set_swap"); png_debug(1, "in png_set_swap");
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
if (png_ptr->bit_depth == 16) if (png_ptr->bit_depth == 16)
png_ptr->transformations |= PNG_SWAP_BYTES; png_ptr->transformations |= PNG_SWAP_BYTES;
} }
@@ -50,10 +46,8 @@ void PNGAPI
png_set_packing(png_structp png_ptr) png_set_packing(png_structp png_ptr)
{ {
png_debug(1, "in png_set_packing"); png_debug(1, "in png_set_packing");
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
if (png_ptr->bit_depth < 8) if (png_ptr->bit_depth < 8)
{ {
png_ptr->transformations |= PNG_PACK; png_ptr->transformations |= PNG_PACK;
@@ -68,10 +62,8 @@ void PNGAPI
png_set_packswap(png_structp png_ptr) png_set_packswap(png_structp png_ptr)
{ {
png_debug(1, "in png_set_packswap"); png_debug(1, "in png_set_packswap");
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
if (png_ptr->bit_depth < 8) if (png_ptr->bit_depth < 8)
png_ptr->transformations |= PNG_PACKSWAP; png_ptr->transformations |= PNG_PACKSWAP;
} }
@@ -79,13 +71,11 @@ png_set_packswap(png_structp png_ptr)
#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) #if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
void PNGAPI void PNGAPI
png_set_shift(png_structp png_ptr, png_const_color_8p true_bits) png_set_shift(png_structp png_ptr, png_color_8p true_bits)
{ {
png_debug(1, "in png_set_shift"); png_debug(1, "in png_set_shift");
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
png_ptr->transformations |= PNG_SHIFT; png_ptr->transformations |= PNG_SHIFT;
png_ptr->shift = *true_bits; png_ptr->shift = *true_bits;
} }
@@ -97,7 +87,6 @@ int PNGAPI
png_set_interlace_handling(png_structp png_ptr) png_set_interlace_handling(png_structp png_ptr)
{ {
png_debug(1, "in png_set_interlace handling"); png_debug(1, "in png_set_interlace handling");
if (png_ptr && png_ptr->interlaced) if (png_ptr && png_ptr->interlaced)
{ {
png_ptr->transformations |= PNG_INTERLACE; png_ptr->transformations |= PNG_INTERLACE;
@@ -118,16 +107,12 @@ void PNGAPI
png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc) png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc)
{ {
png_debug(1, "in png_set_filler"); png_debug(1, "in png_set_filler");
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
png_ptr->transformations |= PNG_FILLER; png_ptr->transformations |= PNG_FILLER;
png_ptr->filler = (png_uint_16)filler; png_ptr->filler = (png_byte)filler;
if (filler_loc == PNG_FILLER_AFTER) if (filler_loc == PNG_FILLER_AFTER)
png_ptr->flags |= PNG_FLAG_FILLER_AFTER; png_ptr->flags |= PNG_FLAG_FILLER_AFTER;
else else
png_ptr->flags &= ~PNG_FLAG_FILLER_AFTER; png_ptr->flags &= ~PNG_FLAG_FILLER_AFTER;
@@ -142,7 +127,7 @@ png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc)
} }
/* Also I added this in libpng-1.0.2a (what happens when we expand /* Also I added this in libpng-1.0.2a (what happens when we expand
* a less-than-8-bit grayscale to GA?) */ * a less-than-8-bit grayscale to GA? */
if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY && png_ptr->bit_depth >= 8) if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY && png_ptr->bit_depth >= 8)
{ {
@@ -150,18 +135,18 @@ png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc)
} }
} }
#if !defined(PNG_1_0_X)
/* Added to libpng-1.2.7 */ /* Added to libpng-1.2.7 */
void PNGAPI void PNGAPI
png_set_add_alpha(png_structp png_ptr, png_uint_32 filler, int filler_loc) png_set_add_alpha(png_structp png_ptr, png_uint_32 filler, int filler_loc)
{ {
png_debug(1, "in png_set_add_alpha"); png_debug(1, "in png_set_add_alpha");
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
png_set_filler(png_ptr, filler, filler_loc); png_set_filler(png_ptr, filler, filler_loc);
png_ptr->transformations |= PNG_ADD_ALPHA; png_ptr->transformations |= PNG_ADD_ALPHA;
} }
#endif
#endif #endif
@@ -171,10 +156,8 @@ void PNGAPI
png_set_swap_alpha(png_structp png_ptr) png_set_swap_alpha(png_structp png_ptr)
{ {
png_debug(1, "in png_set_swap_alpha"); png_debug(1, "in png_set_swap_alpha");
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
png_ptr->transformations |= PNG_SWAP_ALPHA; png_ptr->transformations |= PNG_SWAP_ALPHA;
} }
#endif #endif
@@ -185,10 +168,8 @@ void PNGAPI
png_set_invert_alpha(png_structp png_ptr) png_set_invert_alpha(png_structp png_ptr)
{ {
png_debug(1, "in png_set_invert_alpha"); png_debug(1, "in png_set_invert_alpha");
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
png_ptr->transformations |= PNG_INVERT_ALPHA; png_ptr->transformations |= PNG_INVERT_ALPHA;
} }
#endif #endif
@@ -198,10 +179,8 @@ void PNGAPI
png_set_invert_mono(png_structp png_ptr) png_set_invert_mono(png_structp png_ptr)
{ {
png_debug(1, "in png_set_invert_mono"); png_debug(1, "in png_set_invert_mono");
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
png_ptr->transformations |= PNG_INVERT_MONO; png_ptr->transformations |= PNG_INVERT_MONO;
} }
@@ -210,15 +189,18 @@ void /* PRIVATE */
png_do_invert(png_row_infop row_info, png_bytep row) png_do_invert(png_row_infop row_info, png_bytep row)
{ {
png_debug(1, "in png_do_invert"); png_debug(1, "in png_do_invert");
/* This test removed from libpng version 1.0.13 and 1.2.0: /* This test removed from libpng version 1.0.13 and 1.2.0:
* if (row_info->bit_depth == 1 && * if (row_info->bit_depth == 1 &&
*/ */
#if defined(PNG_USELESS_TESTS_SUPPORTED)
if (row == NULL || row_info == NULL)
return;
#endif
if (row_info->color_type == PNG_COLOR_TYPE_GRAY) if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
{ {
png_bytep rp = row; png_bytep rp = row;
png_size_t i; png_uint_32 i;
png_size_t istop = row_info->rowbytes; png_uint_32 istop = row_info->rowbytes;
for (i = 0; i < istop; i++) for (i = 0; i < istop; i++)
{ {
@@ -226,49 +208,47 @@ png_do_invert(png_row_infop row_info, png_bytep row)
rp++; rp++;
} }
} }
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA && else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
row_info->bit_depth == 8) row_info->bit_depth == 8)
{ {
png_bytep rp = row; png_bytep rp = row;
png_size_t i; png_uint_32 i;
png_size_t istop = row_info->rowbytes; png_uint_32 istop = row_info->rowbytes;
for (i = 0; i < istop; i += 2) for (i = 0; i < istop; i+=2)
{ {
*rp = (png_byte)(~(*rp)); *rp = (png_byte)(~(*rp));
rp += 2; rp+=2;
} }
} }
#ifdef PNG_16BIT_SUPPORTED
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA && else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
row_info->bit_depth == 16) row_info->bit_depth == 16)
{ {
png_bytep rp = row; png_bytep rp = row;
png_size_t i; png_uint_32 i;
png_size_t istop = row_info->rowbytes; png_uint_32 istop = row_info->rowbytes;
for (i = 0; i < istop; i += 4) for (i = 0; i < istop; i+=4)
{ {
*rp = (png_byte)(~(*rp)); *rp = (png_byte)(~(*rp));
*(rp + 1) = (png_byte)(~(*(rp + 1))); *(rp+1) = (png_byte)(~(*(rp+1)));
rp += 4; rp+=4;
} }
} }
#endif
} }
#endif #endif
#ifdef PNG_16BIT_SUPPORTED
#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
/* Swaps byte order on 16 bit depth images */ /* Swaps byte order on 16 bit depth images */
void /* PRIVATE */ void /* PRIVATE */
png_do_swap(png_row_infop row_info, png_bytep row) png_do_swap(png_row_infop row_info, png_bytep row)
{ {
png_debug(1, "in png_do_swap"); png_debug(1, "in png_do_swap");
if (
if (row_info->bit_depth == 16) #if defined(PNG_USELESS_TESTS_SUPPORTED)
row != NULL && row_info != NULL &&
#endif
row_info->bit_depth == 16)
{ {
png_bytep rp = row; png_bytep rp = row;
png_uint_32 i; png_uint_32 i;
@@ -283,7 +263,6 @@ png_do_swap(png_row_infop row_info, png_bytep row)
} }
} }
#endif #endif
#endif
#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED) #if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED)
static PNG_CONST png_byte onebppswaptable[256] = { static PNG_CONST png_byte onebppswaptable[256] = {
@@ -396,23 +375,22 @@ void /* PRIVATE */
png_do_packswap(png_row_infop row_info, png_bytep row) png_do_packswap(png_row_infop row_info, png_bytep row)
{ {
png_debug(1, "in png_do_packswap"); png_debug(1, "in png_do_packswap");
if (
if (row_info->bit_depth < 8) #if defined(PNG_USELESS_TESTS_SUPPORTED)
row != NULL && row_info != NULL &&
#endif
row_info->bit_depth < 8)
{ {
png_bytep rp; png_bytep rp, end, table;
png_const_bytep end, table;
end = row + row_info->rowbytes; end = row + row_info->rowbytes;
if (row_info->bit_depth == 1) if (row_info->bit_depth == 1)
table = onebppswaptable; table = (png_bytep)onebppswaptable;
else if (row_info->bit_depth == 2) else if (row_info->bit_depth == 2)
table = twobppswaptable; table = (png_bytep)twobppswaptable;
else if (row_info->bit_depth == 4) else if (row_info->bit_depth == 4)
table = fourbppswaptable; table = (png_bytep)fourbppswaptable;
else else
return; return;
@@ -424,115 +402,160 @@ png_do_packswap(png_row_infop row_info, png_bytep row)
#if defined(PNG_WRITE_FILLER_SUPPORTED) || \ #if defined(PNG_WRITE_FILLER_SUPPORTED) || \
defined(PNG_READ_STRIP_ALPHA_SUPPORTED) defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
/* Remove a channel - this used to be 'png_do_strip_filler' but it used a /* Remove filler or alpha byte(s) */
* somewhat weird combination of flags to determine what to do. All the calls
* to png_do_strip_filler are changed in 1.5.2 to call this instead with the
* correct arguments.
*
* The routine isn't general - the channel must be the channel at the start or
* end (not in the middle) of each pixel.
*/
void /* PRIVATE */ void /* PRIVATE */
png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start) png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags)
{ {
png_bytep sp = row; /* source pointer */ png_debug(1, "in png_do_strip_filler");
png_bytep dp = row; /* destination pointer */ #if defined(PNG_USELESS_TESTS_SUPPORTED)
png_bytep ep = row + row_info->rowbytes; /* One beyond end of row */ if (row != NULL && row_info != NULL)
#endif
/* At the start sp will point to the first byte to copy and dp to where
* it is copied to. ep always points just beyond the end of the row, so
* the loop simply copies (channels-1) channels until sp reaches ep.
*/
/* GA, GX, XG cases */
if (row_info->channels == 2)
{ {
if (row_info->bit_depth == 8) png_bytep sp=row;
png_bytep dp=row;
png_uint_32 row_width=row_info->width;
png_uint_32 i;
if ((row_info->color_type == PNG_COLOR_TYPE_RGB ||
(row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA &&
(flags & PNG_FLAG_STRIP_ALPHA))) &&
row_info->channels == 4)
{ {
if (at_start) /* Skip initial filler */ if (row_info->bit_depth == 8)
++sp;
else /* Skip initial channels and, for sp, the filler */
sp += 2, ++dp;
/* For a 1 pixel wide image there is nothing to do */
while (sp < ep)
*dp++ = *sp, sp += 2;
row_info->pixel_depth = 8;
}
else if (row_info->bit_depth == 16)
{
if (at_start)
sp += 2;
else
sp += 4, dp += 2;
while (sp < ep)
*dp++ = *sp++, *dp++ = *sp, sp += 3;
row_info->pixel_depth = 16;
}
else
return; /* bad bit depth */
row_info->channels = 1;
/* Finally fix the color type if it records an alpha channel */
if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
row_info->color_type = PNG_COLOR_TYPE_GRAY;
}
/* RGBA, RGBX, XRGB cases */
else if (row_info->channels == 4)
{
if (row_info->bit_depth == 8)
{
if (at_start) /* Skip initial filler */
++sp;
else /* Skip initial channels and, for sp, the filler */
sp += 4, dp += 3;
/* Note that the loop adds 3 to dp and 4 to sp each time. */
while (sp < ep)
*dp++ = *sp++, *dp++ = *sp++, *dp++ = *sp, sp += 2;
row_info->pixel_depth = 24;
}
else if (row_info->bit_depth == 16)
{
if (at_start)
sp += 2;
else
sp += 8, dp += 6;
while (sp < ep)
{ {
/* Copy 6 bytes, skip 2 */ /* This converts from RGBX or RGBA to RGB */
*dp++ = *sp++, *dp++ = *sp++; if (flags & PNG_FLAG_FILLER_AFTER)
*dp++ = *sp++, *dp++ = *sp++; {
*dp++ = *sp++, *dp++ = *sp, sp += 3; dp+=3; sp+=4;
for (i = 1; i < row_width; i++)
{
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
sp++;
}
}
/* This converts from XRGB or ARGB to RGB */
else
{
for (i = 0; i < row_width; i++)
{
sp++;
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
}
}
row_info->pixel_depth = 24;
row_info->rowbytes = row_width * 3;
} }
else /* if (row_info->bit_depth == 16) */
{
if (flags & PNG_FLAG_FILLER_AFTER)
{
/* This converts from RRGGBBXX or RRGGBBAA to RRGGBB */
sp += 8; dp += 6;
for (i = 1; i < row_width; i++)
{
/* This could be (although png_memcpy is probably slower):
png_memcpy(dp, sp, 6);
sp += 8;
dp += 6;
*/
row_info->pixel_depth = 48; *dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
sp += 2;
}
}
else
{
/* This converts from XXRRGGBB or AARRGGBB to RRGGBB */
for (i = 0; i < row_width; i++)
{
/* This could be (although png_memcpy is probably slower):
png_memcpy(dp, sp, 6);
sp += 8;
dp += 6;
*/
sp+=2;
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
}
}
row_info->pixel_depth = 48;
row_info->rowbytes = row_width * 6;
}
row_info->channels = 3;
} }
else if ((row_info->color_type == PNG_COLOR_TYPE_GRAY ||
else (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
return; /* bad bit depth */ (flags & PNG_FLAG_STRIP_ALPHA))) &&
row_info->channels == 2)
row_info->channels = 3; {
if (row_info->bit_depth == 8)
/* Finally fix the color type if it records an alpha channel */ {
if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) /* This converts from GX or GA to G */
row_info->color_type = PNG_COLOR_TYPE_RGB; if (flags & PNG_FLAG_FILLER_AFTER)
{
for (i = 0; i < row_width; i++)
{
*dp++ = *sp++;
sp++;
}
}
/* This converts from XG or AG to G */
else
{
for (i = 0; i < row_width; i++)
{
sp++;
*dp++ = *sp++;
}
}
row_info->pixel_depth = 8;
row_info->rowbytes = row_width;
}
else /* if (row_info->bit_depth == 16) */
{
if (flags & PNG_FLAG_FILLER_AFTER)
{
/* This converts from GGXX or GGAA to GG */
sp += 4; dp += 2;
for (i = 1; i < row_width; i++)
{
*dp++ = *sp++;
*dp++ = *sp++;
sp += 2;
}
}
else
{
/* This converts from XXGG or AAGG to GG */
for (i = 0; i < row_width; i++)
{
sp += 2;
*dp++ = *sp++;
*dp++ = *sp++;
}
}
row_info->pixel_depth = 16;
row_info->rowbytes = row_width * 2;
}
row_info->channels = 1;
}
if (flags & PNG_FLAG_STRIP_ALPHA)
row_info->color_type &= ~PNG_COLOR_MASK_ALPHA;
} }
else
return; /* The filler channel has gone already */
/* Fix the rowbytes value. */
row_info->rowbytes = dp-row;
} }
#endif #endif
@@ -542,8 +565,11 @@ void /* PRIVATE */
png_do_bgr(png_row_infop row_info, png_bytep row) png_do_bgr(png_row_infop row_info, png_bytep row)
{ {
png_debug(1, "in png_do_bgr"); png_debug(1, "in png_do_bgr");
if (
if ((row_info->color_type & PNG_COLOR_MASK_COLOR)) #if defined(PNG_USELESS_TESTS_SUPPORTED)
row != NULL && row_info != NULL &&
#endif
(row_info->color_type & PNG_COLOR_MASK_COLOR))
{ {
png_uint_32 row_width = row_info->width; png_uint_32 row_width = row_info->width;
if (row_info->bit_depth == 8) if (row_info->bit_depth == 8)
@@ -560,7 +586,6 @@ png_do_bgr(png_row_infop row_info, png_bytep row)
*(rp + 2) = save; *(rp + 2) = save;
} }
} }
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
{ {
png_bytep rp; png_bytep rp;
@@ -574,8 +599,6 @@ png_do_bgr(png_row_infop row_info, png_bytep row)
} }
} }
} }
#ifdef PNG_16BIT_SUPPORTED
else if (row_info->bit_depth == 16) else if (row_info->bit_depth == 16)
{ {
if (row_info->color_type == PNG_COLOR_TYPE_RGB) if (row_info->color_type == PNG_COLOR_TYPE_RGB)
@@ -593,7 +616,6 @@ png_do_bgr(png_row_infop row_info, png_bytep row)
*(rp + 5) = save; *(rp + 5) = save;
} }
} }
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
{ {
png_bytep rp; png_bytep rp;
@@ -610,25 +632,29 @@ png_do_bgr(png_row_infop row_info, png_bytep row)
} }
} }
} }
#endif
} }
} }
#endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */ #endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
defined(PNG_LEGACY_SUPPORTED) || \
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
void PNGAPI void PNGAPI
png_set_user_transform_info(png_structp png_ptr, png_voidp png_set_user_transform_info(png_structp png_ptr, png_voidp
user_transform_ptr, int user_transform_depth, int user_transform_channels) user_transform_ptr, int user_transform_depth, int user_transform_channels)
{ {
png_debug(1, "in png_set_user_transform_info"); png_debug(1, "in png_set_user_transform_info");
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
png_ptr->user_transform_ptr = user_transform_ptr; png_ptr->user_transform_ptr = user_transform_ptr;
png_ptr->user_transform_depth = (png_byte)user_transform_depth; png_ptr->user_transform_depth = (png_byte)user_transform_depth;
png_ptr->user_transform_channels = (png_byte)user_transform_channels; png_ptr->user_transform_channels = (png_byte)user_transform_channels;
#else
if (user_transform_ptr || user_transform_depth || user_transform_channels)
png_warning(png_ptr,
"This version of libpng does not support user transform info");
#endif
} }
#endif #endif
@@ -637,38 +663,15 @@ png_set_user_transform_info(png_structp png_ptr, png_voidp
* associated with this pointer before png_write_destroy and png_read_destroy * associated with this pointer before png_write_destroy and png_read_destroy
* are called. * are called.
*/ */
#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
png_voidp PNGAPI png_voidp PNGAPI
png_get_user_transform_ptr(png_const_structp png_ptr) png_get_user_transform_ptr(png_structp png_ptr)
{ {
if (png_ptr == NULL) if (png_ptr == NULL)
return (NULL); return (NULL);
#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
return ((png_voidp)png_ptr->user_transform_ptr); return ((png_voidp)png_ptr->user_transform_ptr);
} #else
return (NULL);
#endif #endif
#ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED
png_uint_32 PNGAPI
png_get_current_row_number(png_const_structp png_ptr)
{
/* See the comments in png.h - this is the sub-image row when reading and
* interlaced image.
*/
if (png_ptr != NULL)
return png_ptr->row_number;
return PNG_UINT_32_MAX; /* help the app not to fail silently */
} }
png_byte PNGAPI
png_get_current_pass_number(png_const_structp png_ptr)
{
if (png_ptr != NULL)
return png_ptr->pass;
return 8; /* invalid */
}
#endif /* PNG_USER_TRANSFORM_INFO_SUPPORTED */
#endif /* PNG_READ_USER_TRANSFORM_SUPPORTED ||
PNG_WRITE_USER_TRANSFORM_SUPPORTED */
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ #endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */

6709
pngvalid.c

File diff suppressed because it is too large Load Diff

1
pngvcrd.c Normal file
View File

@@ -0,0 +1 @@
/* pnggvrd.c was removed from libpng-1.2.20. */

View File

@@ -1,8 +1,8 @@
/* pngwio.c - functions for data output /* pngwio.c - functions for data output
* *
* Last changed in libpng 1.5.0 [January 6, 2011] * Last changed in libpng 1.2.37 [June 4, 2009]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
* *
@@ -18,8 +18,8 @@
* them at run time with png_set_write_fn(...). * them at run time with png_set_write_fn(...).
*/ */
#include "pngpriv.h" #define PNG_INTERNAL
#include "png.h"
#ifdef PNG_WRITE_SUPPORTED #ifdef PNG_WRITE_SUPPORTED
/* Write the data to whatever output you are using. The default routine /* Write the data to whatever output you are using. The default routine
@@ -30,33 +30,34 @@
*/ */
void /* PRIVATE */ void /* PRIVATE */
png_write_data(png_structp png_ptr, png_const_bytep data, png_size_t length) png_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
{ {
/* NOTE: write_data_fn must not change the buffer! */
if (png_ptr->write_data_fn != NULL ) if (png_ptr->write_data_fn != NULL )
(*(png_ptr->write_data_fn))(png_ptr, (png_bytep)data, length); (*(png_ptr->write_data_fn))(png_ptr, data, length);
else else
png_error(png_ptr, "Call to NULL write function"); png_error(png_ptr, "Call to NULL write function");
} }
#ifdef PNG_STDIO_SUPPORTED #if !defined(PNG_NO_STDIO)
/* This is the function that does the actual writing of data. If you are /* This is the function that does the actual writing of data. If you are
* not writing to a standard C stream, you should create a replacement * not writing to a standard C stream, you should create a replacement
* write_data function and use it at run time with png_set_write_fn(), rather * write_data function and use it at run time with png_set_write_fn(), rather
* than changing the library. * than changing the library.
*/ */
#ifndef USE_FAR_KEYWORD #ifndef USE_FAR_KEYWORD
void PNGCBAPI void PNGAPI
png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
{ {
png_size_t check; png_uint_32 check;
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
#if defined(_WIN32_WCE)
if ( !WriteFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
check = 0;
#else
check = fwrite(data, 1, length, (png_FILE_p)(png_ptr->io_ptr)); check = fwrite(data, 1, length, (png_FILE_p)(png_ptr->io_ptr));
#endif
if (check != length) if (check != length)
png_error(png_ptr, "Write Error"); png_error(png_ptr, "Write Error");
} }
@@ -69,7 +70,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
#define NEAR_BUF_SIZE 1024 #define NEAR_BUF_SIZE 1024
#define MIN(a,b) (a <= b ? a : b) #define MIN(a,b) (a <= b ? a : b)
void PNGCBAPI void PNGAPI
png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
{ {
png_uint_32 check; png_uint_32 check;
@@ -78,29 +79,34 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
/* Check if data really is near. If so, use usual code. */ /* Check if data really is near. If so, use usual code. */
near_data = (png_byte *)CVT_PTR_NOCHECK(data); near_data = (png_byte *)CVT_PTR_NOCHECK(data);
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
if ((png_bytep)near_data == data) if ((png_bytep)near_data == data)
{ {
#if defined(_WIN32_WCE)
if ( !WriteFile(io_ptr, near_data, length, &check, NULL) )
check = 0;
#else
check = fwrite(near_data, 1, length, io_ptr); check = fwrite(near_data, 1, length, io_ptr);
#endif
} }
else else
{ {
png_byte buf[NEAR_BUF_SIZE]; png_byte buf[NEAR_BUF_SIZE];
png_size_t written, remaining, err; png_size_t written, remaining, err;
check = 0; check = 0;
remaining = length; remaining = length;
do do
{ {
written = MIN(NEAR_BUF_SIZE, remaining); written = MIN(NEAR_BUF_SIZE, remaining);
png_memcpy(buf, data, written); /* Copy far buffer to near buffer */ png_memcpy(buf, data, written); /* Copy far buffer to near buffer */
#if defined(_WIN32_WCE)
if ( !WriteFile(io_ptr, buf, written, &err, NULL) )
err = 0;
#else
err = fwrite(buf, 1, written, io_ptr); err = fwrite(buf, 1, written, io_ptr);
#endif
if (err != written) if (err != written)
break; break;
@@ -112,7 +118,6 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
} }
while (remaining != 0); while (remaining != 0);
} }
if (check != length) if (check != length)
png_error(png_ptr, "Write Error"); png_error(png_ptr, "Write Error");
} }
@@ -124,7 +129,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
* to disk). After png_flush is called, there should be no data pending * to disk). After png_flush is called, there should be no data pending
* writing in any buffers. * writing in any buffers.
*/ */
#ifdef PNG_WRITE_FLUSH_SUPPORTED #if defined(PNG_WRITE_FLUSH_SUPPORTED)
void /* PRIVATE */ void /* PRIVATE */
png_flush(png_structp png_ptr) png_flush(png_structp png_ptr)
{ {
@@ -132,19 +137,21 @@ png_flush(png_structp png_ptr)
(*(png_ptr->output_flush_fn))(png_ptr); (*(png_ptr->output_flush_fn))(png_ptr);
} }
# ifdef PNG_STDIO_SUPPORTED #if !defined(PNG_NO_STDIO)
void PNGCBAPI void PNGAPI
png_default_flush(png_structp png_ptr) png_default_flush(png_structp png_ptr)
{ {
#if !defined(_WIN32_WCE)
png_FILE_p io_ptr; png_FILE_p io_ptr;
#endif
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
#if !defined(_WIN32_WCE)
io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr)); io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
fflush(io_ptr); fflush(io_ptr);
#endif
} }
# endif #endif
#endif #endif
/* This function allows the application to supply new output functions for /* This function allows the application to supply new output functions for
@@ -166,7 +173,7 @@ png_default_flush(png_structp png_ptr)
* arguments a pointer to a png_struct. After a call to * arguments a pointer to a png_struct. After a call to
* the flush function, there should be no data in any buffers * the flush function, there should be no data in any buffers
* or pending transmission. If the output method doesn't do * or pending transmission. If the output method doesn't do
* any buffering of output, a function prototype must still be * any buffering of ouput, a function prototype must still be
* supplied although it doesn't have to do anything. If * supplied although it doesn't have to do anything. If
* PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile * PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile
* time, output_flush_fn will be ignored, although it must be * time, output_flush_fn will be ignored, although it must be
@@ -178,14 +185,14 @@ png_default_flush(png_structp png_ptr)
*/ */
void PNGAPI void PNGAPI
png_set_write_fn(png_structp png_ptr, png_voidp io_ptr, png_set_write_fn(png_structp png_ptr, png_voidp io_ptr,
png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn) png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)
{ {
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
png_ptr->io_ptr = io_ptr; png_ptr->io_ptr = io_ptr;
#ifdef PNG_STDIO_SUPPORTED #if !defined(PNG_NO_STDIO)
if (write_data_fn != NULL) if (write_data_fn != NULL)
png_ptr->write_data_fn = write_data_fn; png_ptr->write_data_fn = write_data_fn;
@@ -195,33 +202,31 @@ png_set_write_fn(png_structp png_ptr, png_voidp io_ptr,
png_ptr->write_data_fn = write_data_fn; png_ptr->write_data_fn = write_data_fn;
#endif #endif
#ifdef PNG_WRITE_FLUSH_SUPPORTED #if defined(PNG_WRITE_FLUSH_SUPPORTED)
# ifdef PNG_STDIO_SUPPORTED #if !defined(PNG_NO_STDIO)
if (output_flush_fn != NULL) if (output_flush_fn != NULL)
png_ptr->output_flush_fn = output_flush_fn; png_ptr->output_flush_fn = output_flush_fn;
else else
png_ptr->output_flush_fn = png_default_flush; png_ptr->output_flush_fn = png_default_flush;
#else
# else
png_ptr->output_flush_fn = output_flush_fn; png_ptr->output_flush_fn = output_flush_fn;
# endif #endif
#endif /* PNG_WRITE_FLUSH_SUPPORTED */ #endif /* PNG_WRITE_FLUSH_SUPPORTED */
/* It is an error to read while writing a png file */ /* It is an error to read while writing a png file */
if (png_ptr->read_data_fn != NULL) if (png_ptr->read_data_fn != NULL)
{ {
png_ptr->read_data_fn = NULL; png_ptr->read_data_fn = NULL;
png_warning(png_ptr, png_warning(png_ptr,
"Can't set both read_data_fn and write_data_fn in the" "Attempted to set both read_data_fn and write_data_fn in");
" same structure"); png_warning(png_ptr,
"the same structure. Resetting read_data_fn to NULL.");
} }
} }
#ifdef USE_FAR_KEYWORD #if defined(USE_FAR_KEYWORD)
# ifdef _MSC_VER #if defined(_MSC_VER)
void *png_far_to_near(png_structp png_ptr, png_voidp ptr, int check) void *png_far_to_near(png_structp png_ptr, png_voidp ptr, int check)
{ {
void *near_ptr; void *near_ptr;
@@ -249,6 +254,6 @@ void *png_far_to_near(png_structp png_ptr, png_voidp ptr, int check)
return(near_ptr); return(near_ptr);
} }
# endif # endif
#endif # endif
#endif /* PNG_WRITE_SUPPORTED */ #endif /* PNG_WRITE_SUPPORTED */

1080
pngwrite.c

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
/* pngwtran.c - transforms the data in a row for PNG writers /* pngwtran.c - transforms the data in a row for PNG writers
* *
* Last changed in libpng 1.5.2 [March 31, 2011] * Last changed in libpng 1.2.37 [June 4, 2009]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
* *
@@ -11,8 +11,8 @@
* and license in png.h * and license in png.h
*/ */
#include "pngpriv.h" #define PNG_INTERNAL
#include "png.h"
#ifdef PNG_WRITE_SUPPORTED #ifdef PNG_WRITE_SUPPORTED
/* Transform the data according to the user's wishes. The order of /* Transform the data according to the user's wishes. The order of
@@ -26,72 +26,62 @@ png_do_write_transformations(png_structp png_ptr)
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED #if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
if (png_ptr->transformations & PNG_USER_TRANSFORM) if (png_ptr->transformations & PNG_USER_TRANSFORM)
if (png_ptr->write_user_transform_fn != NULL) if (png_ptr->write_user_transform_fn != NULL)
(*(png_ptr->write_user_transform_fn)) /* User write transform (*(png_ptr->write_user_transform_fn)) /* User write transform function */
function */ (png_ptr, /* png_ptr */
(png_ptr, /* png_ptr */ &(png_ptr->row_info), /* row_info: */
&(png_ptr->row_info), /* row_info: */ /* png_uint_32 width; width of row */
/* png_uint_32 width; width of row */ /* png_uint_32 rowbytes; number of bytes in row */
/* png_size_t rowbytes; number of bytes in row */ /* png_byte color_type; color type of pixels */
/* png_byte color_type; color type of pixels */ /* png_byte bit_depth; bit depth of samples */
/* png_byte bit_depth; bit depth of samples */ /* png_byte channels; number of channels (1-4) */
/* png_byte channels; number of channels (1-4) */ /* png_byte pixel_depth; bits per pixel (depth*channels) */
/* png_byte pixel_depth; bits per pixel (depth*channels) */ png_ptr->row_buf + 1); /* start of pixel data for row */
png_ptr->row_buf + 1); /* start of pixel data for row */
#endif #endif
#if defined(PNG_WRITE_FILLER_SUPPORTED)
#ifdef PNG_WRITE_FILLER_SUPPORTED
if (png_ptr->transformations & PNG_FILLER) if (png_ptr->transformations & PNG_FILLER)
png_do_strip_channel(&(png_ptr->row_info), png_ptr->row_buf + 1, png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1,
!(png_ptr->flags & PNG_FILLER_AFTER)); png_ptr->flags);
#endif #endif
#if defined(PNG_WRITE_PACKSWAP_SUPPORTED)
#ifdef PNG_WRITE_PACKSWAP_SUPPORTED
if (png_ptr->transformations & PNG_PACKSWAP) if (png_ptr->transformations & PNG_PACKSWAP)
png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1); png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif #endif
#if defined(PNG_WRITE_PACK_SUPPORTED)
#ifdef PNG_WRITE_PACK_SUPPORTED
if (png_ptr->transformations & PNG_PACK) if (png_ptr->transformations & PNG_PACK)
png_do_pack(&(png_ptr->row_info), png_ptr->row_buf + 1, png_do_pack(&(png_ptr->row_info), png_ptr->row_buf + 1,
(png_uint_32)png_ptr->bit_depth); (png_uint_32)png_ptr->bit_depth);
#endif #endif
#if defined(PNG_WRITE_SWAP_SUPPORTED)
#ifdef PNG_WRITE_SWAP_SUPPORTED
if (png_ptr->transformations & PNG_SWAP_BYTES) if (png_ptr->transformations & PNG_SWAP_BYTES)
png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1); png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif #endif
#if defined(PNG_WRITE_SHIFT_SUPPORTED)
#ifdef PNG_WRITE_SHIFT_SUPPORTED
if (png_ptr->transformations & PNG_SHIFT) if (png_ptr->transformations & PNG_SHIFT)
png_do_shift(&(png_ptr->row_info), png_ptr->row_buf + 1, png_do_shift(&(png_ptr->row_info), png_ptr->row_buf + 1,
&(png_ptr->shift)); &(png_ptr->shift));
#endif #endif
#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
if (png_ptr->transformations & PNG_SWAP_ALPHA) if (png_ptr->transformations & PNG_SWAP_ALPHA)
png_do_write_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); png_do_write_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif #endif
#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
if (png_ptr->transformations & PNG_INVERT_ALPHA) if (png_ptr->transformations & PNG_INVERT_ALPHA)
png_do_write_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); png_do_write_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif #endif
#if defined(PNG_WRITE_BGR_SUPPORTED)
#ifdef PNG_WRITE_BGR_SUPPORTED
if (png_ptr->transformations & PNG_BGR) if (png_ptr->transformations & PNG_BGR)
png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1); png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif #endif
#if defined(PNG_WRITE_INVERT_SUPPORTED)
#ifdef PNG_WRITE_INVERT_SUPPORTED
if (png_ptr->transformations & PNG_INVERT_MONO) if (png_ptr->transformations & PNG_INVERT_MONO)
png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1); png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif #endif
} }
#ifdef PNG_WRITE_PACK_SUPPORTED #if defined(PNG_WRITE_PACK_SUPPORTED)
/* Pack pixels into bytes. Pass the true bit depth in bit_depth. The /* Pack pixels into bytes. Pass the true bit depth in bit_depth. The
* row_info bit depth should be 8 (one pixel per byte). The channels * row_info bit depth should be 8 (one pixel per byte). The channels
* should be 1 (this only happens on grayscale and paletted images). * should be 1 (this only happens on grayscale and paletted images).
@@ -100,8 +90,10 @@ void /* PRIVATE */
png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
{ {
png_debug(1, "in png_do_pack"); png_debug(1, "in png_do_pack");
if (row_info->bit_depth == 8 && if (row_info->bit_depth == 8 &&
#if defined(PNG_USELESS_TESTS_SUPPORTED)
row != NULL && row_info != NULL &&
#endif
row_info->channels == 1) row_info->channels == 1)
{ {
switch ((int)bit_depth) switch ((int)bit_depth)
@@ -122,12 +114,9 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
{ {
if (*sp != 0) if (*sp != 0)
v |= mask; v |= mask;
sp++; sp++;
if (mask > 1) if (mask > 1)
mask >>= 1; mask >>= 1;
else else
{ {
mask = 0x80; mask = 0x80;
@@ -136,13 +125,10 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
v = 0; v = 0;
} }
} }
if (mask != 0x80) if (mask != 0x80)
*dp = (png_byte)v; *dp = (png_byte)v;
break; break;
} }
case 2: case 2:
{ {
png_bytep sp, dp; png_bytep sp, dp;
@@ -154,14 +140,12 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
dp = row; dp = row;
shift = 6; shift = 6;
v = 0; v = 0;
for (i = 0; i < row_width; i++) for (i = 0; i < row_width; i++)
{ {
png_byte value; png_byte value;
value = (png_byte)(*sp & 0x03); value = (png_byte)(*sp & 0x03);
v |= (value << shift); v |= (value << shift);
if (shift == 0) if (shift == 0)
{ {
shift = 6; shift = 6;
@@ -169,19 +153,14 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
dp++; dp++;
v = 0; v = 0;
} }
else else
shift -= 2; shift -= 2;
sp++; sp++;
} }
if (shift != 6) if (shift != 6)
*dp = (png_byte)v; *dp = (png_byte)v;
break; break;
} }
case 4: case 4:
{ {
png_bytep sp, dp; png_bytep sp, dp;
@@ -193,7 +172,6 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
dp = row; dp = row;
shift = 4; shift = 4;
v = 0; v = 0;
for (i = 0; i < row_width; i++) for (i = 0; i < row_width; i++)
{ {
png_byte value; png_byte value;
@@ -208,32 +186,25 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
dp++; dp++;
v = 0; v = 0;
} }
else else
shift -= 4; shift -= 4;
sp++; sp++;
} }
if (shift != 4) if (shift != 4)
*dp = (png_byte)v; *dp = (png_byte)v;
break; break;
} }
default:
break;
} }
row_info->bit_depth = (png_byte)bit_depth; row_info->bit_depth = (png_byte)bit_depth;
row_info->pixel_depth = (png_byte)(bit_depth * row_info->channels); row_info->pixel_depth = (png_byte)(bit_depth * row_info->channels);
row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,
row_info->width); row_info->width);
} }
} }
#endif #endif
#ifdef PNG_WRITE_SHIFT_SUPPORTED #if defined(PNG_WRITE_SHIFT_SUPPORTED)
/* Shift pixel values to take advantage of whole range. Pass the /* Shift pixel values to take advantage of whole range. Pass the
* true number of bits in bit_depth. The row should be packed * true number of bits in bit_depth. The row should be packed
* according to row_info->bit_depth. Thus, if you had a row of * according to row_info->bit_depth. Thus, if you had a row of
@@ -242,12 +213,15 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
* data to 0 to 15. * data to 0 to 15.
*/ */
void /* PRIVATE */ void /* PRIVATE */
png_do_shift(png_row_infop row_info, png_bytep row, png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth)
png_const_color_8p bit_depth)
{ {
png_debug(1, "in png_do_shift"); png_debug(1, "in png_do_shift");
#if defined(PNG_USELESS_TESTS_SUPPORTED)
if (row_info->color_type != PNG_COLOR_TYPE_PALETTE) if (row != NULL && row_info != NULL &&
#else
if (
#endif
row_info->color_type != PNG_COLOR_TYPE_PALETTE)
{ {
int shift_start[4], shift_dec[4]; int shift_start[4], shift_dec[4];
int channels = 0; int channels = 0;
@@ -257,23 +231,19 @@ png_do_shift(png_row_infop row_info, png_bytep row,
shift_start[channels] = row_info->bit_depth - bit_depth->red; shift_start[channels] = row_info->bit_depth - bit_depth->red;
shift_dec[channels] = bit_depth->red; shift_dec[channels] = bit_depth->red;
channels++; channels++;
shift_start[channels] = row_info->bit_depth - bit_depth->green; shift_start[channels] = row_info->bit_depth - bit_depth->green;
shift_dec[channels] = bit_depth->green; shift_dec[channels] = bit_depth->green;
channels++; channels++;
shift_start[channels] = row_info->bit_depth - bit_depth->blue; shift_start[channels] = row_info->bit_depth - bit_depth->blue;
shift_dec[channels] = bit_depth->blue; shift_dec[channels] = bit_depth->blue;
channels++; channels++;
} }
else else
{ {
shift_start[channels] = row_info->bit_depth - bit_depth->gray; shift_start[channels] = row_info->bit_depth - bit_depth->gray;
shift_dec[channels] = bit_depth->gray; shift_dec[channels] = bit_depth->gray;
channels++; channels++;
} }
if (row_info->color_type & PNG_COLOR_MASK_ALPHA) if (row_info->color_type & PNG_COLOR_MASK_ALPHA)
{ {
shift_start[channels] = row_info->bit_depth - bit_depth->alpha; shift_start[channels] = row_info->bit_depth - bit_depth->alpha;
@@ -285,16 +255,14 @@ png_do_shift(png_row_infop row_info, png_bytep row,
if (row_info->bit_depth < 8) if (row_info->bit_depth < 8)
{ {
png_bytep bp = row; png_bytep bp = row;
png_size_t i; png_uint_32 i;
png_byte mask; png_byte mask;
png_size_t row_bytes = row_info->rowbytes; png_uint_32 row_bytes = row_info->rowbytes;
if (bit_depth->gray == 1 && row_info->bit_depth == 2) if (bit_depth->gray == 1 && row_info->bit_depth == 2)
mask = 0x55; mask = 0x55;
else if (row_info->bit_depth == 4 && bit_depth->gray == 3) else if (row_info->bit_depth == 4 && bit_depth->gray == 3)
mask = 0x11; mask = 0x11;
else else
mask = 0xff; mask = 0xff;
@@ -305,18 +273,15 @@ png_do_shift(png_row_infop row_info, png_bytep row,
v = *bp; v = *bp;
*bp = 0; *bp = 0;
for (j = shift_start[0]; j > -shift_dec[0]; j -= shift_dec[0]) for (j = shift_start[0]; j > -shift_dec[0]; j -= shift_dec[0])
{ {
if (j > 0) if (j > 0)
*bp |= (png_byte)((v << j) & 0xff); *bp |= (png_byte)((v << j) & 0xff);
else else
*bp |= (png_byte)((v >> (-j)) & mask); *bp |= (png_byte)((v >> (-j)) & mask);
} }
} }
} }
else if (row_info->bit_depth == 8) else if (row_info->bit_depth == 8)
{ {
png_bytep bp = row; png_bytep bp = row;
@@ -332,18 +297,15 @@ png_do_shift(png_row_infop row_info, png_bytep row,
v = *bp; v = *bp;
*bp = 0; *bp = 0;
for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c]) for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c])
{ {
if (j > 0) if (j > 0)
*bp |= (png_byte)((v << j) & 0xff); *bp |= (png_byte)((v << j) & 0xff);
else else
*bp |= (png_byte)((v >> (-j)) & 0xff); *bp |= (png_byte)((v >> (-j)) & 0xff);
} }
} }
} }
else else
{ {
png_bytep bp; png_bytep bp;
@@ -358,12 +320,10 @@ png_do_shift(png_row_infop row_info, png_bytep row,
v = (png_uint_16)(((png_uint_16)(*bp) << 8) + *(bp + 1)); v = (png_uint_16)(((png_uint_16)(*bp) << 8) + *(bp + 1));
value = 0; value = 0;
for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c]) for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c])
{ {
if (j > 0) if (j > 0)
value |= (png_uint_16)((v << j) & (png_uint_16)0xffff); value |= (png_uint_16)((v << j) & (png_uint_16)0xffff);
else else
value |= (png_uint_16)((v >> (-j)) & (png_uint_16)0xffff); value |= (png_uint_16)((v >> (-j)) & (png_uint_16)0xffff);
} }
@@ -375,22 +335,23 @@ png_do_shift(png_row_infop row_info, png_bytep row,
} }
#endif #endif
#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED #if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
void /* PRIVATE */ void /* PRIVATE */
png_do_write_swap_alpha(png_row_infop row_info, png_bytep row) png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
{ {
png_debug(1, "in png_do_write_swap_alpha"); png_debug(1, "in png_do_write_swap_alpha");
#if defined(PNG_USELESS_TESTS_SUPPORTED)
if (row != NULL && row_info != NULL)
#endif
{ {
if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
{ {
/* This converts from ARGB to RGBA */
if (row_info->bit_depth == 8) if (row_info->bit_depth == 8)
{ {
/* This converts from ARGB to RGBA */
png_bytep sp, dp; png_bytep sp, dp;
png_uint_32 i; png_uint_32 i;
png_uint_32 row_width = row_info->width; png_uint_32 row_width = row_info->width;
for (i = 0, sp = dp = row; i < row_width; i++) for (i = 0, sp = dp = row; i < row_width; i++)
{ {
png_byte save = *(sp++); png_byte save = *(sp++);
@@ -400,11 +361,9 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = save; *(dp++) = save;
} }
} }
/* This converts from AARRGGBB to RRGGBBAA */
#ifdef PNG_WRITE_16BIT_SUPPORTED
else else
{ {
/* This converts from AARRGGBB to RRGGBBAA */
png_bytep sp, dp; png_bytep sp, dp;
png_uint_32 i; png_uint_32 i;
png_uint_32 row_width = row_info->width; png_uint_32 row_width = row_info->width;
@@ -424,14 +383,12 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = save[1]; *(dp++) = save[1];
} }
} }
#endif /* PNG_WRITE_16BIT_SUPPORTED */
} }
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
{ {
/* This converts from AG to GA */
if (row_info->bit_depth == 8) if (row_info->bit_depth == 8)
{ {
/* This converts from AG to GA */
png_bytep sp, dp; png_bytep sp, dp;
png_uint_32 i; png_uint_32 i;
png_uint_32 row_width = row_info->width; png_uint_32 row_width = row_info->width;
@@ -443,11 +400,9 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = save; *(dp++) = save;
} }
} }
/* This converts from AAGG to GGAA */
#ifdef PNG_WRITE_16BIT_SUPPORTED
else else
{ {
/* This converts from AAGG to GGAA */
png_bytep sp, dp; png_bytep sp, dp;
png_uint_32 i; png_uint_32 i;
png_uint_32 row_width = row_info->width; png_uint_32 row_width = row_info->width;
@@ -463,28 +418,28 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = save[1]; *(dp++) = save[1];
} }
} }
#endif /* PNG_WRITE_16BIT_SUPPORTED */
} }
} }
} }
#endif #endif
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED #if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
void /* PRIVATE */ void /* PRIVATE */
png_do_write_invert_alpha(png_row_infop row_info, png_bytep row) png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
{ {
png_debug(1, "in png_do_write_invert_alpha"); png_debug(1, "in png_do_write_invert_alpha");
#if defined(PNG_USELESS_TESTS_SUPPORTED)
if (row != NULL && row_info != NULL)
#endif
{ {
if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
{ {
/* This inverts the alpha channel in RGBA */
if (row_info->bit_depth == 8) if (row_info->bit_depth == 8)
{ {
/* This inverts the alpha channel in RGBA */
png_bytep sp, dp; png_bytep sp, dp;
png_uint_32 i; png_uint_32 i;
png_uint_32 row_width = row_info->width; png_uint_32 row_width = row_info->width;
for (i = 0, sp = dp = row; i < row_width; i++) for (i = 0, sp = dp = row; i < row_width; i++)
{ {
/* Does nothing /* Does nothing
@@ -496,11 +451,9 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = (png_byte)(255 - *(sp++)); *(dp++) = (png_byte)(255 - *(sp++));
} }
} }
/* This inverts the alpha channel in RRGGBBAA */
#ifdef PNG_WRITE_16BIT_SUPPORTED
else else
{ {
/* This inverts the alpha channel in RRGGBBAA */
png_bytep sp, dp; png_bytep sp, dp;
png_uint_32 i; png_uint_32 i;
png_uint_32 row_width = row_info->width; png_uint_32 row_width = row_info->width;
@@ -520,14 +473,12 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = (png_byte)(255 - *(sp++)); *(dp++) = (png_byte)(255 - *(sp++));
} }
} }
#endif /* PNG_WRITE_16BIT_SUPPORTED */
} }
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
{ {
/* This inverts the alpha channel in GA */
if (row_info->bit_depth == 8) if (row_info->bit_depth == 8)
{ {
/* This inverts the alpha channel in GA */
png_bytep sp, dp; png_bytep sp, dp;
png_uint_32 i; png_uint_32 i;
png_uint_32 row_width = row_info->width; png_uint_32 row_width = row_info->width;
@@ -538,11 +489,9 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = (png_byte)(255 - *(sp++)); *(dp++) = (png_byte)(255 - *(sp++));
} }
} }
/* This inverts the alpha channel in GGAA */
#ifdef PNG_WRITE_16BIT_SUPPORTED
else else
{ {
/* This inverts the alpha channel in GGAA */
png_bytep sp, dp; png_bytep sp, dp;
png_uint_32 i; png_uint_32 i;
png_uint_32 row_width = row_info->width; png_uint_32 row_width = row_info->width;
@@ -558,20 +507,22 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = (png_byte)(255 - *(sp++)); *(dp++) = (png_byte)(255 - *(sp++));
} }
} }
#endif /* PNG_WRITE_16BIT_SUPPORTED */
} }
} }
} }
#endif #endif
#ifdef PNG_MNG_FEATURES_SUPPORTED #if defined(PNG_MNG_FEATURES_SUPPORTED)
/* Undoes intrapixel differencing */ /* Undoes intrapixel differencing */
void /* PRIVATE */ void /* PRIVATE */
png_do_write_intrapixel(png_row_infop row_info, png_bytep row) png_do_write_intrapixel(png_row_infop row_info, png_bytep row)
{ {
png_debug(1, "in png_do_write_intrapixel"); png_debug(1, "in png_do_write_intrapixel");
if (
if ((row_info->color_type & PNG_COLOR_MASK_COLOR)) #if defined(PNG_USELESS_TESTS_SUPPORTED)
row != NULL && row_info != NULL &&
#endif
(row_info->color_type & PNG_COLOR_MASK_COLOR))
{ {
int bytes_per_pixel; int bytes_per_pixel;
png_uint_32 row_width = row_info->width; png_uint_32 row_width = row_info->width;
@@ -582,21 +533,17 @@ png_do_write_intrapixel(png_row_infop row_info, png_bytep row)
if (row_info->color_type == PNG_COLOR_TYPE_RGB) if (row_info->color_type == PNG_COLOR_TYPE_RGB)
bytes_per_pixel = 3; bytes_per_pixel = 3;
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
bytes_per_pixel = 4; bytes_per_pixel = 4;
else else
return; return;
for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
{ {
*(rp) = (png_byte)((*rp - *(rp + 1)) & 0xff); *(rp) = (png_byte)((*rp - *(rp+1))&0xff);
*(rp + 2) = (png_byte)((*(rp + 2) - *(rp + 1)) & 0xff); *(rp+2) = (png_byte)((*(rp+2) - *(rp+1))&0xff);
} }
} }
#ifdef PNG_WRITE_16BIT_SUPPORTED
else if (row_info->bit_depth == 16) else if (row_info->bit_depth == 16)
{ {
png_bytep rp; png_bytep rp;
@@ -604,27 +551,24 @@ png_do_write_intrapixel(png_row_infop row_info, png_bytep row)
if (row_info->color_type == PNG_COLOR_TYPE_RGB) if (row_info->color_type == PNG_COLOR_TYPE_RGB)
bytes_per_pixel = 6; bytes_per_pixel = 6;
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
bytes_per_pixel = 8; bytes_per_pixel = 8;
else else
return; return;
for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
{ {
png_uint_32 s0 = (*(rp ) << 8) | *(rp + 1); png_uint_32 s0 = (*(rp ) << 8) | *(rp+1);
png_uint_32 s1 = (*(rp + 2) << 8) | *(rp + 3); png_uint_32 s1 = (*(rp+2) << 8) | *(rp+3);
png_uint_32 s2 = (*(rp + 4) << 8) | *(rp + 5); png_uint_32 s2 = (*(rp+4) << 8) | *(rp+5);
png_uint_32 red = (png_uint_32)((s0 - s1) & 0xffffL); png_uint_32 red = (png_uint_32)((s0 - s1) & 0xffffL);
png_uint_32 blue = (png_uint_32)((s2 - s1) & 0xffffL); png_uint_32 blue = (png_uint_32)((s2 - s1) & 0xffffL);
*(rp ) = (png_byte)((red >> 8) & 0xff); *(rp ) = (png_byte)((red >> 8) & 0xff);
*(rp + 1) = (png_byte)(red & 0xff); *(rp+1) = (png_byte)(red & 0xff);
*(rp + 4) = (png_byte)((blue >> 8) & 0xff); *(rp+4) = (png_byte)((blue >> 8) & 0xff);
*(rp + 5) = (png_byte)(blue & 0xff); *(rp+5) = (png_byte)(blue & 0xff);
} }
} }
#endif /* PNG_WRITE_16BIT_SUPPORTED */
} }
} }
#endif /* PNG_MNG_FEATURES_SUPPORTED */ #endif /* PNG_MNG_FEATURES_SUPPORTED */

1193
pngwutil.c

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -0,0 +1,22 @@
This project builds a shared library version of libpng on x86 BeOS.
It defines PNG_USE_PNGGCCRD, which activates the assembly code in
pnggccrd.c; this hasn't been extensively tested on BeOS.
To install:
1) build
Note: As of version 1.0.10, you'll get a fair number of warnings when
you compile pnggccrd.c. As far as I know, these are harmless,
but it would be better if someone fixed them.
2) copy and png.h, pngconf.h somewhere; /boot/home/config/include (which
you'll have to make) is a good choice
3) copy libpng.so to /boot/home/config/lib
4) build your libpng.so applications (remember to include libz.a as
well when you link)
- Chris Herborth, March 27, 2001

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More