cairo 1.8.0-x86-mswin32 → 1.8.1-x86-mswin32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of cairo might be problematic. Click here for more details.
- data/ChangeLog +25 -0
- data/NEWS +8 -0
- data/Rakefile +5 -32
- data/cairo/bin/libcairo-2.dll +0 -0
- data/cairo/bin/libpng12-0.dll +0 -0
- data/cairo/include/cairo/cairo-features.h +1 -1
- data/cairo/include/cairo/cairo-ft.h +75 -0
- data/cairo/include/cairo/cairo-version.h +1 -1
- data/cairo/include/cairo/cairo.h +16 -21
- data/cairo/include/libpng12/png.h +251 -121
- data/cairo/include/libpng12/pngconf.h +83 -56
- data/cairo/include/png.h +251 -121
- data/cairo/include/pngconf.h +83 -56
- data/cairo/lib/cairo.def +5 -0
- data/cairo/lib/cairo.lib +0 -0
- data/cairo/lib/libcairo.dll.a +0 -0
- data/cairo/lib/libpng.def +3 -0
- data/cairo/lib/libpng.lib +0 -0
- data/cairo/lib/libpng12.dll.a +0 -0
- data/cairo/lib/pkgconfig/cairo-ft.pc +12 -0
- data/cairo/lib/pkgconfig/cairo-pdf.pc +2 -2
- data/cairo/lib/pkgconfig/cairo-png.pc +2 -2
- data/cairo/lib/pkgconfig/cairo-ps.pc +2 -2
- data/cairo/lib/pkgconfig/cairo-svg.pc +2 -2
- data/cairo/lib/pkgconfig/cairo-win32-font.pc +2 -2
- data/cairo/lib/pkgconfig/cairo-win32.pc +2 -2
- data/cairo/lib/pkgconfig/cairo.pc +4 -4
- data/cairo/lib/pkgconfig/libpng.pc +2 -2
- data/cairo/lib/pkgconfig/libpng12.pc +2 -2
- data/cairo/manifest/{cairo-dev_1.8.0-1_win32.mft → cairo-dev_1.8.8-2_win32.mft} +5 -3
- data/cairo/manifest/cairo_1.8.8-2_win32.mft +5 -0
- data/cairo/manifest/{libpng-dev_1.2.32-1_win32.mft → libpng-dev_1.2.39-1_win32.mft} +3 -3
- data/cairo/manifest/libpng_1.2.39-1_win32.mft +2 -0
- data/cairo/share/doc/{cairo_1.8.0-1_win32 → cairo_1.8.8-2_win32}/COPYING +0 -0
- data/cairo/share/doc/{cairo_1.8.0-1_win32 → cairo_1.8.8-2_win32}/COPYING-LGPL-2.1 +0 -0
- data/cairo/share/doc/{cairo_1.8.0-1_win32 → cairo_1.8.8-2_win32}/COPYING-MPL-1.1 +0 -0
- data/cairo/share/gtk-doc/html/cairo/bindings-errors.html +9 -9
- data/cairo/share/gtk-doc/html/cairo/bindings-fonts.html +5 -5
- data/cairo/share/gtk-doc/html/cairo/bindings-memory.html +8 -8
- data/cairo/share/gtk-doc/html/cairo/bindings-overloading.html +5 -5
- data/cairo/share/gtk-doc/html/cairo/bindings-path.html +5 -5
- data/cairo/share/gtk-doc/html/cairo/bindings-patterns.html +6 -6
- data/cairo/share/gtk-doc/html/cairo/bindings-return-values.html +5 -5
- data/cairo/share/gtk-doc/html/cairo/bindings-streams.html +5 -5
- data/cairo/share/gtk-doc/html/cairo/bindings-surfaces.html +5 -5
- data/cairo/share/gtk-doc/html/cairo/cairo-context.html +200 -262
- data/cairo/share/gtk-doc/html/cairo/cairo-drawing.html +5 -5
- data/cairo/share/gtk-doc/html/cairo/cairo-error-status.html +61 -60
- data/cairo/share/gtk-doc/html/cairo/cairo-font-face.html +51 -53
- data/cairo/share/gtk-doc/html/cairo/cairo-font-options.html +65 -78
- data/cairo/share/gtk-doc/html/cairo/cairo-fonts.html +5 -5
- data/cairo/share/gtk-doc/html/cairo/cairo-ft-font.html +37 -34
- data/cairo/share/gtk-doc/html/cairo/cairo-image-surface.html +49 -60
- data/cairo/share/gtk-doc/html/cairo/cairo-matrix.html +30 -41
- data/cairo/share/gtk-doc/html/cairo/cairo-paths.html +72 -97
- data/cairo/share/gtk-doc/html/cairo/cairo-pattern.html +184 -175
- data/cairo/share/gtk-doc/html/cairo/cairo-pdf-surface.html +40 -34
- data/cairo/share/gtk-doc/html/cairo/cairo-png-functions.html +57 -48
- data/cairo/share/gtk-doc/html/cairo/cairo-ps-surface.html +73 -76
- data/cairo/share/gtk-doc/html/cairo/cairo-quartz-font.html +27 -30
- data/cairo/share/gtk-doc/html/cairo/cairo-quartz-surface.html +29 -34
- data/cairo/share/gtk-doc/html/cairo/cairo-scaled-font.html +102 -106
- data/cairo/share/gtk-doc/html/cairo/cairo-support.html +5 -5
- data/cairo/share/gtk-doc/html/cairo/cairo-surface.html +101 -127
- data/cairo/share/gtk-doc/html/cairo/cairo-surfaces.html +5 -5
- data/cairo/share/gtk-doc/html/cairo/cairo-svg-surface.html +52 -49
- data/cairo/share/gtk-doc/html/cairo/cairo-text.html +126 -146
- data/cairo/share/gtk-doc/html/cairo/cairo-transformations.html +26 -35
- data/cairo/share/gtk-doc/html/cairo/cairo-types.html +16 -17
- data/cairo/share/gtk-doc/html/cairo/cairo-user-font.html +121 -127
- data/cairo/share/gtk-doc/html/cairo/cairo-version-info.html +50 -60
- data/cairo/share/gtk-doc/html/cairo/cairo-win32-font.html +37 -46
- data/cairo/share/gtk-doc/html/cairo/cairo-win32-surface.html +58 -58
- data/cairo/share/gtk-doc/html/cairo/cairo-xlib-surface.html +47 -63
- data/cairo/share/gtk-doc/html/cairo/cairo.devhelp +21 -21
- data/cairo/share/gtk-doc/html/cairo/cairo.devhelp2 +21 -21
- data/cairo/share/gtk-doc/html/cairo/index-1.2.html +5 -5
- data/cairo/share/gtk-doc/html/cairo/index-1.4.html +5 -5
- data/cairo/share/gtk-doc/html/cairo/index-1.6.html +5 -5
- data/cairo/share/gtk-doc/html/cairo/index-1.8.html +8 -8
- data/cairo/share/gtk-doc/html/cairo/index-all.html +24 -24
- data/cairo/share/gtk-doc/html/cairo/index.html +6 -6
- data/cairo/share/gtk-doc/html/cairo/index.sgml +19 -19
- data/cairo/share/gtk-doc/html/cairo/language-bindings.html +6 -6
- data/cairo/share/gtk-doc/html/cairo/style.css +8 -1
- data/cairo/share/man/man3/libpng.3 +299 -59
- data/cairo/share/man/man3/libpngpf.3 +2 -2
- data/cairo/share/man/man5/png.5 +1 -1
- data/cairo/src/tml/packaging/cairo_1.8.8-2_win32.log +949 -0
- data/cairo/src/tml/{make/cairo_1.8.0-1_win32.sh → packaging/cairo_1.8.8-2_win32.sh} +6 -6
- data/cairo/src/tml/{make/libpng_1.2.32-1_win32.log → packaging/libpng_1.2.39-1_win32.log} +74 -73
- data/cairo/src/tml/{make/libpng_1.2.32-1_win32.sh → packaging/libpng_1.2.39-1_win32.sh} +4 -4
- data/doc/ja/cairo-context.html +1 -1
- data/doc/ja/index.html +0 -3
- data/extconf.rb +1 -0
- data/pkg-config.rb +4 -0
- data/src/cairo.so +0 -0
- data/src/libruby-cairo.a +0 -0
- data/src/rb_cairo.c +2 -2
- data/src/rb_cairo_surface.c +6 -2
- metadata +20 -50
- data/cairo/DLL_FAQ.txt +0 -397
- data/cairo/README.txt +0 -53
- data/cairo/USAGE.txt +0 -94
- data/cairo/bin/zlib1.dll +0 -0
- data/cairo/include/zconf.h +0 -332
- data/cairo/include/zlib.h +0 -1357
- data/cairo/lib/zdll.exp +0 -0
- data/cairo/lib/zdll.lib +0 -0
- data/cairo/lib/zlib.def +0 -60
- data/cairo/manifest/cairo_1.8.0-1_win32.mft +0 -5
- data/cairo/manifest/libpng_1.2.32-1_win32.mft +0 -2
- data/cairo/src/tml/make/cairo_1.8.0-1_win32.log +0 -1021
- data/cairo/test/example_d.exe +0 -0
- data/cairo/test/minigzip_d.exe +0 -0
- data/cairo/test/testzlib_d.exe +0 -0
- data/cairo/test/untgz_d.exe +0 -0
@@ -1,11 +1,14 @@
|
|
1
1
|
|
2
2
|
/* pngconf.h - machine configurable file for libpng
|
3
3
|
*
|
4
|
-
* libpng version 1.2.
|
5
|
-
*
|
6
|
-
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
|
4
|
+
* libpng version 1.2.39 - August 13, 2009
|
5
|
+
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
7
6
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
8
7
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
8
|
+
*
|
9
|
+
* This code is released under the libpng license.
|
10
|
+
* For conditions of distribution and use, see the disclaimer
|
11
|
+
* and license in png.h
|
9
12
|
*/
|
10
13
|
|
11
14
|
/* Any machine specific code is near the front of this file, so if you
|
@@ -19,7 +22,7 @@
|
|
19
22
|
|
20
23
|
#define PNG_1_2_X
|
21
24
|
|
22
|
-
/*
|
25
|
+
/*
|
23
26
|
* PNG_USER_CONFIG has to be defined on the compiler command line. This
|
24
27
|
* includes the resource compiler for Windows DLL configurations.
|
25
28
|
*/
|
@@ -39,7 +42,7 @@
|
|
39
42
|
|
40
43
|
/*
|
41
44
|
* Added at libpng-1.2.8
|
42
|
-
*
|
45
|
+
*
|
43
46
|
* If you create a private DLL you need to define in "pngusr.h" the followings:
|
44
47
|
* #define PNG_USER_PRIVATEBUILD <Describes by whom and why this version of
|
45
48
|
* the DLL was built>
|
@@ -50,8 +53,8 @@
|
|
50
53
|
* number and must match your private DLL name>
|
51
54
|
* e.g. // private DLL "libpng13gx.dll"
|
52
55
|
* #define PNG_USER_DLLFNAME_POSTFIX "gx"
|
53
|
-
*
|
54
|
-
* The following macros are also at your disposal if you want to complete the
|
56
|
+
*
|
57
|
+
* The following macros are also at your disposal if you want to complete the
|
55
58
|
* DLL VERSIONINFO structure.
|
56
59
|
* - PNG_USER_VERSIONINFO_COMMENTS
|
57
60
|
* - PNG_USER_VERSIONINFO_COMPANYNAME
|
@@ -147,9 +150,9 @@
|
|
147
150
|
* 'Cygwin' defines/defaults:
|
148
151
|
* PNG_BUILD_DLL -- (ignored) building the dll
|
149
152
|
* (no define) -- (ignored) building an application, linking to the dll
|
150
|
-
* PNG_STATIC -- (ignored) building the static lib, or building an
|
153
|
+
* PNG_STATIC -- (ignored) building the static lib, or building an
|
151
154
|
* application that links to the static lib.
|
152
|
-
* ALL_STATIC -- (ignored) building various static libs, or building an
|
155
|
+
* ALL_STATIC -- (ignored) building various static libs, or building an
|
153
156
|
* application that links to the static libs.
|
154
157
|
* Thus,
|
155
158
|
* a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and
|
@@ -162,12 +165,12 @@
|
|
162
165
|
* PNG_BUILD_DLL
|
163
166
|
* PNG_STATIC
|
164
167
|
* (nothing) == PNG_USE_DLL
|
165
|
-
*
|
168
|
+
*
|
166
169
|
* CYGWIN (2002-01-20): The preceding is now obsolete. With the advent
|
167
|
-
* of auto-import in binutils, we no longer need to worry about
|
170
|
+
* of auto-import in binutils, we no longer need to worry about
|
168
171
|
* __declspec(dllexport) / __declspec(dllimport) and friends. Therefore,
|
169
172
|
* we don't need to worry about PNG_STATIC or ALL_STATIC when it comes
|
170
|
-
* to __declspec() stuff. However, we DO need to worry about
|
173
|
+
* to __declspec() stuff. However, we DO need to worry about
|
171
174
|
* PNG_BUILD_DLL and PNG_STATIC because those change some defaults
|
172
175
|
* such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed.
|
173
176
|
*/
|
@@ -211,8 +214,8 @@
|
|
211
214
|
# if !defined(PNG_DLL)
|
212
215
|
# define PNG_DLL
|
213
216
|
# endif
|
214
|
-
# endif
|
215
|
-
# endif
|
217
|
+
# endif
|
218
|
+
# endif
|
216
219
|
# endif
|
217
220
|
#endif
|
218
221
|
|
@@ -233,6 +236,8 @@
|
|
233
236
|
# include <windows.h>
|
234
237
|
/* Console I/O functions are not supported on WindowsCE */
|
235
238
|
# define PNG_NO_CONSOLE_IO
|
239
|
+
/* abort() may not be supported on some/all Windows CE platforms */
|
240
|
+
# define PNG_ABORT() exit(-1)
|
236
241
|
# ifdef PNG_DEBUG
|
237
242
|
# undef PNG_DEBUG
|
238
243
|
# endif
|
@@ -312,21 +317,29 @@
|
|
312
317
|
#ifdef PNG_SETJMP_SUPPORTED
|
313
318
|
/* This is an attempt to force a single setjmp behaviour on Linux. If
|
314
319
|
* the X config stuff didn't define _BSD_SOURCE we wouldn't need this.
|
320
|
+
*
|
321
|
+
* You can bypass this test if you know that your application uses exactly
|
322
|
+
* the same setjmp.h that was included when libpng was built. Only define
|
323
|
+
* PNG_SKIP_SETJMP_CHECK while building your application, prior to the
|
324
|
+
* application's '#include "png.h"'. Don't define PNG_SKIP_SETJMP_CHECK
|
325
|
+
* while building a separate libpng library for general use.
|
315
326
|
*/
|
316
327
|
|
317
|
-
#
|
318
|
-
# ifdef
|
319
|
-
#
|
320
|
-
#
|
321
|
-
#
|
322
|
-
#
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
#
|
328
|
+
# ifndef PNG_SKIP_SETJMP_CHECK
|
329
|
+
# ifdef __linux__
|
330
|
+
# ifdef _BSD_SOURCE
|
331
|
+
# define PNG_SAVE_BSD_SOURCE
|
332
|
+
# undef _BSD_SOURCE
|
333
|
+
# endif
|
334
|
+
# ifdef _SETJMP_H
|
335
|
+
/* If you encounter a compiler error here, see the explanation
|
336
|
+
* near the end of INSTALL.
|
337
|
+
*/
|
338
|
+
__pngconf.h__ in libpng already includes setjmp.h;
|
339
|
+
__dont__ include it again.;
|
340
|
+
# endif
|
341
|
+
# endif /* __linux__ */
|
342
|
+
# endif /* PNG_SKIP_SETJMP_CHECK */
|
330
343
|
|
331
344
|
/* include setjmp.h for error handling */
|
332
345
|
# include <setjmp.h>
|
@@ -477,7 +490,7 @@
|
|
477
490
|
* iTXt support was added. iTXt support was turned off by default through
|
478
491
|
* libpng-1.2.x, to support old apps that malloc the png_text structure
|
479
492
|
* instead of calling png_set_text() and letting libpng malloc it. It
|
480
|
-
*
|
493
|
+
* will be turned on by default in libpng-1.4.0.
|
481
494
|
*/
|
482
495
|
|
483
496
|
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
|
@@ -511,6 +524,7 @@
|
|
511
524
|
# define PNG_NO_FREE_ME
|
512
525
|
# define PNG_NO_READ_UNKNOWN_CHUNKS
|
513
526
|
# define PNG_NO_WRITE_UNKNOWN_CHUNKS
|
527
|
+
# define PNG_NO_HANDLE_AS_UNKNOWN
|
514
528
|
# define PNG_NO_READ_USER_CHUNKS
|
515
529
|
# define PNG_NO_READ_iCCP
|
516
530
|
# define PNG_NO_WRITE_iCCP
|
@@ -540,7 +554,7 @@
|
|
540
554
|
# define PNG_FREE_ME_SUPPORTED
|
541
555
|
#endif
|
542
556
|
|
543
|
-
#
|
557
|
+
#ifdef PNG_READ_SUPPORTED
|
544
558
|
|
545
559
|
#if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \
|
546
560
|
!defined(PNG_NO_READ_TRANSFORMS)
|
@@ -628,7 +642,7 @@
|
|
628
642
|
|
629
643
|
#endif /* PNG_READ_SUPPORTED */
|
630
644
|
|
631
|
-
#
|
645
|
+
#ifdef PNG_WRITE_SUPPORTED
|
632
646
|
|
633
647
|
# if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \
|
634
648
|
!defined(PNG_NO_WRITE_TRANSFORMS)
|
@@ -731,7 +745,7 @@
|
|
731
745
|
# define PNG_EASY_ACCESS_SUPPORTED
|
732
746
|
#endif
|
733
747
|
|
734
|
-
/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0
|
748
|
+
/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0
|
735
749
|
* and removed from version 1.2.20. The following will be removed
|
736
750
|
* from libpng-1.4.0
|
737
751
|
*/
|
@@ -798,6 +812,11 @@
|
|
798
812
|
# define PNG_USER_HEIGHT_MAX 1000000L
|
799
813
|
#endif
|
800
814
|
|
815
|
+
/* Added at libpng-1.2.34 and 1.4.0 */
|
816
|
+
#ifndef PNG_STRING_NEWLINE
|
817
|
+
#define PNG_STRING_NEWLINE "\n"
|
818
|
+
#endif
|
819
|
+
|
801
820
|
/* These are currently experimental features, define them if you want */
|
802
821
|
|
803
822
|
/* very little testing */
|
@@ -925,14 +944,22 @@
|
|
925
944
|
# define PNG_READ_zTXt_SUPPORTED
|
926
945
|
# define PNG_zTXt_SUPPORTED
|
927
946
|
#endif
|
947
|
+
#ifndef PNG_NO_READ_OPT_PLTE
|
948
|
+
# define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */
|
949
|
+
#endif /* optional PLTE chunk in RGB and RGBA images */
|
950
|
+
#if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \
|
951
|
+
defined(PNG_READ_zTXt_SUPPORTED)
|
952
|
+
# define PNG_READ_TEXT_SUPPORTED
|
953
|
+
# define PNG_TEXT_SUPPORTED
|
954
|
+
#endif
|
955
|
+
|
956
|
+
#endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */
|
957
|
+
|
928
958
|
#ifndef PNG_NO_READ_UNKNOWN_CHUNKS
|
929
959
|
# define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
|
930
960
|
# ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
|
931
961
|
# define PNG_UNKNOWN_CHUNKS_SUPPORTED
|
932
962
|
# endif
|
933
|
-
# ifndef PNG_NO_HANDLE_AS_UNKNOWN
|
934
|
-
# define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
935
|
-
# endif
|
936
963
|
#endif
|
937
964
|
#if !defined(PNG_NO_READ_USER_CHUNKS) && \
|
938
965
|
defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
|
@@ -945,17 +972,14 @@
|
|
945
972
|
# undef PNG_NO_HANDLE_AS_UNKNOWN
|
946
973
|
# endif
|
947
974
|
#endif
|
948
|
-
#ifndef PNG_NO_READ_OPT_PLTE
|
949
|
-
# define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */
|
950
|
-
#endif /* optional PLTE chunk in RGB and RGBA images */
|
951
|
-
#if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \
|
952
|
-
defined(PNG_READ_zTXt_SUPPORTED)
|
953
|
-
# define PNG_READ_TEXT_SUPPORTED
|
954
|
-
# define PNG_TEXT_SUPPORTED
|
955
|
-
#endif
|
956
975
|
|
957
|
-
#
|
976
|
+
#ifndef PNG_NO_HANDLE_AS_UNKNOWN
|
977
|
+
# ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
978
|
+
# define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
979
|
+
# endif
|
980
|
+
#endif
|
958
981
|
|
982
|
+
#ifdef PNG_WRITE_SUPPORTED
|
959
983
|
#ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
|
960
984
|
|
961
985
|
#ifdef PNG_NO_WRITE_TEXT
|
@@ -1067,17 +1091,6 @@
|
|
1067
1091
|
# define PNG_zTXt_SUPPORTED
|
1068
1092
|
# endif
|
1069
1093
|
#endif
|
1070
|
-
#ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS
|
1071
|
-
# define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
|
1072
|
-
# ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
|
1073
|
-
# define PNG_UNKNOWN_CHUNKS_SUPPORTED
|
1074
|
-
# endif
|
1075
|
-
# ifndef PNG_NO_HANDLE_AS_UNKNOWN
|
1076
|
-
# ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
1077
|
-
# define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
1078
|
-
# endif
|
1079
|
-
# endif
|
1080
|
-
#endif
|
1081
1094
|
#if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \
|
1082
1095
|
defined(PNG_WRITE_zTXt_SUPPORTED)
|
1083
1096
|
# define PNG_WRITE_TEXT_SUPPORTED
|
@@ -1088,6 +1101,20 @@
|
|
1088
1101
|
|
1089
1102
|
#endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */
|
1090
1103
|
|
1104
|
+
#ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS
|
1105
|
+
# define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
|
1106
|
+
# ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
|
1107
|
+
# define PNG_UNKNOWN_CHUNKS_SUPPORTED
|
1108
|
+
# endif
|
1109
|
+
#endif
|
1110
|
+
|
1111
|
+
#ifndef PNG_NO_HANDLE_AS_UNKNOWN
|
1112
|
+
# ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
1113
|
+
# define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
1114
|
+
# endif
|
1115
|
+
#endif
|
1116
|
+
#endif /* PNG_WRITE_SUPPORTED */
|
1117
|
+
|
1091
1118
|
/* Turn this off to disable png_read_png() and
|
1092
1119
|
* png_write_png() and leave the row_pointers member
|
1093
1120
|
* out of the info structure.
|
@@ -1233,7 +1260,7 @@ typedef char FAR * FAR * FAR * png_charppp;
|
|
1233
1260
|
|
1234
1261
|
#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
|
1235
1262
|
/* SPC - Is this stuff deprecated? */
|
1236
|
-
/* It'll be removed as of libpng-1.
|
1263
|
+
/* It'll be removed as of libpng-1.4.0 - GR-P */
|
1237
1264
|
/* libpng typedefs for types in zlib. If zlib changes
|
1238
1265
|
* or another compression library is used, then change these.
|
1239
1266
|
* Eliminates need to change all the source files.
|
@@ -1306,7 +1333,7 @@ typedef z_stream FAR * png_zstreamp;
|
|
1306
1333
|
# define PNGAPI __cdecl
|
1307
1334
|
# undef PNG_IMPEXP
|
1308
1335
|
# define PNG_IMPEXP
|
1309
|
-
#endif
|
1336
|
+
#endif
|
1310
1337
|
|
1311
1338
|
/* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall",
|
1312
1339
|
* you may get warnings regarding the linkage of png_zalloc and png_zfree.
|
data/cairo/include/png.h
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
/* png.h - header file for PNG reference library
|
2
2
|
*
|
3
|
-
* libpng version 1.2.
|
4
|
-
* Copyright (c) 1998-
|
3
|
+
* libpng version 1.2.39 - August 13, 2009
|
4
|
+
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
5
5
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
6
6
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
7
7
|
*
|
8
|
+
* This code is released under the libpng license (See LICENSE, below)
|
9
|
+
*
|
8
10
|
* Authors and maintainers:
|
9
11
|
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
10
12
|
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
11
|
-
* libpng versions 0.97, January 1998, through 1.2.
|
13
|
+
* libpng versions 0.97, January 1998, through 1.2.39 - August 13, 2009: Glenn
|
12
14
|
* See also "Contributing Authors", below.
|
13
15
|
*
|
14
16
|
* Note about libpng version numbers:
|
@@ -207,6 +209,38 @@
|
|
207
209
|
* 1.2.32rc01 13 10232 12.so.0.32[.0]
|
208
210
|
* 1.0.40 10 10040 10.so.0.40[.0]
|
209
211
|
* 1.2.32 13 10232 12.so.0.32[.0]
|
212
|
+
* 1.2.33beta01-02 13 10233 12.so.0.33[.0]
|
213
|
+
* 1.2.33rc01-02 13 10233 12.so.0.33[.0]
|
214
|
+
* 1.0.41rc01 10 10041 10.so.0.41[.0]
|
215
|
+
* 1.2.33 13 10233 12.so.0.33[.0]
|
216
|
+
* 1.0.41 10 10041 10.so.0.41[.0]
|
217
|
+
* 1.2.34beta01-07 13 10234 12.so.0.34[.0]
|
218
|
+
* 1.0.42rc01 10 10042 10.so.0.42[.0]
|
219
|
+
* 1.2.34rc01 13 10234 12.so.0.34[.0]
|
220
|
+
* 1.0.42 10 10042 10.so.0.42[.0]
|
221
|
+
* 1.2.34 13 10234 12.so.0.34[.0]
|
222
|
+
* 1.2.35beta01-03 13 10235 12.so.0.35[.0]
|
223
|
+
* 1.0.43rc01-02 10 10043 10.so.0.43[.0]
|
224
|
+
* 1.2.35rc01-02 13 10235 12.so.0.35[.0]
|
225
|
+
* 1.0.43 10 10043 10.so.0.43[.0]
|
226
|
+
* 1.2.35 13 10235 12.so.0.35[.0]
|
227
|
+
* 1.2.36beta01-05 13 10236 12.so.0.36[.0]
|
228
|
+
* 1.2.36rc01 13 10236 12.so.0.36[.0]
|
229
|
+
* 1.0.44 10 10044 10.so.0.44[.0]
|
230
|
+
* 1.2.36 13 10236 12.so.0.36[.0]
|
231
|
+
* 1.2.37beta01-03 13 10237 12.so.0.37[.0]
|
232
|
+
* 1.2.37rc01 13 10237 12.so.0.37[.0]
|
233
|
+
* 1.2.37 13 10237 12.so.0.37[.0]
|
234
|
+
* 1.2.45 10 10045 12.so.0.45[.0]
|
235
|
+
* 1.0.46 10 10046 10.so.0.46[.0]
|
236
|
+
* 1.2.38beta01 13 10238 12.so.0.38[.0]
|
237
|
+
* 1.2.38rc01-03 13 10238 12.so.0.38[.0]
|
238
|
+
* 1.0.47 10 10047 10.so.0.47[.0]
|
239
|
+
* 1.2.38 13 10238 12.so.0.38[.0]
|
240
|
+
* 1.2.39beta01-05 13 10239 12.so.0.39[.0]
|
241
|
+
* 1.2.39rc01 13 10239 12.so.0.39[.0]
|
242
|
+
* 1.0.48 10 10048 10.so.0.48[.0]
|
243
|
+
* 1.2.39 13 10239 12.so.0.39[.0]
|
210
244
|
*
|
211
245
|
* Henceforth the source version will match the shared-library major
|
212
246
|
* and minor numbers; the shared-library major version number will be
|
@@ -236,8 +270,10 @@
|
|
236
270
|
* If you modify libpng you may insert additional notices immediately following
|
237
271
|
* this sentence.
|
238
272
|
*
|
239
|
-
*
|
240
|
-
*
|
273
|
+
* This code is released under the libpng license.
|
274
|
+
*
|
275
|
+
* libpng versions 1.2.6, August 15, 2004, through 1.2.39, August 13, 2009, are
|
276
|
+
* Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson, and are
|
241
277
|
* distributed according to the same disclaimer and license as libpng-1.2.5
|
242
278
|
* with the following individual added to the list of Contributing Authors:
|
243
279
|
*
|
@@ -348,13 +384,13 @@
|
|
348
384
|
* Y2K compliance in libpng:
|
349
385
|
* =========================
|
350
386
|
*
|
351
|
-
*
|
387
|
+
* August 13, 2009
|
352
388
|
*
|
353
389
|
* Since the PNG Development group is an ad-hoc body, we can't make
|
354
390
|
* an official declaration.
|
355
391
|
*
|
356
392
|
* This is your unofficial assurance that libpng from version 0.71 and
|
357
|
-
* upward through 1.2.
|
393
|
+
* upward through 1.2.39 are Y2K compliant. It is my belief that earlier
|
358
394
|
* versions were also Y2K compliant.
|
359
395
|
*
|
360
396
|
* Libpng only has three year fields. One is a 2-byte unsigned integer
|
@@ -410,9 +446,9 @@
|
|
410
446
|
*/
|
411
447
|
|
412
448
|
/* Version information for png.h - this should match the version in png.c */
|
413
|
-
#define PNG_LIBPNG_VER_STRING "1.2.
|
449
|
+
#define PNG_LIBPNG_VER_STRING "1.2.39"
|
414
450
|
#define PNG_HEADER_VERSION_STRING \
|
415
|
-
" libpng version 1.2.
|
451
|
+
" libpng version 1.2.39 - August 13, 2009\n"
|
416
452
|
|
417
453
|
#define PNG_LIBPNG_VER_SONUM 0
|
418
454
|
#define PNG_LIBPNG_VER_DLLNUM 13
|
@@ -420,9 +456,10 @@
|
|
420
456
|
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
421
457
|
#define PNG_LIBPNG_VER_MAJOR 1
|
422
458
|
#define PNG_LIBPNG_VER_MINOR 2
|
423
|
-
#define PNG_LIBPNG_VER_RELEASE
|
459
|
+
#define PNG_LIBPNG_VER_RELEASE 39
|
424
460
|
/* This should match the numeric part of the final component of
|
425
|
-
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
|
461
|
+
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
|
462
|
+
*/
|
426
463
|
|
427
464
|
#define PNG_LIBPNG_VER_BUILD 0
|
428
465
|
|
@@ -432,7 +469,7 @@
|
|
432
469
|
#define PNG_LIBPNG_BUILD_RC 3
|
433
470
|
#define PNG_LIBPNG_BUILD_STABLE 4
|
434
471
|
#define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7
|
435
|
-
|
472
|
+
|
436
473
|
/* Release-Specific Flags */
|
437
474
|
#define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with
|
438
475
|
PNG_LIBPNG_BUILD_STABLE only */
|
@@ -447,8 +484,9 @@
|
|
447
484
|
* We must not include leading zeros.
|
448
485
|
* Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
|
449
486
|
* version 1.0.0 was mis-numbered 100 instead of 10000). From
|
450
|
-
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
|
451
|
-
|
487
|
+
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
|
488
|
+
*/
|
489
|
+
#define PNG_LIBPNG_VER 10239 /* 1.2.39 */
|
452
490
|
|
453
491
|
#ifndef PNG_VERSION_INFO_ONLY
|
454
492
|
/* include the compression library's header */
|
@@ -463,12 +501,12 @@
|
|
463
501
|
/* Ref MSDN: Private as priority over Special
|
464
502
|
* VS_FF_PRIVATEBUILD File *was not* built using standard release
|
465
503
|
* procedures. If this value is given, the StringFileInfo block must
|
466
|
-
* contain a PrivateBuild string.
|
504
|
+
* contain a PrivateBuild string.
|
467
505
|
*
|
468
506
|
* VS_FF_SPECIALBUILD File *was* built by the original company using
|
469
507
|
* standard release procedures but is a variation of the standard
|
470
508
|
* file of the same version number. If this value is given, the
|
471
|
-
* StringFileInfo block must contain a SpecialBuild string.
|
509
|
+
* StringFileInfo block must contain a SpecialBuild string.
|
472
510
|
*/
|
473
511
|
|
474
512
|
#if defined(PNG_USER_PRIVATEBUILD)
|
@@ -530,7 +568,7 @@ extern "C" {
|
|
530
568
|
#define png_write_status_ptr_NULL NULL
|
531
569
|
#endif
|
532
570
|
|
533
|
-
/*
|
571
|
+
/* Variables declared in png.c - only it needs to define PNG_NO_EXTERN */
|
534
572
|
#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
|
535
573
|
/* Version information for C files, stored in png.c. This had better match
|
536
574
|
* the version above.
|
@@ -656,7 +694,8 @@ typedef png_text FAR * FAR * png_textpp;
|
|
656
694
|
#endif
|
657
695
|
|
658
696
|
/* Supported compression types for text in PNG files (tEXt, and zTXt).
|
659
|
-
* The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed.
|
697
|
+
* The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed.
|
698
|
+
*/
|
660
699
|
#define PNG_TEXT_COMPRESSION_NONE_WR -3
|
661
700
|
#define PNG_TEXT_COMPRESSION_zTXt_WR -2
|
662
701
|
#define PNG_TEXT_COMPRESSION_NONE -1
|
@@ -683,7 +722,8 @@ typedef struct png_time_struct
|
|
683
722
|
typedef png_time FAR * png_timep;
|
684
723
|
typedef png_time FAR * FAR * png_timepp;
|
685
724
|
|
686
|
-
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
725
|
+
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \
|
726
|
+
defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
|
687
727
|
/* png_unknown_chunk is a structure to hold queued chunks for which there is
|
688
728
|
* no specific support. The idea is that we can use this to queue
|
689
729
|
* up private chunks for output even though the library doesn't actually
|
@@ -918,8 +958,9 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
|
|
918
958
|
png_uint_32 free_me; /* flags items libpng is responsible for freeing */
|
919
959
|
#endif
|
920
960
|
|
921
|
-
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
922
|
-
|
961
|
+
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \
|
962
|
+
defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
|
963
|
+
/* Storage for unknown chunks that the library doesn't recognize. */
|
923
964
|
png_unknown_chunkp unknown_chunks;
|
924
965
|
png_size_t unknown_chunks_num;
|
925
966
|
#endif
|
@@ -934,7 +975,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
|
|
934
975
|
#endif
|
935
976
|
|
936
977
|
#if defined(PNG_sPLT_SUPPORTED)
|
937
|
-
/*
|
978
|
+
/* Data on sPLT chunks (there may be more than one). */
|
938
979
|
png_sPLT_tp splt_palettes;
|
939
980
|
png_uint_32 splt_palettes_num;
|
940
981
|
#endif
|
@@ -1149,7 +1190,10 @@ typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp));
|
|
1149
1190
|
#define PNG_TRANSFORM_SWAP_ALPHA 0x0100 /* read and write */
|
1150
1191
|
#define PNG_TRANSFORM_SWAP_ENDIAN 0x0200 /* read and write */
|
1151
1192
|
#define PNG_TRANSFORM_INVERT_ALPHA 0x0400 /* read and write */
|
1152
|
-
#define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* WRITE only */
|
1193
|
+
#define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* WRITE only, deprecated */
|
1194
|
+
/* Added to libpng-1.2.34 */
|
1195
|
+
#define PNG_TRANSFORM_STRIP_FILLER_BEFORE 0x0800 /* WRITE only */
|
1196
|
+
#define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* WRITE only */
|
1153
1197
|
|
1154
1198
|
/* Flags for MNG supported features */
|
1155
1199
|
#define PNG_FLAG_MNG_EMPTY_PLTE 0x01
|
@@ -1266,7 +1310,7 @@ struct png_struct_def
|
|
1266
1310
|
#endif /* PNG_bKGD_SUPPORTED */
|
1267
1311
|
|
1268
1312
|
#if defined(PNG_WRITE_FLUSH_SUPPORTED)
|
1269
|
-
png_flush_ptr output_flush_fn
|
1313
|
+
png_flush_ptr output_flush_fn; /* Function for flushing output */
|
1270
1314
|
png_uint_32 flush_dist; /* how many rows apart to flush, 0 - no flush */
|
1271
1315
|
png_uint_32 flush_rows; /* number of rows written since last flush */
|
1272
1316
|
#endif
|
@@ -1364,7 +1408,7 @@ struct png_struct_def
|
|
1364
1408
|
/* New members added in libpng-1.0.6 */
|
1365
1409
|
|
1366
1410
|
#ifdef PNG_FREE_ME_SUPPORTED
|
1367
|
-
png_uint_32 free_me;
|
1411
|
+
png_uint_32 free_me; /* flags items libpng is responsible for freeing */
|
1368
1412
|
#endif
|
1369
1413
|
|
1370
1414
|
#if defined(PNG_USER_CHUNKS_SUPPORTED)
|
@@ -1372,7 +1416,7 @@ struct png_struct_def
|
|
1372
1416
|
png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */
|
1373
1417
|
#endif
|
1374
1418
|
|
1375
|
-
#
|
1419
|
+
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
1376
1420
|
int num_chunk_list;
|
1377
1421
|
png_bytep chunk_list;
|
1378
1422
|
#endif
|
@@ -1426,21 +1470,21 @@ struct png_struct_def
|
|
1426
1470
|
|
1427
1471
|
/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */
|
1428
1472
|
#ifdef PNG_USER_MEM_SUPPORTED
|
1429
|
-
png_voidp mem_ptr;
|
1430
|
-
png_malloc_ptr malloc_fn;
|
1431
|
-
png_free_ptr free_fn;
|
1473
|
+
png_voidp mem_ptr; /* user supplied struct for mem functions */
|
1474
|
+
png_malloc_ptr malloc_fn; /* function for allocating memory */
|
1475
|
+
png_free_ptr free_fn; /* function for freeing memory */
|
1432
1476
|
#endif
|
1433
1477
|
|
1434
1478
|
/* New member added in libpng-1.0.13 and 1.2.0 */
|
1435
|
-
png_bytep big_row_buf;
|
1479
|
+
png_bytep big_row_buf; /* buffer to save current (unfiltered) row */
|
1436
1480
|
|
1437
1481
|
#if defined(PNG_READ_DITHER_SUPPORTED)
|
1438
1482
|
/* The following three members were added at version 1.0.14 and 1.2.4 */
|
1439
|
-
png_bytep dither_sort;
|
1440
|
-
png_bytep index_to_palette;
|
1441
|
-
|
1442
|
-
png_bytep palette_to_index;
|
1443
|
-
|
1483
|
+
png_bytep dither_sort; /* working sort array */
|
1484
|
+
png_bytep index_to_palette; /* where the original index currently is */
|
1485
|
+
/* in the palette */
|
1486
|
+
png_bytep palette_to_index; /* which original index points to this */
|
1487
|
+
/* palette color */
|
1444
1488
|
#endif
|
1445
1489
|
|
1446
1490
|
/* New members added in libpng-1.0.16 and 1.2.6 */
|
@@ -1453,7 +1497,7 @@ struct png_struct_def
|
|
1453
1497
|
|
1454
1498
|
/* New member added in libpng-1.0.25 and 1.2.17 */
|
1455
1499
|
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
1456
|
-
/*
|
1500
|
+
/* Storage for unknown chunk that the library doesn't recognize. */
|
1457
1501
|
png_unknown_chunk unknown_chunk;
|
1458
1502
|
#endif
|
1459
1503
|
|
@@ -1469,7 +1513,7 @@ struct png_struct_def
|
|
1469
1513
|
/* This triggers a compiler error in png.c, if png.c and png.h
|
1470
1514
|
* do not agree upon the version number.
|
1471
1515
|
*/
|
1472
|
-
typedef png_structp
|
1516
|
+
typedef png_structp version_1_2_39;
|
1473
1517
|
|
1474
1518
|
typedef png_struct FAR * FAR * png_structpp;
|
1475
1519
|
|
@@ -1573,7 +1617,7 @@ extern PNG_EXPORT(void,png_write_info) PNGARG((png_structp png_ptr,
|
|
1573
1617
|
png_infop info_ptr));
|
1574
1618
|
|
1575
1619
|
#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
|
1576
|
-
/*
|
1620
|
+
/* Read the information before the actual image data. */
|
1577
1621
|
extern PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr,
|
1578
1622
|
png_infop info_ptr));
|
1579
1623
|
#endif
|
@@ -1586,11 +1630,11 @@ extern PNG_EXPORT(png_charp,png_convert_to_rfc1123)
|
|
1586
1630
|
#if !defined(_WIN32_WCE)
|
1587
1631
|
/* "time.h" functions are not supported on WindowsCE */
|
1588
1632
|
#if defined(PNG_WRITE_tIME_SUPPORTED)
|
1589
|
-
/*
|
1633
|
+
/* Convert from a struct tm to png_time */
|
1590
1634
|
extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime,
|
1591
1635
|
struct tm FAR * ttime));
|
1592
1636
|
|
1593
|
-
/*
|
1637
|
+
/* Convert from time_t to png_time. Uses gmtime() */
|
1594
1638
|
extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime,
|
1595
1639
|
time_t ttime));
|
1596
1640
|
#endif /* PNG_WRITE_tIME_SUPPORTED */
|
@@ -1710,7 +1754,7 @@ extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr,
|
|
1710
1754
|
#endif
|
1711
1755
|
|
1712
1756
|
#if defined(PNG_READ_16_TO_8_SUPPORTED)
|
1713
|
-
/*
|
1757
|
+
/* Strip the second byte of information from a 16-bit depth file. */
|
1714
1758
|
extern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr));
|
1715
1759
|
#endif
|
1716
1760
|
|
@@ -1746,74 +1790,74 @@ extern PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows));
|
|
1746
1790
|
extern PNG_EXPORT(void,png_write_flush) PNGARG((png_structp png_ptr));
|
1747
1791
|
#endif
|
1748
1792
|
|
1749
|
-
/*
|
1793
|
+
/* Optional update palette with requested transformations */
|
1750
1794
|
extern PNG_EXPORT(void,png_start_read_image) PNGARG((png_structp png_ptr));
|
1751
1795
|
|
1752
|
-
/*
|
1796
|
+
/* Optional call to update the users info structure */
|
1753
1797
|
extern PNG_EXPORT(void,png_read_update_info) PNGARG((png_structp png_ptr,
|
1754
1798
|
png_infop info_ptr));
|
1755
1799
|
|
1756
1800
|
#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
|
1757
|
-
/*
|
1801
|
+
/* Read one or more rows of image data. */
|
1758
1802
|
extern PNG_EXPORT(void,png_read_rows) PNGARG((png_structp png_ptr,
|
1759
1803
|
png_bytepp row, png_bytepp display_row, png_uint_32 num_rows));
|
1760
1804
|
#endif
|
1761
1805
|
|
1762
1806
|
#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
|
1763
|
-
/*
|
1807
|
+
/* Read a row of data. */
|
1764
1808
|
extern PNG_EXPORT(void,png_read_row) PNGARG((png_structp png_ptr,
|
1765
1809
|
png_bytep row,
|
1766
1810
|
png_bytep display_row));
|
1767
1811
|
#endif
|
1768
1812
|
|
1769
1813
|
#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
|
1770
|
-
/*
|
1814
|
+
/* Read the whole image into memory at once. */
|
1771
1815
|
extern PNG_EXPORT(void,png_read_image) PNGARG((png_structp png_ptr,
|
1772
1816
|
png_bytepp image));
|
1773
1817
|
#endif
|
1774
1818
|
|
1775
|
-
/*
|
1819
|
+
/* Write a row of image data */
|
1776
1820
|
extern PNG_EXPORT(void,png_write_row) PNGARG((png_structp png_ptr,
|
1777
1821
|
png_bytep row));
|
1778
1822
|
|
1779
|
-
/*
|
1823
|
+
/* Write a few rows of image data */
|
1780
1824
|
extern PNG_EXPORT(void,png_write_rows) PNGARG((png_structp png_ptr,
|
1781
1825
|
png_bytepp row, png_uint_32 num_rows));
|
1782
1826
|
|
1783
|
-
/*
|
1827
|
+
/* Write the image data */
|
1784
1828
|
extern PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr,
|
1785
1829
|
png_bytepp image));
|
1786
1830
|
|
1787
|
-
/*
|
1831
|
+
/* Writes the end of the PNG file. */
|
1788
1832
|
extern PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr,
|
1789
1833
|
png_infop info_ptr));
|
1790
1834
|
|
1791
1835
|
#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
|
1792
|
-
/*
|
1836
|
+
/* Read the end of the PNG file. */
|
1793
1837
|
extern PNG_EXPORT(void,png_read_end) PNGARG((png_structp png_ptr,
|
1794
1838
|
png_infop info_ptr));
|
1795
1839
|
#endif
|
1796
1840
|
|
1797
|
-
/*
|
1841
|
+
/* Free any memory associated with the png_info_struct */
|
1798
1842
|
extern PNG_EXPORT(void,png_destroy_info_struct) PNGARG((png_structp png_ptr,
|
1799
1843
|
png_infopp info_ptr_ptr));
|
1800
1844
|
|
1801
|
-
/*
|
1845
|
+
/* Free any memory associated with the png_struct and the png_info_structs */
|
1802
1846
|
extern PNG_EXPORT(void,png_destroy_read_struct) PNGARG((png_structpp
|
1803
1847
|
png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr));
|
1804
1848
|
|
1805
|
-
/*
|
1849
|
+
/* Free all memory used by the read (old method - NOT DLL EXPORTED) */
|
1806
1850
|
extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr,
|
1807
1851
|
png_infop end_info_ptr));
|
1808
1852
|
|
1809
|
-
/*
|
1853
|
+
/* Free any memory associated with the png_struct and the png_info_structs */
|
1810
1854
|
extern PNG_EXPORT(void,png_destroy_write_struct)
|
1811
1855
|
PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr));
|
1812
1856
|
|
1813
|
-
/*
|
1857
|
+
/* Free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */
|
1814
1858
|
extern void png_write_destroy PNGARG((png_structp png_ptr));
|
1815
1859
|
|
1816
|
-
/*
|
1860
|
+
/* Set the libpng method of handling chunk CRC errors */
|
1817
1861
|
extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr,
|
1818
1862
|
int crit_action, int ancil_action));
|
1819
1863
|
|
@@ -1841,7 +1885,7 @@ extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr,
|
|
1841
1885
|
* header file (zlib.h) for an explination of the compression functions.
|
1842
1886
|
*/
|
1843
1887
|
|
1844
|
-
/*
|
1888
|
+
/* Set the filtering method(s) used by libpng. Currently, the only valid
|
1845
1889
|
* value for "method" is 0.
|
1846
1890
|
*/
|
1847
1891
|
extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method,
|
@@ -1969,6 +2013,11 @@ extern PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr));
|
|
1969
2013
|
* If buffered output is not used, then output_flush_fn can be set to NULL.
|
1970
2014
|
* If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time
|
1971
2015
|
* output_flush_fn will be ignored (and thus can be NULL).
|
2016
|
+
* It is probably a mistake to use NULL for output_flush_fn if
|
2017
|
+
* write_data_fn is not also NULL unless you have built libpng with
|
2018
|
+
* PNG_WRITE_FLUSH_SUPPORTED undefined, because in this case libpng's
|
2019
|
+
* default flush function, which uses the standard *FILE structure, will
|
2020
|
+
* be used.
|
1972
2021
|
*/
|
1973
2022
|
extern PNG_EXPORT(void,png_set_write_fn) PNGARG((png_structp png_ptr,
|
1974
2023
|
png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn));
|
@@ -2033,11 +2082,11 @@ extern PNG_EXPORT(void,png_set_progressive_read_fn) PNGARG((png_structp png_ptr,
|
|
2033
2082
|
png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,
|
2034
2083
|
png_progressive_end_ptr end_fn));
|
2035
2084
|
|
2036
|
-
/*
|
2085
|
+
/* Returns the user pointer associated with the push read functions */
|
2037
2086
|
extern PNG_EXPORT(png_voidp,png_get_progressive_ptr)
|
2038
2087
|
PNGARG((png_structp png_ptr));
|
2039
2088
|
|
2040
|
-
/*
|
2089
|
+
/* Function to be called when data becomes available */
|
2041
2090
|
extern PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr,
|
2042
2091
|
png_infop info_ptr, png_bytep buffer, png_size_t buffer_size));
|
2043
2092
|
|
@@ -2059,7 +2108,7 @@ extern PNG_EXPORT(png_voidp,png_malloc_warn) PNGARG((png_structp png_ptr,
|
|
2059
2108
|
png_uint_32 size));
|
2060
2109
|
#endif
|
2061
2110
|
|
2062
|
-
/*
|
2111
|
+
/* Frees a pointer allocated by png_malloc() */
|
2063
2112
|
extern PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr));
|
2064
2113
|
|
2065
2114
|
#if defined(PNG_1_0_X)
|
@@ -2076,11 +2125,12 @@ extern PNG_EXPORT(void,png_free_data) PNGARG((png_structp png_ptr,
|
|
2076
2125
|
png_infop info_ptr, png_uint_32 free_me, int num));
|
2077
2126
|
#ifdef PNG_FREE_ME_SUPPORTED
|
2078
2127
|
/* Reassign responsibility for freeing existing data, whether allocated
|
2079
|
-
* by libpng or by the application
|
2128
|
+
* by libpng or by the application
|
2129
|
+
*/
|
2080
2130
|
extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr,
|
2081
2131
|
png_infop info_ptr, int freer, png_uint_32 mask));
|
2082
2132
|
#endif
|
2083
|
-
/*
|
2133
|
+
/* Assignments for png_data_freer */
|
2084
2134
|
#define PNG_DESTROY_WILL_FREE_DATA 1
|
2085
2135
|
#define PNG_SET_WILL_FREE_DATA 1
|
2086
2136
|
#define PNG_USER_WILL_FREE_DATA 2
|
@@ -2164,11 +2214,13 @@ png_infop info_ptr));
|
|
2164
2214
|
|
2165
2215
|
#if defined(PNG_INFO_IMAGE_SUPPORTED)
|
2166
2216
|
/* Returns row_pointers, which is an array of pointers to scanlines that was
|
2167
|
-
returned from png_read_png().
|
2217
|
+
* returned from png_read_png().
|
2218
|
+
*/
|
2168
2219
|
extern PNG_EXPORT(png_bytepp,png_get_rows) PNGARG((png_structp png_ptr,
|
2169
2220
|
png_infop info_ptr));
|
2170
2221
|
/* Set row_pointers, which is an array of pointers to scanlines for use
|
2171
|
-
by png_write_png().
|
2222
|
+
* by png_write_png().
|
2223
|
+
*/
|
2172
2224
|
extern PNG_EXPORT(void,png_set_rows) PNGARG((png_structp png_ptr,
|
2173
2225
|
png_infop info_ptr, png_bytepp row_pointers));
|
2174
2226
|
#endif
|
@@ -2469,8 +2521,8 @@ extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr,
|
|
2469
2521
|
#endif
|
2470
2522
|
#endif /* PNG_sCAL_SUPPORTED || PNG_WRITE_sCAL_SUPPORTED */
|
2471
2523
|
|
2472
|
-
#
|
2473
|
-
/*
|
2524
|
+
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
2525
|
+
/* Provide a list of chunks and how they are to be handled, if the built-in
|
2474
2526
|
handling or default unknown chunk handling is not desired. Any chunks not
|
2475
2527
|
listed will be handled in the default manner. The IHDR and IEND chunks
|
2476
2528
|
must not be listed.
|
@@ -2481,6 +2533,10 @@ extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr,
|
|
2481
2533
|
*/
|
2482
2534
|
extern PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp
|
2483
2535
|
png_ptr, int keep, png_bytep chunk_list, int num_chunks));
|
2536
|
+
PNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep
|
2537
|
+
chunk_name));
|
2538
|
+
#endif
|
2539
|
+
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
2484
2540
|
extern PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr,
|
2485
2541
|
png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns));
|
2486
2542
|
extern PNG_EXPORT(void, png_set_unknown_chunk_location)
|
@@ -2488,14 +2544,11 @@ extern PNG_EXPORT(void, png_set_unknown_chunk_location)
|
|
2488
2544
|
extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp
|
2489
2545
|
png_ptr, png_infop info_ptr, png_unknown_chunkpp entries));
|
2490
2546
|
#endif
|
2491
|
-
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
2492
|
-
PNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep
|
2493
|
-
chunk_name));
|
2494
|
-
#endif
|
2495
2547
|
|
2496
2548
|
/* Png_free_data() will turn off the "valid" flag for anything it frees.
|
2497
|
-
|
2498
|
-
|
2549
|
+
* If you need to turn it off for a chunk that your application has freed,
|
2550
|
+
* you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK);
|
2551
|
+
*/
|
2499
2552
|
extern PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr,
|
2500
2553
|
png_infop info_ptr, int mask));
|
2501
2554
|
|
@@ -2521,34 +2574,90 @@ extern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr,
|
|
2521
2574
|
#if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER)
|
2522
2575
|
#include <crtdbg.h>
|
2523
2576
|
#if (PNG_DEBUG > 1)
|
2524
|
-
#
|
2525
|
-
#define
|
2526
|
-
#
|
2577
|
+
#ifndef _DEBUG
|
2578
|
+
# define _DEBUG
|
2579
|
+
#endif
|
2580
|
+
#ifndef png_debug
|
2581
|
+
#define png_debug(l,m) _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE)
|
2582
|
+
#endif
|
2583
|
+
#ifndef png_debug1
|
2584
|
+
#define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1)
|
2585
|
+
#endif
|
2586
|
+
#ifndef png_debug2
|
2587
|
+
#define png_debug2(l,m,p1,p2) _RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2)
|
2588
|
+
#endif
|
2527
2589
|
#endif
|
2528
2590
|
#else /* PNG_DEBUG_FILE || !_MSC_VER */
|
2529
2591
|
#ifndef PNG_DEBUG_FILE
|
2530
2592
|
#define PNG_DEBUG_FILE stderr
|
2531
2593
|
#endif /* PNG_DEBUG_FILE */
|
2594
|
+
|
2532
2595
|
#if (PNG_DEBUG > 1)
|
2533
|
-
|
2534
|
-
|
2535
|
-
|
2536
|
-
|
2537
|
-
|
2538
|
-
|
2539
|
-
|
2540
|
-
|
2541
|
-
|
2542
|
-
|
2543
|
-
|
2544
|
-
|
2545
|
-
#
|
2546
|
-
|
2547
|
-
|
2548
|
-
|
2549
|
-
(
|
2550
|
-
|
2596
|
+
/* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on non-ISO
|
2597
|
+
* compilers.
|
2598
|
+
*/
|
2599
|
+
# ifdef __STDC__
|
2600
|
+
# ifndef png_debug
|
2601
|
+
# define png_debug(l,m) \
|
2602
|
+
{ \
|
2603
|
+
int num_tabs=l; \
|
2604
|
+
fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
|
2605
|
+
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \
|
2606
|
+
}
|
2607
|
+
# endif
|
2608
|
+
# ifndef png_debug1
|
2609
|
+
# define png_debug1(l,m,p1) \
|
2610
|
+
{ \
|
2611
|
+
int num_tabs=l; \
|
2612
|
+
fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
|
2613
|
+
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \
|
2614
|
+
}
|
2615
|
+
# endif
|
2616
|
+
# ifndef png_debug2
|
2617
|
+
# define png_debug2(l,m,p1,p2) \
|
2618
|
+
{ \
|
2619
|
+
int num_tabs=l; \
|
2620
|
+
fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
|
2621
|
+
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \
|
2622
|
+
}
|
2623
|
+
# endif
|
2624
|
+
# else /* __STDC __ */
|
2625
|
+
# ifndef png_debug
|
2626
|
+
# define png_debug(l,m) \
|
2627
|
+
{ \
|
2628
|
+
int num_tabs=l; \
|
2629
|
+
char format[256]; \
|
2630
|
+
snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
|
2631
|
+
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
|
2632
|
+
m,PNG_STRING_NEWLINE); \
|
2633
|
+
fprintf(PNG_DEBUG_FILE,format); \
|
2634
|
+
}
|
2635
|
+
# endif
|
2636
|
+
# ifndef png_debug1
|
2637
|
+
# define png_debug1(l,m,p1) \
|
2638
|
+
{ \
|
2639
|
+
int num_tabs=l; \
|
2640
|
+
char format[256]; \
|
2641
|
+
snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
|
2642
|
+
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
|
2643
|
+
m,PNG_STRING_NEWLINE); \
|
2644
|
+
fprintf(PNG_DEBUG_FILE,format,p1); \
|
2645
|
+
}
|
2646
|
+
# endif
|
2647
|
+
# ifndef png_debug2
|
2648
|
+
# define png_debug2(l,m,p1,p2) \
|
2649
|
+
{ \
|
2650
|
+
int num_tabs=l; \
|
2651
|
+
char format[256]; \
|
2652
|
+
snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
|
2653
|
+
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
|
2654
|
+
m,PNG_STRING_NEWLINE); \
|
2655
|
+
fprintf(PNG_DEBUG_FILE,format,p1,p2); \
|
2656
|
+
}
|
2657
|
+
# endif
|
2658
|
+
# endif /* __STDC __ */
|
2551
2659
|
#endif /* (PNG_DEBUG > 1) */
|
2660
|
+
|
2552
2661
|
#endif /* _MSC_VER */
|
2553
2662
|
#endif /* (PNG_DEBUG > 0) */
|
2554
2663
|
#endif /* PNG_DEBUG */
|
@@ -2643,17 +2752,17 @@ extern PNG_EXPORT(void,png_set_mmx_thresholds)
|
|
2643
2752
|
#if !defined(PNG_1_0_X)
|
2644
2753
|
/* png.c, pnggccrd.c, or pngvcrd.c */
|
2645
2754
|
extern PNG_EXPORT(int,png_mmx_support) PNGARG((void));
|
2755
|
+
#endif /* PNG_1_0_X */
|
2646
2756
|
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
|
2647
2757
|
|
2648
2758
|
/* Strip the prepended error numbers ("#nnn ") from error and warning
|
2649
|
-
* messages before passing them to the error or warning handler.
|
2759
|
+
* messages before passing them to the error or warning handler.
|
2760
|
+
*/
|
2650
2761
|
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
|
2651
2762
|
extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp
|
2652
2763
|
png_ptr, png_uint_32 strip_mode));
|
2653
2764
|
#endif
|
2654
2765
|
|
2655
|
-
#endif /* PNG_1_0_X */
|
2656
|
-
|
2657
2766
|
/* Added at libpng-1.2.6 */
|
2658
2767
|
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
|
2659
2768
|
extern PNG_EXPORT(void,png_set_user_limits) PNGARG((png_structp
|
@@ -2665,7 +2774,9 @@ extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp
|
|
2665
2774
|
#endif
|
2666
2775
|
|
2667
2776
|
|
2668
|
-
/* Maintainer: Put new public prototypes here ^, in libpng.3, and
|
2777
|
+
/* Maintainer: Put new public prototypes here ^, in libpng.3, and in
|
2778
|
+
* project defs
|
2779
|
+
*/
|
2669
2780
|
|
2670
2781
|
#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
|
2671
2782
|
/* With these routines we avoid an integer divide, which will be slower on
|
@@ -2694,7 +2805,7 @@ extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp
|
|
2694
2805
|
(png_uint_32)(alpha)) + (png_uint_32)32768L); \
|
2695
2806
|
(composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); }
|
2696
2807
|
|
2697
|
-
#else /*
|
2808
|
+
#else /* Standard method using integer division */
|
2698
2809
|
|
2699
2810
|
# define png_composite(composite, fg, alpha, bg) \
|
2700
2811
|
(composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) + \
|
@@ -2777,7 +2888,7 @@ extern PNG_EXPORT(void,png_save_uint_16)
|
|
2777
2888
|
#define PNG_HAVE_PNG_SIGNATURE 0x1000
|
2778
2889
|
#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */
|
2779
2890
|
|
2780
|
-
/*
|
2891
|
+
/* Flags for the transformations the PNG library does on the image data */
|
2781
2892
|
#define PNG_BGR 0x0001
|
2782
2893
|
#define PNG_INTERLACE 0x0002
|
2783
2894
|
#define PNG_PACK 0x0004
|
@@ -2811,7 +2922,7 @@ extern PNG_EXPORT(void,png_save_uint_16)
|
|
2811
2922
|
/* 0x20000000L unused */
|
2812
2923
|
/* 0x40000000L unused */
|
2813
2924
|
|
2814
|
-
/*
|
2925
|
+
/* Flags for png_create_struct */
|
2815
2926
|
#define PNG_STRUCT_PNG 0x0001
|
2816
2927
|
#define PNG_STRUCT_INFO 0x0002
|
2817
2928
|
|
@@ -2821,7 +2932,7 @@ extern PNG_EXPORT(void,png_save_uint_16)
|
|
2821
2932
|
#define PNG_COST_SHIFT 3
|
2822
2933
|
#define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT))
|
2823
2934
|
|
2824
|
-
/*
|
2935
|
+
/* Flags for the png_ptr->flags rather than declaring a byte for each one */
|
2825
2936
|
#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001
|
2826
2937
|
#define PNG_FLAG_ZLIB_CUSTOM_LEVEL 0x0002
|
2827
2938
|
#define PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL 0x0004
|
@@ -2863,7 +2974,7 @@ extern PNG_EXPORT(void,png_save_uint_16)
|
|
2863
2974
|
#define PNG_FLAG_CRC_MASK (PNG_FLAG_CRC_ANCILLARY_MASK | \
|
2864
2975
|
PNG_FLAG_CRC_CRITICAL_MASK)
|
2865
2976
|
|
2866
|
-
/*
|
2977
|
+
/* Save typing and make code easier to understand */
|
2867
2978
|
|
2868
2979
|
#define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \
|
2869
2980
|
abs((int)((c1).green) - (int)((c2).green)) + \
|
@@ -2876,13 +2987,14 @@ extern PNG_EXPORT(void,png_save_uint_16)
|
|
2876
2987
|
(( ((width) * ((png_uint_32)(pixel_bits))) + 7) >> 3) )
|
2877
2988
|
|
2878
2989
|
/* PNG_OUT_OF_RANGE returns true if value is outside the range
|
2879
|
-
|
2880
|
-
|
2881
|
-
|
2990
|
+
* ideal-delta..ideal+delta. Each argument is evaluated twice.
|
2991
|
+
* "ideal" and "delta" should be constants, normally simple
|
2992
|
+
* integers, "value" a variable. Added to libpng-1.2.6 JB
|
2993
|
+
*/
|
2882
2994
|
#define PNG_OUT_OF_RANGE(value, ideal, delta) \
|
2883
2995
|
( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )
|
2884
2996
|
|
2885
|
-
/*
|
2997
|
+
/* Variables declared in png.c - only it needs to define PNG_NO_EXTERN */
|
2886
2998
|
#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
|
2887
2999
|
/* place to hold the signature string for a PNG file. */
|
2888
3000
|
#ifdef PNG_USE_GLOBAL_ARRAYS
|
@@ -3003,7 +3115,8 @@ PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr));
|
|
3003
3115
|
#endif
|
3004
3116
|
|
3005
3117
|
/* Next four functions are used internally as callbacks. PNGAPI is required
|
3006
|
-
* but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3.
|
3118
|
+
* but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3.
|
3119
|
+
*/
|
3007
3120
|
|
3008
3121
|
PNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr,
|
3009
3122
|
png_bytep data, png_size_t length));
|
@@ -3068,10 +3181,10 @@ PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr,
|
|
3068
3181
|
PNG_EXTERN void png_flush PNGARG((png_structp png_ptr));
|
3069
3182
|
#endif
|
3070
3183
|
|
3071
|
-
/*
|
3184
|
+
/* Simple function to write the signature */
|
3072
3185
|
PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr));
|
3073
3186
|
|
3074
|
-
/*
|
3187
|
+
/* Write various chunks */
|
3075
3188
|
|
3076
3189
|
/* Write the IHDR chunk, and update the png_struct with the necessary
|
3077
3190
|
* information.
|
@@ -3223,12 +3336,12 @@ PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr));
|
|
3223
3336
|
PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr));
|
3224
3337
|
#endif
|
3225
3338
|
|
3226
|
-
/*
|
3339
|
+
/* Combine a row of data, dealing with alpha, etc. if requested */
|
3227
3340
|
PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row,
|
3228
3341
|
int mask));
|
3229
3342
|
|
3230
3343
|
#if defined(PNG_READ_INTERLACING_SUPPORTED)
|
3231
|
-
/*
|
3344
|
+
/* Expand an interlaced row */
|
3232
3345
|
/* OLD pre-1.0.9 interface:
|
3233
3346
|
PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info,
|
3234
3347
|
png_bytep row, int pass, png_uint_32 transformations));
|
@@ -3239,12 +3352,12 @@ PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr));
|
|
3239
3352
|
/* GRR TO DO (2.0 or whenever): simplify other internal calling interfaces */
|
3240
3353
|
|
3241
3354
|
#if defined(PNG_WRITE_INTERLACING_SUPPORTED)
|
3242
|
-
/*
|
3355
|
+
/* Grab pixels out of a row for an interlaced pass */
|
3243
3356
|
PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info,
|
3244
3357
|
png_bytep row, int pass));
|
3245
3358
|
#endif
|
3246
3359
|
|
3247
|
-
/*
|
3360
|
+
/* Unfilter a row */
|
3248
3361
|
PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr,
|
3249
3362
|
png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter));
|
3250
3363
|
|
@@ -3255,16 +3368,16 @@ PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr,
|
|
3255
3368
|
/* Write out the filtered row. */
|
3256
3369
|
PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr,
|
3257
3370
|
png_bytep filtered_row));
|
3258
|
-
/*
|
3371
|
+
/* Finish a row while reading, dealing with interlacing passes, etc. */
|
3259
3372
|
PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr));
|
3260
3373
|
|
3261
|
-
/*
|
3374
|
+
/* Initialize the row buffers, etc. */
|
3262
3375
|
PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr));
|
3263
|
-
/*
|
3376
|
+
/* Optional call to update the users info structure */
|
3264
3377
|
PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr,
|
3265
3378
|
png_infop info_ptr));
|
3266
3379
|
|
3267
|
-
/*
|
3380
|
+
/* These are the functions that do the transformations */
|
3268
3381
|
#if defined(PNG_READ_FILLER_SUPPORTED)
|
3269
3382
|
PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info,
|
3270
3383
|
png_bytep row, png_uint_32 filler, png_uint_32 flags));
|
@@ -3386,7 +3499,7 @@ PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info,
|
|
3386
3499
|
* then calls the appropriate callback for the chunk if it is valid.
|
3387
3500
|
*/
|
3388
3501
|
|
3389
|
-
/*
|
3502
|
+
/* Decode the IHDR chunk */
|
3390
3503
|
PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr,
|
3391
3504
|
png_uint_32 length));
|
3392
3505
|
PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr,
|
@@ -3485,7 +3598,7 @@ PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr,
|
|
3485
3598
|
PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr,
|
3486
3599
|
png_bytep chunk_name));
|
3487
3600
|
|
3488
|
-
/*
|
3601
|
+
/* Handle the transformations for reading and writing */
|
3489
3602
|
PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr));
|
3490
3603
|
PNG_EXTERN void png_do_write_transformations PNGARG((png_structp png_ptr));
|
3491
3604
|
|
@@ -3579,6 +3692,23 @@ png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
|
|
3579
3692
|
/* Read the chunk header (length + type name) */
|
3580
3693
|
PNG_EXTERN png_uint_32 png_read_chunk_header PNGARG((png_structp png_ptr));
|
3581
3694
|
|
3695
|
+
/* Added at libpng version 1.2.34 */
|
3696
|
+
#if defined(PNG_cHRM_SUPPORTED)
|
3697
|
+
PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr,
|
3698
|
+
png_fixed_point int_white_x, png_fixed_point int_white_y,
|
3699
|
+
png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
|
3700
|
+
int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
|
3701
|
+
png_fixed_point int_blue_y));
|
3702
|
+
#endif
|
3703
|
+
|
3704
|
+
#if defined(PNG_cHRM_SUPPORTED)
|
3705
|
+
#if !defined(PNG_NO_CHECK_cHRM)
|
3706
|
+
/* Added at libpng version 1.2.34 */
|
3707
|
+
PNG_EXTERN void png_64bit_product (long v1, long v2, unsigned long *hi_product,
|
3708
|
+
unsigned long *lo_product);
|
3709
|
+
#endif
|
3710
|
+
#endif
|
3711
|
+
|
3582
3712
|
/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
|
3583
3713
|
|
3584
3714
|
#endif /* PNG_INTERNAL */
|
@@ -3588,5 +3718,5 @@ PNG_EXTERN png_uint_32 png_read_chunk_header PNGARG((png_structp png_ptr));
|
|
3588
3718
|
#endif
|
3589
3719
|
|
3590
3720
|
#endif /* PNG_VERSION_INFO_ONLY */
|
3591
|
-
/*
|
3721
|
+
/* Do not put anything past this line */
|
3592
3722
|
#endif /* PNG_H */
|