VirtualBox

source: vbox/trunk/src/libs/libpng-1.6.42/scripts/pnglibconf.dfa@ 103980

最後變更 在這個檔案從103980是 103316,由 vboxsync 提交於 12 月 前

libpng-1.6.42: Applied and adjusted our libpng changes to 1.6.42. bugref:8515

檔案大小: 42.0 KB
 
1# scripts/pnglibconf.dfa - library build configuration control
2#
3@/*- pnglibconf.dfn intermediate file
4@ * generated from scripts/pnglibconf.dfa
5@ */
6#
7com pnglibconf.h - library build configuration
8com
9version
10com
11com Copyright (c) 2018-2024 Cosmin Truta
12com Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
13com
14com This code is released under the libpng license.
15com For conditions of distribution and use, see the disclaimer
16com and license in png.h
17com
18
19file pnglibconf.h scripts/pnglibconf.dfa PNGLCONF_H
20
21# This file is preprocessed by scripts/options.awk and the
22# C compiler to generate 'pnglibconf.h' - a list of all the
23# configuration options. The file lists the various options
24# that can *only* be specified during the libpng build;
25# pnglibconf.h freezes the definitions selected for the specific
26# build.
27#
28# The syntax is detailed in scripts/options.awk; this is a summary
29# only:
30#
31# setting <name> [requires ...] [default]
32# #define PNG_<name> <value> /* value comes from current setting */
33# option <name> [requires ...] [if ...] [enables ...] [disabled]
34# #define PNG_<name>_SUPPORTED if the requirements are met and
35# enable the other options listed
36# chunk <name> [requires ...] [enables ...] [disabled]
37# Enable chunk processing for the given ancillary chunk; any
38# 'requires something' expands to READ_something for read and
39# WRITE_something for write, but the enables list members are
40# used as given (e.g. enables GAMMA just expands to that on the
41# correspond READ_name and WRITE_name lines.)
42#
43# "," may be used to separate options on an 'option' line and is ignored; it
44# doesn't change the meaning of the line. (NOT setting, where "," becomes
45# part of the setting!) A comma at the end of an option line causes a
46# continuation (the next line is included in the option too.)
47#
48# Note that the 'on' and 'off' keywords, while valid on both option
49# and chunk, should not be used in this file because they force the
50# relevant options on or off.
51
52#----------------------------------------------------------------------
53
54# The following setting, option and chunk values can all be changed
55# while building libpng:
56#
57# setting: change 'setting' lines to fine tune library performance;
58# changes to the settings don't affect the libpng API functionally
59#
60# option: change 'option' lines to remove or add capabilities from
61# or to the library; options change the library API
62#
63# chunk: change 'chunk' lines to remove capabilities to process
64# optional ('ancillary') chunks. This does not prevent PNG
65# decoding but does change the libpng API because some chunks
66# will be ignored.
67#
68# There are three ways of disabling features, in no particular order:
69#
70# 1) Create 'pngusr.h', enter the required private build information
71# detailed below and #define PNG_NO_<option> for each option you
72# don't want in that file. You can also turn on options using
73# PNG_<option>_SUPPORTED. When you have finished, rerun configure
74# and rebuild pnglibconf.h file with -DPNG_USER_CONFIG:
75#
76# make clean
77# CPPFLAGS='-DPNG_USER_CONFIG' ./configure
78# make pnglibconf.h
79#
80# pngusr.h is only used during the creation of pnglibconf.h, but it
81# is safer to ensure that -DPNG_USER_CONFIG is specified throughout
82# the build by changing the CPPFLAGS passed to the initial ./configure
83#
84# 2) Add definitions of the settings you want to change to
85# CPPFLAGS; for example:
86#
87# -DPNG_DEFAULT_READ_MACROS=0
88#
89# (This would change the default to *not* use read macros.) Be
90# very careful to change only settings that don't alter the API
91# because this approach bypasses the private build checking. You
92# can also change settings from pngpriv.h (read pngpriv.h) safely
93# without API changes. Do that in the same way.
94#
95# 3) Write a new '.dfa' file (say 'pngusr.dfa') and in this file
96# provide override values for setting entries and turn option or
97# chunk values explicitly 'on' or 'off':
98#
99# setting FOO default VALUE
100# option BAR [on|off]
101#
102# Then add this file to the options.awk command line (the *first*
103# one) after this file. The make macro DFA_XTRA is provided to make
104# this easier (set it like CPPFLAGS prior to running ./configure).
105# Look at the builds below contrib/pngminim for some extreme examples
106# of how this can be used.
107#
108# Don't edit this file unless you are contributing a patch to
109# libpng and need new or modified options/settings.
110#----------------------------------------------------------------------
111
112# The following causes commented out #undef lines to be written to
113# pnglibconf.h; this can be stopped by logunsupported=0 in a later
114# file or on the command line (after pnglibconf.dfa)
115
116logunsupported = 1
117
118# The following allows the output from configure to modify the contents of
119# pnglibconf.h
120
121@#ifdef HAVE_CONFIG_H
122@# include "config.h"
123@#endif
124
125# PNG_USER_CONFIG has to be defined on the compiler command line
126# to cause pngusr.h to be read while constructing pnglibconf.h
127#
128# If you create a private DLL you need to define the following
129# macros in the file 'pngusr.h' and set -DPNG_USER_CONFIG for
130# compilation (i.e. in CPPFLAGS.)
131# #define PNG_USER_PRIVATEBUILD \
132# <Describes by whom and why this version of the DLL was built>
133# e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons."
134# #define PNG_USER_DLLFNAME_POSTFIX <two-letter postfix that serve to
135# distinguish your DLL from those of the official release. These
136# correspond to the trailing letters that come after the version
137# number and must match your private DLL name>
138# e.g. // private DLL "libpng13gx.dll"
139# #define PNG_USER_DLLFNAME_POSTFIX "gx"
140#
141# The following macros are also at your disposal if you want to complete the
142# DLL VERSIONINFO structure.
143# - PNG_USER_VERSIONINFO_COMMENTS
144# - PNG_USER_VERSIONINFO_COMPANYNAME
145# - PNG_USER_VERSIONINFO_LEGALTRADEMARKS
146
147# It is necessary to include configures definitions here so that AC_DEFINE
148# in configure.ac works in a comprehensible way
149@#if defined(HAVE_CONFIG_H) && !defined(PNG_NO_CONFIG_H)
150@# include "config.h"
151@#endif
152
153@#ifdef PNG_USER_CONFIG
154@# include "pngusr.h"
155@#endif
156
157# This is a special fixup for the Watcom C compiler on Windows, which has
158# multiple procedure call standards. Unless PNG_API_RULE is set explicitly
159# (i.e. if it is not defined at this point) it will be forced to '2' here when
160# using Watcom. This indicates to the other header files that Watcom behaviour
161# is required where appropriate.
162
163@#ifdef __WATCOMC__
164@# ifndef PNG_API_RULE
165@# define PNG_API_RULE 2 /* Use Watcom calling conventions */
166@# endif
167@#endif
168
169# IN DEVELOPMENT
170# These are currently experimental features; define them if you want (NOTE:
171# experimental options must be disabled before they are defined in this file!)
172
173# NONE
174
175# Note that PNG_USER_CONFIG only has an effect when building
176# pnglibconf.h
177
178setting USER_CONFIG
179setting USER_PRIVATEBUILD
180setting USER_DLLFNAME_POSTFIX
181setting USER_VERSIONINFO_COMMENTS
182setting USER_VERSIONINFO_COMPANYNAME
183setting USER_VERSIONINFO_LEGALTRADEMARKS
184
185# Record the 'API rule' used to select calling conventions on
186# those systems that support such things (see all the comments in
187# pngconf.h)
188# Changing this setting has a fundamental affect on the PNG ABI,
189# do not release shared libraries with this changed.
190
191setting API_RULE default 0
192
193# This allows a prefix to be added to the front of every API function name (and
194# therefore every symbol) by redefining all the function names with the prefix
195# at the end of pnglibconf.h. It also turns on similar internal symbol renaming
196# by causing a similar build-time only file, pngprefix.h, to be generated.
197
198setting PREFIX
199
200# Implementation specific control of the optimizations, enabled by those
201# hardware or software options that need it (typically when run-time choices
202# must be made by the user)
203option SET_OPTION disabled
204
205# These options are specific to the ARM NEON hardware optimizations. At present
206# these optimizations depend on GCC specific pre-processing of an assembler (.S)
207# file so they probably won't work with other compilers.
208#
209# ARM_NEON_OPT: unset: check at compile time (__ARM_NEON__ must be defined by
210# the compiler, typically as a result of specifying
211# CC="gcc -mfpu=neon".)
212# 0: disable (even if the CPU has a NEON FPU.)
213# 1: check at run time (via ARM_NEON_{API,CHECK})
214# 2: switch on unconditionally (inadvisable - instead pass
215# -mfpu=neon to GCC in CC)
216# When building libpng avoid using any setting other than '0'; '1' is
217# set automatically when either 'API' or 'CHECK' are configured in,
218# '2' should not be necessary as -mfpu=neon will achieve the same
219# effect as well as applying NEON optimizations to the rest of the
220# libpng code.
221# NOTE: any setting other than '0' requires ALIGNED_MEMORY
222# ARM_NEON_API: (PNG_ARM_NEON == 1) allow the optimization to be switched on
223# with png_set_option
224# ARM_NEON_CHECK: (PNG_ARM_NEON == 1) compile a run-time check to see if Neon
225# extensions are supported. This is poorly supported and
226# deprecated - use the png_set_option API.
227setting ARM_NEON_OPT
228option ARM_NEON_API disabled requires ALIGNED_MEMORY enables SET_OPTION,
229 sets ARM_NEON_OPT 1
230option ARM_NEON_CHECK disabled requires ALIGNED_MEMORY,
231 sets ARM_NEON_OPT 1
232
233# These options are specific to the PowerPC VSX hardware optimizations.
234#
235# POWERPC_VSX_OPT: unset: check at compile time (__PPC64__,__ALTIVEC__,__VSX__
236# must be defined by the compiler, typically as a result
237# of specifying
238# "-mvsx -maltivec" compiler flags)
239# 0: disable (even if the CPU supports VSX.)
240# 1: check at run time (via POWERPC_VSX_{API,CHECK})
241# 2: switch on unconditionally (inadvisable - instead pass
242# -mvsx -maltivec to compiler options)
243# When building libpng avoid using any setting other than '0'; '1' is
244# set automatically when either 'API' or 'CHECK' are configured in,
245# '2' should not be necessary as "-mvsx -maltivec" will achieve the same
246# effect as well as applying VSX optimizations to the rest of the
247# libpng code.
248# POWERPC_VSX_API: (PNG_POWERPC_VSX == 1) allow the optimization to be switched on
249# with png_set_option
250# POWERPC_VSX_CHECK: (PNG_POWERPC_VSX == 1) compile a run-time check to see if VSX
251# extensions are supported. This is supported not for all OSes
252# (see contrib/powerpc/README)
253setting POWERPC_VSX_OPT
254option POWERPC_VSX_API disabled enables SET_OPTION,
255 sets POWERPC_VSX_OPT 1
256option POWERPC_VSX_CHECK disabled,
257 sets POWERPC_VSX_OPT 1
258
259# These options are specific to the MIPS MSA hardware optimizations.
260#
261# MIPS_MSA_OPT: unset: check at compile time (__mips_msa must be defined by
262# the compiler, typically as a result of specifying
263# "-mmsa -mfp64" compiler flags)
264# 0: disable (even if the CPU supports MSA.)
265# 1: check at run time (via MIPS_MSA_{API,CHECK})
266# 2: switch on unconditionally (inadvisable - instead pass
267# -mmsa -mfp64 to compiler options)
268# When building libpng avoid using any setting other than '0'; '1' is
269# set automatically when either 'API' or 'CHECK' are configured in,
270# '2' should not be necessary as "-mmsa -mfp64" will achieve the same
271# effect as well as applying MSA optimizations to the rest of the
272# libpng code.
273# NOTE: any setting other than '0' requires ALIGNED_MEMORY
274# MIPS_MSA_API: (PNG_MIPS_MSA == 1) allow the optimization to be switched on
275# with png_set_option.
276# MIPS_MSA_CHECK: (PNG_MIPS_MSA == 1) compile a run-time check to see if MSA
277# extensions are supported.
278setting MIPS_MSA_OPT
279option MIPS_MSA_API disabled requires ALIGNED_MEMORY enables SET_OPTION,
280 sets MIPS_MSA_OPT 1
281option MIPS_MSA_CHECK disabled requires ALIGNED_MEMORY,
282 sets MIPS_MSA_OPT 1
283
284# These options are specific to the MIPS MMI hardware optimizations.
285#
286# MIPS_MMI_OPT: unset: check at compile time (__mips_loongson_mmi must be defined by
287# the compiler, typically as a result of specifying
288# "-mloongson-mmi -march=loongson3a" compiler flags)
289# 0: disable (even if the CPU supports MMI.)
290# 1: check at run time (via MIPS_MMI_{API,CHECK})
291# 2: switch on unconditionally (inadvisable - instead pass
292# -mloongson-mmi -march=loongson3a to compiler options)
293# When building libpng avoid using any setting other than '0'; '1' is
294# set automatically when either 'API' or 'CHECK' are configured in,
295# '2' should not be necessary as "-mloongson-mmi -march=loongson3a" will achieve the same
296# effect as well as applying MMI optimizations to the rest of the
297# libpng code.
298# MIPS_MMI_API: (PNG_MIPS_MMI == 1) allow the optimization to be switched on
299# with png_set_option
300# MIPS_MMI_CHECK: (PNG_MIPS_MMI == 1) compile a run-time check to see if MMI
301# extensions are supported.
302setting MIPS_MMI_OPT
303option MIPS_MMI_API disabled requires ALIGNED_MEMORY enables SET_OPTION,
304 sets MIPS_MMI_OPT 1
305option MIPS_MMI_CHECK disabled requires ALIGNED_MEMORY,
306 sets MIPS_MMI_OPT 1
307
308
309# These settings configure the default compression level (0-9) and 'strategy';
310# strategy is as defined by the implementors of zlib. It describes the input
311# data and modifies the zlib parameters in an attempt to optimize the balance
312# between search and huffman encoding in the zlib algorithms. The defaults are
313# the zlib.h defaults - the apparently recursive definition does not arise
314# because the name of the setting is prefixed by PNG_
315#
316# The TEXT values are the defaults when writing compressed text (all forms)
317
318# Include the zlib header so that the defaults below are known
319@# include <zlib.h>
320
321# The '@' here means to substitute the value when pnglibconf.h is built
322setting Z_DEFAULT_COMPRESSION default @Z_DEFAULT_COMPRESSION
323# TODO: why aren't these Z_RLE; zlib.h says that Z_RLE, specifically, is
324# appropriate for PNG images, maybe it doesn't exist in all versions?
325setting Z_DEFAULT_STRATEGY default @Z_FILTERED
326setting Z_DEFAULT_NOFILTER_STRATEGY default @Z_DEFAULT_STRATEGY
327setting ZLIB_VERNUM default @ZLIB_VERNUM
328
329# Linkage of:
330#
331# API: libpng API functions
332# CALLBACK: internal non-file-local callbacks
333# FUNCTION: internal non-file-local functions
334# DATA: internal non-file-local (const) data
335setting LINKAGE_API default extern
336setting LINKAGE_CALLBACK default extern
337setting LINKAGE_FUNCTION default extern
338setting LINKAGE_DATA default extern
339
340setting TEXT_Z_DEFAULT_COMPRESSION default @Z_DEFAULT_COMPRESSION
341setting TEXT_Z_DEFAULT_STRATEGY default @Z_DEFAULT_STRATEGY
342
343# Default to using the read macros
344
345setting DEFAULT_READ_MACROS default 1
346
347# The alternative is to call functions to read PNG values, if
348# the functions are turned *off* the read macros must always
349# be enabled, so turning this off will actually force the
350# USE_READ_MACROS option on (see pngconf.h)
351
352option READ_INT_FUNCTIONS requires READ
353
354# The same for write but these can only be switched off if no writing
355# is required at all - hence the use of a 'disabled', not a 'requires'.
356# If these are needed, they are enabled in the 'WRITE options' section
357# below.
358
359option WRITE_INT_FUNCTIONS disabled
360
361# Error controls
362#
363# WARNINGS: normally on, if off no warnings are generated
364# ERROR_TEXT: normally on, if off errors happen but there is no message
365# ERROR_NUMBERS: unimplemented feature, therefore disabled
366# BENIGN_ERRORS: support for just issuing warnings for recoverable errors
367#
368# BENIGN_READ_ERRORS:
369# By default recoverable errors on read should just generate warnings,
370# generally safe but PNG files that don't conform to the specification will
371# be accepted if a meaningful result can be produced.
372#
373# BENIGN_WRITE_ERRORS:
374# By default recoverable errors on write should just generate warnings,
375# not generally safe because this allows the application to write invalid
376# PNG files. Applications should enable this themselves; it's useful
377# because it means that a failure to write an ancillary chunk can often be
378# ignored.
379
380option WARNINGS
381option ERROR_TEXT
382option ERROR_NUMBERS disabled
383
384option BENIGN_ERRORS
385option BENIGN_WRITE_ERRORS requires BENIGN_ERRORS disabled
386option BENIGN_READ_ERRORS requires BENIGN_ERRORS
387
388# Adler32 checksum
389#
390# This option allows the check of the Adler32 checksum performed by zlib to
391# be turned off for IDAT chunks (only). Unless this option is enabled and
392# turned on (not the default even if enabled) a failed Adler32 at the end of the
393# stream will result in a decompression (inflate) failure on read even though
394# the entire image might have been read successfully.
395#
396# This option relies on an undocumented function 'inflateValidate' which is
397# present in only some versions of zlib. If the function is not present in the
398# zlib used with libpng code which uses -lpng is likely to fail to link or to
399# launch in the case of a DLL.
400#
401# Therefore this option is currently disabled by default; it has to be turned on
402# in pngusr.dfa and then the application program has to explicitly turn the
403# functionality on by calling png_set_option.
404#
405# Furthermore the option is explicitly turned off here if the zlib version
406# number is below that required - libpng wouldn't compile in that case if the
407# option were turned on.
408option DISABLE_ADLER32_CHECK requires READ enables SET_OPTION disabled
409
410# ZLIB_VERNUM must be used here, not PNG_ZLIB_VERNUM, because
411# scripts/options.awk ends up putting this test adhead of the setting of
412# PNG_ZLIB_VERNUM (apparently above, but not because of the two-pass processing)
413@#if ZLIB_VERNUM < 0x1290
414@# define PNG_NO_DISABLE_ADLER32_CHECK
415@#endif
416
417# Generic options - affect both read and write.
418
419option MNG_FEATURES
420
421# Arithmetic options, the first is the big switch that chooses between internal
422# floating and fixed point arithmetic implementations - it does not affect any
423# APIs. The second two (the _POINT settings) switch off individual APIs.
424#
425# Prior to libpng 1.6.8 one of the API (_POINT) variants had to be selected. At
426# 1.6.8 this restriction has been removed; the simplified API can be used
427# without enabling any of the low level fixed/floating APIs.
428
429option FLOATING_ARITHMETIC
430option FLOATING_POINT
431option FIXED_POINT
432
433# This protects us against compilers that run on a windowing system
434# and thus don't have or would rather us not use the stdio types:
435# stdin, stdout, and stderr. The only one currently used is stderr
436# in png_error() and png_warning(). #defining PNG_NO_CONSOLE_IO will
437# prevent these from being compiled and used. #defining PNG_NO_STDIO
438# will also prevent these, plus will prevent the entire set of stdio
439# macros and functions (FILE *, printf, etc.) from being compiled and used,
440# unless (PNG_DEBUG > 0) has been #defined.
441
442option STDIO
443option CONSOLE_IO requires STDIO
444
445# Note: prior to 1.5.0 this option could not be disabled if STDIO
446# was enabled. Prior to 1.5.3 this option required STDIO
447
448option TIME_RFC1123
449
450# PNG_SETJMP_NOT_SUPPORTED is an old equivalent for NO_SETJMP
451
452option SETJMP
453= NO_SETJMP SETJMP_NOT_SUPPORTED
454
455# If this is disabled it is not possible for apps to get the
456# values from the 'info' structure, this effectively removes
457# quite a lot of the READ API.
458
459option EASY_ACCESS
460
461# Added at libpng-1.2.0
462
463option USER_MEM
464
465# Added at libpng-1.4.0
466
467option IO_STATE
468
469# Libpng limits: limit the size of images and data on read.
470#
471# If this option is disabled all the limit checking code will be disabled:
472
473option USER_LIMITS requires READ
474
475# The default settings given below for the limits mean that libpng will
476# limit the size of images or the size of data in ancillary chunks to less
477# than the specification or implementation limits. Settings have the
478# following interpretations:
479#
480# USER_WIDTH_MAX: maximum width of an image that will be read
481# USER_HEIGHT_MAX: maximum height
482# USER_CHUNK_MALLOC_MAX: maximum in-memory (decompressed) size of a single chunk
483# USER_CHUNK_CACHE_MAX: maximum number of chunks to be cached
484#
485# Only chunks that are variable in number are counted towards the
486
487# Use 0x7fffffff for unlimited
488setting USER_WIDTH_MAX default 1000000
489setting USER_HEIGHT_MAX default 1000000
490
491# Use 0 for unlimited
492setting USER_CHUNK_CACHE_MAX default 1000
493setting USER_CHUNK_MALLOC_MAX default 8000000
494
495# If this option is enabled APIs to set the above limits at run time are added;
496# without this the hardwired (compile time) limits will be used.
497option SET_USER_LIMITS requires USER_LIMITS
498
499# All of the following options relate to code capabilities for
500# processing image data before creating a PNG or after reading one.
501# You can remove these capabilities safely and still be PNG
502# conformant, however the library that results is still non-standard.
503# See the comments above about how to change options and settings.
504
505# READ options
506#
507# WARNING: in libpng 1.5 maintained configuration compatibility with earlier
508# versions. In some cases turning off an option turned off other options, in
509# others it was ineffective unless dependent options were also turned off.
510# Libpng 1.6 changes this: in general if you turn off an option that affects
511# APIs it stays off and simply disables APIs that depend on it.
512#
513# As a result if you simply port the libpng 1.5 configuration to libpng 1.6 you
514# will probably see build failures due to missing APIs. Fixing these failures
515# requires some, perhaps considerable, knowledge of what your libpng using
516# applications are doing, fortunately there is no great reason for you to move
517# to libpng 1.6; the new interfaces in 1.6 will take several years to become
518# popular.
519
520option READ enables READ_INTERLACING SET_OPTION
521
522# Disabling READ_16BIT does not disable reading 16-bit PNG files, but it
523# forces them to be chopped down to 8-bit, and disables any 16-bit
524# processing after that has happened. You need to be sure to enable
525# READ_SCALE_16_TO_8 or READ_STRIP_16_TO_8 when you disable READ_16BIT for
526# this to work properly. You should disable the other option if you need to
527# ensure a particular conversion (otherwise the app can chose.)
528
529option READ_16BIT requires READ enables 16BIT
530
531option READ_QUANTIZE requires READ
532
533option READ_TRANSFORMS requires READ
534= NO_READ_TRANSFORMS READ_TRANSFORMS_NOT_SUPPORTED
535
536# Read gamma handling. Gamma processing is a core part of libpng and many of
537# the capabilities are dependent on libpng performing gamma correction.
538#
539# In libpng 1.6 disabling gamma processing (setting PNG_NO_READ_GAMMA)
540# consistently disables those parts of the API that depend on it. Prior to
541# 1.6.0 this was not true; the results were unpredictable and varied between
542# releases.
543#
544# If you disable gamma processing and your program no longer compiles you need
545# to ask whether you really need the APIs that are missing. If you do then you
546# almost certainly need the gamma processing.
547#
548# If you handle gamma issues outside libpng then you do not need the libpng
549# gamma processing; and it is an enormous waste of space. You just need to
550# remove the use of libpng APIs that depend on it.
551option READ_GAMMA requires READ_TRANSFORMS, READ_gAMA, READ_sRGB
552
553option READ_ALPHA_MODE requires READ_TRANSFORMS, READ_GAMMA
554option READ_BACKGROUND requires READ_TRANSFORMS, READ_STRIP_ALPHA, READ_GAMMA
555option READ_BGR requires READ_TRANSFORMS
556option READ_EXPAND_16 requires READ_TRANSFORMS, READ_16BIT, READ_EXPAND
557option READ_EXPAND requires READ_TRANSFORMS
558option READ_FILLER requires READ_TRANSFORMS
559option READ_GRAY_TO_RGB requires READ_TRANSFORMS
560option READ_INVERT_ALPHA requires READ_TRANSFORMS
561option READ_INVERT requires READ_TRANSFORMS
562option READ_PACK requires READ_TRANSFORMS
563option READ_PACKSWAP requires READ_TRANSFORMS
564option READ_RGB_TO_GRAY requires READ_TRANSFORMS, READ_GAMMA enables COLORSPACE
565option READ_SCALE_16_TO_8 requires READ_TRANSFORMS
566option READ_SHIFT requires READ_TRANSFORMS
567option READ_STRIP_16_TO_8 requires READ_TRANSFORMS
568option READ_STRIP_ALPHA requires READ_TRANSFORMS
569option READ_SWAP_ALPHA requires READ_TRANSFORMS
570option READ_SWAP requires READ_TRANSFORMS, READ_16BIT
571option READ_USER_TRANSFORM requires READ_TRANSFORMS
572
573option PROGRESSIVE_READ requires READ
574option SEQUENTIAL_READ requires READ
575
576# You can define PNG_NO_PROGRESSIVE_READ if you don't do progressive reading.
577# This is not talking about interlacing capability! You'll still have
578# interlacing unless you turn off the following which is required
579# for PNG-compliant decoders. (In other words, do not do this - in
580# fact it can't be disabled from the command line!)
581#option READ_INTERLACING requires READ
582
583option READ_COMPOSITE_NODIV requires READ
584= NO_READ_COMPOSITE_NODIV NO_READ_COMPOSITED_NODIV
585
586# Inch conversions
587
588option INCH_CONVERSIONS
589= INCH_CONVERSIONS INCH_CONVERSIONS
590
591# API to build a grayscale palette
592# NOTE: this is not used internally by libpng at present.
593
594option BUILD_GRAYSCALE_PALETTE
595
596# WRITE options
597
598option WRITE enables WRITE_INT_FUNCTIONS
599
600# Disabling WRITE_16BIT prevents 16-bit PNG files from being
601# generated.
602option WRITE_16BIT requires WRITE enables 16BIT
603
604option WRITE_TRANSFORMS requires WRITE
605= NO_WRITE_TRANSFORMS WRITE_TRANSFORMS_NOT_SUPPORTED
606
607option WRITE_SHIFT requires WRITE_TRANSFORMS
608option WRITE_PACK requires WRITE_TRANSFORMS
609option WRITE_BGR requires WRITE_TRANSFORMS
610option WRITE_SWAP requires WRITE_TRANSFORMS, WRITE_16BIT
611option WRITE_PACKSWAP requires WRITE_TRANSFORMS
612option WRITE_INVERT requires WRITE_TRANSFORMS
613option WRITE_FILLER requires WRITE_TRANSFORMS
614option WRITE_SWAP_ALPHA requires WRITE_TRANSFORMS
615option WRITE_INVERT_ALPHA requires WRITE_TRANSFORMS
616option WRITE_USER_TRANSFORM requires WRITE_TRANSFORMS
617
618# This is not required for PNG-compliant encoders, but can cause
619# trouble if left undefined
620
621option WRITE_INTERLACING requires WRITE
622
623# Deprecated, will be removed.
624option WRITE_WEIGHTED_FILTER requires WRITE
625
626option WRITE_FLUSH requires WRITE
627
628# Note: these can be turned off explicitly if not required by the
629# apps implementing the user transforms
630option USER_TRANSFORM_PTR if READ_USER_TRANSFORM, WRITE_USER_TRANSFORM
631option USER_TRANSFORM_INFO if READ_USER_TRANSFORM, WRITE_USER_TRANSFORM
632
633# This enables API to set compression parameters for compressing
634# non-IDAT chunks (zTXt, iTXt, iCCP, and unknown chunks). This feature
635# was added at libpng-1.5.3.
636option WRITE_CUSTOMIZE_ZTXT_COMPRESSION requires WRITE
637option WRITE_CUSTOMIZE_COMPRESSION requires WRITE
638
639# Any chunks you are not interested in, you can undef here. The
640# ones that allocate memory may be especially important (hIST,
641# tEXt, zTXt, tRNS, pCAL). Others will just save time and make png_info
642# a bit smaller.
643
644# The size of the png_text structure changed in libpng-1.0.6 when
645# iTXt support was added. iTXt support was turned off by default through
646# libpng-1.2.x, to support old apps that malloc the png_text structure
647# instead of calling png_set_text() and letting libpng malloc it. It
648# was turned on by default in libpng-1.4.0.
649
650option READ_ANCILLARY_CHUNKS requires READ
651# PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED is deprecated.
652= NO_READ_ANCILLARY_CHUNKS READ_ANCILLARY_CHUNKS_NOT_SUPPORTED
653
654option WRITE_ANCILLARY_CHUNKS requires WRITE
655# PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED is deprecated.
656= NO_WRITE_ANCILLARY_CHUNKS WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED
657
658# These options disable *all* the text chunks if turned off
659
660option TEXT disabled
661option READ_TEXT requires READ_ANCILLARY_CHUNKS enables TEXT
662option WRITE_TEXT requires WRITE_ANCILLARY_CHUNKS enables TEXT
663
664# Moved to pnglibconf.h at libpng-1.5.0
665# Feature support: in 1.4 this was in pngconf.h, but the following
666# features have no affect on the libpng API. Add library
667# only features to the end of this list. Add features that
668# affect the API above. (Note: the list of chunks follows
669# the library-only settings.)
670#
671# BUILD TIME ONLY OPTIONS
672# These options do not affect the API but rather alter how the
673# API is implemented, they get recorded in pnglibconf.h, but
674# can't be changed by the application.
675
676# Colorspace support (enabled as required); just the support for colorant
677# information. Gamma support, likewise, is just support for the gamma
678# information, READ_GAMMA is required for gamma transformations (so it
679# is possible to read PNG gamma without enabling all the libpng transform
680# code - do this for applications that do their own gamma processing)
681#
682# As of 1.6.0 COLORSPACE is only useful if the application processes the
683# information; this is because the library does not do any colorspace
684# processing, it just validates the data in the PNG file.
685
686option GAMMA disabled
687option COLORSPACE enables GAMMA disabled
688
689# When an ICC profile is read, or png_set, it will be checked for a match
690# against known sRGB profiles if the sRGB handling is enabled. The
691# PNG_sRGB_PROFILE_CHECKS setting controls how much work is done during the
692# check:
693#
694# -1: Don't do any sRGB profile checking.
695#
696# 0: Just validate the profile MD5 signature if present, otherwise use
697# the checks in option 1.
698#
699# 1: Additionally check the length, intent and adler32 checksum of the
700# actual data. If enabled this will reject known profiles that have
701# had the rendering intent in the header changed as well as other edits
702# done without updating the checksum. See the discussion below.
703#
704# 2: Additionally checksum all the data using the ethernet CRC32 algorithm.
705# This makes it more difficult to fake profiles and makes it less likely
706# to get a false positive on profiles with no signature, but is probably
707# just a waste of time since all currently approved ICC sRGB profiles have
708# a secure MD5 signature.
709#
710# The rendering intent. An ICC profile stores an intended rendering intent,
711# but does not include the value in the signature. The intent is documented
712# as the intent that should be used when combining two profiles. The sRGB
713# profile is intended, however, to be used with any of the four defined intents.
714# For this reason the sRGB chunk includes an 'intent' to be used when displaying
715# the image (intent is really a property of the image not the profile.)
716#
717# Unfortunately the iCCP chunk does not. It may therefore be that some
718# applications modify the intent in profiles (including sRGB profiles) to work
719# round this problem. Selecting an option other than option '0' will cause such
720# modified profiles to be rejected.
721#
722# Security. The use of Adler32 and CRC32 checksums does not help significantly
723# with any security issues. It is relatively easy to produce arbitrary profiles
724# with the required checksums on current computer systems. Nevertheless
725# security does not seem to be an issue because the only consequence of a false
726# positive is a false assertion that the profile is an sRGB profile. This might
727# be used to hide data from libpng using applications, but it doesn't seem
728# possible to damage them.
729
730setting sRGB_PROFILE_CHECKS default 2
731
732# Artificially align memory - the code typically aligns to 8 byte
733# boundaries if this is switched on, it's a small waste of space
734# but can help (in theory) on some architectures. Only affects
735# internal structures. Added at libpng 1.4.0
736
737option ALIGNED_MEMORY
738
739# Buggy compilers (e.g., gcc 2.7.2.2) need PNG_NO_POINTER_INDEXING
740# See png[wr]util.c, normally this should always be *on*
741
742option POINTER_INDEXING
743
744# Other defines for things like memory and the like can go here.
745
746# BUILD TIME SETTINGS
747# Like build time options these do not affect the API, but they
748# may be useful to applications because they record details of
749# how the API will behave particularly with regard to overall
750# accuracy.
751
752# This controls how fine the quantizing gets. As this allocates
753# a largish chunk of memory (32K), those who are not as concerned
754# with quantizing quality can decrease some or all of these.
755
756setting QUANTIZE_RED_BITS default 5
757setting QUANTIZE_GREEN_BITS default 5
758setting QUANTIZE_BLUE_BITS default 5
759
760# This controls how fine the gamma correction becomes when you
761# are only interested in 8 bits anyway. Increasing this value
762# results in more memory being used, and more pow() functions
763# being called to fill in the gamma tables. Don't set this value
764# less than 8, and even that may not work (I haven't tested it).
765
766setting MAX_GAMMA_8 default 11
767
768# This controls how much a difference in gamma we can tolerate before
769# we actually start doing gamma conversion, it's a fixed point value,
770# so the default below is 0.05, meaning libpng ignores corrections in
771# the range 0.95 to 1.05
772
773setting GAMMA_THRESHOLD_FIXED default 5000
774
775# Precision to use when converting a floating point value to a PNG
776# extension format string in an sCAL chunk (only relevant if the
777# floating point API is enabled)
778
779setting sCAL_PRECISION default 5
780
781# This is the size of the compression buffer, and thus the size of
782# an IDAT chunk. Make this whatever size you feel is best for your
783# machine. One of these will be allocated per png_struct. When this
784# is full, it writes the data to the disk, and does some other
785# calculations. Making this an extremely small size may slow
786# the library down, but you may want to experiment to determine
787# where it becomes significant, if you are concerned with memory
788# usage. Note that zlib allocates at least 32Kb also. For readers,
789# this describes the size of the buffer available to read the data in.
790# Unless this gets smaller than the size of a row (compressed),
791# it should not make much difference how big this is.
792
793setting ZBUF_SIZE default 8192
794
795# This is the size of the decompression buffer used when counting or checking
796# the decompressed size of an LZ stream from a compressed ancillary chunk; the
797# decompressed data is never used so a different size may be optimal. This size
798# was determined using contrib/libtests/timepng.c with compressed zTXt data
799# around 11MByte in size. Slight speed improvements (up to about 14% in
800# timepng) can be achieved by very large increases (to 32kbyte) on regular data,
801# but highly compressible data shows only around 2% improvement. The size is
802# chosen to minimize the effects of DoS attacks based on using very large
803# amounts of highly compressible data.
804
805setting INFLATE_BUF_SIZE default 1024
806
807# This is the maximum amount of IDAT data that the sequential reader will
808# process at one time. The setting does not affect the size of IDAT chunks
809# read, just the amount read at once. Neither does it affect the progressive
810# reader, which processes just the amount of data the application gives it.
811# The sequential reader is currently unable to process more than one IDAT at
812# once - it has to read and process each one in turn. There is no point setting
813# this to a value larger than the IDAT chunks typically encountered (it would
814# just waste memory) but there may be some point in reducing it below the value
815# of ZBUF_SIZE (the size of IDAT chunks written by libpng.)
816
817setting IDAT_READ_SIZE default PNG_ZBUF_SIZE
818
819# Ancillary chunks
820chunk bKGD
821chunk cHRM enables COLORSPACE
822chunk eXIf
823chunk gAMA enables GAMMA
824chunk hIST
825chunk iCCP enables COLORSPACE, GAMMA
826chunk iTXt enables TEXT
827chunk oFFs
828chunk pCAL
829chunk pHYs
830chunk sBIT
831chunk sCAL
832chunk sPLT
833chunk sRGB enables COLORSPACE, GAMMA, SET_OPTION
834chunk tEXt requires TEXT
835chunk tIME
836chunk tRNS
837chunk zTXt enables TEXT
838
839# This only affects support of the optional PLTE chunk in RGB and RGBA
840# images. Notice that READ_ANCILLARY_CHUNKS therefore disables part
841# of the regular chunk reading too.
842
843option READ_OPT_PLTE requires READ_ANCILLARY_CHUNKS
844
845# Unknown chunk handling
846#
847# 'UNKNOWN_CHUNKS' is a global option to disable all unknown chunk handling on
848# read or write; everything else below requires it (directly or indirectly).
849option UNKNOWN_CHUNKS
850
851# There are three main options to control the ability to read and write unknown
852# chunks. If either read option is turned on then unknown chunks will be read,
853# otherwise they are skipped. If the write option is turned on unknown chunks
854# set by png_set_unknown_chunks will be written otherwise it is an error to call
855# that API on a write struct.
856option WRITE_UNKNOWN_CHUNKS requires WRITE requires UNKNOWN_CHUNKS
857option WRITE_UNKNOWN_CHUNKS enables STORE_UNKNOWN_CHUNKS
858
859# The first way to read user chunks is to have libpng save them for a later call
860# to png_get_unknown_chunks, the application must call
861# png_set_keep_unknown_chunks to cause this to actually happen (see png.h)
862option SAVE_UNKNOWN_CHUNKS requires READ requires SET_UNKNOWN_CHUNKS
863option SAVE_UNKNOWN_CHUNKS enables READ_UNKNOWN_CHUNKS, STORE_UNKNOWN_CHUNKS
864
865# The second approach is to use an application provided callback to process the
866# chunks, the callback can either handle the chunk entirely itself or request
867# that libpng store the chunk for later retrieval via png_get_unknown_chunks.
868#
869# NOTE: If STORE_UNKNOWN_CHUNKS is not enabled (which is the default if
870# both SAVE_UNKNOWN_CHUNKS and WRITE_UNKNOWN_CHUNKS are disabled) then a
871# 0 result from the callback will be ignored because no support for saving
872# unknown chunks has been compiled in. The normal symptom is that your app
873# fails to compile because png_get_unknown_chunks is no longer defined in png.h.
874# If you encounter this issue simply enable STORE_UNKNOWN_CHUNKS in your build.
875#
876# Note that there is no 'WRITE_USER_CHUNKS' so the USER_CHUNKS option is always
877# the same as READ_USER_CHUNKS at present
878option READ_USER_CHUNKS requires READ, UNKNOWN_CHUNKS
879option READ_USER_CHUNKS enables READ_UNKNOWN_CHUNKS, USER_CHUNKS
880
881# Two further options are provided to allow detailed control of the handling.
882# The first enables png_set_keep_unknown_chunks; this allows the default to be
883# changed from discarding unknown chunks and allows per-chunk control. This is
884# required to use the SAVE_UNKNOWN_CHUNKS option. If enabled this option also
885# applies to write (see png.h), otherwise the write API simply writes all the
886# chunks it is given.
887#
888# The second option extends the unknown handling to allow known chunks to be
889# handled as though they were unknown. This option doesn't change any APIs, it
890# merely turns on the code to check known as well as unknown chunks.
891#
892# This option no longer affects the write code. It can be safely disabled and
893# will prevent applications stopping libpng reading known chunks.
894option SET_UNKNOWN_CHUNKS requires UNKNOWN_CHUNKS
895option HANDLE_AS_UNKNOWN requires SET_UNKNOWN_CHUNKS
896
897# The following options are derived from the above and should not be turned on
898# explicitly.
899option READ_UNKNOWN_CHUNKS requires UNKNOWN_CHUNKS disabled
900option STORE_UNKNOWN_CHUNKS requires UNKNOWN_CHUNKS disabled
901
902option CONVERT_tIME requires WRITE_ANCILLARY_CHUNKS
903# The "tm" structure is not supported on WindowsCE
904
905@#ifdef _WIN32_WCE
906@# define PNG_NO_CONVERT_tIME
907@#endif
908
909option WRITE_FILTER requires WRITE
910
911option SAVE_INT_32 disabled
912# png_save_int_32 is required internally for writing the ancillary chunks oFFs
913# and pCAL and for both reading and writing iCCP (for the generation/checking of
914# the corresponding cHRM/gAMA chunks) if full ICC is supported.
915
916# added at libpng-1.5.4
917
918option WRITE_OPTIMIZE_CMF requires WRITE
919
920option READ_COMPRESSED_TEXT disabled
921option READ_iCCP enables READ_COMPRESSED_TEXT
922option READ_iTXt enables READ_COMPRESSED_TEXT
923option READ_zTXt enables READ_COMPRESSED_TEXT
924
925option WRITE_oFFs enables SAVE_INT_32
926option WRITE_pCAL enables SAVE_INT_32
927option WRITE_cHRM enables SAVE_INT_32
928
929option WRITE_COMPRESSED_TEXT disabled
930option WRITE_iCCP enables WRITE_COMPRESSED_TEXT
931option WRITE_iTXt enables WRITE_COMPRESSED_TEXT
932option WRITE_zTXt enables WRITE_COMPRESSED_TEXT
933
934# Turn this off to disable png_read_png() and png_write_png() and
935# leave the row_pointers member out of the info structure.
936
937option INFO_IMAGE
938
939# added at libpng-1.5.10
940# Turn this off to disable warning about invalid palette index and
941# leave the num_palette_max member out of the png structure.
942
943option CHECK_FOR_INVALID_INDEX enables READ_CHECK_FOR_INVALID_INDEX
944option CHECK_FOR_INVALID_INDEX enables WRITE_CHECK_FOR_INVALID_INDEX
945option READ_CHECK_FOR_INVALID_INDEX requires READ, CHECK_FOR_INVALID_INDEX
946option WRITE_CHECK_FOR_INVALID_INDEX requires WRITE, CHECK_FOR_INVALID_INDEX
947
948# added at libpng-1.5.15
949option GET_PALETTE_MAX enables READ_GET_PALETTE_MAX WRITE_GET_PALETTE_MAX
950option READ_GET_PALETTE_MAX requires READ_CHECK_FOR_INVALID_INDEX disabled
951option WRITE_GET_PALETTE_MAX requires WRITE_CHECK_FOR_INVALID_INDEX disabled
952
953# Simplified API options (added at libpng-1.6.0)
954# In libpng 1.6.8 the handling of these options was changed to used 'requires'
955# throughout, so that disabling some of the low level support always disables
956# the base simplified read/write API. This much simplifies the handling and
957# makes 'everything = off' work in a more intuitive way. It eliminates a
958# previously reported feature that APIs previously enabled by the simplified
959# API couldn't be turned off without explicitly turning off the simplified
960# APIs.
961#
962# Read:
963option SIMPLIFIED_READ,
964 requires SEQUENTIAL_READ, READ_TRANSFORMS, SETJMP, BENIGN_ERRORS,
965 READ_EXPAND, READ_16BIT, READ_EXPAND_16, READ_SCALE_16_TO_8,
966 READ_RGB_TO_GRAY, READ_ALPHA_MODE, READ_BACKGROUND, READ_STRIP_ALPHA,
967 READ_FILLER, READ_SWAP, READ_PACK, READ_GRAY_TO_RGB, READ_GAMMA,
968 READ_tRNS, READ_bKGD, READ_gAMA, READ_cHRM, READ_sRGB, READ_sBIT
969
970# AFIRST and BGR read options:
971# Prior to libpng 1.6.8 these were disabled but switched on if the low level
972# libpng routines that do the swaps were enabled. This worked but was
973# confusing. In libpng 1.6.8 the options were changed to simple 'requires'
974# and are enabled by default. This should work the same way in practice.
975option SIMPLIFIED_READ_AFIRST enables FORMAT_AFIRST,
976 requires SIMPLIFIED_READ READ_SWAP_ALPHA
977
978option SIMPLIFIED_READ_BGR enables FORMAT_BGR,
979 requires SIMPLIFIED_READ READ_BGR
980
981# Write:
982option SIMPLIFIED_WRITE,
983 requires WRITE, SETJMP, WRITE_SWAP, WRITE_PACK,
984 WRITE_tRNS, WRITE_gAMA, WRITE_sRGB, WRITE_cHRM
985
986# 1.6.22: allow simplified write without stdio support:
987option SIMPLIFIED_WRITE_STDIO requires SIMPLIFIED_WRITE STDIO
988
989option SIMPLIFIED_WRITE_AFIRST enables FORMAT_AFIRST,
990 requires SIMPLIFIED_WRITE WRITE_SWAP_ALPHA
991
992option SIMPLIFIED_WRITE_BGR enables FORMAT_BGR,
993 requires SIMPLIFIED_WRITE WRITE_BGR
994
995# Formats:
996option FORMAT_AFIRST disabled
997option FORMAT_BGR disabled
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette