1 | # scripts/pnglibconf.dfa - library build configuration control |
---|
2 | # |
---|
3 | @/*- pnglibconf.dfn intermediate file |
---|
4 | @ * generated from scripts/pnglibconf.dfa |
---|
5 | @ */ |
---|
6 | # |
---|
7 | com pnglibconf.h - library build configuration |
---|
8 | com |
---|
9 | version |
---|
10 | com |
---|
11 | com Copyright (c) 1998-2011 Glenn Randers-Pehrson |
---|
12 | com |
---|
13 | com This code is released under the libpng license. |
---|
14 | com For conditions of distribution and use, see the disclaimer |
---|
15 | com and license in png.h |
---|
16 | com |
---|
17 | |
---|
18 | file pnglibconf.h scripts/pnglibconf.dfa PNGLCONF_H |
---|
19 | |
---|
20 | # This file is preprocessed by scripts/options.awk and the |
---|
21 | # C compiler to generate 'pnglibconf.h' - a list of all the |
---|
22 | # configuration options. The file lists the various options |
---|
23 | # that can *only* be specified during the libpng build; |
---|
24 | # pnglibconf.h freezes the definitions selected for the specific |
---|
25 | # build. |
---|
26 | # |
---|
27 | # The syntax is detailed in scripts/options.awk, this is a summary |
---|
28 | # only: |
---|
29 | # |
---|
30 | # setting <name> [default] |
---|
31 | # #define PNG_<name> <value> /* value comes from current setting */ |
---|
32 | # option <name> [requires ...] [if ...] [enables ...] [disabled] |
---|
33 | # #define PNG_<name>_SUPPORTED if the requirements are met and |
---|
34 | # enable the other options listed |
---|
35 | # chunk <name> [requires ...] [disabled] |
---|
36 | # Enable chunk processing for the given ancillary chunk |
---|
37 | # |
---|
38 | # Note that the 'on' and 'off' keywords, while valid on both option |
---|
39 | # and chunk, should not be used in this file because they force the |
---|
40 | # relevant options on or off. |
---|
41 | |
---|
42 | #---------------------------------------------------------------------- |
---|
43 | |
---|
44 | # The following setting, option and chunk values can all be changed |
---|
45 | # while building libpng: |
---|
46 | # |
---|
47 | # setting: change 'setting' lines to fine tune library performance, |
---|
48 | # changes to the settings don't affect the libpng API functionally |
---|
49 | # |
---|
50 | # option: change 'option' lines to remove or add capabilities from |
---|
51 | # or to the library; options change the library API |
---|
52 | # |
---|
53 | # chunk: change 'chunk' lines to remove capabilities to process |
---|
54 | # optional ('ancillary') chunks. This does not prevent PNG |
---|
55 | # decoding but does change the libpng API because some chunks |
---|
56 | # will be ignored. |
---|
57 | # |
---|
58 | # There are three ways of disabling features, in no particular order: |
---|
59 | # |
---|
60 | # 1) Create 'pngusr.h', enter the required private build information |
---|
61 | # detailed below and #define PNG_NO_<option> for each option you |
---|
62 | # don't want in that file in that file. You can also turn on options |
---|
63 | # using PNG_<option>_SUPPORTED. When you have finished rerun |
---|
64 | # configure and rebuild pnglibconf.h file with -DPNG_USER_CONFIG: |
---|
65 | # |
---|
66 | # make clean |
---|
67 | # CPPFLAGS='-DPNG_USER_CONFIG' ./configure |
---|
68 | # make pnglibconf.h |
---|
69 | # |
---|
70 | # pngusr.h is only used during the creation of pnglibconf.h, but it |
---|
71 | # is safer to ensure that -DPNG_USER_CONFIG is specified throughout |
---|
72 | # the build by changing the CPPFLAGS passed to the initial ./configure |
---|
73 | # |
---|
74 | # 2) Add definitions of the settings you want to change to |
---|
75 | # CPPFLAGS; for example: |
---|
76 | # |
---|
77 | # -DPNG_DEFAULT_READ_MACROS=0 |
---|
78 | # |
---|
79 | # (This would change the default to *not* use read macros.) Be |
---|
80 | # very careful to change only settings that don't alter the API |
---|
81 | # because this approach bypasses the private build checking. You |
---|
82 | # can also change settings from pngpriv.h (read pngpriv.h) safely |
---|
83 | # without API changes. Do that in the same way. |
---|
84 | # |
---|
85 | # 3) Write a new '.dfa' file (say 'pngusr.dfa') and in this file |
---|
86 | # provide override values for setting entries and turn option or |
---|
87 | # chunk values explicitly 'on' or 'off': |
---|
88 | # |
---|
89 | # setting FOO default VALUE |
---|
90 | # option BAR [on|off] |
---|
91 | # |
---|
92 | # Then add this file to the options.awk command line (the *first* |
---|
93 | # one) after this file. The make macro DFA_XTRA is provided to make |
---|
94 | # this easier (set it like CPPFLAGS prior to running ./configure). |
---|
95 | # Look at the builds below contrib/pngminim for some extreme examples |
---|
96 | # of how this can be used. |
---|
97 | # |
---|
98 | # Don't edit this file unless you are contributing a patch to |
---|
99 | # libpng and need new or modified options/settings. |
---|
100 | #---------------------------------------------------------------------- |
---|
101 | |
---|
102 | # The following causes commented out #undef lines to be written to |
---|
103 | # pnglibconf.h; this can be stopped by logunsupported=0 in a later |
---|
104 | # file or on the command line (after pnglibconf.dfa) |
---|
105 | |
---|
106 | logunsupported = 1 |
---|
107 | |
---|
108 | # PNG_USER_CONFIG has to be defined on the compiler command line |
---|
109 | # to cause pngusr.h to be read while constructing pnglibconf.h |
---|
110 | # |
---|
111 | # If you create a private DLL you need to define the following |
---|
112 | # macros in the file 'pngusr.h' and set -DPNG_USER_CONFIG for |
---|
113 | # compilation (i.e. in CFLAGS.) |
---|
114 | # #define PNG_USER_PRIVATEBUILD \ |
---|
115 | # <Describes by whom and why this version of the DLL was built> |
---|
116 | # e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons." |
---|
117 | # #define PNG_USER_DLLFNAME_POSTFIX <two-letter postfix that serve to |
---|
118 | # distinguish your DLL from those of the official release. These |
---|
119 | # correspond to the trailing letters that come after the version |
---|
120 | # number and must match your private DLL name> |
---|
121 | # e.g. // private DLL "libpng13gx.dll" |
---|
122 | # #define PNG_USER_DLLFNAME_POSTFIX "gx" |
---|
123 | # |
---|
124 | # The following macros are also at your disposal if you want to complete the |
---|
125 | # DLL VERSIONINFO structure. |
---|
126 | # - PNG_USER_VERSIONINFO_COMMENTS |
---|
127 | # - PNG_USER_VERSIONINFO_COMPANYNAME |
---|
128 | # - PNG_USER_VERSIONINFO_LEGALTRADEMARKS |
---|
129 | |
---|
130 | @#ifdef PNG_USER_CONFIG |
---|
131 | @# include "pngusr.h" |
---|
132 | @#endif |
---|
133 | |
---|
134 | # This is a special fixup for the Watcom C compiler on Windows, which has |
---|
135 | # multiple procedure call standards. Unless PNG_API_RULE is set explicitly |
---|
136 | # (i.e. if it is not defined at this point) it will be forced to '2' here when |
---|
137 | # using Watcom. This indicates to the other header files that Watcom behaviour |
---|
138 | # is required where appropriate. |
---|
139 | |
---|
140 | @#ifdef __WATCOMC__ |
---|
141 | @# ifndef PNG_API_RULE |
---|
142 | @# define PNG_API_RULE 2 /* Use Watcom calling conventions */ |
---|
143 | @# endif |
---|
144 | @#endif |
---|
145 | |
---|
146 | # Note that PNG_USR_CONFIG only has an effect when building |
---|
147 | # pnglibconf.h |
---|
148 | |
---|
149 | setting USER_CONFIG |
---|
150 | setting USER_PRIVATEBUILD |
---|
151 | setting USER_DLLFNAME_POSTFIX |
---|
152 | setting USER_VERSIONINFO_COMMENTS |
---|
153 | setting USER_VERSIONINFO_COMPANYNAME |
---|
154 | setting USER_VERSIONINFO_LEGALTRADEMARKS |
---|
155 | |
---|
156 | # Record the 'API rule' used to select calling conventions on |
---|
157 | # those systems that support such things (see all the comments in |
---|
158 | # pngconf.h) |
---|
159 | # Changing this setting has a fundamental affect on the PNG ABI, |
---|
160 | # do not release shared libraries with this changed. |
---|
161 | |
---|
162 | setting API_RULE default 0 |
---|
163 | |
---|
164 | # Default to using the read macros |
---|
165 | |
---|
166 | setting DEFAULT_READ_MACROS default 1 |
---|
167 | |
---|
168 | # The alternative is to call functions to read PNG values, if |
---|
169 | # the functions are turned *off* the read macros must always |
---|
170 | # be enabled, so turning this off will actually force the |
---|
171 | # USE_READ_MACROS option on (see pngconf.h) |
---|
172 | |
---|
173 | option READ_INT_FUNCTIONS requires READ |
---|
174 | |
---|
175 | # The same for write, but these can only be switched off if |
---|
176 | # no writing is required at all - hence the use of an 'enables' |
---|
177 | # not a 'requires' below: |
---|
178 | |
---|
179 | option WRITE_INT_FUNCTIONS disabled |
---|
180 | option WRITE enables WRITE_INT_FUNCTIONS |
---|
181 | |
---|
182 | # Generic options - affect both read and write. |
---|
183 | |
---|
184 | option WARNINGS |
---|
185 | option BENIGN_ERRORS |
---|
186 | option MNG_FEATURES |
---|
187 | |
---|
188 | # Arithmetic options, the first is the big switch that chooses between internal |
---|
189 | # floating and fixed point arithmetic implementations - it does not affect any |
---|
190 | # APIs. The second two (the _POINT settings) switch off individual APIs. |
---|
191 | |
---|
192 | option FLOATING_ARITHMETIC |
---|
193 | option FLOATING_POINT enables ok_math |
---|
194 | option FIXED_POINT enables ok_math |
---|
195 | |
---|
196 | # Added at libpng version 1.4.0 |
---|
197 | |
---|
198 | option ERROR_TEXT |
---|
199 | |
---|
200 | # The following is always on (defined empty) |
---|
201 | |
---|
202 | setting CALLOC_SUPPORTED default |
---|
203 | |
---|
204 | # This protects us against compilers that run on a windowing system |
---|
205 | # and thus don't have or would rather us not use the stdio types: |
---|
206 | # stdin, stdout, and stderr. The only one currently used is stderr |
---|
207 | # in png_error() and png_warning(). #defining PNG_NO_CONSOLE_IO will |
---|
208 | # prevent these from being compiled and used. #defining PNG_NO_STDIO |
---|
209 | # will also prevent these, plus will prevent the entire set of stdio |
---|
210 | # macros and functions (FILE *, printf, etc.) from being compiled and used, |
---|
211 | # unless (PNG_DEBUG > 0) has been #defined. |
---|
212 | |
---|
213 | option STDIO |
---|
214 | option CONSOLE_IO requires STDIO |
---|
215 | |
---|
216 | # Note: prior to 1.5.0 this option could not be disabled if STDIO |
---|
217 | # was enabled. Prior to 1.5.3 this option required STDIO |
---|
218 | |
---|
219 | option TIME_RFC1123 |
---|
220 | |
---|
221 | # PNG_SETJMP_NOT_SUPPORTED is an old equivalent for NO_SETJMP |
---|
222 | |
---|
223 | option SETJMP |
---|
224 | = NO_SETJMP SETJMP_NOT_SUPPORTED |
---|
225 | |
---|
226 | # For the moment this is disabled (no code support): |
---|
227 | |
---|
228 | option ERROR_NUMBERS disabled |
---|
229 | |
---|
230 | # If this is disabled it is not possible for apps to get the |
---|
231 | # values from the 'info' structure, this effectively removes |
---|
232 | # quite a lot of the READ API. |
---|
233 | |
---|
234 | option EASY_ACCESS |
---|
235 | |
---|
236 | # Added at libpng-1.2.0 |
---|
237 | |
---|
238 | option USER_MEM |
---|
239 | |
---|
240 | # Added at libpng-1.4.0 |
---|
241 | |
---|
242 | option IO_STATE |
---|
243 | |
---|
244 | # This is only for PowerPC big-endian and 680x0 systems |
---|
245 | # some testing, not enabled by default. |
---|
246 | # NO LONGER USED |
---|
247 | |
---|
248 | #option READ_BIG_ENDIAN disabled |
---|
249 | |
---|
250 | # Allow users to control limits on what the READ code will |
---|
251 | # read: |
---|
252 | |
---|
253 | # Added at libpng-1.2.43; adds limit fields to png_struct, |
---|
254 | # allows some usages of these fields |
---|
255 | |
---|
256 | option USER_LIMITS |
---|
257 | |
---|
258 | # Added at libpng-1.2.6; adds setting APIs, allows additional |
---|
259 | # usage of this field (UTSL) |
---|
260 | |
---|
261 | option SET_USER_LIMITS requires USER_LIMITS |
---|
262 | |
---|
263 | # Feature added at libpng-1.4.0, this flag added at 1.4.1 |
---|
264 | option SET_USER_LIMITS enables SET_CHUNK_CACHE_LIMIT |
---|
265 | # Feature added at libpng-1.4.1, this flag added at 1.4.1 |
---|
266 | |
---|
267 | option SET_USER_LIMITS enables SET_CHUNK_MALLOC_LIMIT |
---|
268 | |
---|
269 | # Libpng limits. |
---|
270 | # |
---|
271 | # If these settings are *not* set libpng will not limit the size of |
---|
272 | # images or the size of data in ancilliary chunks. This does lead to |
---|
273 | # security issues if PNG files come from untrusted sources. |
---|
274 | setting USER_WIDTH_MAX |
---|
275 | setting USER_HEIGHT_MAX |
---|
276 | setting USER_CHUNK_CACHE_MAX |
---|
277 | setting USER_CHUNK_MALLOC_MAX |
---|
278 | |
---|
279 | # To default all these settings to values that are large but probably |
---|
280 | # safe turn the SAFE_LIMITS option on; this will cause the value in |
---|
281 | # pngpriv.h to be used. Individual values can also be set, simply set |
---|
282 | # them in pngusr.dfa with '@#define PNG_setting value' lines. |
---|
283 | option SAFE_LIMITS enables USER_LIMITS disabled |
---|
284 | = SAFE_LIMITS SAFE_LIMITS |
---|
285 | |
---|
286 | # All of the following options relate to code capabilities for |
---|
287 | # processing image data before creating a PNG or after reading one. |
---|
288 | # You can remove these capabilities safely and still be PNG |
---|
289 | # conformant, however the library that results is still non-standard. |
---|
290 | # See the comments above about how to change options and settings. |
---|
291 | |
---|
292 | # READ options |
---|
293 | |
---|
294 | option READ enables READ_INTERLACING |
---|
295 | |
---|
296 | # Disabling READ_16BIT does not disable reading 16-bit PNG files, but it |
---|
297 | # forces them to be chopped down to 8-bit, and disables any 16-bit |
---|
298 | # processing after that has happened. You need to be sure to enable |
---|
299 | # READ_SCALE_16_TO_8 or READ_STRIP_16_TO_8 when you disable READ_16BIT for |
---|
300 | # this to work properly. You should disable the other option if you need to |
---|
301 | # ensure a particular conversion (otherwise the app can chose.) |
---|
302 | |
---|
303 | option READ_16BIT requires READ enables 16BIT |
---|
304 | |
---|
305 | option READ_QUANTIZE requires READ |
---|
306 | |
---|
307 | option READ_TRANSFORMS requires READ |
---|
308 | = NO_READ_TRANSFORMS READ_TRANSFORMS_NOT_SUPPORTED |
---|
309 | |
---|
310 | option READ_EXPAND requires READ_TRANSFORMS |
---|
311 | option READ_EXPAND_16 requires READ_TRANSFORMS READ_16BIT enables READ_EXPAND |
---|
312 | option READ_SHIFT requires READ_TRANSFORMS |
---|
313 | option READ_PACK requires READ_TRANSFORMS |
---|
314 | option READ_BGR requires READ_TRANSFORMS |
---|
315 | option READ_SWAP requires READ_TRANSFORMS READ_16BIT |
---|
316 | option READ_PACKSWAP requires READ_TRANSFORMS |
---|
317 | option READ_INVERT requires READ_TRANSFORMS |
---|
318 | option READ_BACKGROUND requires READ_TRANSFORMS enables READ_STRIP_ALPHA |
---|
319 | option READ_STRIP_16_TO_8 requires READ_TRANSFORMS |
---|
320 | option READ_SCALE_16_TO_8 requires READ_TRANSFORMS |
---|
321 | option READ_FILLER requires READ_TRANSFORMS |
---|
322 | option READ_GAMMA requires READ_TRANSFORMS enables READ_gAMA |
---|
323 | option READ_GRAY_TO_RGB requires READ_TRANSFORMS |
---|
324 | |
---|
325 | option READ_ALPHA_MODE requires READ_TRANSFORMS enables READ_GAMMA |
---|
326 | option READ_SWAP_ALPHA requires READ_TRANSFORMS |
---|
327 | option READ_INVERT_ALPHA requires READ_TRANSFORMS |
---|
328 | option READ_STRIP_ALPHA requires READ_TRANSFORMS |
---|
329 | option READ_USER_TRANSFORM requires READ_TRANSFORMS |
---|
330 | option READ_RGB_TO_GRAY requires READ_TRANSFORMS |
---|
331 | |
---|
332 | option PROGRESSIVE_READ requires READ |
---|
333 | option SEQUENTIAL_READ requires READ |
---|
334 | |
---|
335 | # You can define PNG_NO_PROGRESSIVE_READ if you don't do progressive reading. |
---|
336 | # This is not talking about interlacing capability! You'll still have |
---|
337 | # interlacing unless you turn off the following which is required |
---|
338 | # for PNG-compliant decoders. (In other words, do not do this - in |
---|
339 | # fact it can't be disabled from the command line!) |
---|
340 | #option READ_INTERLACING requires READ |
---|
341 | |
---|
342 | option READ_COMPOSITE_NODIV requires READ |
---|
343 | = NO_READ_COMPOSITE_NODIV NO_READ_COMPOSITED_NODIV |
---|
344 | |
---|
345 | # Inch conversions |
---|
346 | |
---|
347 | option INCH_CONVERSIONS |
---|
348 | = INCH_CONVERSIONS INCH_CONVERSIONS |
---|
349 | |
---|
350 | # API to build a grayscale palette |
---|
351 | |
---|
352 | option BUILD_GRAYSCALE_PALETTE |
---|
353 | |
---|
354 | # IN DEVELOPMENT |
---|
355 | # These are currently experimental features; define them if you want |
---|
356 | |
---|
357 | # NOTHING HERE |
---|
358 | |
---|
359 | # WRITE options |
---|
360 | |
---|
361 | option WRITE |
---|
362 | |
---|
363 | # Disabling WRITE_16BIT prevents 16-bit PNG files from being |
---|
364 | # generated. |
---|
365 | option WRITE_16BIT requires WRITE enables 16BIT |
---|
366 | |
---|
367 | option WRITE_TRANSFORMS requires WRITE |
---|
368 | = NO_WRITE_TRANSFORMS WRITE_TRANSFORMS_NOT_SUPPORTED |
---|
369 | |
---|
370 | option WRITE_SHIFT requires WRITE_TRANSFORMS |
---|
371 | option WRITE_PACK requires WRITE_TRANSFORMS |
---|
372 | option WRITE_BGR requires WRITE_TRANSFORMS |
---|
373 | option WRITE_SWAP requires WRITE_TRANSFORMS WRITE_16BIT |
---|
374 | option WRITE_PACKSWAP requires WRITE_TRANSFORMS |
---|
375 | option WRITE_INVERT requires WRITE_TRANSFORMS |
---|
376 | option WRITE_FILLER requires WRITE_TRANSFORMS |
---|
377 | option WRITE_SWAP_ALPHA requires WRITE_TRANSFORMS |
---|
378 | option WRITE_INVERT_ALPHA requires WRITE_TRANSFORMS |
---|
379 | option WRITE_USER_TRANSFORM requires WRITE_TRANSFORMS |
---|
380 | |
---|
381 | # This is not required for PNG-compliant encoders, but can cause |
---|
382 | # trouble if left undefined |
---|
383 | |
---|
384 | option WRITE_INTERLACING requires WRITE |
---|
385 | |
---|
386 | # The following depends, internally, on WEIGHT_SHIFT and COST_SHIFT |
---|
387 | # where are set below. |
---|
388 | |
---|
389 | option WRITE_WEIGHTED_FILTER requires WRITE |
---|
390 | |
---|
391 | option WRITE_FLUSH requires WRITE |
---|
392 | |
---|
393 | # Note: these can be turned off explicitly if not required by the |
---|
394 | # apps implementing the user transforms |
---|
395 | option USER_TRANSFORM_PTR if READ_USER_TRANSFORM WRITE_USER_TRANSFORM |
---|
396 | option USER_TRANSFORM_INFO if READ_USER_TRANSFORM WRITE_USER_TRANSFORM |
---|
397 | |
---|
398 | # This enables API to set compression parameters for compressing |
---|
399 | # non-IDAT chunks (zTXt, iTXt, iCCP, and unknown chunks). This feature |
---|
400 | # was added at libpng-1.5.3. |
---|
401 | option WRITE_CUSTOMIZE_ZTXT_COMPRESSION requires WRITE |
---|
402 | |
---|
403 | # Any chunks you are not interested in, you can undef here. The |
---|
404 | # ones that allocate memory may be expecially important (hIST, |
---|
405 | # tEXt, zTXt, tRNS, pCAL). Others will just save time and make png_info |
---|
406 | # a bit smaller. |
---|
407 | |
---|
408 | # The size of the png_text structure changed in libpng-1.0.6 when |
---|
409 | # iTXt support was added. iTXt support was turned off by default through |
---|
410 | # libpng-1.2.x, to support old apps that malloc the png_text structure |
---|
411 | # instead of calling png_set_text() and letting libpng malloc it. It |
---|
412 | # was turned on by default in libpng-1.4.0. |
---|
413 | |
---|
414 | option READ_ANCILLARY_CHUNKS requires READ |
---|
415 | # PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED is deprecated. |
---|
416 | = NO_READ_ANCILLARY_CHUNKS READ_ANCILLARY_CHUNKS_NOT_SUPPORTED |
---|
417 | |
---|
418 | option WRITE_ANCILLARY_CHUNKS requires WRITE |
---|
419 | # PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED is deprecated. |
---|
420 | = NO_WRITE_ANCILLARY_CHUNKS WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED |
---|
421 | |
---|
422 | # These options disable *all* the text chunks if turned off |
---|
423 | |
---|
424 | option READ_TEXT requires READ_ANCILLARY_CHUNKS enables TEXT |
---|
425 | option WRITE_TEXT requires WRITE_ANCILLARY_CHUNKS enables TEXT |
---|
426 | |
---|
427 | # Moved to pnglibconf.h at libpng-1.5.0 |
---|
428 | # Feature support: in 1.4 this was in pngconf.h, but the following |
---|
429 | # features have no affect on the libpng API. Add library |
---|
430 | # only features to the end of this list. Add features that |
---|
431 | # affect the API above. (Note: the list of chunks follows |
---|
432 | # the library-only settings.) |
---|
433 | # |
---|
434 | # BUILD TIME ONLY OPTIONS |
---|
435 | # These options do not affect the API but rather alter how the |
---|
436 | # API is implemented, they get recorded in pnglibconf.h, but |
---|
437 | # can't be changed by the application. |
---|
438 | |
---|
439 | # Check the correctness of cHRM chunks |
---|
440 | |
---|
441 | option CHECK_cHRM requires cHRM |
---|
442 | |
---|
443 | # |
---|
444 | # Artificially align memory - the code typically aligns to 8 byte |
---|
445 | # boundaries if this is switched on, it's a small waste of space |
---|
446 | # but can help (in theory) on some architectures. Only affects |
---|
447 | # internal structures. Added at libpng 1.4.0 |
---|
448 | |
---|
449 | option ALIGN_MEMORY |
---|
450 | |
---|
451 | # Buggy compilers (e.g., gcc 2.7.2.2) need PNG_NO_POINTER_INDEXING |
---|
452 | # See png[wr]util.c, normally this should always be *on* |
---|
453 | |
---|
454 | option POINTER_INDEXING |
---|
455 | |
---|
456 | # Other defines for things like memory and the like can go here. |
---|
457 | |
---|
458 | # BUILD TIME SETTINGS |
---|
459 | # Like build time options these do not affect the API, but they |
---|
460 | # may be useful to applications because they record details of |
---|
461 | # how the API will behave particularly with regard to overall |
---|
462 | # accuracy. |
---|
463 | |
---|
464 | # This controls how fine the quantizing gets. As this allocates |
---|
465 | # a largish chunk of memory (32K), those who are not as concerned |
---|
466 | # with quantizing quality can decrease some or all of these. |
---|
467 | |
---|
468 | setting QUANTIZE_RED_BITS default 5 |
---|
469 | setting QUANTIZE_GREEN_BITS default 5 |
---|
470 | setting QUANTIZE_BLUE_BITS default 5 |
---|
471 | |
---|
472 | # This controls how fine the gamma correction becomes when you |
---|
473 | # are only interested in 8 bits anyway. Increasing this value |
---|
474 | # results in more memory being used, and more pow() functions |
---|
475 | # being called to fill in the gamma tables. Don't set this value |
---|
476 | # less then 8, and even that may not work (I haven't tested it). |
---|
477 | |
---|
478 | setting MAX_GAMMA_8 default 11 |
---|
479 | |
---|
480 | # This controls how much a difference in gamma we can tolerate before |
---|
481 | # we actually start doing gamma conversion, it's a fixed point value, |
---|
482 | # so the default below is 0.05, meaning libpng ignores corrections in |
---|
483 | # the range 0.95 to 1.05 |
---|
484 | |
---|
485 | setting GAMMA_THRESHOLD_FIXED default 5000 |
---|
486 | |
---|
487 | # Scaling factor for filter heuristic weighting calculations |
---|
488 | |
---|
489 | setting WEIGHT_SHIFT default 8 |
---|
490 | setting COST_SHIFT default 3 |
---|
491 | |
---|
492 | # Precision to use when converting a floating point value to a PNG |
---|
493 | # extension format string in an sCAL chunk (only relevant if the |
---|
494 | # floating point API is enabled) |
---|
495 | |
---|
496 | setting sCAL_PRECISION default 5 |
---|
497 | |
---|
498 | # This is the size of the compression buffer, and thus the size of |
---|
499 | # an IDAT chunk. Make this whatever size you feel is best for your |
---|
500 | # machine. One of these will be allocated per png_struct. When this |
---|
501 | # is full, it writes the data to the disk, and does some other |
---|
502 | # calculations. Making this an extremely small size may slow |
---|
503 | # the library down, but you may want to experiment to determine |
---|
504 | # where it becomes significant, if you are concerned with memory |
---|
505 | # usage. Note that zlib allocates at least 32Kb also. For readers, |
---|
506 | # this describes the size of the buffer available to read the data in. |
---|
507 | # Unless this gets smaller than the size of a row (compressed), |
---|
508 | # it should not make much difference how big this is. |
---|
509 | |
---|
510 | setting ZBUF_SIZE default 8192 |
---|
511 | |
---|
512 | # Ancillary chunks |
---|
513 | chunk bKGD |
---|
514 | chunk cHRM |
---|
515 | chunk gAMA |
---|
516 | chunk hIST |
---|
517 | chunk iCCP |
---|
518 | chunk iTXt |
---|
519 | chunk oFFs |
---|
520 | chunk pCAL |
---|
521 | chunk sCAL |
---|
522 | chunk pHYs |
---|
523 | chunk sBIT |
---|
524 | chunk sPLT |
---|
525 | chunk sRGB |
---|
526 | chunk tEXt requires TEXT |
---|
527 | chunk tIME |
---|
528 | chunk tRNS |
---|
529 | chunk zTXt |
---|
530 | |
---|
531 | # This only affects support of the optional PLTE chunk in RGB and RGBA |
---|
532 | # images. Notice that READ_ANCILLARY_CHUNKS therefore disables part |
---|
533 | # of the regular chunk reading too. |
---|
534 | |
---|
535 | option READ_OPT_PLTE requires READ_ANCILLARY_CHUNKS |
---|
536 | |
---|
537 | option READ_UNKNOWN_CHUNKS requires READ |
---|
538 | option READ_UNKNOWN_CHUNKS enables UNKNOWN_CHUNKS READ_USER_CHUNKS |
---|
539 | option READ_USER_CHUNKS requires READ enables USER_CHUNKS |
---|
540 | |
---|
541 | option CONVERT_tIME requires WRITE_ANCILLARY_CHUNKS |
---|
542 | # The "tm" structure is not supported on WindowsCE |
---|
543 | |
---|
544 | @#ifdef _WIN32_WCE |
---|
545 | @# define PNG_NO_CONVERT_tIME |
---|
546 | @#endif |
---|
547 | |
---|
548 | option WRITE_FILTER requires WRITE |
---|
549 | |
---|
550 | option WRITE_UNKNOWN_CHUNKS requires WRITE |
---|
551 | |
---|
552 | option HANDLE_AS_UNKNOWN |
---|
553 | |
---|
554 | option SAVE_INT_32 requires WRITE |
---|
555 | |
---|
556 | # png_save_int_32 is required by the ancillary chunks oFFs and pCAL |
---|
557 | |
---|
558 | # added at libpng-1.5.4 |
---|
559 | |
---|
560 | option WRITE_OPTIMIZE_CMF requires WRITE |
---|
561 | |
---|
562 | option READ_COMPRESSED_TEXT disabled |
---|
563 | option READ_iCCP enables READ_COMPRESSED_TEXT |
---|
564 | option READ_iTXt enables READ_COMPRESSED_TEXT |
---|
565 | option READ_zTXt enables READ_COMPRESSED_TEXT |
---|
566 | option READ_COMPRESSED_TEXT enables READ_TEXT |
---|
567 | |
---|
568 | option WRITE_oFFs enables SAVE_INT_32 |
---|
569 | option WRITE_pCAL enables SAVE_INT_32 |
---|
570 | |
---|
571 | option WRITE_COMPRESSED_TEXT disabled |
---|
572 | option WRITE_iCCP enables WRITE_COMPRESSED_TEXT |
---|
573 | option WRITE_iTXt enables WRITE_COMPRESSED_TEXT |
---|
574 | option WRITE_zTXt enables WRITE_COMPRESSED_TEXT |
---|
575 | option WRITE_COMPRESSED_TEXT enables WRITE_TEXT |
---|
576 | |
---|
577 | # Turn this off to disable png_read_png() and png_write_png() and |
---|
578 | # leave the row_pointers member out of the info structure. |
---|
579 | |
---|
580 | option INFO_IMAGE |
---|
581 | |
---|
582 | # added at libpng-1.5.10 |
---|
583 | # Turn this off to disable warning about invalid palette index and |
---|
584 | # leave the num_palette_max member out of the png structure. |
---|
585 | |
---|
586 | option CHECK_FOR_INVALID_INDEX enables READ_CHECK_FOR_INVALID_INDEX |
---|
587 | option CHECK_FOR_INVALID_INDEX enables WRITE_CHECK_FOR_INVALID_INDEX |
---|
588 | option READ_CHECK_FOR_INVALID_INDEX requires READ CHECK_FOR_INVALID_INDEX |
---|
589 | option WRITE_CHECK_FOR_INVALID_INDEX requires WRITE CHECK_FOR_INVALID_INDEX |
---|
590 | |
---|