xref: /aosp_15_r20/external/libpng/contrib/conftest/basic.dfa (revision a67afe4df73cf47866eedc69947994b8ff839aba)
1# basic.dfa
2#  Build time configuration of libpng
3#
4# Author: John Bowler
5# Copyright: (c) John Bowler, 2024
6# Usage rights:
7#  To the extent possible under law, the author has waived all copyright and
8#  related or neighboring rights to this work.  This work is published from:
9#  United States.
10#
11# Build libpng with basic read and write support.  This enables the lowest
12# level libpng read and write APIs - the "row-by-row" ones.
13#
14# Support is enabled only for those transformations that are observed to be
15# required by widely used apps or are in the v3 specification.
16#
17
18everything = off
19
20# The sequential read code is enabled here; the progressive code can be used
21# instead but there is no point enabling both.
22
23option READ on
24option SEQUENTIAL_READ on
25option EASY_ACCESS on
26option SET_USER_LIMITS on
27option INFO_IMAGE on
28option READ_16BIT on
29
30# Errors: these can be disabled but then there won't be any error messages
31# just failures and the error messages are really needed for apps:
32option WARNINGS on
33option ERROR_TEXT on
34option BENIGN_READ_ERRORS on
35
36# Required for many display programs such as web browsers:
37option PROGRESSIVE_READ on
38
39# Switch on the write code - this makes a minimalist encoder but with
40# interlace support turned on; otherwise png_read_png..png_write_png will
41# fail on an interlaced image.
42option WRITE on
43option WRITE_INTERLACING on
44option WRITE_16BIT on
45
46# Usages of the 'fixed' APIs are relatively rare but they do occur
47# one or the other for both the API and the internal math.
48
49#Fixed point:
50option FIXED_POINT on
51
52#Floating point:
53option FLOATING_POINT on
54option FLOATING_ARITHMETIC on
55
56# Basic error handling, IO and user memory support.  The latter allows the
57# application program to provide its own implementations of 'malloc' and 'free'.
58option SETJMP on
59option STDIO on
60option USER_MEM on
61
62# Gamma handling: this needs to be on for the gamma handling
63option READ_GAMMA on
64
65# The supported chunks
66chunk bKGD on
67chunk cHRM on
68chunk eXIf on
69chunk gAMA on
70chunk iCCP on
71chunk iTXt on
72chunk pHYs on
73chunk sBIT on
74chunk sRGB on
75chunk tEXt on
76chunk tIME on
77chunk tRNS on
78chunk zTXt on
79
80# These don't seem to be used anywhere:
81# chunk pCAL
82# chunk sCAL
83# chunk sPLT
84
85# The rest of this is app dependent: none of these options are required for
86# read/write of the full range of PNG files and the normal chunk handling on
87# read.
88option WRITE_CUSTOMIZE_ZTXT_COMPRESSION on
89option WRITE_CUSTOMIZE_COMPRESSION on
90
91option READ_EXPAND on
92option READ_FILLER on
93option READ_GRAY_TO_RGB on
94option READ_INVERT on
95option READ_PACK on
96option READ_RGB_TO_GRAY on
97option READ_SCALE_16_TO_8 on
98option READ_SHIFT on
99option READ_STRIP_16_TO_8 on
100option READ_STRIP_ALPHA on
101option READ_SWAP on
102
103option CONVERT_tIME on
104
105# optipng
106option IO_STATE on
107option STORE_UNKNOWN_CHUNKS on
108option HANDLE_AS_UNKNOWN on
109
110# pngcrush
111option READ_USER_TRANSFORM on
112option WRITE_FLUSH on
113
114# pnmtopng
115chunk hIST on
116
117# cairo
118option WRITE_PACKSWAP on
119option WRITE_USER_TRANSFORM on
120
121# graphicsmagick
122option READ_USER_CHUNKS on
123
124# Qt5.15 qtgui (gentoo package split) Qt6.6 qtbase
125option READ_BGR on
126option WRITE_BGR on
127option READ_SWAP_ALPHA on
128option WRITE_SWAP_ALPHA on
129chunk oFFs on
130
131# ghostscript-gpl
132option WRITE_INVERT_ALPHA on
133option WRITE_INVERT on
134