Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: third_party/libpng/png.h

Issue 1467263003: third_party/libpng: update to 1.2.54 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1
1 /* png.h - header file for PNG reference library 2 /* png.h - header file for PNG reference library
2 * 3 *
3 * libpng version 1.2.52 - November 20, 2014 4 * libpng version 1.2.54, November 12, 2015
4 * Copyright (c) 1998-2014 Glenn Randers-Pehrson 5 *
6 * Copyright (c) 1998-2015 Glenn Randers-Pehrson
5 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) 7 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
6 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) 8 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
7 * 9 *
8 * This code is released under the libpng license (See LICENSE, below) 10 * This code is released under the libpng license (See LICENSE, below)
9 * 11 *
10 * Authors and maintainers: 12 * Authors and maintainers:
11 * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat 13 * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
12 * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger 14 * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
13 * libpng versions 0.97, January 1998, through 1.2.52 - November 20, 2014: Glen n 15 * libpng versions 0.97, January 1998, through 1.2.54, November 12, 2015: Glenn
14 * See also "Contributing Authors", below. 16 * See also "Contributing Authors", below.
15 *
16 * Note about libpng version numbers:
17 *
18 * Due to various miscommunications, unforeseen code incompatibilities
19 * and occasional factors outside the authors' control, version numbering
20 * on the library has not always been consistent and straightforward.
21 * The following table summarizes matters since version 0.89c, which was
22 * the first widely used release:
23 *
24 * source png.h png.h shared-lib
25 * version string int version
26 * ------- ------ ----- ----------
27 * 0.89c "1.0 beta 3" 0.89 89 1.0.89
28 * 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90]
29 * 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95]
30 * 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96]
31 * 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97]
32 * 0.97c 0.97 97 2.0.97
33 * 0.98 0.98 98 2.0.98
34 * 0.99 0.99 98 2.0.99
35 * 0.99a-m 0.99 99 2.0.99
36 * 1.00 1.00 100 2.1.0 [100 should be 10000]
37 * 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000]
38 * 1.0.1 png.h string is 10001 2.1.0
39 * 1.0.1a-e identical to the 10002 from here on, the shared library
40 * 1.0.2 source version) 10002 is 2.V where V is the source code
41 * 1.0.2a-b 10003 version, except as noted.
42 * 1.0.3 10003
43 * 1.0.3a-d 10004
44 * 1.0.4 10004
45 * 1.0.4a-f 10005
46 * 1.0.5 (+ 2 patches) 10005
47 * 1.0.5a-d 10006
48 * 1.0.5e-r 10100 (not source compatible)
49 * 1.0.5s-v 10006 (not binary compatible)
50 * 1.0.6 (+ 3 patches) 10006 (still binary incompatible)
51 * 1.0.6d-f 10007 (still binary incompatible)
52 * 1.0.6g 10007
53 * 1.0.6h 10007 10.6h (testing xy.z so-numbering)
54 * 1.0.6i 10007 10.6i
55 * 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0)
56 * 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible)
57 * 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible)
58 * 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible)
59 * 1.0.7 1 10007 (still compatible)
60 * 1.0.8beta1-4 1 10008 2.1.0.8beta1-4
61 * 1.0.8rc1 1 10008 2.1.0.8rc1
62 * 1.0.8 1 10008 2.1.0.8
63 * 1.0.9beta1-6 1 10009 2.1.0.9beta1-6
64 * 1.0.9rc1 1 10009 2.1.0.9rc1
65 * 1.0.9beta7-10 1 10009 2.1.0.9beta7-10
66 * 1.0.9rc2 1 10009 2.1.0.9rc2
67 * 1.0.9 1 10009 2.1.0.9
68 * 1.0.10beta1 1 10010 2.1.0.10beta1
69 * 1.0.10rc1 1 10010 2.1.0.10rc1
70 * 1.0.10 1 10010 2.1.0.10
71 * 1.0.11beta1-3 1 10011 2.1.0.11beta1-3
72 * 1.0.11rc1 1 10011 2.1.0.11rc1
73 * 1.0.11 1 10011 2.1.0.11
74 * 1.0.12beta1-2 2 10012 2.1.0.12beta1-2
75 * 1.0.12rc1 2 10012 2.1.0.12rc1
76 * 1.0.12 2 10012 2.1.0.12
77 * 1.1.0a-f - 10100 2.1.1.0a-f (branch abandoned)
78 * 1.2.0beta1-2 2 10200 2.1.2.0beta1-2
79 * 1.2.0beta3-5 3 10200 3.1.2.0beta3-5
80 * 1.2.0rc1 3 10200 3.1.2.0rc1
81 * 1.2.0 3 10200 3.1.2.0
82 * 1.2.1beta1-4 3 10201 3.1.2.1beta1-4
83 * 1.2.1rc1-2 3 10201 3.1.2.1rc1-2
84 * 1.2.1 3 10201 3.1.2.1
85 * 1.2.2beta1-6 12 10202 12.so.0.1.2.2beta1-6
86 * 1.0.13beta1 10 10013 10.so.0.1.0.13beta1
87 * 1.0.13rc1 10 10013 10.so.0.1.0.13rc1
88 * 1.2.2rc1 12 10202 12.so.0.1.2.2rc1
89 * 1.0.13 10 10013 10.so.0.1.0.13
90 * 1.2.2 12 10202 12.so.0.1.2.2
91 * 1.2.3rc1-6 12 10203 12.so.0.1.2.3rc1-6
92 * 1.2.3 12 10203 12.so.0.1.2.3
93 * 1.2.4beta1-3 13 10204 12.so.0.1.2.4beta1-3
94 * 1.0.14rc1 13 10014 10.so.0.1.0.14rc1
95 * 1.2.4rc1 13 10204 12.so.0.1.2.4rc1
96 * 1.0.14 10 10014 10.so.0.1.0.14
97 * 1.2.4 13 10204 12.so.0.1.2.4
98 * 1.2.5beta1-2 13 10205 12.so.0.1.2.5beta1-2
99 * 1.0.15rc1-3 10 10015 10.so.0.1.0.15rc1-3
100 * 1.2.5rc1-3 13 10205 12.so.0.1.2.5rc1-3
101 * 1.0.15 10 10015 10.so.0.1.0.15
102 * 1.2.5 13 10205 12.so.0.1.2.5
103 * 1.2.6beta1-4 13 10206 12.so.0.1.2.6beta1-4
104 * 1.0.16 10 10016 10.so.0.1.0.16
105 * 1.2.6 13 10206 12.so.0.1.2.6
106 * 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2
107 * 1.0.17rc1 10 10017 10.so.0.1.0.17rc1
108 * 1.2.7rc1 13 10207 12.so.0.1.2.7rc1
109 * 1.0.17 10 10017 10.so.0.1.0.17
110 * 1.2.7 13 10207 12.so.0.1.2.7
111 * 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5
112 * 1.0.18rc1-5 10 10018 10.so.0.1.0.18rc1-5
113 * 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5
114 * 1.0.18 10 10018 10.so.0.1.0.18
115 * 1.2.8 13 10208 12.so.0.1.2.8
116 * 1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3
117 * 1.2.9beta4-11 13 10209 12.so.0.9[.0]
118 * 1.2.9rc1 13 10209 12.so.0.9[.0]
119 * 1.2.9 13 10209 12.so.0.9[.0]
120 * 1.2.10beta1-8 13 10210 12.so.0.10[.0]
121 * 1.2.10rc1-3 13 10210 12.so.0.10[.0]
122 * 1.2.10 13 10210 12.so.0.10[.0]
123 * 1.2.11beta1-4 13 10211 12.so.0.11[.0]
124 * 1.0.19rc1-5 10 10019 10.so.0.19[.0]
125 * 1.2.11rc1-5 13 10211 12.so.0.11[.0]
126 * 1.0.19 10 10019 10.so.0.19[.0]
127 * 1.2.11 13 10211 12.so.0.11[.0]
128 * 1.0.20 10 10020 10.so.0.20[.0]
129 * 1.2.12 13 10212 12.so.0.12[.0]
130 * 1.2.13beta1 13 10213 12.so.0.13[.0]
131 * 1.0.21 10 10021 10.so.0.21[.0]
132 * 1.2.13 13 10213 12.so.0.13[.0]
133 * 1.2.14beta1-2 13 10214 12.so.0.14[.0]
134 * 1.0.22rc1 10 10022 10.so.0.22[.0]
135 * 1.2.14rc1 13 10214 12.so.0.14[.0]
136 * 1.0.22 10 10022 10.so.0.22[.0]
137 * 1.2.14 13 10214 12.so.0.14[.0]
138 * 1.2.15beta1-6 13 10215 12.so.0.15[.0]
139 * 1.0.23rc1-5 10 10023 10.so.0.23[.0]
140 * 1.2.15rc1-5 13 10215 12.so.0.15[.0]
141 * 1.0.23 10 10023 10.so.0.23[.0]
142 * 1.2.15 13 10215 12.so.0.15[.0]
143 * 1.2.16beta1-2 13 10216 12.so.0.16[.0]
144 * 1.2.16rc1 13 10216 12.so.0.16[.0]
145 * 1.0.24 10 10024 10.so.0.24[.0]
146 * 1.2.16 13 10216 12.so.0.16[.0]
147 * 1.2.17beta1-2 13 10217 12.so.0.17[.0]
148 * 1.0.25rc1 10 10025 10.so.0.25[.0]
149 * 1.2.17rc1-3 13 10217 12.so.0.17[.0]
150 * 1.0.25 10 10025 10.so.0.25[.0]
151 * 1.2.17 13 10217 12.so.0.17[.0]
152 * 1.0.26 10 10026 10.so.0.26[.0]
153 * 1.2.18 13 10218 12.so.0.18[.0]
154 * 1.2.19beta1-31 13 10219 12.so.0.19[.0]
155 * 1.0.27rc1-6 10 10027 10.so.0.27[.0]
156 * 1.2.19rc1-6 13 10219 12.so.0.19[.0]
157 * 1.0.27 10 10027 10.so.0.27[.0]
158 * 1.2.19 13 10219 12.so.0.19[.0]
159 * 1.2.20beta01-04 13 10220 12.so.0.20[.0]
160 * 1.0.28rc1-6 10 10028 10.so.0.28[.0]
161 * 1.2.20rc1-6 13 10220 12.so.0.20[.0]
162 * 1.0.28 10 10028 10.so.0.28[.0]
163 * 1.2.20 13 10220 12.so.0.20[.0]
164 * 1.2.21beta1-2 13 10221 12.so.0.21[.0]
165 * 1.2.21rc1-3 13 10221 12.so.0.21[.0]
166 * 1.0.29 10 10029 10.so.0.29[.0]
167 * 1.2.21 13 10221 12.so.0.21[.0]
168 * 1.2.22beta1-4 13 10222 12.so.0.22[.0]
169 * 1.0.30rc1 10 10030 10.so.0.30[.0]
170 * 1.2.22rc1 13 10222 12.so.0.22[.0]
171 * 1.0.30 10 10030 10.so.0.30[.0]
172 * 1.2.22 13 10222 12.so.0.22[.0]
173 * 1.2.23beta01-05 13 10223 12.so.0.23[.0]
174 * 1.2.23rc01 13 10223 12.so.0.23[.0]
175 * 1.2.23 13 10223 12.so.0.23[.0]
176 * 1.2.24beta01-02 13 10224 12.so.0.24[.0]
177 * 1.2.24rc01 13 10224 12.so.0.24[.0]
178 * 1.2.24 13 10224 12.so.0.24[.0]
179 * 1.2.25beta01-06 13 10225 12.so.0.25[.0]
180 * 1.2.25rc01-02 13 10225 12.so.0.25[.0]
181 * 1.0.31 10 10031 10.so.0.31[.0]
182 * 1.2.25 13 10225 12.so.0.25[.0]
183 * 1.2.26beta01-06 13 10226 12.so.0.26[.0]
184 * 1.2.26rc01 13 10226 12.so.0.26[.0]
185 * 1.2.26 13 10226 12.so.0.26[.0]
186 * 1.0.32 10 10032 10.so.0.32[.0]
187 * 1.2.27beta01-06 13 10227 12.so.0.27[.0]
188 * 1.2.27rc01 13 10227 12.so.0.27[.0]
189 * 1.0.33 10 10033 10.so.0.33[.0]
190 * 1.2.27 13 10227 12.so.0.27[.0]
191 * 1.0.34 10 10034 10.so.0.34[.0]
192 * 1.2.28 13 10228 12.so.0.28[.0]
193 * 1.2.29beta01-03 13 10229 12.so.0.29[.0]
194 * 1.2.29rc01 13 10229 12.so.0.29[.0]
195 * 1.0.35 10 10035 10.so.0.35[.0]
196 * 1.2.29 13 10229 12.so.0.29[.0]
197 * 1.0.37 10 10037 10.so.0.37[.0]
198 * 1.2.30beta01-04 13 10230 12.so.0.30[.0]
199 * 1.0.38rc01-08 10 10038 10.so.0.38[.0]
200 * 1.2.30rc01-08 13 10230 12.so.0.30[.0]
201 * 1.0.38 10 10038 10.so.0.38[.0]
202 * 1.2.30 13 10230 12.so.0.30[.0]
203 * 1.0.39rc01-03 10 10039 10.so.0.39[.0]
204 * 1.2.31rc01-03 13 10231 12.so.0.31[.0]
205 * 1.0.39 10 10039 10.so.0.39[.0]
206 * 1.2.31 13 10231 12.so.0.31[.0]
207 * 1.2.32beta01-02 13 10232 12.so.0.32[.0]
208 * 1.0.40rc01 10 10040 10.so.0.40[.0]
209 * 1.2.32rc01 13 10232 12.so.0.32[.0]
210 * 1.0.40 10 10040 10.so.0.40[.0]
211 * 1.2.32 13 10232 12.so.0.32[.0]
212 * 1.2.33beta01-02 13 10233 12.so.0.33[.0]
213 * 1.2.33rc01-02 13 10233 12.so.0.33[.0]
214 * 1.0.41rc01 10 10041 10.so.0.41[.0]
215 * 1.2.33 13 10233 12.so.0.33[.0]
216 * 1.0.41 10 10041 10.so.0.41[.0]
217 * 1.2.34beta01-07 13 10234 12.so.0.34[.0]
218 * 1.0.42rc01 10 10042 10.so.0.42[.0]
219 * 1.2.34rc01 13 10234 12.so.0.34[.0]
220 * 1.0.42 10 10042 10.so.0.42[.0]
221 * 1.2.34 13 10234 12.so.0.34[.0]
222 * 1.2.35beta01-03 13 10235 12.so.0.35[.0]
223 * 1.0.43rc01-02 10 10043 10.so.0.43[.0]
224 * 1.2.35rc01-02 13 10235 12.so.0.35[.0]
225 * 1.0.43 10 10043 10.so.0.43[.0]
226 * 1.2.35 13 10235 12.so.0.35[.0]
227 * 1.2.36beta01-05 13 10236 12.so.0.36[.0]
228 * 1.2.36rc01 13 10236 12.so.0.36[.0]
229 * 1.0.44 10 10044 10.so.0.44[.0]
230 * 1.2.36 13 10236 12.so.0.36[.0]
231 * 1.2.37beta01-03 13 10237 12.so.0.37[.0]
232 * 1.2.37rc01 13 10237 12.so.0.37[.0]
233 * 1.2.37 13 10237 12.so.0.37[.0]
234 * 1.0.45 10 10045 12.so.0.45[.0]
235 * 1.0.46 10 10046 10.so.0.46[.0]
236 * 1.2.38beta01 13 10238 12.so.0.38[.0]
237 * 1.2.38rc01-03 13 10238 12.so.0.38[.0]
238 * 1.0.47 10 10047 10.so.0.47[.0]
239 * 1.2.38 13 10238 12.so.0.38[.0]
240 * 1.2.39beta01-05 13 10239 12.so.0.39[.0]
241 * 1.2.39rc01 13 10239 12.so.0.39[.0]
242 * 1.0.48 10 10048 10.so.0.48[.0]
243 * 1.2.39 13 10239 12.so.0.39[.0]
244 * 1.2.40beta01 13 10240 12.so.0.40[.0]
245 * 1.2.40rc01 13 10240 12.so.0.40[.0]
246 * 1.0.49 10 10049 10.so.0.49[.0]
247 * 1.2.40 13 10240 12.so.0.40[.0]
248 * 1.2.41beta01-18 13 10241 12.so.0.41[.0]
249 * 1.0.51rc01 10 10051 10.so.0.51[.0]
250 * 1.2.41rc01-03 13 10241 12.so.0.41[.0]
251 * 1.0.51 10 10051 10.so.0.51[.0]
252 * 1.2.41 13 10241 12.so.0.41[.0]
253 * 1.2.42beta01-02 13 10242 12.so.0.42[.0]
254 * 1.2.42rc01-05 13 10242 12.so.0.42[.0]
255 * 1.0.52 10 10052 10.so.0.52[.0]
256 * 1.2.42 13 10242 12.so.0.42[.0]
257 * 1.2.43beta01-05 13 10243 12.so.0.43[.0]
258 * 1.0.53rc01-02 10 10053 10.so.0.53[.0]
259 * 1.2.43rc01-02 13 10243 12.so.0.43[.0]
260 * 1.0.53 10 10053 10.so.0.53[.0]
261 * 1.2.43 13 10243 12.so.0.43[.0]
262 * 1.2.44beta01-03 13 10244 12.so.0.44[.0]
263 * 1.2.44rc01-03 13 10244 12.so.0.44[.0]
264 * 1.2.44 13 10244 12.so.0.44[.0]
265 * 1.2.45beta01-03 13 10245 12.so.0.45[.0]
266 * 1.0.55rc01 10 10055 10.so.0.55[.0]
267 * 1.2.45rc01 13 10245 12.so.0.45[.0]
268 * 1.0.55 10 10055 10.so.0.55[.0]
269 * 1.2.45 13 10245 12.so.0.45[.0]
270 * 1.2.46rc01-02 13 10246 12.so.0.46[.0]
271 * 1.0.56 10 10056 10.so.0.56[.0]
272 * 1.2.46 13 10246 12.so.0.46[.0]
273 * 1.2.47beta01 13 10247 12.so.0.47[.0]
274 * 1.2.47rc01 13 10247 12.so.0.47[.0]
275 * 1.0.57rc01 10 10057 10.so.0.57[.0]
276 * 1.2.47 13 10247 12.so.0.47[.0]
277 * 1.0.57 10 10057 10.so.0.57[.0]
278 * 1.2.48beta01 13 10248 12.so.0.48[.0]
279 * 1.2.48rc01-02 13 10248 12.so.0.48[.0]
280 * 1.0.58 10 10058 10.so.0.58[.0]
281 * 1.2.48 13 10248 12.so.0.48[.0]
282 * 1.2.49rc01 13 10249 12.so.0.49[.0]
283 * 1.0.59 10 10059 10.so.0.59[.0]
284 * 1.2.49 13 10249 12.so.0.49[.0]
285 * 1.0.60 10 10060 10.so.0.60[.0]
286 * 1.2.50 13 10250 12.so.0.50[.0]
287 * 1.2.51beta01-05 13 10251 12.so.0.51[.0]
288 * 1.2.51rc01-04 13 10251 12.so.0.51[.0]
289 * 1.0.61 10 10061 10.so.0.61[.0]
290 * 1.2.51 13 10251 12.so.0.51[.0]
291 * 1.2.52beta01 13 10252 12.so.0.52[.0]
292 * 1.2.52rc01-02 13 10252 12.so.0.52[.0]
293 * 1.0.62 10 10062 10.so.0.62[.0]
294 * 1.2.52 13 10252 12.so.0.52[.0]
295 *
296 * Henceforth the source version will match the shared-library major
297 * and minor numbers; the shared-library major version number will be
298 * used for changes in backward compatibility, as it is intended. The
299 * PNG_LIBPNG_VER macro, which is not used within libpng but is available
300 * for applications, is an unsigned integer of the form xyyzz corresponding
301 * to the source version x.y.z (leading zeros in y and z). Beta versions
302 * were given the previous public release number plus a letter, until
303 * version 1.0.6j; from then on they were given the upcoming public
304 * release number plus "betaNN" or "rcNN".
305 *
306 * Binary incompatibility exists only when applications make direct access
307 * to the info_ptr or png_ptr members through png.h, and the compiled
308 * application is loaded with a different version of the library.
309 *
310 * DLLNUM will change each time there are forward or backward changes
311 * in binary compatibility (e.g., when a new feature is added).
312 *
313 * See libpng.txt or libpng.3 for more information. The PNG specification
314 * is available as a W3C Recommendation and as an ISO Specification,
315 * <http://www.w3.org/TR/2003/REC-PNG-20031110/
316 */ 17 */
317 18
318 /* 19 /*
319 * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: 20 * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
320 * 21 *
321 * If you modify libpng you may insert additional notices immediately following 22 * If you modify libpng you may insert additional notices immediately following
322 * this sentence. 23 * this sentence.
323 * 24 *
324 * This code is released under the libpng license. 25 * This code is released under the libpng license.
325 * 26 *
326 * libpng versions 1.2.6, August 15, 2004, through 1.2.52, November 20, 2014, ar e 27 * libpng versions 1.0.7, July 1, 2000, through 1.2.54, November 12, 2015, are
327 * Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson, and are 28 * Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, are
328 * distributed according to the same disclaimer and license as libpng-1.2.5 29 * derived from libpng-1.0.6, and are distributed according to the same
329 * with the following individual added to the list of Contributing Authors: 30 * disclaimer and license as libpng-1.0.6 with the following individuals
330 * 31 * added to the list of Contributing Authors:
331 * Cosmin Truta
332 *
333 * libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are
334 * Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
335 * distributed according to the same disclaimer and license as libpng-1.0.6
336 * with the following individuals added to the list of Contributing Authors:
337 * 32 *
338 * Simon-Pierre Cadieux 33 * Simon-Pierre Cadieux
339 * Eric S. Raymond 34 * Eric S. Raymond
35 * Cosmin Truta
340 * Gilles Vollant 36 * Gilles Vollant
341 * 37 *
342 * and with the following additions to the disclaimer: 38 * and with the following additions to the disclaimer:
343 * 39 *
344 * There is no warranty against interference with your enjoyment of the 40 * There is no warranty against interference with your enjoyment of the
345 * library or against infringement. There is no warranty that our 41 * library or against infringement. There is no warranty that our
346 * efforts or the library will fulfill any of your particular purposes 42 * efforts or the library will fulfill any of your particular purposes
347 * or needs. This library is provided with all faults, and the entire 43 * or needs. This library is provided with all faults, and the entire
348 * risk of satisfactory quality, performance, accuracy, and effort is with 44 * risk of satisfactory quality, performance, accuracy, and effort is with
349 * the user. 45 * the user.
350 * 46 *
351 * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are 47 * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
352 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson, and are 48 * Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
353 * distributed according to the same disclaimer and license as libpng-0.96, 49 * libpng-0.96, and are distributed according to the same disclaimer and
354 * with the following individuals added to the list of Contributing Authors: 50 * license as libpng-0.96, with the following individuals added to the list
51 * of Contributing Authors:
355 * 52 *
356 * Tom Lane 53 * Tom Lane
357 * Glenn Randers-Pehrson 54 * Glenn Randers-Pehrson
358 * Willem van Schaik 55 * Willem van Schaik
359 * 56 *
360 * libpng versions 0.89, June 1996, through 0.96, May 1997, are 57 * libpng versions 0.89, June 1996, through 0.96, May 1997, are
361 * Copyright (c) 1996, 1997 Andreas Dilger 58 * Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
362 * Distributed according to the same disclaimer and license as libpng-0.88, 59 * and are distributed according to the same disclaimer and license as
363 * with the following individuals added to the list of Contributing Authors: 60 * libpng-0.88, with the following individuals added to the list of
61 * Contributing Authors:
364 * 62 *
365 * John Bowler 63 * John Bowler
366 * Kevin Bracey 64 * Kevin Bracey
367 * Sam Bushell 65 * Sam Bushell
368 * Magnus Holmgren 66 * Magnus Holmgren
369 * Greg Roelofs 67 * Greg Roelofs
370 * Tom Tanner 68 * Tom Tanner
371 * 69 *
372 * libpng versions 0.5, May 1995, through 0.88, January 1996, are 70 * libpng versions 0.5, May 1995, through 0.88, January 1996, are
373 * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. 71 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
374 * 72 *
375 * For the purposes of this copyright and license, "Contributing Authors" 73 * For the purposes of this copyright and license, "Contributing Authors"
376 * is defined as the following set of individuals: 74 * is defined as the following set of individuals:
377 * 75 *
378 * Andreas Dilger 76 * Andreas Dilger
379 * Dave Martindale 77 * Dave Martindale
380 * Guy Eric Schalnat 78 * Guy Eric Schalnat
381 * Paul Schmidt 79 * Paul Schmidt
382 * Tim Wegner 80 * Tim Wegner
383 * 81 *
384 * The PNG Reference Library is supplied "AS IS". The Contributing Authors 82 * The PNG Reference Library is supplied "AS IS". The Contributing Authors
385 * and Group 42, Inc. disclaim all warranties, expressed or implied, 83 * and Group 42, Inc. disclaim all warranties, expressed or implied,
386 * including, without limitation, the warranties of merchantability and of 84 * including, without limitation, the warranties of merchantability and of
387 * fitness for any purpose. The Contributing Authors and Group 42, Inc. 85 * fitness for any purpose. The Contributing Authors and Group 42, Inc.
388 * assume no liability for direct, indirect, incidental, special, exemplary, 86 * assume no liability for direct, indirect, incidental, special, exemplary,
389 * or consequential damages, which may result from the use of the PNG 87 * or consequential damages, which may result from the use of the PNG
390 * Reference Library, even if advised of the possibility of such damage. 88 * Reference Library, even if advised of the possibility of such damage.
391 * 89 *
392 * Permission is hereby granted to use, copy, modify, and distribute this 90 * Permission is hereby granted to use, copy, modify, and distribute this
393 * source code, or portions hereof, for any purpose, without fee, subject 91 * source code, or portions hereof, for any purpose, without fee, subject
394 * to the following restrictions: 92 * to the following restrictions:
395 * 93 *
396 * 1. The origin of this source code must not be misrepresented. 94 * 1. The origin of this source code must not be misrepresented.
397 * 95 *
398 * 2. Altered versions must be plainly marked as such and 96 * 2. Altered versions must be plainly marked as such and must not
399 * must not be misrepresented as being the original source. 97 * be misrepresented as being the original source.
400 * 98 *
401 * 3. This Copyright notice may not be removed or altered from 99 * 3. This Copyright notice may not be removed or altered from any
402 * any source or altered source distribution. 100 * source or altered source distribution.
403 * 101 *
404 * The Contributing Authors and Group 42, Inc. specifically permit, without 102 * The Contributing Authors and Group 42, Inc. specifically permit, without
405 * fee, and encourage the use of this source code as a component to 103 * fee, and encourage the use of this source code as a component to
406 * supporting the PNG file format in commercial products. If you use this 104 * supporting the PNG file format in commercial products. If you use this
407 * source code in a product, acknowledgment is not required but would be 105 * source code in a product, acknowledgment is not required but would be
408 * appreciated. 106 * appreciated.
107 *
108 * END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
409 */ 109 */
410 110
411 /* 111 /*
412 * A "png_get_copyright" function is available, for convenient use in "about" 112 * A "png_get_copyright" function is available, for convenient use in "about"
413 * boxes and the like: 113 * boxes and the like:
414 * 114 *
415 * printf("%s",png_get_copyright(NULL)); 115 * printf("%s", png_get_copyright(NULL));
416 * 116 *
417 * Also, the PNG logo (in PNG format, of course) is supplied in the 117 * Also, the PNG logo (in PNG format, of course) is supplied in the
418 * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). 118 * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
419 */ 119 */
420 120
421 /* 121 /*
422 * Libpng is OSI Certified Open Source Software. OSI Certified is a 122 * Libpng is OSI Certified Open Source Software. OSI Certified Open Source is
423 * certification mark of the Open Source Initiative. 123 * a certification mark of the Open Source Initiative. OSI has not addressed
124 * the additional disclaimers inserted at version 1.0.7.
424 */ 125 */
425 126
426 /* 127 /*
427 * The contributing authors would like to thank all those who helped 128 * The contributing authors would like to thank all those who helped
428 * with testing, bug fixes, and patience. This wouldn't have been 129 * with testing, bug fixes, and patience. This wouldn't have been
429 * possible without all of you. 130 * possible without all of you.
430 * 131 *
431 * Thanks to Frank J. T. Wojcik for helping with the documentation. 132 * Thanks to Frank J. T. Wojcik for helping with the documentation.
432 */ 133 */
433 134
135 /* Note about libpng version numbers:
136 *
137 * Due to various miscommunications, unforeseen code incompatibilities
138 * and occasional factors outside the authors' control, version numbering
139 * on the library has not always been consistent and straightforward.
140 * The following table summarizes matters since version 0.89c, which was
141 * the first widely used release:
142 *
143 * source png.h png.h shared-lib
144 * version string int version
145 * ------- ------ ----- ----------
146 * 0.89c "1.0 beta 3" 0.89 89 1.0.89
147 * 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90]
148 * 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95]
149 * 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96]
150 * 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97]
151 * 0.97c 0.97 97 2.0.97
152 * 0.98 0.98 98 2.0.98
153 * 0.99 0.99 98 2.0.99
154 * 0.99a-m 0.99 99 2.0.99
155 * 1.00 1.00 100 2.1.0 [100 should be 10000]
156 * 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000]
157 * 1.0.1 png.h string is 10001 2.1.0
158 * 1.0.1a-e identical to the 10002 from here on, the shared library
159 * 1.0.2 source version) 10002 is 2.V where V is the source code
160 * 1.0.2a-b 10003 version, except as noted.
161 * 1.0.3 10003
162 * 1.0.3a-d 10004
163 * 1.0.4 10004
164 * 1.0.4a-f 10005
165 * 1.0.5 (+ 2 patches) 10005
166 * 1.0.5a-d 10006
167 * 1.0.5e-r 10100 (not source compatible)
168 * 1.0.5s-v 10006 (not binary compatible)
169 * 1.0.6 (+ 3 patches) 10006 (still binary incompatible)
170 * 1.0.6d-f 10007 (still binary incompatible)
171 * 1.0.6g 10007
172 * 1.0.6h 10007 10.6h (testing xy.z so-numbering)
173 * 1.0.6i 10007 10.6i
174 * 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0)
175 * 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible)
176 * 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible)
177 * 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible)
178 * 1.0.7 1 10007 (still compatible)
179 * ...
180 * 1.0.19 10 10019 10.so.0.19[.0]
181 * ...
182 * 1.0.64 10 10064 10.so.0.64[.0]
183 * 1.2.54 13 10254 12.so.0.54[.0]
184 *
185 * Henceforth the source version will match the shared-library major
186 * and minor numbers; the shared-library major version number will be
187 * used for changes in backward compatibility, as it is intended. The
188 * PNG_LIBPNG_VER macro, which is not used within libpng but is available
189 * for applications, is an unsigned integer of the form xyyzz corresponding
190 * to the source version x.y.z (leading zeros in y and z). Beta versions
191 * were given the previous public release number plus a letter, until
192 * version 1.0.6j; from then on they were given the upcoming public
193 * release number plus "betaNN" or "rcNN".
194 *
195 * Binary incompatibility exists only when applications make direct access
196 * to the info_ptr or png_ptr members through png.h, and the compiled
197 * application is loaded with a different version of the library.
198 *
199 * DLLNUM will change each time there are forward or backward changes
200 * in binary compatibility (e.g., when a new feature is added).
201 *
202 * See libpng.txt or libpng.3 for more information. The PNG specification
203 * is available as a W3C Recommendation and as an ISO Specification,
204 * <http://www.w3.org/TR/2003/REC-PNG-20031110/
205 */
206
434 /* 207 /*
435 * Y2K compliance in libpng: 208 * Y2K compliance in libpng:
436 * ========================= 209 * =========================
437 * 210 *
438 * November 20, 2014 211 * November 12, 2015
439 * 212 *
440 * Since the PNG Development group is an ad-hoc body, we can't make 213 * Since the PNG Development group is an ad-hoc body, we can't make
441 * an official declaration. 214 * an official declaration.
442 * 215 *
443 * This is your unofficial assurance that libpng from version 0.71 and 216 * This is your unofficial assurance that libpng from version 0.71 and
444 * upward through 1.2.52 are Y2K compliant. It is my belief that earlier 217 * upward through 1.2.54 are Y2K compliant. It is my belief that earlier
445 * versions were also Y2K compliant. 218 * versions were also Y2K compliant.
446 * 219 *
447 * Libpng only has three year fields. One is a 2-byte unsigned integer 220 * Libpng only has three year fields. One is a 2-byte unsigned integer
448 * that will hold years up to 65535. The other two hold the date in text 221 * that will hold years up to 65535. The other two hold the date in text
449 * format, and will hold years up to 9999. 222 * format, and will hold years up to 9999.
450 * 223 *
451 * The integer is 224 * The integer is
452 * "png_uint_16 year" in png_time_struct. 225 * "png_uint_16 year" in png_time_struct.
453 * 226 *
454 * The strings are 227 * The strings are
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 #ifndef PNG_H 263 #ifndef PNG_H
491 #define PNG_H 264 #define PNG_H
492 265
493 /* This is not the place to learn how to use libpng. The file libpng.txt 266 /* This is not the place to learn how to use libpng. The file libpng.txt
494 * describes how to use libpng, and the file example.c summarizes it 267 * describes how to use libpng, and the file example.c summarizes it
495 * with some code on which to build. This file is useful for looking 268 * with some code on which to build. This file is useful for looking
496 * at the actual function definitions and structure components. 269 * at the actual function definitions and structure components.
497 */ 270 */
498 271
499 /* Version information for png.h - this should match the version in png.c */ 272 /* Version information for png.h - this should match the version in png.c */
500 #define PNG_LIBPNG_VER_STRING "1.2.52" 273 #define PNG_LIBPNG_VER_STRING "1.2.54"
501 #define PNG_HEADER_VERSION_STRING \ 274 #define PNG_HEADER_VERSION_STRING \
502 " libpng version 1.2.52 - November 20, 2014\n" 275 " libpng version 1.2.54 - November 12, 2015\n"
503 276
504 #define PNG_LIBPNG_VER_SONUM 0 277 #define PNG_LIBPNG_VER_SONUM 0
505 #define PNG_LIBPNG_VER_DLLNUM 13 278 #define PNG_LIBPNG_VER_DLLNUM 13
506 279
507 /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ 280 /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
508 #define PNG_LIBPNG_VER_MAJOR 1 281 #define PNG_LIBPNG_VER_MAJOR 1
509 #define PNG_LIBPNG_VER_MINOR 2 282 #define PNG_LIBPNG_VER_MINOR 2
510 #define PNG_LIBPNG_VER_RELEASE 52 283 #define PNG_LIBPNG_VER_RELEASE 54
511 /* This should match the numeric part of the final component of 284 /* This should match the numeric part of the final component of
512 * PNG_LIBPNG_VER_STRING, omitting any leading zero: 285 * PNG_LIBPNG_VER_STRING, omitting any leading zero:
513 */ 286 */
514 287
515 #define PNG_LIBPNG_VER_BUILD 0 288 #define PNG_LIBPNG_VER_BUILD 0
516 289
517 /* Release Status */ 290 /* Release Status */
518 #define PNG_LIBPNG_BUILD_ALPHA 1 291 #define PNG_LIBPNG_BUILD_ALPHA 1
519 #define PNG_LIBPNG_BUILD_BETA 2 292 #define PNG_LIBPNG_BUILD_BETA 2
520 #define PNG_LIBPNG_BUILD_RC 3 293 #define PNG_LIBPNG_BUILD_RC 3
521 #define PNG_LIBPNG_BUILD_STABLE 4 294 #define PNG_LIBPNG_BUILD_STABLE 4
522 #define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7 295 #define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7
523 296
524 /* Release-Specific Flags */ 297 /* Release-Specific Flags */
525 #define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with 298 #define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with
526 PNG_LIBPNG_BUILD_STABLE only */ 299 PNG_LIBPNG_BUILD_STABLE only */
527 #define PNG_LIBPNG_BUILD_PRIVATE 16 /* Cannot be OR'ed with 300 #define PNG_LIBPNG_BUILD_PRIVATE 16 /* Cannot be OR'ed with
528 PNG_LIBPNG_BUILD_SPECIAL */ 301 PNG_LIBPNG_BUILD_SPECIAL */
529 #define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with 302 #define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
530 PNG_LIBPNG_BUILD_PRIVATE */ 303 PNG_LIBPNG_BUILD_PRIVATE */
531 304
532 #define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE 305 #define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE
533 306
534 /* Careful here. At one time, Guy wanted to use 082, but that would be octal. 307 /* Careful here. At one time, Guy wanted to use 082, but that would be octal.
535 * We must not include leading zeros. 308 * We must not include leading zeros.
536 * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only 309 * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
537 * version 1.0.0 was mis-numbered 100 instead of 10000). From 310 * version 1.0.0 was mis-numbered 100 instead of 10000). From
538 * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release 311 * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
539 */ 312 */
540 #define PNG_LIBPNG_VER 10252 /* 1.2.52 */ 313 #define PNG_LIBPNG_VER 10254 /* 1.2.54 */
541 314
542 #ifndef PNG_VERSION_INFO_ONLY 315 #ifndef PNG_VERSION_INFO_ONLY
543 /* Include the compression library's header */ 316 /* Include the compression library's header */
544 #include "zlib.h" 317 #include "zlib.h"
545 #endif 318 #endif
546 319
547 /* Include all user configurable info, including optional assembler routines */ 320 /* Include all user configurable info, including optional assembler routines */
548 #include "pngconf.h" 321 #include "pngconf.h"
549 322
550 /* 323 /*
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
1446 1219
1447 #ifdef PNG_READ_DITHER_SUPPORTED 1220 #ifdef PNG_READ_DITHER_SUPPORTED
1448 png_bytep palette_lookup PNG_DEPSTRUCT; /* lookup table for dithering */ 1221 png_bytep palette_lookup PNG_DEPSTRUCT; /* lookup table for dithering */
1449 png_bytep dither_index PNG_DEPSTRUCT; /* index translation for pale tte files */ 1222 png_bytep dither_index PNG_DEPSTRUCT; /* index translation for pale tte files */
1450 #endif 1223 #endif
1451 1224
1452 #if defined(PNG_READ_DITHER_SUPPORTED) || defined(PNG_hIST_SUPPORTED) 1225 #if defined(PNG_READ_DITHER_SUPPORTED) || defined(PNG_hIST_SUPPORTED)
1453 png_uint_16p hist PNG_DEPSTRUCT; /* histogram */ 1226 png_uint_16p hist PNG_DEPSTRUCT; /* histogram */
1454 #endif 1227 #endif
1455 1228
1456 #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
1457 png_byte heuristic_method PNG_DEPSTRUCT; /* heuristic for row filter s election */
1458 png_byte num_prev_filters PNG_DEPSTRUCT; /* number of weights for prev ious rows */
1459 png_bytep prev_filters PNG_DEPSTRUCT; /* filter type(s) of previous row(s) */
1460 png_uint_16p filter_weights PNG_DEPSTRUCT; /* weight(s) for previous lin e(s) */
1461 png_uint_16p inv_filter_weights PNG_DEPSTRUCT; /* 1/weight(s) for previous l ine(s) */
1462 png_uint_16p filter_costs PNG_DEPSTRUCT; /* relative filter calculatio n cost */
1463 png_uint_16p inv_filter_costs PNG_DEPSTRUCT; /* 1/relative filter calculat ion cost */
1464 #endif
1465
1466 #ifdef PNG_TIME_RFC1123_SUPPORTED 1229 #ifdef PNG_TIME_RFC1123_SUPPORTED
1467 png_charp time_buffer PNG_DEPSTRUCT; /* String to hold RFC 1123 ti me text */ 1230 png_charp time_buffer PNG_DEPSTRUCT; /* String to hold RFC 1123 ti me text */
1468 #endif 1231 #endif
1469 1232
1470 /* New members added in libpng-1.0.6 */ 1233 /* New members added in libpng-1.0.6 */
1471 1234
1472 #ifdef PNG_FREE_ME_SUPPORTED 1235 #ifdef PNG_FREE_ME_SUPPORTED
1473 png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is responsible for freeing */ 1236 png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is responsible for freeing */
1474 #endif 1237 #endif
1475 1238
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 /* New member added in libpng-1.2.30 */ 1333 /* New member added in libpng-1.2.30 */
1571 png_charp chunkdata PNG_DEPSTRUCT; /* buffer for reading chunk data */ 1334 png_charp chunkdata PNG_DEPSTRUCT; /* buffer for reading chunk data */
1572 1335
1573 1336
1574 }; 1337 };
1575 1338
1576 1339
1577 /* This triggers a compiler error in png.c, if png.c and png.h 1340 /* This triggers a compiler error in png.c, if png.c and png.h
1578 * do not agree upon the version number. 1341 * do not agree upon the version number.
1579 */ 1342 */
1580 typedef png_structp version_1_2_52; 1343 typedef png_structp version_1_2_54;
1581 1344
1582 typedef png_struct FAR * FAR * png_structpp; 1345 typedef png_struct FAR * FAR * png_structpp;
1583 1346
1584 /* Here are the function definitions most commonly used. This is not 1347 /* Here are the function definitions most commonly used. This is not
1585 * the place to find out how to use libpng. See libpng.txt for the 1348 * the place to find out how to use libpng. See libpng.txt for the
1586 * full explanation, see example.c for the summary. This just provides 1349 * full explanation, see example.c for the summary. This just provides
1587 * a simple one line description of the use of each function. 1350 * a simple one line description of the use of each function.
1588 */ 1351 */
1589 1352
1590 /* Returns the version number of the library */ 1353 /* Returns the version number of the library */
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1971 /* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now. 1734 /* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now.
1972 * These defines should NOT be changed. 1735 * These defines should NOT be changed.
1973 */ 1736 */
1974 #define PNG_FILTER_VALUE_NONE 0 1737 #define PNG_FILTER_VALUE_NONE 0
1975 #define PNG_FILTER_VALUE_SUB 1 1738 #define PNG_FILTER_VALUE_SUB 1
1976 #define PNG_FILTER_VALUE_UP 2 1739 #define PNG_FILTER_VALUE_UP 2
1977 #define PNG_FILTER_VALUE_AVG 3 1740 #define PNG_FILTER_VALUE_AVG 3
1978 #define PNG_FILTER_VALUE_PAETH 4 1741 #define PNG_FILTER_VALUE_PAETH 4
1979 #define PNG_FILTER_VALUE_LAST 5 1742 #define PNG_FILTER_VALUE_LAST 5
1980 1743
1981 #if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) /* EXPERIMENTAL */ 1744 #if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) /* DEPRECATED */
1982 /* The "heuristic_method" is given by one of the PNG_FILTER_HEURISTIC_
1983 * defines, either the default (minimum-sum-of-absolute-differences), or
1984 * the experimental method (weighted-minimum-sum-of-absolute-differences).
1985 *
1986 * Weights are factors >= 1.0, indicating how important it is to keep the
1987 * filter type consistent between rows. Larger numbers mean the current
1988 * filter is that many times as likely to be the same as the "num_weights"
1989 * previous filters. This is cumulative for each previous row with a weight.
1990 * There needs to be "num_weights" values in "filter_weights", or it can be
1991 * NULL if the weights aren't being specified. Weights have no influence on
1992 * the selection of the first row filter. Well chosen weights can (in theory)
1993 * improve the compression for a given image.
1994 *
1995 * Costs are factors >= 1.0 indicating the relative decoding costs of a
1996 * filter type. Higher costs indicate more decoding expense, and are
1997 * therefore less likely to be selected over a filter with lower computational
1998 * costs. There needs to be a value in "filter_costs" for each valid filter
1999 * type (given by PNG_FILTER_VALUE_LAST), or it can be NULL if you aren't
2000 * setting the costs. Costs try to improve the speed of decompression without
2001 * unduly increasing the compressed image size.
2002 *
2003 * A negative weight or cost indicates the default value is to be used, and
2004 * values in the range [0.0, 1.0) indicate the value is to remain unchanged.
2005 * The default values for both weights and costs are currently 1.0, but may
2006 * change if good general weighting/cost heuristics can be found. If both
2007 * the weights and costs are set to 1.0, this degenerates the WEIGHTED method
2008 * to the UNWEIGHTED method, but with added encoding time/computation.
2009 */
2010 #ifdef PNG_FLOATING_POINT_SUPPORTED 1745 #ifdef PNG_FLOATING_POINT_SUPPORTED
2011 extern PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr, 1746 extern PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr,
2012 int heuristic_method, int num_weights, png_doublep filter_weights, 1747 int heuristic_method, int num_weights, png_doublep filter_weights,
2013 png_doublep filter_costs)); 1748 png_doublep filter_costs));
2014 #endif 1749 #endif
2015 #endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */ 1750 #endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */
2016 1751
2017 /* Heuristic used for row filter selection. These defines should NOT be 1752 /* The following are no longer used and will be removed from libpng-1.7: */
2018 * changed.
2019 */
2020 #define PNG_FILTER_HEURISTIC_DEFAULT 0 /* Currently "UNWEIGHTED" */ 1753 #define PNG_FILTER_HEURISTIC_DEFAULT 0 /* Currently "UNWEIGHTED" */
2021 #define PNG_FILTER_HEURISTIC_UNWEIGHTED 1 /* Used by libpng < 0.95 */ 1754 #define PNG_FILTER_HEURISTIC_UNWEIGHTED 1 /* Used by libpng < 0.95 */
2022 #define PNG_FILTER_HEURISTIC_WEIGHTED 2 /* Experimental feature */ 1755 #define PNG_FILTER_HEURISTIC_WEIGHTED 2 /* Experimental feature */
2023 #define PNG_FILTER_HEURISTIC_LAST 3 /* Not a valid value */ 1756 #define PNG_FILTER_HEURISTIC_LAST 3 /* Not a valid value */
2024 1757
2025 /* Set the library compression level. Currently, valid values range from 1758 /* Set the library compression level. Currently, valid values range from
2026 * 0 - 9, corresponding directly to the zlib compression levels 0 - 9 1759 * 0 - 9, corresponding directly to the zlib compression levels 0 - 9
2027 * (0 - no compression, 9 - "maximal" compression). Note that tests have 1760 * (0 - no compression, 9 - "maximal" compression). Note that tests have
2028 * shown that zlib compression levels 3-6 usually perform as well as level 9 1761 * shown that zlib compression levels 3-6 usually perform as well as level 9
2029 * for PNG images, and do considerably fewer caclulations. In the future, 1762 * for PNG images, and do considerably fewer caclulations. In the future,
(...skipping 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after
3809 3542
3810 #endif /* PNG_INTERNAL */ 3543 #endif /* PNG_INTERNAL */
3811 3544
3812 #ifdef __cplusplus 3545 #ifdef __cplusplus
3813 } 3546 }
3814 #endif 3547 #endif
3815 3548
3816 #endif /* PNG_VERSION_INFO_ONLY */ 3549 #endif /* PNG_VERSION_INFO_ONLY */
3817 /* Do not put anything past this line */ 3550 /* Do not put anything past this line */
3818 #endif /* PNG_H */ 3551 #endif /* PNG_H */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698