annotate libpng/pngconf.h @ 48:e308ea014922 libavformat

fixed copy
author bellard
date Sun, 02 Feb 2003 19:51:40 +0000
parents cfc262e9955c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
42
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1 /* pngconf.h - machine configurable file for libpng
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
2 *
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
3 * libpng 1.0.15 - October 3, 2002
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
4 * For conditions of distribution and use, see copyright notice in png.h
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
5 * Copyright (c) 1998-2002 Glenn Randers-Pehrson
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
6 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
7 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
8 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
9
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
10 /* Any machine specific code is near the front of this file, so if you
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
11 * are configuring libpng for a machine, you may want to read the section
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
12 * starting here down to where it starts to typedef png_color, png_text,
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
13 * and png_info.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
14 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
15
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
16 #ifndef PNGCONF_H
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
17 #define PNGCONF_H
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
18
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
19 #define PNG_1_0_X
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
20
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
21 /* This is the size of the compression buffer, and thus the size of
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
22 * an IDAT chunk. Make this whatever size you feel is best for your
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
23 * machine. One of these will be allocated per png_struct. When this
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
24 * is full, it writes the data to the disk, and does some other
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
25 * calculations. Making this an extremely small size will slow
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
26 * the library down, but you may want to experiment to determine
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
27 * where it becomes significant, if you are concerned with memory
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
28 * usage. Note that zlib allocates at least 32Kb also. For readers,
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
29 * this describes the size of the buffer available to read the data in.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
30 * Unless this gets smaller than the size of a row (compressed),
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
31 * it should not make much difference how big this is.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
32 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
33
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
34 # define PNG_ZBUF_SIZE 8192
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
35
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
36 /* Enable if you want a write-only libpng */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
37
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
38 # define PNG_READ_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
39
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
40 /* Enable if you want a read-only libpng */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
41
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
42 # define PNG_WRITE_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
43
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
44 /* Enabled by default in 1.2.0. You can disable this if you don't need to
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
45 support PNGs that are embedded in MNG datastreams */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
46 #undef PNG_MNG_FEATURES_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
47
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
48 # define PNG_FLOATING_POINT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
49
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
50 /* If you are running on a machine where you cannot allocate more
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
51 * than 64K of memory at once, uncomment this. While libpng will not
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
52 * normally need that much memory in a chunk (unless you load up a very
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
53 * large file), zlib needs to know how big of a chunk it can use, and
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
54 * libpng thus makes sure to check any memory allocation to verify it
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
55 * will fit into memory.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
56 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
57 #undef PNG_MAX_MALLOC_64K
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
58
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
59 /* Special munging to support doing things the 'cygwin' way:
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
60 * 'Normal' png-on-win32 defines/defaults:
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
61 * PNG_BUILD_DLL -- building dll
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
62 * PNG_USE_DLL -- building an application, linking to dll
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
63 * (no define) -- building static library, or building an
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
64 * application and linking to the static lib
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
65 * 'Cygwin' defines/defaults:
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
66 * PNG_BUILD_DLL -- (ignored) building the dll
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
67 * (no define) -- (ignored) building an application, linking to the dll
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
68 * PNG_STATIC -- (ignored) building the static lib, or building an
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
69 * application that links to the static lib.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
70 * ALL_STATIC -- (ignored) building various static libs, or building an
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
71 * application that links to the static libs.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
72 * Thus,
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
73 * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
74 * this bit of #ifdefs will define the 'correct' config variables based on
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
75 * that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
76 * unnecessary.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
77 *
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
78 * Also, the precedence order is:
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
79 * ALL_STATIC (since we can't #undef something outside our namespace)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
80 * PNG_BUILD_DLL
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
81 * PNG_STATIC
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
82 * (nothing) == PNG_USE_DLL
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
83 *
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
84 * CYGWIN (2002-01-20): The preceding is now obsolete. With the advent
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
85 * of auto-import in binutils, we no longer need to worry about
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
86 * __declspec(dllexport) / __declspec(dllimport) and friends. Therefore,
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
87 * we don't need to worry about PNG_STATIC or ALL_STATIC when it comes
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
88 * to __declspec() stuff. However, we DO need to worry about
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
89 * PNG_BUILD_DLL and PNG_STATIC because those change some defaults
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
90 * such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
91 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
92 #undef PNG_BUILD_DLL
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
93 #undef PNG_USE_DLL
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
94
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
95 /* This protects us against compilers that run on a windowing system
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
96 * and thus don't have or would rather us not use the stdio types:
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
97 * stdin, stdout, and stderr. The only one currently used is stderr
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
98 * in png_error() and png_warning(). #defining PNG_NO_CONSOLE_IO will
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
99 * prevent these from being compiled and used. #defining PNG_NO_STDIO
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
100 * will also prevent these, plus will prevent the entire set of stdio
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
101 * macros and functions (FILE *, printf, etc.) from being compiled and used,
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
102 * unless (PNG_DEBUG > 0) has been #defined.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
103 *
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
104 * #define PNG_NO_CONSOLE_IO
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
105 * #define PNG_NO_STDIO
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
106 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
107
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
108 #if defined(_WIN32_WCE)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
109 # include <windows.h>
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
110 /* Console I/O functions are not supported on WindowsCE */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
111 # define PNG_NO_CONSOLE_IO
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
112 # ifdef PNG_DEBUG
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
113 # undef PNG_DEBUG
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
114 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
115 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
116
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
117 #ifdef PNG_BUILD_DLL
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
118 # ifndef PNG_CONSOLE_IO_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
119 # ifndef PNG_NO_CONSOLE_IO
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
120 # define PNG_NO_CONSOLE_IO
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
121 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
122 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
123 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
124
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
125 # ifdef PNG_NO_STDIO
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
126 # ifndef PNG_NO_CONSOLE_IO
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
127 # define PNG_NO_CONSOLE_IO
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
128 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
129 # ifdef PNG_DEBUG
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
130 # if (PNG_DEBUG > 0)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
131 # include <stdio.h>
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
132 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
133 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
134 # else
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
135 # if !defined(_WIN32_WCE)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
136 /* "stdio.h" functions are not supported on WindowsCE */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
137 # include <stdio.h>
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
138 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
139 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
140
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
141 /* This macro protects us against machines that don't have function
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
142 * prototypes (ie K&R style headers). If your compiler does not handle
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
143 * function prototypes, define this macro and use the included ansi2knr.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
144 * I've always been able to use _NO_PROTO as the indicator, but you may
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
145 * need to drag the empty declaration out in front of here, or change the
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
146 * ifdef to suit your own needs.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
147 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
148 #ifndef PNGARG
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
149
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
150 #ifdef OF /* zlib prototype munger */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
151 # define PNGARG(arglist) OF(arglist)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
152 #else
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
153
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
154 #ifdef _NO_PROTO
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
155 # define PNGARG(arglist) ()
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
156 # ifndef PNG_TYPECAST_NULL
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
157 # define PNG_TYPECAST_NULL
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
158 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
159 #else
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
160 # define PNGARG(arglist) arglist
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
161 #endif /* _NO_PROTO */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
162
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
163 #endif /* OF */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
164
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
165 #endif /* PNGARG */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
166
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
167 /* Try to determine if we are compiling on a Mac. Note that testing for
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
168 * just __MWERKS__ is not good enough, because the Codewarrior is now used
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
169 * on non-Mac platforms.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
170 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
171 #ifndef MACOS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
172 # if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
173 defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
174 # define MACOS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
175 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
176 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
177
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
178 /* enough people need this for various reasons to include it here */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
179 #if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
180 # include <sys/types.h>
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
181 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
182
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
183 #if !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
184 # define PNG_SETJMP_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
185 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
186
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
187 #ifdef PNG_SETJMP_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
188 /* This is an attempt to force a single setjmp behaviour on Linux. If
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
189 * the X config stuff didn't define _BSD_SOURCE we wouldn't need this.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
190 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
191
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
192 # ifdef __linux__
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
193 # ifdef _BSD_SOURCE
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
194 # define PNG_SAVE_BSD_SOURCE
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
195 # undef _BSD_SOURCE
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
196 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
197 # ifdef _SETJMP_H
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
198 __png.h__ already includes setjmp.h;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
199 __dont__ include it again.;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
200 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
201 # endif /* __linux__ */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
202
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
203 /* include setjmp.h for error handling */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
204 # include <setjmp.h>
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
205
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
206 # ifdef __linux__
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
207 # ifdef PNG_SAVE_BSD_SOURCE
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
208 # define _BSD_SOURCE
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
209 # undef PNG_SAVE_BSD_SOURCE
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
210 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
211 # endif /* __linux__ */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
212 #endif /* PNG_SETJMP_SUPPORTED */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
213
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
214 #ifdef BSD
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
215 # include <strings.h>
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
216 #else
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
217 # include <string.h>
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
218 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
219
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
220 /* Other defines for things like memory and the like can go here. */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
221 #ifdef PNG_INTERNAL
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
222
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
223 #include <stdlib.h>
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
224
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
225 /* The functions exported by PNG_EXTERN are PNG_INTERNAL functions, which
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
226 * aren't usually used outside the library (as far as I know), so it is
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
227 * debatable if they should be exported at all. In the future, when it is
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
228 * possible to have run-time registry of chunk-handling functions, some of
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
229 * these will be made available again.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
230 #define PNG_EXTERN extern
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
231 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
232 #define PNG_EXTERN
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
233
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
234 /* Other defines specific to compilers can go here. Try to keep
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
235 * them inside an appropriate ifdef/endif pair for portability.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
236 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
237
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
238 #if defined(PNG_FLOATING_POINT_SUPPORTED)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
239 # if defined(MACOS)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
240 /* We need to check that <math.h> hasn't already been included earlier
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
241 * as it seems it doesn't agree with <fp.h>, yet we should really use
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
242 * <fp.h> if possible.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
243 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
244 # if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
245 # include <fp.h>
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
246 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
247 # else
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
248 # include <math.h>
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
249 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
250 # if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
251 /* Amiga SAS/C: We must include builtin FPU functions when compiling using
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
252 * MATH=68881
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
253 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
254 # include <m68881.h>
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
255 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
256 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
257
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
258 /* Codewarrior on NT has linking problems without this. */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
259 #if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
260 # define PNG_ALWAYS_EXTERN
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
261 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
262
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
263 /* For some reason, Borland C++ defines memcmp, etc. in mem.h, not
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
264 * stdlib.h like it should (I think). Or perhaps this is a C++
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
265 * "feature"?
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
266 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
267 #ifdef __TURBOC__
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
268 # include <mem.h>
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
269 # include "alloc.h"
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
270 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
271
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
272 #if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
273 defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__))
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
274 # include <malloc.h>
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
275 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
276
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
277 /* This controls how fine the dithering gets. As this allocates
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
278 * a largish chunk of memory (32K), those who are not as concerned
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
279 * with dithering quality can decrease some or all of these.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
280 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
281 #ifndef PNG_DITHER_RED_BITS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
282 # define PNG_DITHER_RED_BITS 5
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
283 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
284 #ifndef PNG_DITHER_GREEN_BITS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
285 # define PNG_DITHER_GREEN_BITS 5
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
286 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
287 #ifndef PNG_DITHER_BLUE_BITS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
288 # define PNG_DITHER_BLUE_BITS 5
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
289 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
290
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
291 /* This controls how fine the gamma correction becomes when you
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
292 * are only interested in 8 bits anyway. Increasing this value
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
293 * results in more memory being used, and more pow() functions
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
294 * being called to fill in the gamma tables. Don't set this value
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
295 * less then 8, and even that may not work (I haven't tested it).
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
296 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
297
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
298 #ifndef PNG_MAX_GAMMA_8
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
299 # define PNG_MAX_GAMMA_8 11
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
300 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
301
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
302 /* This controls how much a difference in gamma we can tolerate before
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
303 * we actually start doing gamma conversion.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
304 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
305 #ifndef PNG_GAMMA_THRESHOLD
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
306 # define PNG_GAMMA_THRESHOLD 0.05
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
307 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
308
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
309 #endif /* PNG_INTERNAL */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
310
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
311 /* The following uses const char * instead of char * for error
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
312 * and warning message functions, so some compilers won't complain.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
313 * If you do not want to use const, define PNG_NO_CONST here.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
314 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
315
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
316 #ifndef PNG_NO_CONST
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
317 # define PNG_CONST const
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
318 #else
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
319 # define PNG_CONST
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
320 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
321
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
322 /* The following defines give you the ability to remove code from the
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
323 * library that you will not be using. I wish I could figure out how to
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
324 * automate this, but I can't do that without making it seriously hard
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
325 * on the users. So if you are not using an ability, change the #define
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
326 * to and #undef, and that part of the library will not be compiled. If
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
327 * your linker can't find a function, you may want to make sure the
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
328 * ability is defined here. Some of these depend upon some others being
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
329 * defined. I haven't figured out all the interactions here, so you may
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
330 * have to experiment awhile to get everything to compile. If you are
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
331 * creating or using a shared library, you probably shouldn't touch this,
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
332 * as it will affect the size of the structures, and this will cause bad
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
333 * things to happen if the library and/or application ever change.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
334 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
335
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
336 /* Any features you will not be using can be undef'ed here */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
337
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
338 /* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
339 * to turn it off with "*TRANSFORMS_NOT_SUPPORTED" or *PNG_NO_*_TRANSFORMS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
340 * on the compile line, then pick and choose which ones to define without
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
341 * having to edit this file. It is safe to use the *TRANSFORMS_NOT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
342 * if you only want to have a png-compliant reader/writer but don't need
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
343 * any of the extra transformations. This saves about 80 kbytes in a
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
344 * typical installation of the library. (PNG_NO_* form added in version
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
345 * 1.0.1c, for consistency)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
346 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
347
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
348 /* The size of the png_text structure changed in libpng-1.0.6 when
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
349 * iTXt is supported. It is turned off by default, to support old apps
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
350 * that malloc the png_text structure instead of calling png_set_text()
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
351 * and letting libpng malloc it. It will be turned on by default in
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
352 * libpng-1.3.0.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
353 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
354
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
355 #ifndef PNG_iTXt_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
356 # if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
357 # define PNG_NO_READ_iTXt
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
358 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
359 # if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
360 # define PNG_NO_WRITE_iTXt
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
361 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
362 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
363
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
364 /* The following support, added after version 1.0.0, can be turned off here en
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
365 * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
366 * with old applications that require the length of png_struct and png_info
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
367 * to remain unchanged.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
368 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
369
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
370 #ifdef PNG_LEGACY_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
371 # define PNG_NO_FREE_ME
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
372 # define PNG_NO_READ_UNKNOWN_CHUNKS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
373 # define PNG_NO_WRITE_UNKNOWN_CHUNKS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
374 # define PNG_NO_READ_USER_CHUNKS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
375 # define PNG_NO_READ_iCCP
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
376 # define PNG_NO_WRITE_iCCP
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
377 # define PNG_NO_READ_iTXt
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
378 # define PNG_NO_WRITE_iTXt
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
379 # define PNG_NO_READ_sCAL
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
380 # define PNG_NO_WRITE_sCAL
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
381 # define PNG_NO_READ_sPLT
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
382 # define PNG_NO_WRITE_sPLT
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
383 # define PNG_NO_INFO_IMAGE
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
384 # define PNG_NO_READ_RGB_TO_GRAY
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
385 # define PNG_NO_READ_USER_TRANSFORM
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
386 # define PNG_NO_WRITE_USER_TRANSFORM
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
387 # define PNG_NO_USER_MEM
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
388 # define PNG_NO_READ_EMPTY_PLTE
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
389 # define PNG_NO_MNG_FEATURES
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
390 # define PNG_NO_FIXED_POINT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
391 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
392
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
393 /* Ignore attempt to turn off both floating and fixed point support */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
394 #if !defined(PNG_FLOATING_POINT_SUPPORTED) || \
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
395 !defined(PNG_NO_FIXED_POINT_SUPPORTED)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
396 # define PNG_FIXED_POINT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
397 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
398
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
399 #ifndef PNG_NO_FREE_ME
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
400 # define PNG_FREE_ME_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
401 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
402
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
403 #if defined(PNG_READ_SUPPORTED)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
404
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
405 #undef PNG_READ_TRANSFORMS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
406
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
407 #ifdef PNG_READ_TRANSFORMS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
408 # ifndef PNG_NO_READ_EXPAND
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
409 # define PNG_READ_EXPAND_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
410 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
411 # ifndef PNG_NO_READ_SHIFT
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
412 # define PNG_READ_SHIFT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
413 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
414 # ifndef PNG_NO_READ_PACK
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
415 # define PNG_READ_PACK_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
416 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
417 # ifndef PNG_NO_READ_BGR
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
418 # define PNG_READ_BGR_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
419 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
420 # ifndef PNG_NO_READ_SWAP
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
421 # define PNG_READ_SWAP_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
422 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
423 # ifndef PNG_NO_READ_PACKSWAP
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
424 # define PNG_READ_PACKSWAP_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
425 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
426 # ifndef PNG_NO_READ_INVERT
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
427 # define PNG_READ_INVERT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
428 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
429 # ifndef PNG_NO_READ_DITHER
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
430 # define PNG_READ_DITHER_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
431 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
432 # ifndef PNG_NO_READ_BACKGROUND
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
433 # define PNG_READ_BACKGROUND_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
434 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
435 # ifndef PNG_NO_READ_16_TO_8
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
436 # define PNG_READ_16_TO_8_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
437 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
438 # ifndef PNG_NO_READ_FILLER
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
439 # define PNG_READ_FILLER_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
440 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
441 # ifndef PNG_NO_READ_GAMMA
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
442 # define PNG_READ_GAMMA_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
443 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
444 # ifndef PNG_NO_READ_GRAY_TO_RGB
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
445 # define PNG_READ_GRAY_TO_RGB_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
446 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
447 # ifndef PNG_NO_READ_SWAP_ALPHA
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
448 # define PNG_READ_SWAP_ALPHA_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
449 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
450 # ifndef PNG_NO_READ_INVERT_ALPHA
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
451 # define PNG_READ_INVERT_ALPHA_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
452 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
453 # ifndef PNG_NO_READ_STRIP_ALPHA
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
454 # define PNG_READ_STRIP_ALPHA_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
455 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
456 # ifndef PNG_NO_READ_USER_TRANSFORM
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
457 # define PNG_READ_USER_TRANSFORM_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
458 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
459 # ifndef PNG_NO_READ_RGB_TO_GRAY
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
460 # define PNG_READ_RGB_TO_GRAY_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
461 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
462 #endif /* PNG_READ_TRANSFORMS_SUPPORTED */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
463
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
464 #if !defined(PNG_NO_PROGRESSIVE_READ) && \
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
465 !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED) /* if you don't do progressive */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
466 # define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
467 #endif /* about interlacing capability! You'll */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
468 /* still have interlacing unless you change the following line: */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
469
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
470 #define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
471
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
472 #ifndef PNG_NO_READ_COMPOSITE_NODIV
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
473 # ifndef PNG_NO_READ_COMPOSITED_NODIV /* libpng-1.0.x misspelling */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
474 # define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
475 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
476 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
477
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
478 /* Deprecated, will be removed from version 2.0.0.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
479 Use PNG_MNG_FEATURES_SUPPORTED instead. */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
480 #ifndef PNG_NO_READ_EMPTY_PLTE
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
481 # define PNG_READ_EMPTY_PLTE_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
482 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
483
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
484 #endif /* PNG_READ_SUPPORTED */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
485
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
486 #if defined(PNG_WRITE_SUPPORTED)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
487
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
488 #undef PNG_WRITE_TRANSFORMS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
489
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
490 #ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
491 # ifndef PNG_NO_WRITE_SHIFT
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
492 # define PNG_WRITE_SHIFT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
493 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
494 # ifndef PNG_NO_WRITE_PACK
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
495 # define PNG_WRITE_PACK_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
496 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
497 # ifndef PNG_NO_WRITE_BGR
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
498 # define PNG_WRITE_BGR_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
499 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
500 # ifndef PNG_NO_WRITE_SWAP
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
501 # define PNG_WRITE_SWAP_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
502 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
503 # ifndef PNG_NO_WRITE_PACKSWAP
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
504 # define PNG_WRITE_PACKSWAP_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
505 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
506 # ifndef PNG_NO_WRITE_INVERT
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
507 # define PNG_WRITE_INVERT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
508 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
509 # ifndef PNG_NO_WRITE_FILLER
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
510 # define PNG_WRITE_FILLER_SUPPORTED /* same as WRITE_STRIP_ALPHA */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
511 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
512 # ifndef PNG_NO_WRITE_SWAP_ALPHA
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
513 # define PNG_WRITE_SWAP_ALPHA_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
514 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
515 # ifndef PNG_NO_WRITE_INVERT_ALPHA
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
516 # define PNG_WRITE_INVERT_ALPHA_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
517 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
518 # ifndef PNG_NO_WRITE_USER_TRANSFORM
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
519 # define PNG_WRITE_USER_TRANSFORM_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
520 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
521 #endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
522
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
523 #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
524 defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
525 # ifndef PNG_NO_USER_TRANSFORM_PTR
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
526 # define PNG_USER_TRANSFORM_PTR_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
527 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
528 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
529
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
530 #undef PNG_WRITE_INTERLACING_SUPPORTED /* not required for PNG-compliant
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
531 encoders, but can cause trouble
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
532 if left undefined */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
533
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
534 #if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
535 defined(PNG_FLOATING_POINT_SUPPORTED)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
536 # define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
537 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
538
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
539 #ifndef PNG_1_0_X
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
540 #ifndef PNG_NO_ERROR_NUMBERS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
541 #define PNG_ERROR_NUMBERS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
542 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
543 #endif /* PNG_1_0_X */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
544
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
545 #undef PNG_WRITE_FLUSH_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
546
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
547 /* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
548 #ifndef PNG_NO_WRITE_EMPTY_PLTE
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
549 # define PNG_WRITE_EMPTY_PLTE_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
550 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
551
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
552 #endif /* PNG_WRITE_SUPPORTED */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
553
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
554 #ifndef PNG_NO_STDIO
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
555 # define PNG_TIME_RFC1123_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
556 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
557
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
558 /* This adds extra functions in pngget.c for accessing data from the
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
559 * info pointer (added in version 0.99)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
560 * png_get_image_width()
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
561 * png_get_image_height()
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
562 * png_get_bit_depth()
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
563 * png_get_color_type()
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
564 * png_get_compression_type()
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
565 * png_get_filter_type()
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
566 * png_get_interlace_type()
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
567 * png_get_pixel_aspect_ratio()
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
568 * png_get_pixels_per_meter()
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
569 * png_get_x_offset_pixels()
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
570 * png_get_y_offset_pixels()
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
571 * png_get_x_offset_microns()
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
572 * png_get_y_offset_microns()
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
573 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
574 #if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
575 # define PNG_EASY_ACCESS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
576 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
577
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
578 /* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
579 even when PNG_USE_PNGVCRD or PNG_USE_PNGGCCRD is not defined */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
580 #if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
581 # ifndef PNG_ASSEMBLER_CODE_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
582 # define PNG_ASSEMBLER_CODE_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
583 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
584 # if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
585 # define PNG_MMX_CODE_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
586 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
587 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
588
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
589 /* If you are sure that you don't need thread safety and you are compiling
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
590 with PNG_USE_PNGCCRD for an MMX application, you can define this for
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
591 faster execution. See pnggccrd.c.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
592 #define PNG_THREAD_UNSAFE_OK
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
593 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
594
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
595 #undef PNG_USER_MEM_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
596
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
597 /* These are currently experimental features, define them if you want */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
598
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
599 /* very little testing */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
600 /*
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
601 #ifdef PNG_READ_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
602 # ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
603 # define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
604 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
605 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
606 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
607
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
608 /* This is only for PowerPC big-endian and 680x0 systems */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
609 /* some testing */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
610 /*
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
611 #ifdef PNG_READ_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
612 # ifndef PNG_PNG_READ_BIG_ENDIAN_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
613 # define PNG_READ_BIG_ENDIAN_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
614 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
615 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
616 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
617
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
618 /* Buggy compilers (e.g., gcc 2.7.2.2) need this */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
619 /*
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
620 #define PNG_NO_POINTER_INDEXING
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
621 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
622
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
623 /* These functions are turned off by default, as they will be phased out. */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
624 /*
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
625 #define PNG_USELESS_TESTS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
626 #define PNG_CORRECT_PALETTE_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
627 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
628
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
629 /* Any chunks you are not interested in, you can undef here. The
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
630 * ones that allocate memory may be expecially important (hIST,
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
631 * tEXt, zTXt, tRNS, pCAL). Others will just save time and make png_info
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
632 * a bit smaller.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
633 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
634
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
635 #undef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
636 #undef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
637
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
638 #ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
639
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
640 #ifdef PNG_NO_READ_TEXT
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
641 # define PNG_NO_READ_iTXt
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
642 # define PNG_NO_READ_tEXt
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
643 # define PNG_NO_READ_zTXt
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
644 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
645 #ifndef PNG_NO_READ_bKGD
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
646 # define PNG_READ_bKGD_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
647 # define PNG_bKGD_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
648 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
649 #ifndef PNG_NO_READ_cHRM
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
650 # define PNG_READ_cHRM_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
651 # define PNG_cHRM_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
652 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
653 #ifndef PNG_NO_READ_gAMA
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
654 # define PNG_READ_gAMA_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
655 # define PNG_gAMA_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
656 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
657 #ifndef PNG_NO_READ_hIST
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
658 # define PNG_READ_hIST_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
659 # define PNG_hIST_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
660 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
661 #ifndef PNG_NO_READ_iCCP
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
662 # define PNG_READ_iCCP_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
663 # define PNG_iCCP_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
664 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
665 #ifndef PNG_NO_READ_iTXt
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
666 # ifndef PNG_READ_iTXt_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
667 # define PNG_READ_iTXt_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
668 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
669 # ifndef PNG_iTXt_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
670 # define PNG_iTXt_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
671 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
672 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
673 #ifndef PNG_NO_READ_oFFs
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
674 # define PNG_READ_oFFs_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
675 # define PNG_oFFs_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
676 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
677 #ifndef PNG_NO_READ_pCAL
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
678 # define PNG_READ_pCAL_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
679 # define PNG_pCAL_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
680 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
681 #ifndef PNG_NO_READ_sCAL
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
682 # define PNG_READ_sCAL_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
683 # define PNG_sCAL_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
684 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
685 #ifndef PNG_NO_READ_pHYs
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
686 # define PNG_READ_pHYs_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
687 # define PNG_pHYs_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
688 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
689 #ifndef PNG_NO_READ_sBIT
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
690 # define PNG_READ_sBIT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
691 # define PNG_sBIT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
692 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
693 #ifndef PNG_NO_READ_sPLT
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
694 # define PNG_READ_sPLT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
695 # define PNG_sPLT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
696 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
697 #ifndef PNG_NO_READ_sRGB
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
698 # define PNG_READ_sRGB_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
699 # define PNG_sRGB_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
700 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
701 #ifndef PNG_NO_READ_tEXt
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
702 # define PNG_READ_tEXt_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
703 # define PNG_tEXt_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
704 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
705 #ifndef PNG_NO_READ_tIME
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
706 # define PNG_READ_tIME_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
707 # define PNG_tIME_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
708 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
709 #ifndef PNG_NO_READ_tRNS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
710 # define PNG_READ_tRNS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
711 # define PNG_tRNS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
712 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
713 #ifndef PNG_NO_READ_zTXt
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
714 # define PNG_READ_zTXt_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
715 # define PNG_zTXt_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
716 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
717 #ifndef PNG_NO_READ_UNKNOWN_CHUNKS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
718 # define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
719 # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
720 # define PNG_UNKNOWN_CHUNKS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
721 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
722 # ifndef PNG_NO_HANDLE_AS_UNKNOWN
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
723 # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
724 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
725 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
726 #if !defined(PNG_NO_READ_USER_CHUNKS) && \
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
727 defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
728 # define PNG_READ_USER_CHUNKS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
729 # define PNG_USER_CHUNKS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
730 # ifdef PNG_NO_READ_UNKNOWN_CHUNKS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
731 # undef PNG_NO_READ_UNKNOWN_CHUNKS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
732 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
733 # ifdef PNG_NO_HANDLE_AS_UNKNOWN
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
734 # undef PNG_NO_HANDLE_AS_UNKNOWN
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
735 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
736 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
737 #ifndef PNG_NO_READ_OPT_PLTE
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
738 # define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
739 #endif /* optional PLTE chunk in RGB and RGBA images */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
740 #if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
741 defined(PNG_READ_zTXt_SUPPORTED)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
742 # define PNG_READ_TEXT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
743 # define PNG_TEXT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
744 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
745
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
746 #endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
747
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
748 #ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
749
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
750 #ifdef PNG_NO_WRITE_TEXT
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
751 # define PNG_NO_WRITE_iTXt
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
752 # define PNG_NO_WRITE_tEXt
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
753 # define PNG_NO_WRITE_zTXt
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
754 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
755 #ifndef PNG_NO_WRITE_bKGD
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
756 # define PNG_WRITE_bKGD_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
757 # ifndef PNG_bKGD_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
758 # define PNG_bKGD_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
759 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
760 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
761 #ifndef PNG_NO_WRITE_cHRM
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
762 # define PNG_WRITE_cHRM_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
763 # ifndef PNG_cHRM_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
764 # define PNG_cHRM_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
765 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
766 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
767 #ifndef PNG_NO_WRITE_gAMA
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
768 # define PNG_WRITE_gAMA_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
769 # ifndef PNG_gAMA_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
770 # define PNG_gAMA_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
771 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
772 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
773 #ifndef PNG_NO_WRITE_hIST
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
774 # define PNG_WRITE_hIST_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
775 # ifndef PNG_hIST_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
776 # define PNG_hIST_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
777 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
778 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
779 #ifndef PNG_NO_WRITE_iCCP
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
780 # define PNG_WRITE_iCCP_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
781 # ifndef PNG_iCCP_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
782 # define PNG_iCCP_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
783 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
784 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
785 #ifndef PNG_NO_WRITE_iTXt
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
786 # ifndef PNG_WRITE_iTXt_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
787 # define PNG_WRITE_iTXt_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
788 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
789 # ifndef PNG_iTXt_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
790 # define PNG_iTXt_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
791 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
792 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
793 #ifndef PNG_NO_WRITE_oFFs
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
794 # define PNG_WRITE_oFFs_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
795 # ifndef PNG_oFFs_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
796 # define PNG_oFFs_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
797 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
798 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
799 #ifndef PNG_NO_WRITE_pCAL
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
800 # define PNG_WRITE_pCAL_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
801 # ifndef PNG_pCAL_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
802 # define PNG_pCAL_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
803 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
804 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
805 #ifndef PNG_NO_WRITE_sCAL
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
806 # define PNG_WRITE_sCAL_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
807 # ifndef PNG_sCAL_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
808 # define PNG_sCAL_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
809 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
810 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
811 #ifndef PNG_NO_WRITE_pHYs
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
812 # define PNG_WRITE_pHYs_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
813 # ifndef PNG_pHYs_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
814 # define PNG_pHYs_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
815 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
816 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
817 #ifndef PNG_NO_WRITE_sBIT
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
818 # define PNG_WRITE_sBIT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
819 # ifndef PNG_sBIT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
820 # define PNG_sBIT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
821 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
822 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
823 #ifndef PNG_NO_WRITE_sPLT
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
824 # define PNG_WRITE_sPLT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
825 # ifndef PNG_sPLT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
826 # define PNG_sPLT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
827 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
828 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
829 #ifndef PNG_NO_WRITE_sRGB
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
830 # define PNG_WRITE_sRGB_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
831 # ifndef PNG_sRGB_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
832 # define PNG_sRGB_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
833 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
834 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
835 #ifndef PNG_NO_WRITE_tEXt
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
836 # define PNG_WRITE_tEXt_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
837 # ifndef PNG_tEXt_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
838 # define PNG_tEXt_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
839 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
840 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
841 #ifndef PNG_NO_WRITE_tIME
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
842 # define PNG_WRITE_tIME_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
843 # ifndef PNG_tIME_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
844 # define PNG_tIME_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
845 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
846 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
847 #ifndef PNG_NO_WRITE_tRNS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
848 # define PNG_WRITE_tRNS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
849 # ifndef PNG_tRNS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
850 # define PNG_tRNS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
851 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
852 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
853 #ifndef PNG_NO_WRITE_zTXt
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
854 # define PNG_WRITE_zTXt_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
855 # ifndef PNG_zTXt_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
856 # define PNG_zTXt_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
857 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
858 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
859 #ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
860 # define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
861 # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
862 # define PNG_UNKNOWN_CHUNKS_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
863 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
864 # ifndef PNG_NO_HANDLE_AS_UNKNOWN
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
865 # ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
866 # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
867 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
868 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
869 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
870 #if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
871 defined(PNG_WRITE_zTXt_SUPPORTED)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
872 # define PNG_WRITE_TEXT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
873 # ifndef PNG_TEXT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
874 # define PNG_TEXT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
875 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
876 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
877
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
878 #endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
879
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
880 /* Turn this off to disable png_read_png() and
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
881 * png_write_png() and leave the row_pointers member
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
882 * out of the info structure.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
883 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
884 #ifndef PNG_NO_INFO_IMAGE
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
885 # define PNG_INFO_IMAGE_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
886 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
887
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
888 /* need the time information for reading tIME chunks */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
889 #if defined(PNG_tIME_SUPPORTED)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
890 # if !defined(_WIN32_WCE)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
891 /* "time.h" functions are not supported on WindowsCE */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
892 # include <time.h>
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
893 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
894 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
895
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
896 /* Some typedefs to get us started. These should be safe on most of the
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
897 * common platforms. The typedefs should be at least as large as the
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
898 * numbers suggest (a png_uint_32 must be at least 32 bits long), but they
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
899 * don't have to be exactly that size. Some compilers dislike passing
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
900 * unsigned shorts as function parameters, so you may be better off using
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
901 * unsigned int for png_uint_16. Likewise, for 64-bit systems, you may
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
902 * want to have unsigned int for png_uint_32 instead of unsigned long.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
903 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
904
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
905 typedef unsigned long png_uint_32;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
906 typedef long png_int_32;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
907 typedef unsigned short png_uint_16;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
908 typedef short png_int_16;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
909 typedef unsigned char png_byte;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
910
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
911 /* This is usually size_t. It is typedef'ed just in case you need it to
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
912 change (I'm not sure if you will or not, so I thought I'd be safe) */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
913 typedef size_t png_size_t;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
914
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
915 /* The following is needed for medium model support. It cannot be in the
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
916 * PNG_INTERNAL section. Needs modification for other compilers besides
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
917 * MSC. Model independent support declares all arrays and pointers to be
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
918 * large using the far keyword. The zlib version used must also support
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
919 * model independent data. As of version zlib 1.0.4, the necessary changes
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
920 * have been made in zlib. The USE_FAR_KEYWORD define triggers other
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
921 * changes that are needed. (Tim Wegner)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
922 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
923
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
924 /* Separate compiler dependencies (problem here is that zlib.h always
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
925 defines FAR. (SJT) */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
926 #ifdef __BORLANDC__
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
927 # if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
928 # define LDATA 1
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
929 # else
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
930 # define LDATA 0
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
931 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
932 /* GRR: why is Cygwin in here? Cygwin is not Borland C... */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
933 # if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
934 # define PNG_MAX_MALLOC_64K
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
935 # if (LDATA != 1)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
936 # ifndef FAR
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
937 # define FAR __far
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
938 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
939 # define USE_FAR_KEYWORD
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
940 # endif /* LDATA != 1 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
941 /* Possibly useful for moving data out of default segment.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
942 * Uncomment it if you want. Could also define FARDATA as
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
943 * const if your compiler supports it. (SJT)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
944 # define FARDATA FAR
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
945 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
946 # endif /* __WIN32__, __FLAT__, __CYGWIN__ */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
947 #endif /* __BORLANDC__ */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
948
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
949
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
950 /* Suggest testing for specific compiler first before testing for
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
951 * FAR. The Watcom compiler defines both __MEDIUM__ and M_I86MM,
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
952 * making reliance oncertain keywords suspect. (SJT)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
953 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
954
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
955 /* MSC Medium model */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
956 #if defined(FAR)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
957 # if defined(M_I86MM)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
958 # define USE_FAR_KEYWORD
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
959 # define FARDATA FAR
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
960 # include <dos.h>
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
961 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
962 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
963
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
964 /* SJT: default case */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
965 #ifndef FAR
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
966 # define FAR
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
967 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
968
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
969 /* At this point FAR is always defined */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
970 #ifndef FARDATA
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
971 # define FARDATA
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
972 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
973
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
974 /* Typedef for floating-point numbers that are converted
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
975 to fixed-point with a multiple of 100,000, e.g., int_gamma */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
976 typedef png_int_32 png_fixed_point;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
977
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
978 /* Add typedefs for pointers */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
979 typedef void FAR * png_voidp;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
980 typedef png_byte FAR * png_bytep;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
981 typedef png_uint_32 FAR * png_uint_32p;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
982 typedef png_int_32 FAR * png_int_32p;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
983 typedef png_uint_16 FAR * png_uint_16p;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
984 typedef png_int_16 FAR * png_int_16p;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
985 typedef PNG_CONST char FAR * png_const_charp;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
986 typedef char FAR * png_charp;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
987 typedef png_fixed_point FAR * png_fixed_point_p;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
988
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
989 #ifndef PNG_NO_STDIO
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
990 #if defined(_WIN32_WCE)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
991 typedef HANDLE png_FILE_p;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
992 #else
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
993 typedef FILE * png_FILE_p;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
994 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
995 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
996
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
997 #ifdef PNG_FLOATING_POINT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
998 typedef double FAR * png_doublep;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
999 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1000
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1001 /* Pointers to pointers; i.e. arrays */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1002 typedef png_byte FAR * FAR * png_bytepp;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1003 typedef png_uint_32 FAR * FAR * png_uint_32pp;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1004 typedef png_int_32 FAR * FAR * png_int_32pp;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1005 typedef png_uint_16 FAR * FAR * png_uint_16pp;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1006 typedef png_int_16 FAR * FAR * png_int_16pp;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1007 typedef PNG_CONST char FAR * FAR * png_const_charpp;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1008 typedef char FAR * FAR * png_charpp;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1009 typedef png_fixed_point FAR * FAR * png_fixed_point_pp;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1010 #ifdef PNG_FLOATING_POINT_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1011 typedef double FAR * FAR * png_doublepp;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1012 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1013
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1014 /* Pointers to pointers to pointers; i.e., pointer to array */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1015 typedef char FAR * FAR * FAR * png_charppp;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1016
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1017 /* libpng typedefs for types in zlib. If zlib changes
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1018 * or another compression library is used, then change these.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1019 * Eliminates need to change all the source files.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1020 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1021 typedef charf * png_zcharp;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1022 typedef charf * FAR * png_zcharpp;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1023 typedef z_stream FAR * png_zstreamp;
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1024
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1025 /*
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1026 * Define PNG_BUILD_DLL if the module being built is a Windows
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1027 * LIBPNG DLL.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1028 *
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1029 * Define PNG_USE_DLL if you want to *link* to the Windows LIBPNG DLL.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1030 * It is equivalent to Microsoft predefined macro _DLL that is
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1031 * automatically defined when you compile using the share
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1032 * version of the CRT (C Run-Time library)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1033 *
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1034 * The cygwin mods make this behavior a little different:
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1035 * Define PNG_BUILD_DLL if you are building a dll for use with cygwin
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1036 * Define PNG_STATIC if you are building a static library for use with cygwin,
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1037 * -or- if you are building an application that you want to link to the
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1038 * static library.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1039 * PNG_USE_DLL is defined by default (no user action needed) unless one of
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1040 * the other flags is defined.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1041 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1042
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1043 #if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL))
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1044 # define PNG_DLL
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1045 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1046 /* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1047 * When building a static lib, default to no GLOBAL ARRAYS, but allow
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1048 * command-line override
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1049 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1050 #if defined(__CYGWIN__)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1051 # if !defined(PNG_STATIC)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1052 # if defined(PNG_USE_GLOBAL_ARRAYS)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1053 # undef PNG_USE_GLOBAL_ARRAYS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1054 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1055 # if !defined(PNG_USE_LOCAL_ARRAYS)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1056 # define PNG_USE_LOCAL_ARRAYS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1057 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1058 # else
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1059 # if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1060 # if defined(PNG_USE_GLOBAL_ARRAYS)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1061 # undef PNG_USE_GLOBAL_ARRAYS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1062 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1063 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1064 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1065 # if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1066 # define PNG_USE_LOCAL_ARRAYS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1067 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1068 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1069
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1070 /* Do not use global arrays (helps with building DLL's)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1071 * They are no longer used in libpng itself, since version 1.0.5c,
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1072 * but might be required for some pre-1.0.5c applications.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1073 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1074 #if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1075 # if defined(PNG_NO_GLOBAL_ARRAYS) || (defined(__GNUC__) && defined(PNG_DLL))
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1076 # define PNG_USE_LOCAL_ARRAYS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1077 # else
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1078 # define PNG_USE_GLOBAL_ARRAYS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1079 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1080 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1081
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1082 #if defined(__CYGWIN__)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1083 # undef PNGAPI
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1084 # define PNGAPI __cdecl
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1085 # undef PNG_IMPEXP
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1086 # define PNG_IMPEXP
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1087 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1088
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1089 /* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall",
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1090 * you may get warnings regarding the linkage of png_zalloc and png_zfree.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1091 * Don't ignore those warnings; you must also reset the default calling
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1092 * convention in your compiler to match your PNGAPI, and you must build
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1093 * zlib and your applications the same way you build libpng.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1094 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1095
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1096 #ifndef PNGAPI
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1097
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1098 #if defined(__MINGW32__) && !defined(PNG_MODULEDEF)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1099 # ifndef PNG_NO_MODULEDEF
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1100 # define PNG_NO_MODULEDEF
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1101 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1102 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1103
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1104 #if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1105 # define PNG_IMPEXP
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1106 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1107
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1108 #if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1109 (( defined(_Windows) || defined(_WINDOWS) || \
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1110 defined(WIN32) || defined(_WIN32) || defined(__WIN32__) ))
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1111
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1112 # if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1113 # define PNGAPI __cdecl
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1114 # else
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1115 # define PNGAPI _cdecl
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1116 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1117
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1118 # if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1119 0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1120 # define PNG_IMPEXP
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1121 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1122
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1123 # if !defined(PNG_IMPEXP)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1124
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1125 # define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1126 # define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1127
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1128 /* Borland/Microsoft */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1129 # if defined(_MSC_VER) || defined(__BORLANDC__)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1130 # if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1131 # define PNG_EXPORT PNG_EXPORT_TYPE1
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1132 # else
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1133 # define PNG_EXPORT PNG_EXPORT_TYPE2
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1134 # if defined(PNG_BUILD_DLL)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1135 # define PNG_IMPEXP __export
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1136 # else
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1137 # define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1138 VC++ */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1139 # endif /* Exists in Borland C++ for
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1140 C++ classes (== huge) */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1141 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1142 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1143
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1144 # if !defined(PNG_IMPEXP)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1145 # if defined(PNG_BUILD_DLL)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1146 # define PNG_IMPEXP __declspec(dllexport)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1147 # else
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1148 # define PNG_IMPEXP __declspec(dllimport)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1149 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1150 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1151 # endif /* PNG_IMPEXP */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1152 #else /* !(DLL || non-cygwin WINDOWS) */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1153 # if (defined(__IBMC__) || defined(IBMCPP__)) && defined(__OS2__)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1154 # define PNGAPI _System
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1155 # define PNG_IMPEXP
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1156 # else
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1157 # if 0 /* ... other platforms, with other meanings */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1158 # else
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1159 # define PNGAPI
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1160 # define PNG_IMPEXP
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1161 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1162 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1163 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1164 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1165
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1166 #ifndef PNGAPI
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1167 # define PNGAPI
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1168 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1169 #ifndef PNG_IMPEXP
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1170 # define PNG_IMPEXP
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1171 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1172
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1173 #ifndef PNG_EXPORT
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1174 # define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1175 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1176
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1177 #ifdef PNG_USE_GLOBAL_ARRAYS
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1178 # ifndef PNG_EXPORT_VAR
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1179 # define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1180 # endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1181 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1182
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1183 /* User may want to use these so they are not in PNG_INTERNAL. Any library
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1184 * functions that are passed far data must be model independent.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1185 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1186
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1187 #ifndef PNG_ABORT
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1188 # define PNG_ABORT() abort()
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1189 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1190
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1191 #ifdef PNG_SETJMP_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1192 # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1193 #else
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1194 # define png_jmpbuf(png_ptr) \
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1195 (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1196 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1197
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1198 #if defined(USE_FAR_KEYWORD) /* memory model independent fns */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1199 /* use this to make far-to-near assignments */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1200 # define CHECK 1
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1201 # define NOCHECK 0
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1202 # define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1203 # define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1204 # define png_strcpy _fstrcpy
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1205 # define png_strlen _fstrlen
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1206 # define png_memcmp _fmemcmp /* SJT: added */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1207 # define png_memcpy _fmemcpy
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1208 # define png_memset _fmemset
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1209 #else /* use the usual functions */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1210 # define CVT_PTR(ptr) (ptr)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1211 # define CVT_PTR_NOCHECK(ptr) (ptr)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1212 # define png_strcpy strcpy
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1213 # define png_strlen strlen
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1214 # define png_memcmp memcmp /* SJT: added */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1215 # define png_memcpy memcpy
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1216 # define png_memset memset
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1217 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1218 /* End of memory model independent support */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1219
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1220 /* Just a little check that someone hasn't tried to define something
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1221 * contradictory.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1222 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1223 #if (PNG_ZBUF_SIZE > 65536) && defined(PNG_MAX_MALLOC_64K)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1224 # undef PNG_ZBUF_SIZE
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1225 # define PNG_ZBUF_SIZE 65536
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1226 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1227
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1228 #ifdef PNG_READ_SUPPORTED
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1229 /* Prior to libpng-1.0.9, this block was in pngasmrd.h */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1230 #if defined(PNG_INTERNAL)
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1231
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1232 /* These are the default thresholds before the MMX code kicks in; if either
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1233 * rowbytes or bitdepth is below the threshold, plain C code is used. These
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1234 * can be overridden at runtime via the png_set_mmx_thresholds() call in
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1235 * libpng 1.2.0 and later. The values below were chosen by Intel.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1236 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1237
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1238 #ifndef PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1239 # define PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT 128 /* >= */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1240 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1241 #ifndef PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1242 # define PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT 9 /* >= */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1243 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1244
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1245 /* Set this in the makefile for VC++ on Pentium, not here. */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1246 /* Platform must be Pentium. Makefile must assemble and load pngvcrd.c .
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1247 * MMX will be detected at run time and used if present.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1248 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1249 #ifdef PNG_USE_PNGVCRD
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1250 # define PNG_HAVE_ASSEMBLER_COMBINE_ROW
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1251 # define PNG_HAVE_ASSEMBLER_READ_INTERLACE
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1252 # define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1253 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1254
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1255 /* Set this in the makefile for gcc/as on Pentium, not here. */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1256 /* Platform must be Pentium. Makefile must assemble and load pnggccrd.c .
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1257 * MMX will be detected at run time and used if present.
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1258 */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1259 #ifdef PNG_USE_PNGGCCRD
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1260 # define PNG_HAVE_ASSEMBLER_COMBINE_ROW
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1261 # define PNG_HAVE_ASSEMBLER_READ_INTERLACE
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1262 # define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1263 #endif
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1264 /* - see pnggccrd.c for info about what is currently enabled */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1265
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1266 #endif /* PNG_INTERNAL */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1267 #endif /* PNG_READ_SUPPORTED */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1268
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1269 #endif /* PNGCONF_H */
cfc262e9955c added stripped down libpng
bellard
parents:
diff changeset
1270