1 | /* ************************************************************************** */
|
---|
2 | /* * * */
|
---|
3 | /* * COPYRIGHT NOTICE: * */
|
---|
4 | /* * * */
|
---|
5 | /* * Copyright (c) 2000-2007 Gerard Juyn * */
|
---|
6 | /* * [You may insert additional notices after this sentence if you modify * */
|
---|
7 | /* * this source] * */
|
---|
8 | /* * * */
|
---|
9 | /* * For the purposes of this copyright and license, "Contributing Authors" * */
|
---|
10 | /* * is defined as the following set of individuals: * */
|
---|
11 | /* * * */
|
---|
12 | /* * Gerard Juyn - gjuyn :at: users.sourceforge.net * */
|
---|
13 | /* * Glenn Randers-Pehrson - glennrp :at: users.sourceforge.net * */
|
---|
14 | /* * Raphael Assenat - raph :at: raphnet.net * */
|
---|
15 | /* * John Stiles - * */
|
---|
16 | /* * * */
|
---|
17 | /* * The MNG Library is supplied "AS IS". The Contributing Authors * */
|
---|
18 | /* * disclaim all warranties, expressed or implied, including, without * */
|
---|
19 | /* * limitation, the warranties of merchantability and of fitness for any * */
|
---|
20 | /* * purpose. The Contributing Authors assume no liability for direct, * */
|
---|
21 | /* * indirect, incidental, special, exemplary, or consequential damages, * */
|
---|
22 | /* * which may result from the use of the MNG Library, even if advised of * */
|
---|
23 | /* * the possibility of such damage. * */
|
---|
24 | /* * * */
|
---|
25 | /* * Permission is hereby granted to use, copy, modify, and distribute this * */
|
---|
26 | /* * source code, or portions hereof, for any purpose, without fee, subject * */
|
---|
27 | /* * to the following restrictions: * */
|
---|
28 | /* * * */
|
---|
29 | /* * 1. The origin of this source code must not be misrepresented; * */
|
---|
30 | /* * you must not claim that you wrote the original software. * */
|
---|
31 | /* * * */
|
---|
32 | /* * 2. Altered versions must be plainly marked as such and must not be * */
|
---|
33 | /* * misrepresented as being the original source. * */
|
---|
34 | /* * * */
|
---|
35 | /* * 3. This Copyright notice may not be removed or altered from any source * */
|
---|
36 | /* * or altered source distribution. * */
|
---|
37 | /* * * */
|
---|
38 | /* * The Contributing Authors specifically permit, without fee, and * */
|
---|
39 | /* * encourage the use of this source code as a component to supporting * */
|
---|
40 | /* * the MNG and JNG file format in commercial products. If you use this * */
|
---|
41 | /* * source code in a product, acknowledgment would be highly appreciated. * */
|
---|
42 | /* * * */
|
---|
43 | /* ************************************************************************** */
|
---|
44 | /* * * */
|
---|
45 | /* * Parts of this software have been adapted from the libpng package. * */
|
---|
46 | /* * Although this library supports all features from the PNG specification * */
|
---|
47 | /* * (as MNG descends from it) it does not require the libpng package. * */
|
---|
48 | /* * It does require the zlib library and optionally the IJG jpeg library, * */
|
---|
49 | /* * and/or the "little-cms" library by Marti Maria (depending on the * */
|
---|
50 | /* * inclusion of support for JNG and Full-Color-Management respectively. * */
|
---|
51 | /* * * */
|
---|
52 | /* * This library's function is primarily to read and display MNG * */
|
---|
53 | /* * animations. It is not meant as a full-featured image-editing * */
|
---|
54 | /* * component! It does however offer creation and editing functionality * */
|
---|
55 | /* * at the chunk level. * */
|
---|
56 | /* * (future modifications may include some more support for creation * */
|
---|
57 | /* * and or editing) * */
|
---|
58 | /* * * */
|
---|
59 | /* ************************************************************************** */
|
---|
60 |
|
---|
61 | /* ************************************************************************** */
|
---|
62 | /* * * */
|
---|
63 | /* * Version numbering * */
|
---|
64 | /* * * */
|
---|
65 | /* * X.Y.Z : X = release (0 = initial build) * */
|
---|
66 | /* * Y = major version (uneven = test; even = production) * */
|
---|
67 | /* * Z = minor version (bugfixes; 2 is older than 10) * */
|
---|
68 | /* * * */
|
---|
69 | /* * production versions only appear when a test-version is extensively * */
|
---|
70 | /* * tested and found stable or for intermediate bug-fixes (recognized by * */
|
---|
71 | /* * a change in the Z number) * */
|
---|
72 | /* * * */
|
---|
73 | /* * x.1.x = test version * */
|
---|
74 | /* * x.2.x = production version * */
|
---|
75 | /* * x.3.x = test version * */
|
---|
76 | /* * x.4.x = production version * */
|
---|
77 | /* * etc. * */
|
---|
78 | /* * * */
|
---|
79 | /* ************************************************************************** */
|
---|
80 | /* * * */
|
---|
81 | /* * Identifier naming conventions throughout this library * */
|
---|
82 | /* * * */
|
---|
83 | /* * iXxxx = an integer * */
|
---|
84 | /* * dXxxx = a float * */
|
---|
85 | /* * pXxxx = a pointer * */
|
---|
86 | /* * bXxxx = a boolean * */
|
---|
87 | /* * eXxxx = an enumeration * */
|
---|
88 | /* * hXxxx = a handle * */
|
---|
89 | /* * zXxxx = a zero-terminated string (pchar) * */
|
---|
90 | /* * fXxxx = a pointer to a function (callback) * */
|
---|
91 | /* * aXxxx = an array * */
|
---|
92 | /* * sXxxx = a structure * */
|
---|
93 | /* * * */
|
---|
94 | /* * Macros & defines are in all uppercase. * */
|
---|
95 | /* * Functions & typedefs in all lowercase. * */
|
---|
96 | /* * Exported stuff is prefixed with MNG_ or mng_ respectively. * */
|
---|
97 | /* * * */
|
---|
98 | /* * (I may have missed a couple; don't hesitate to let me know!) * */
|
---|
99 | /* * * */
|
---|
100 | /* ************************************************************************** */
|
---|
101 |
|
---|
102 | /* ************************************************************************** */
|
---|
103 | /* * * */
|
---|
104 | /* * project : libmng * */
|
---|
105 | /* * file : libmng.h copyright (c) 2000-2007 G.Juyn * */
|
---|
106 | /* * version : 1.0.10 * */
|
---|
107 | /* * * */
|
---|
108 | /* * purpose : main application interface * */
|
---|
109 | /* * * */
|
---|
110 | /* * author : G.Juyn * */
|
---|
111 | /* * * */
|
---|
112 | /* * comment : The main application interface. An application should not * */
|
---|
113 | /* * need access to any of the other modules! * */
|
---|
114 | /* * * */
|
---|
115 | /* * changes : 0.5.1 - 05/06/2000 - G.Juyn * */
|
---|
116 | /* * - changed chunk iteration function * */
|
---|
117 | /* * 0.5.1 - 05/08/2000 - G.Juyn * */
|
---|
118 | /* * - added chunk access functions * */
|
---|
119 | /* * - added version control constants & functions * */
|
---|
120 | /* * - changed strict-ANSI stuff * */
|
---|
121 | /* * 0.5.1 - 05/11/2000 - G.Juyn * */
|
---|
122 | /* * - added set_outputprofile2 & set_srgbprofile2 * */
|
---|
123 | /* * - added empty-chunk put-routines * */
|
---|
124 | /* * 0.5.1 - 05/12/2000 - G.Juyn * */
|
---|
125 | /* * - added version_dll & VERSION_DLL (for consistency) * */
|
---|
126 | /* * - added version control explanatory text & samples * */
|
---|
127 | /* * 0.5.1 - 05/15/2000 - G.Juyn * */
|
---|
128 | /* * - added getimgdata & putimgdata functions * */
|
---|
129 | /* * * */
|
---|
130 | /* * 0.5.2 - 05/16/2000 - G.Juyn * */
|
---|
131 | /* * - changed the version parameters (obviously) * */
|
---|
132 | /* * 0.5.2 - 05/18/2000 - G.Juyn * */
|
---|
133 | /* * - complimented constants for chunk-property values * */
|
---|
134 | /* * 0.5.2 - 05/23/2000 - G.Juyn * */
|
---|
135 | /* * - fixed MNG_UINT_pHYg value * */
|
---|
136 | /* * 0.5.2 - 05/24/2000 - G.Juyn * */
|
---|
137 | /* * - added support for get/set default zlib/IJG parms * */
|
---|
138 | /* * 0.5.2 - 06/02/2000 - G.Juyn * */
|
---|
139 | /* * - added MNG_BIGENDIAN_SUPPORT (contributed by Tim Rowley) * */
|
---|
140 | /* * - separated configuration-options into "mng_conf.h" * */
|
---|
141 | /* * - added RGB8_A8 canvasstyle * */
|
---|
142 | /* * - added getalphaline callback for RGB8_A8 canvasstyle * */
|
---|
143 | /* * 0.5.2 - 06/06/2000 - G.Juyn * */
|
---|
144 | /* * - moved errorcodes from "mng_error.h" * */
|
---|
145 | /* * - added mng_read_resume function to support * */
|
---|
146 | /* * read-suspension * */
|
---|
147 | /* * * */
|
---|
148 | /* * 0.5.3 - 06/16/2000 - G.Juyn * */
|
---|
149 | /* * - changed the version parameters (obviously) * */
|
---|
150 | /* * 0.5.3 - 06/21/2000 - G.Juyn * */
|
---|
151 | /* * - added get/set for speedtype to facilitate testing * */
|
---|
152 | /* * - added get for imagelevel during processtext callback * */
|
---|
153 | /* * 0.5.3 - 06/24/2000 - G.Juyn * */
|
---|
154 | /* * - fixed inclusion of IJG read/write code * */
|
---|
155 | /* * 0.5.3 - 06/26/2000 - G.Juyn * */
|
---|
156 | /* * - changed userdata variable to mng_ptr * */
|
---|
157 | /* * * */
|
---|
158 | /* * 0.9.0 - 06/30/2000 - G.Juyn * */
|
---|
159 | /* * - changed refresh parameters to 'x,y,width,height' * */
|
---|
160 | /* * * */
|
---|
161 | /* * 0.9.1 - 07/06/2000 - G.Juyn * */
|
---|
162 | /* * - added MNG_NEEDTIMERWAIT errorcode * */
|
---|
163 | /* * - changed comments to indicate modified behavior for * */
|
---|
164 | /* * timer & suspension breaks * */
|
---|
165 | /* * 0.9.1 - 07/08/2000 - G.Juyn * */
|
---|
166 | /* * - added get routines for internal display variables * */
|
---|
167 | /* * - added get/set routines for suspensionmode variable * */
|
---|
168 | /* * 0.9.1 - 07/15/2000 - G.Juyn * */
|
---|
169 | /* * - added callbacks for SAVE/SEEK processing * */
|
---|
170 | /* * - added get/set routines for sectionbreak variable * */
|
---|
171 | /* * - added NEEDSECTIONWAIT errorcode * */
|
---|
172 | /* * 0.9.1 - 07/19/2000 - G.Juyn * */
|
---|
173 | /* * - added function to set frame-/layer-count & playtime * */
|
---|
174 | /* * - added errorcode for updatemngheader if not a MNG * */
|
---|
175 | /* * * */
|
---|
176 | /* * 0.9.2 - 07/31/2000 - G.Juyn * */
|
---|
177 | /* * - fixed problem with trace-functions improperly wrapped * */
|
---|
178 | /* * - added status_xxxx functions * */
|
---|
179 | /* * 0.9.2 - 08/05/2000 - G.Juyn * */
|
---|
180 | /* * - changed file-prefixes * */
|
---|
181 | /* * - added function to set simplicity field * */
|
---|
182 | /* * * */
|
---|
183 | /* * 0.9.3 - 08/09/2000 - G.Juyn * */
|
---|
184 | /* * - added check for simplicity-bits in MHDR * */
|
---|
185 | /* * 0.9.3 - 08/12/2000 - G.Juyn * */
|
---|
186 | /* * - added workaround for faulty PhotoShop iCCP chunk * */
|
---|
187 | /* * 0.9.3 - 08/26/2000 - G.Juyn * */
|
---|
188 | /* * - added MAGN chunk * */
|
---|
189 | /* * 0.9.3 - 09/07/2000 - G.Juyn * */
|
---|
190 | /* * - added support for new filter_types * */
|
---|
191 | /* * 0.9.3 - 10/10/2000 - G.Juyn * */
|
---|
192 | /* * - added support for alpha-depth prediction * */
|
---|
193 | /* * 0.9.3 - 10/11/2000 - G.Juyn * */
|
---|
194 | /* * - fixed processing of unknown critical chunks * */
|
---|
195 | /* * - removed test-MaGN * */
|
---|
196 | /* * - added PNG/MNG spec version indicators * */
|
---|
197 | /* * - added support for nEED * */
|
---|
198 | /* * 0.9.3 - 10/16/2000 - G.Juyn * */
|
---|
199 | /* * - added functions to retrieve PNG/JNG specific header-info * */
|
---|
200 | /* * - added JDAA chunk * */
|
---|
201 | /* * 0.9.3 - 10/17/2000 - G.Juyn * */
|
---|
202 | /* * - added callback to process non-critical unknown chunks * */
|
---|
203 | /* * 0.9.3 - 10/20/2000 - G.Juyn * */
|
---|
204 | /* * - added errocode for delayed delta-processing * */
|
---|
205 | /* * - added get/set for bKGD preference setting * */
|
---|
206 | /* * 0.9.3 - 10/21/2000 - G.Juyn * */
|
---|
207 | /* * - added get function for interlace/progressive display * */
|
---|
208 | /* * * */
|
---|
209 | /* * 0.9.4 - 01/18/2001 - G.Juyn * */
|
---|
210 | /* * - added errorcode for MAGN methods * */
|
---|
211 | /* * - removed test filter-methods 1 & 65 * */
|
---|
212 | /* * * */
|
---|
213 | /* * 1.0.0 - 02/05/2001 - G.Juyn * */
|
---|
214 | /* * - version numbers (obviously) * */
|
---|
215 | /* * * */
|
---|
216 | /* * 1.0.1 - 02/08/2001 - G.Juyn * */
|
---|
217 | /* * - added MEND processing callback * */
|
---|
218 | /* * 1.0.1 - 04/21/2001 - G.Juyn (code by G.Kelly) * */
|
---|
219 | /* * - added BGRA8 canvas with premultiplied alpha * */
|
---|
220 | /* * 1.0.1 - 05/02/2001 - G.Juyn * */
|
---|
221 | /* * - added "default" sRGB generation (Thanks Marti!) * */
|
---|
222 | /* * * */
|
---|
223 | /* * 1.0.2 - 06/23/2001 - G.Juyn * */
|
---|
224 | /* * - added optimization option for MNG-video playback * */
|
---|
225 | /* * - added processterm callback * */
|
---|
226 | /* * 1.0.2 - 06/25/2001 - G.Juyn * */
|
---|
227 | /* * - added late binding errorcode (not used internally) * */
|
---|
228 | /* * - added option to turn off progressive refresh * */
|
---|
229 | /* * * */
|
---|
230 | /* * 1.0.3 - 08/06/2001 - G.Juyn * */
|
---|
231 | /* * - added get function for last processed BACK chunk * */
|
---|
232 | /* * * */
|
---|
233 | /* * 1.0.5 - 07/04/2002 - G.Juyn * */
|
---|
234 | /* * - added errorcode for extreme chunk-sizes * */
|
---|
235 | /* * 1.0.5 - 08/07/2002 - G.Juyn * */
|
---|
236 | /* * - added test-option for PNG filter method 193 (=no filter) * */
|
---|
237 | /* * 1.0.5 - 08/15/2002 - G.Juyn * */
|
---|
238 | /* * - completed PROM support * */
|
---|
239 | /* * - completed delta-image support * */
|
---|
240 | /* * 1.0.5 - 08/19/2002 - G.Juyn * */
|
---|
241 | /* * - added HLAPI function to copy chunks * */
|
---|
242 | /* * 1.0.5 - 09/14/2002 - G.Juyn * */
|
---|
243 | /* * - added event handling for dynamic MNG * */
|
---|
244 | /* * - added 'supports' call to check function availability * */
|
---|
245 | /* * 1.0.5 - 09/15/2002 - G.Juyn * */
|
---|
246 | /* * - fixed LOOP iteration=0 special case * */
|
---|
247 | /* * 1.0.5 - 09/20/2002 - G.Juyn * */
|
---|
248 | /* * - added support for PAST * */
|
---|
249 | /* * 1.0.5 - 09/22/2002 - G.Juyn * */
|
---|
250 | /* * - added bgrx8 canvas (filler byte) * */
|
---|
251 | /* * 1.0.5 - 10/07/2002 - G.Juyn * */
|
---|
252 | /* * - added check for TERM placement during create/write * */
|
---|
253 | /* * - added beta version function & constant * */
|
---|
254 | /* * 1.0.5 - 11/07/2002 - G.Juyn * */
|
---|
255 | /* * - added support to get totals after mng_read() * */
|
---|
256 | /* * * */
|
---|
257 | /* * 1.0.6 - 07/07/2003 - G. Randers-Pehrson * */
|
---|
258 | /* * - added support for reducing the footprint of libmng * */
|
---|
259 | /* * by macros that optionally skip unused chunks, remove * */
|
---|
260 | /* * 16-bit sample support, remove Delta support, and * */
|
---|
261 | /* * remove JNG support, to accomodate Mozilla/Firebird. * */
|
---|
262 | /* * 1.0.6 - 07/14/2003 - G. Randers-Pehrson * */
|
---|
263 | /* * - further optional removal of unused functions * */
|
---|
264 | /* * * */
|
---|
265 | /* * 1.0.7 - 11/27/2003 - R.A * */
|
---|
266 | /* * - added CANVAS_RGB565 and CANVAS_BGR565 * */
|
---|
267 | /* * 1.0.7 - 12/06/2003 - R.A * */
|
---|
268 | /* * - added CANVAS_RGBA565 and CANVAS_BGRA565 * */
|
---|
269 | /* * 1.0.7 - 01/25/2004 - J.S * */
|
---|
270 | /* * - added premultiplied alpha canvas' for RGBA, ARGB, ABGR * */
|
---|
271 | /* * 1.0.7 - 03/07/2004 - G. Randers-Pehrson * */
|
---|
272 | /* * - put gamma, cms-related declarations inside #ifdef * */
|
---|
273 | /* * 1.0.7 - 03/10/2004 - G.R-P * */
|
---|
274 | /* * - added conditionals around openstream/closestream * */
|
---|
275 | /* * * */
|
---|
276 | /* * 1.0.8 - 04/02/2004 - G.Juyn * */
|
---|
277 | /* * - added CRC existence & checking flags * */
|
---|
278 | /* * 1.0.8 - 04/12/2004 - G.Juyn * */
|
---|
279 | /* * - added data-push mechanisms for specialized decoders * */
|
---|
280 | /* * 1.0.8 - 06/05/2004 - G.R-P * */
|
---|
281 | /* * - define MNG_INCLUDE_ZLIB when MNG_USE_ZLIB_CRC is defined * */
|
---|
282 | /* * * */
|
---|
283 | /* * 1.0.9 - 10/03/2004 - G.Juyn * */
|
---|
284 | /* * - added function to retrieve current FRAM delay * */
|
---|
285 | /* * 1.0.9 - 10/14/2004 - G.Juyn * */
|
---|
286 | /* * - added bgr565_a8 canvas-style (thanks to J. Elvander) * */
|
---|
287 | /* * 1.0.9 - 10/17/2004 - G.Juyn * */
|
---|
288 | /* * - fixed PPLT getchunk/putchunk routines * */
|
---|
289 | /* * * */
|
---|
290 | /* * 1.0.10 - 03/07/2006 - (thanks to W. Manthey) * */
|
---|
291 | /* * - added CANVAS_RGB555 and CANVAS_BGR555 * */
|
---|
292 | /* * 1.0.10 - 04/08/2007 - G.Juyn * */
|
---|
293 | /* * - added support for mPNG proposal * */
|
---|
294 | /* * 1.0.10 - 04/12/2007 - G.Juyn * */
|
---|
295 | /* * - added support for ANG proposal * */
|
---|
296 | /* * * */
|
---|
297 | /* ************************************************************************** */
|
---|
298 |
|
---|
299 | #if defined(__BORLANDC__) && defined(MNG_STRICT_ANSI)
|
---|
300 | #pragma option -A /* force ANSI-C */
|
---|
301 | #endif
|
---|
302 |
|
---|
303 | #ifndef _libmng_h_
|
---|
304 | #define _libmng_h_
|
---|
305 |
|
---|
306 | /* ************************************************************************** */
|
---|
307 |
|
---|
308 | #include "libmng_conf.h" /* user-specific configuration options */
|
---|
309 |
|
---|
310 | /* ************************************************************************** */
|
---|
311 |
|
---|
312 | #define MNG_CHECK_BAD_ICCP /* let's catch that sucker !!! */
|
---|
313 |
|
---|
314 | #ifdef MNG_SUPPORT_READ /* dependencies based on user-configuration */
|
---|
315 | #define MNG_INCLUDE_READ_PROCS
|
---|
316 | #endif
|
---|
317 |
|
---|
318 | #ifdef MNG_SUPPORT_WRITE
|
---|
319 | #define MNG_INCLUDE_WRITE_PROCS
|
---|
320 | #endif
|
---|
321 |
|
---|
322 | #ifdef MNG_USE_ZLIB_CRC
|
---|
323 | #define MNG_INCLUDE_ZLIB
|
---|
324 | #endif
|
---|
325 |
|
---|
326 | #ifdef MNG_SUPPORT_DISPLAY
|
---|
327 | #define MNG_INCLUDE_FILTERS
|
---|
328 | #define MNG_INCLUDE_INTERLACE
|
---|
329 | #define MNG_INCLUDE_OBJECTS
|
---|
330 | #define MNG_INCLUDE_DISPLAY_PROCS
|
---|
331 | #define MNG_INCLUDE_TIMING_PROCS
|
---|
332 | #define MNG_INCLUDE_ZLIB
|
---|
333 | #endif
|
---|
334 |
|
---|
335 | #ifdef MNG_STORE_CHUNKS
|
---|
336 | #define MNG_INCLUDE_ZLIB
|
---|
337 | #endif
|
---|
338 |
|
---|
339 | #ifdef MNG_SUPPORT_IJG6B
|
---|
340 | #define MNG_INCLUDE_JNG
|
---|
341 | #define MNG_INCLUDE_IJG6B
|
---|
342 | #define MNG_USE_SETJMP
|
---|
343 | #endif
|
---|
344 |
|
---|
345 | #ifdef MNG_INCLUDE_JNG
|
---|
346 | #if defined(MNG_SUPPORT_DISPLAY) || defined(MNG_ACCESS_CHUNKS)
|
---|
347 | #define MNG_INCLUDE_JNG_READ
|
---|
348 | #endif
|
---|
349 | #if defined(MNG_SUPPORT_WRITE) || defined(MNG_ACCESS_CHUNKS)
|
---|
350 | #define MNG_INCLUDE_JNG_WRITE
|
---|
351 | #endif
|
---|
352 | #endif
|
---|
353 |
|
---|
354 | #ifdef MNG_FULL_CMS
|
---|
355 | #define MNG_INCLUDE_LCMS
|
---|
356 | #endif
|
---|
357 |
|
---|
358 | #ifdef MNG_AUTO_DITHER
|
---|
359 | #define MNG_INCLUDE_DITHERING
|
---|
360 | #endif
|
---|
361 |
|
---|
362 | #ifdef MNG_SUPPORT_TRACE
|
---|
363 | #define MNG_INCLUDE_TRACE_PROCS
|
---|
364 | #ifdef MNG_TRACE_TELLTALE
|
---|
365 | #define MNG_INCLUDE_TRACE_STRINGS
|
---|
366 | #endif
|
---|
367 | #endif
|
---|
368 |
|
---|
369 | #ifdef MNG_ERROR_TELLTALE
|
---|
370 | #define MNG_INCLUDE_ERROR_STRINGS
|
---|
371 | #endif
|
---|
372 |
|
---|
373 | #ifdef MNG_OPTIMIZE_CHUNKINITFREE
|
---|
374 | #ifndef MNG_OPTIMIZE_CHUNKACCESS
|
---|
375 | #define MNG_OPTIMIZE_CHUNKACCESS
|
---|
376 | #endif
|
---|
377 | #else
|
---|
378 | #ifdef MNG_OPTIMIZE_CHUNKACCESS
|
---|
379 | #undef MNG_OPTIMIZE_CHUNKACCESS
|
---|
380 | #endif
|
---|
381 | #endif
|
---|
382 |
|
---|
383 | /* ************************************************************************** */
|
---|
384 |
|
---|
385 | #include "libmng_types.h" /* platform-specific definitions
|
---|
386 | and other assorted stuff */
|
---|
387 |
|
---|
388 | /* ************************************************************************** */
|
---|
389 |
|
---|
390 | #ifdef __cplusplus
|
---|
391 | extern "C" {
|
---|
392 | #endif
|
---|
393 |
|
---|
394 | /* ************************************************************************** */
|
---|
395 | /* * * */
|
---|
396 | /* * Versioning control * */
|
---|
397 | /* * * */
|
---|
398 | /* * version_so and version_dll will NOT reflect version_major; * */
|
---|
399 | /* * these will only change for binary incompatible changes (which will * */
|
---|
400 | /* * hopefully never occur) * */
|
---|
401 | /* * note: they will be set to 1 on the first public release !!! * */
|
---|
402 | /* * * */
|
---|
403 | /* * first public release: * */
|
---|
404 | /* * #define MNG_VERSION_TEXT "1.0.0" * */
|
---|
405 | /* * #define MNG_VERSION_SO 1 eg. libmng.so.1 * */
|
---|
406 | /* * #define MNG_VERSION_DLL 1 eg. libmng.dll * */
|
---|
407 | /* * #define MNG_VERSION_MAJOR 1 * */
|
---|
408 | /* * #define MNG_VERSION_MINOR 0 * */
|
---|
409 | /* * #define MNG_VERSION_RELEASE 0 * */
|
---|
410 | /* * * */
|
---|
411 | /* * bug fix & cosmetics : * */
|
---|
412 | /* * #define MNG_VERSION_TEXT "1.0.1" * */
|
---|
413 | /* * #define MNG_VERSION_SO 1 eg. libmng.so.1 * */
|
---|
414 | /* * #define MNG_VERSION_DLL 1 eg. libmng.dll * */
|
---|
415 | /* * #define MNG_VERSION_MAJOR 1 * */
|
---|
416 | /* * #define MNG_VERSION_MINOR 0 * */
|
---|
417 | /* * #define MNG_VERSION_RELEASE 1 * */
|
---|
418 | /* * * */
|
---|
419 | /* * feature change : * */
|
---|
420 | /* * #define MNG_VERSION_TEXT "1.2.0" * */
|
---|
421 | /* * #define MNG_VERSION_SO 1 eg. libmng.so.1 * */
|
---|
422 | /* * #define MNG_VERSION_DLL 1 eg. libmng.dll * */
|
---|
423 | /* * #define MNG_VERSION_MAJOR 1 * */
|
---|
424 | /* * #define MNG_VERSION_MINOR 2 * */
|
---|
425 | /* * #define MNG_VERSION_RELEASE 0 * */
|
---|
426 | /* * * */
|
---|
427 | /* * major rewrite (still binary compatible) : * */
|
---|
428 | /* * #define MNG_VERSION_TEXT "2.0.0" * */
|
---|
429 | /* * #define MNG_VERSION_SO 1 eg. libmng.so.1 * */
|
---|
430 | /* * #define MNG_VERSION_DLL 1 eg. libmng.dll * */
|
---|
431 | /* * #define MNG_VERSION_MAJOR 2 * */
|
---|
432 | /* * #define MNG_VERSION_MINOR 0 * */
|
---|
433 | /* * #define MNG_VERSION_RELEASE 0 * */
|
---|
434 | /* * * */
|
---|
435 | /* * binary incompatible change: * */
|
---|
436 | /* * #define MNG_VERSION_TEXT "13.0.0" * */
|
---|
437 | /* * #define MNG_VERSION_SO 2 eg. libmng.so.2 * */
|
---|
438 | /* * #define MNG_VERSION_DLL 2 eg. libmng2.dll * */
|
---|
439 | /* * #define MNG_VERSION_MAJOR 13 * */
|
---|
440 | /* * #define MNG_VERSION_MINOR 0 * */
|
---|
441 | /* * #define MNG_VERSION_RELEASE 0 * */
|
---|
442 | /* * * */
|
---|
443 | /* * note that version_so & version_dll will always remain equal so it * */
|
---|
444 | /* * doesn't matter which one is called to do version-checking; they are * */
|
---|
445 | /* * just provided for their target platform * */
|
---|
446 | /* * * */
|
---|
447 | /* ************************************************************************** */
|
---|
448 |
|
---|
449 | #define MNG_VERSION_TEXT "1.0.10"
|
---|
450 | #define MNG_VERSION_SO 1 /* eg. libmng.so.1 */
|
---|
451 | #define MNG_VERSION_DLL 1 /* but: libmng.dll (!) */
|
---|
452 | #define MNG_VERSION_MAJOR 1
|
---|
453 | #define MNG_VERSION_MINOR 0
|
---|
454 | #define MNG_VERSION_RELEASE 10
|
---|
455 | #define MNG_VERSION_BETA MNG_FALSE
|
---|
456 |
|
---|
457 | MNG_EXT mng_pchar MNG_DECL mng_version_text (void);
|
---|
458 | MNG_EXT mng_uint8 MNG_DECL mng_version_so (void);
|
---|
459 | MNG_EXT mng_uint8 MNG_DECL mng_version_dll (void);
|
---|
460 | MNG_EXT mng_uint8 MNG_DECL mng_version_major (void);
|
---|
461 | MNG_EXT mng_uint8 MNG_DECL mng_version_minor (void);
|
---|
462 | MNG_EXT mng_uint8 MNG_DECL mng_version_release (void);
|
---|
463 | MNG_EXT mng_bool MNG_DECL mng_version_beta (void);
|
---|
464 |
|
---|
465 | /* use the following call to check wether the version of libmng your app
|
---|
466 | is using supports the given function; this is useful in apps that dynamically
|
---|
467 | load the library to make sure a certain function will work; the result will
|
---|
468 | be MNG_TRUE if the given function is implemented in this version of the library;
|
---|
469 | Major/Minor/Version indicate the version the function became available;
|
---|
470 | (if these fields are zero the function is not yet implemented!) */
|
---|
471 | #ifdef MNG_SUPPORT_FUNCQUERY
|
---|
472 | MNG_EXT mng_bool MNG_DECL mng_supports_func (mng_pchar zFunction,
|
---|
473 | mng_uint8* iMajor,
|
---|
474 | mng_uint8* iMinor,
|
---|
475 | mng_uint8* iRelease);
|
---|
476 | #endif
|
---|
477 |
|
---|
478 | /* ************************************************************************** */
|
---|
479 | /* * * */
|
---|
480 | /* * MNG/PNG specification level conformance * */
|
---|
481 | /* * * */
|
---|
482 | /* ************************************************************************** */
|
---|
483 |
|
---|
484 | #define MNG_PNG_VERSION "1.2"
|
---|
485 | #define MNG_PNG_VERSION_MAJ 1
|
---|
486 | #define MNG_PNG_VERSION_MIN 2
|
---|
487 |
|
---|
488 | #define MNG_MNG_VERSION "1.1"
|
---|
489 | #define MNG_MNG_VERSION_MAJ 1
|
---|
490 | #define MNG_MNG_VERSION_MIN 1
|
---|
491 | #define MNG_MNG_DRAFT 99 /* deprecated;
|
---|
492 | only used for nEED "MNG DRAFT nn" */
|
---|
493 |
|
---|
494 | /* ************************************************************************** */
|
---|
495 | /* * * */
|
---|
496 | /* * High-level application functions * */
|
---|
497 | /* * * */
|
---|
498 | /* ************************************************************************** */
|
---|
499 |
|
---|
500 | /* library initialization function */
|
---|
501 | /* must be the first called before anything can be done at all */
|
---|
502 | /* initializes internal datastructure(s) */
|
---|
503 | MNG_EXT mng_handle MNG_DECL mng_initialize (mng_ptr pUserdata,
|
---|
504 | mng_memalloc fMemalloc,
|
---|
505 | mng_memfree fMemfree,
|
---|
506 | mng_traceproc fTraceproc);
|
---|
507 |
|
---|
508 | /* library reset function */
|
---|
509 | /* can be used to re-initialize the library, so another image can be
|
---|
510 | processed. there's absolutely no harm in calling it, even when it's not
|
---|
511 | really necessary */
|
---|
512 | MNG_EXT mng_retcode MNG_DECL mng_reset (mng_handle hHandle);
|
---|
513 |
|
---|
514 | /* library cleanup function */
|
---|
515 | /* must be the last called to clean up internal datastructure(s) */
|
---|
516 | MNG_EXT mng_retcode MNG_DECL mng_cleanup (mng_handle* hHandle);
|
---|
517 |
|
---|
518 | /* high-level read functions */
|
---|
519 | /* use mng_read if you simply want to read a Network Graphic */
|
---|
520 | /* mng_read_resume is used in I/O-read-suspension scenarios, where the
|
---|
521 | "readdata" callback may return FALSE & length=0 indicating its buffer is
|
---|
522 | depleted or too short to supply the required bytes, and the buffer needs
|
---|
523 | to be refilled; libmng will return the errorcode MNG_NEEDMOREDATA telling
|
---|
524 | the app to refill its read-buffer after which it must call mng_read_resume
|
---|
525 | (or mng_display_resume if it also displaying the image simultaneously) */
|
---|
526 | #ifdef MNG_SUPPORT_READ
|
---|
527 | MNG_EXT mng_retcode MNG_DECL mng_read (mng_handle hHandle);
|
---|
528 | MNG_EXT mng_retcode MNG_DECL mng_read_resume (mng_handle hHandle);
|
---|
529 | #endif
|
---|
530 |
|
---|
531 | /* high-level "data push" functions */
|
---|
532 | /* these functions can be used in situations where data is streaming into the
|
---|
533 | application and needs to be buffered by libmng before it is actually
|
---|
534 | requested by libmng itself. the pushing complements the normal reading
|
---|
535 | mechanism, but applications can decide to always return "0 bytes read" to
|
---|
536 | make libmng go into suspension mode with the returncode MNG_NEEDMOREDATA */
|
---|
537 | /* mng_read_pushdata can be used to push blobs of data of arbitrary size;
|
---|
538 | mng_read_pushsig and mng_read_pushchunk can be used if the application
|
---|
539 | has already done some low-level decoding (eg. at the chunk level) */
|
---|
540 | /* the data being pushed into libmng with mng_read_pushdata *must* contain
|
---|
541 | the regular 4-byte chunklength, but *must not* contain it with
|
---|
542 | mng_read_pushchunk!!! */
|
---|
543 | /* mng_read_pushsig is used to prevent libmng from trying to parse the regular
|
---|
544 | PNG/JNG/MNG signature bytes; the application must have done this itself
|
---|
545 | and *must* indicate the proper type in the function call or things will
|
---|
546 | go amiss!!
|
---|
547 | also you *must* call this first, so pretty much right after mng_initialize
|
---|
548 | and certainly before any call to mng_read or mng_readdisplay !!!! */
|
---|
549 | /* IMPORTANT!!! data can only be safely pushed when libmng is in a
|
---|
550 | "wait" state; eg. during MNG_NEEDTIMERWAIT, MNG_NEEDSECTIONWAIT or
|
---|
551 | MNG_NEEDMOREDATA !!! this just means you can't have one thread displaying
|
---|
552 | and another thread pushing data !!! */
|
---|
553 | /* if bOwnership = MNG_TRUE, libmng will retain the supplied pointer and
|
---|
554 | *will* expect the buffer to remain available until libmng is finished
|
---|
555 | with it; what happens then depends on whether or not you have set the
|
---|
556 | releasedata() callback; if this is set than the supplied buffer will
|
---|
557 | be returned through this callback and your application can take care of
|
---|
558 | cleaning it up, otherwise libmng will use its internal freeing mechanism
|
---|
559 | (which, depending on compile-options, will be the standard C free() call,
|
---|
560 | or the memfree() callback */
|
---|
561 | /* if bOwnership = MNG_FALSE, libmng will just copy the data into its own
|
---|
562 | buffers and dispose of it in the normal way */
|
---|
563 | #ifdef MNG_SUPPORT_READ
|
---|
564 | MNG_EXT mng_retcode MNG_DECL mng_read_pushdata (mng_handle hHandle,
|
---|
565 | mng_ptr pData,
|
---|
566 | mng_size_t iLength,
|
---|
567 | mng_bool bTakeownership);
|
---|
568 | MNG_EXT mng_retcode MNG_DECL mng_read_pushsig (mng_handle hHandle,
|
---|
569 | mng_imgtype eSigtype);
|
---|
570 | MNG_EXT mng_retcode MNG_DECL mng_read_pushchunk (mng_handle hHandle,
|
---|
571 | mng_ptr pChunk,
|
---|
572 | mng_size_t iLength,
|
---|
573 | mng_bool bTakeownership);
|
---|
574 | #endif
|
---|
575 |
|
---|
576 | /* high-level write & create functions */
|
---|
577 | /* use this if you want to write a previously read Network Graphic or
|
---|
578 | if you want to create a new graphic and write it */
|
---|
579 | /* to write a previously read graphic you must have defined MNG_STORE_CHUNKS */
|
---|
580 | /* to create a new graphic you'll also need access to the chunks
|
---|
581 | (eg. #define MNG_ACCESS_CHUNKS !) */
|
---|
582 | #ifdef MNG_SUPPORT_WRITE
|
---|
583 | MNG_EXT mng_retcode MNG_DECL mng_write (mng_handle hHandle);
|
---|
584 | MNG_EXT mng_retcode MNG_DECL mng_create (mng_handle hHandle);
|
---|
585 | #endif
|
---|
586 |
|
---|
587 | /* high-level display functions */
|
---|
588 | /* use these to display a previously read or created graphic or
|
---|
589 | to read & display a graphic simultaneously */
|
---|
590 | /* mng_display_resume should be called after a timer-interval
|
---|
591 | expires that was set through the settimer-callback, after a
|
---|
592 | read suspension-break, or, to resume an animation after a call
|
---|
593 | to mng_display_freeze/mng_display_reset */
|
---|
594 | /* mng_display_freeze thru mng_display_gotime can be used to influence
|
---|
595 | the display of an image, BUT ONLY if it has been completely read! */
|
---|
596 | #ifdef MNG_SUPPORT_DISPLAY
|
---|
597 | #ifdef MNG_SUPPORT_READ
|
---|
598 | MNG_EXT mng_retcode MNG_DECL mng_readdisplay (mng_handle hHandle);
|
---|
599 | #endif
|
---|
600 | MNG_EXT mng_retcode MNG_DECL mng_display (mng_handle hHandle);
|
---|
601 | MNG_EXT mng_retcode MNG_DECL mng_display_resume (mng_handle hHandle);
|
---|
602 | MNG_EXT mng_retcode MNG_DECL mng_display_freeze (mng_handle hHandle);
|
---|
603 | MNG_EXT mng_retcode MNG_DECL mng_display_reset (mng_handle hHandle);
|
---|
604 | #ifndef MNG_NO_DISPLAY_GO_SUPPORTED
|
---|
605 | MNG_EXT mng_retcode MNG_DECL mng_display_goframe (mng_handle hHandle,
|
---|
606 | mng_uint32 iFramenr);
|
---|
607 | MNG_EXT mng_retcode MNG_DECL mng_display_golayer (mng_handle hHandle,
|
---|
608 | mng_uint32 iLayernr);
|
---|
609 | MNG_EXT mng_retcode MNG_DECL mng_display_gotime (mng_handle hHandle,
|
---|
610 | mng_uint32 iPlaytime);
|
---|
611 | #endif
|
---|
612 | #endif /* MNG_SUPPORT_DISPLAY */
|
---|
613 |
|
---|
614 | /* event processing function */
|
---|
615 | /* this needs to be called by the app when dynamic MNG is enabled and
|
---|
616 | a specific event occurs in the user-interface */
|
---|
617 | #if defined(MNG_SUPPORT_DISPLAY) && defined(MNG_SUPPORT_DYNAMICMNG)
|
---|
618 | MNG_EXT mng_retcode MNG_DECL mng_trapevent (mng_handle hHandle,
|
---|
619 | mng_uint8 iEventtype,
|
---|
620 | mng_int32 iX,
|
---|
621 | mng_int32 iY);
|
---|
622 | #endif
|
---|
623 |
|
---|
624 | /* error reporting function */
|
---|
625 | /* use this if you need more detailed info on the last error */
|
---|
626 | /* iExtra1 & iExtra2 may contain errorcodes from zlib, jpeg, etc... */
|
---|
627 | /* zErrortext will only be filled if you #define MNG_ERROR_TELLTALE */
|
---|
628 | MNG_EXT mng_retcode MNG_DECL mng_getlasterror (mng_handle hHandle,
|
---|
629 | mng_int8* iSeverity,
|
---|
630 | mng_chunkid* iChunkname,
|
---|
631 | mng_uint32* iChunkseq,
|
---|
632 | mng_int32* iExtra1,
|
---|
633 | mng_int32* iExtra2,
|
---|
634 | mng_pchar* zErrortext);
|
---|
635 |
|
---|
636 | /* ************************************************************************** */
|
---|
637 | /* * * */
|
---|
638 | /* * Callback set functions * */
|
---|
639 | /* * * */
|
---|
640 | /* ************************************************************************** */
|
---|
641 |
|
---|
642 | /* memory callbacks */
|
---|
643 | /* called to allocate and release internal datastructures */
|
---|
644 | #ifndef MNG_INTERNAL_MEMMNGMT
|
---|
645 | MNG_EXT mng_retcode MNG_DECL mng_setcb_memalloc (mng_handle hHandle,
|
---|
646 | mng_memalloc fProc);
|
---|
647 | MNG_EXT mng_retcode MNG_DECL mng_setcb_memfree (mng_handle hHandle,
|
---|
648 | mng_memfree fProc);
|
---|
649 | #endif /* MNG_INTERNAL_MEMMNGMT */
|
---|
650 |
|
---|
651 | /* open- & close-stream callbacks */
|
---|
652 | /* called to open & close streams for input or output */
|
---|
653 | #if defined(MNG_SUPPORT_READ) || defined(MNG_SUPPORT_WRITE)
|
---|
654 | #ifndef MNG_NO_OPEN_CLOSE_STREAM
|
---|
655 | MNG_EXT mng_retcode MNG_DECL mng_setcb_openstream (mng_handle hHandle,
|
---|
656 | mng_openstream fProc);
|
---|
657 | MNG_EXT mng_retcode MNG_DECL mng_setcb_closestream (mng_handle hHandle,
|
---|
658 | mng_closestream fProc);
|
---|
659 | #endif
|
---|
660 | #endif
|
---|
661 |
|
---|
662 | /* read callback */
|
---|
663 | /* called to get data from the inputstream */
|
---|
664 | #ifdef MNG_SUPPORT_READ
|
---|
665 | MNG_EXT mng_retcode MNG_DECL mng_setcb_readdata (mng_handle hHandle,
|
---|
666 | mng_readdata fProc);
|
---|
667 | #endif
|
---|
668 |
|
---|
669 | /* write callback */
|
---|
670 | /* called to put data into the outputstream */
|
---|
671 | #ifdef MNG_SUPPORT_WRITE
|
---|
672 | MNG_EXT mng_retcode MNG_DECL mng_setcb_writedata (mng_handle hHandle,
|
---|
673 | mng_writedata fProc);
|
---|
674 | #endif
|
---|
675 |
|
---|
676 | /* error callback */
|
---|
677 | /* called when an error occurs */
|
---|
678 | /* the application can determine if the error is recoverable,
|
---|
679 | and may inform the library by setting specific returncodes */
|
---|
680 | MNG_EXT mng_retcode MNG_DECL mng_setcb_errorproc (mng_handle hHandle,
|
---|
681 | mng_errorproc fProc);
|
---|
682 |
|
---|
683 | /* trace callback */
|
---|
684 | /* called to show the currently executing function */
|
---|
685 | #ifdef MNG_SUPPORT_TRACE
|
---|
686 | MNG_EXT mng_retcode MNG_DECL mng_setcb_traceproc (mng_handle hHandle,
|
---|
687 | mng_traceproc fProc);
|
---|
688 | #endif
|
---|
689 |
|
---|
690 | /* callbacks for read processing */
|
---|
691 | /* processheader is called when all header information has been gathered
|
---|
692 | from the inputstream */
|
---|
693 | /* processtext is called for every tEXt, zTXt and iTXt chunk in the
|
---|
694 | inputstream (iType=0 for tEXt, 1 for zTXt and 2 for iTXt);
|
---|
695 | you can call get_imagelevel to check at what nesting-level the chunk is
|
---|
696 | encountered (eg. tEXt inside an embedded image inside a MNG -> level == 2;
|
---|
697 | in most other case -> level == 1) */
|
---|
698 | /* processsave & processseek are called for SAVE/SEEK chunks */
|
---|
699 | /* processneed is called for the nEED chunk; you should specify a callback
|
---|
700 | for this as the default behavior will be to abort processing, unless
|
---|
701 | the requirement is one of:
|
---|
702 | - a supported chunk
|
---|
703 | - the text "draft nn" where nn is a numeric value
|
---|
704 | - the text "MNG-1.0" or "MNG-1.1"
|
---|
705 | - the text "CACHEOFF" */
|
---|
706 | /* processmend is called at the very end of the animation-stream;
|
---|
707 | note that this may not be the end of the animation though! */
|
---|
708 | /* processterm is called when a TERM chunk is encountered; there can be only
|
---|
709 | 1 in the stream (or none) */
|
---|
710 | /* processunknown is called after reading each non-critical unknown chunk */
|
---|
711 | #ifdef MNG_SUPPORT_READ
|
---|
712 | MNG_EXT mng_retcode MNG_DECL mng_setcb_processheader (mng_handle hHandle,
|
---|
713 | mng_processheader fProc);
|
---|
714 | MNG_EXT mng_retcode MNG_DECL mng_setcb_processtext (mng_handle hHandle,
|
---|
715 | mng_processtext fProc);
|
---|
716 | MNG_EXT mng_retcode MNG_DECL mng_setcb_processsave (mng_handle hHandle,
|
---|
717 | mng_processsave fProc);
|
---|
718 | MNG_EXT mng_retcode MNG_DECL mng_setcb_processseek (mng_handle hHandle,
|
---|
719 | mng_processseek fProc);
|
---|
720 | MNG_EXT mng_retcode MNG_DECL mng_setcb_processneed (mng_handle hHandle,
|
---|
721 | mng_processneed fProc);
|
---|
722 | MNG_EXT mng_retcode MNG_DECL mng_setcb_processmend (mng_handle hHandle,
|
---|
723 | mng_processmend fProc);
|
---|
724 | MNG_EXT mng_retcode MNG_DECL mng_setcb_processterm (mng_handle hHandle,
|
---|
725 | mng_processterm fProc);
|
---|
726 | MNG_EXT mng_retcode MNG_DECL mng_setcb_processunknown(mng_handle hHandle,
|
---|
727 | mng_processunknown fProc);
|
---|
728 | #endif
|
---|
729 |
|
---|
730 | /* callbacks for display processing */
|
---|
731 | /* getcanvasline is called to get an access-pointer to a line on the
|
---|
732 | drawing-canvas */
|
---|
733 | /* getbkgdline is called to get an access-pointer to a line from the
|
---|
734 | background-canvas */
|
---|
735 | /* refresh is called to inform the GUI to redraw the current canvas onto
|
---|
736 | its output device (eg. in Win32 this would mean sending an
|
---|
737 | invalidate message for the specified region */
|
---|
738 | /* NOTE that the update-region is specified as x,y,width,height; eg. the
|
---|
739 | invalidate message for Windows requires left,top,right,bottom parameters
|
---|
740 | where the bottom-right is exclusive of the region!!
|
---|
741 | to get these correctly is as simple as:
|
---|
742 | left = x;
|
---|
743 | top = y;
|
---|
744 | right = x + width;
|
---|
745 | bottom = y + height;
|
---|
746 | if your implementation requires inclusive points, simply subtract 1 from
|
---|
747 | both the right & bottom values calculated above.
|
---|
748 | */
|
---|
749 | #ifdef MNG_SUPPORT_DISPLAY
|
---|
750 | MNG_EXT mng_retcode MNG_DECL mng_setcb_getcanvasline (mng_handle hHandle,
|
---|
751 | mng_getcanvasline fProc);
|
---|
752 | MNG_EXT mng_retcode MNG_DECL mng_setcb_getbkgdline (mng_handle hHandle,
|
---|
753 | mng_getbkgdline fProc);
|
---|
754 | MNG_EXT mng_retcode MNG_DECL mng_setcb_getalphaline (mng_handle hHandle,
|
---|
755 | mng_getalphaline fProc);
|
---|
756 | MNG_EXT mng_retcode MNG_DECL mng_setcb_refresh (mng_handle hHandle,
|
---|
757 | mng_refresh fProc);
|
---|
758 |
|
---|
759 | /* timing callbacks */
|
---|
760 | /* gettickcount is called to get the system tickcount (milliseconds);
|
---|
761 | this is used to determine the remaining interval between frames */
|
---|
762 | /* settimer is called to inform the application that it should set a timer;
|
---|
763 | when the timer is triggered the app must call mng_display_resume */
|
---|
764 | MNG_EXT mng_retcode MNG_DECL mng_setcb_gettickcount (mng_handle hHandle,
|
---|
765 | mng_gettickcount fProc);
|
---|
766 | MNG_EXT mng_retcode MNG_DECL mng_setcb_settimer (mng_handle hHandle,
|
---|
767 | mng_settimer fProc);
|
---|
768 |
|
---|
769 | /* color management callbacks */
|
---|
770 | /* called to transmit color management information to the application */
|
---|
771 | /* these are only used when you #define MNG_APP_CMS */
|
---|
772 | #ifdef MNG_APP_CMS
|
---|
773 | MNG_EXT mng_retcode MNG_DECL mng_setcb_processgamma (mng_handle hHandle,
|
---|
774 | mng_processgamma fProc);
|
---|
775 | MNG_EXT mng_retcode MNG_DECL mng_setcb_processchroma (mng_handle hHandle,
|
---|
776 | mng_processchroma fProc);
|
---|
777 | MNG_EXT mng_retcode MNG_DECL mng_setcb_processsrgb (mng_handle hHandle,
|
---|
778 | mng_processsrgb fProc);
|
---|
779 | MNG_EXT mng_retcode MNG_DECL mng_setcb_processiccp (mng_handle hHandle,
|
---|
780 | mng_processiccp fProc);
|
---|
781 | MNG_EXT mng_retcode MNG_DECL mng_setcb_processarow (mng_handle hHandle,
|
---|
782 | mng_processarow fProc);
|
---|
783 | #endif /* MNG_APP_CMS */
|
---|
784 | #endif /* MNG_SUPPORT_DISPLAY */
|
---|
785 |
|
---|
786 | /* release push data callback */
|
---|
787 | /* used when the app pushes data into libmng (as opposed to libmng pulling it)
|
---|
788 | and relinquishes ownership of the pushed data-buffer, but *does* want to
|
---|
789 | release (free) the buffer itself once libmng has finished processing it */
|
---|
790 | #ifdef MNG_SUPPORT_READ
|
---|
791 | MNG_EXT mng_retcode MNG_DECL mng_setcb_releasedata (mng_handle hHandle,
|
---|
792 | mng_releasedata fProc);
|
---|
793 | #endif
|
---|
794 |
|
---|
795 | /* ************************************************************************** */
|
---|
796 | /* * * */
|
---|
797 | /* * Callback get functions * */
|
---|
798 | /* * * */
|
---|
799 | /* ************************************************************************** */
|
---|
800 |
|
---|
801 | /* see _setcb_ */
|
---|
802 | #ifndef MNG_INTERNAL_MEMMNGMT
|
---|
803 | MNG_EXT mng_memalloc MNG_DECL mng_getcb_memalloc (mng_handle hHandle);
|
---|
804 | MNG_EXT mng_memfree MNG_DECL mng_getcb_memfree (mng_handle hHandle);
|
---|
805 | #endif
|
---|
806 |
|
---|
807 | /* see _setcb_ */
|
---|
808 | #ifdef MNG_SUPPORT_READ
|
---|
809 | MNG_EXT mng_releasedata MNG_DECL mng_getcb_releasedata (mng_handle hHandle);
|
---|
810 | #endif
|
---|
811 |
|
---|
812 | /* see _setcb_ */
|
---|
813 | #if defined(MNG_SUPPORT_READ) || defined(MNG_WRITE_SUPPORT)
|
---|
814 | #ifndef MNG_NO_OPEN_CLOSE_STREAM
|
---|
815 | MNG_EXT mng_openstream MNG_DECL mng_getcb_openstream (mng_handle hHandle);
|
---|
816 | MNG_EXT mng_closestream MNG_DECL mng_getcb_closestream (mng_handle hHandle);
|
---|
817 | #endif
|
---|
818 | #endif
|
---|
819 |
|
---|
820 | /* see _setcb_ */
|
---|
821 | #ifdef MNG_SUPPORT_READ
|
---|
822 | MNG_EXT mng_readdata MNG_DECL mng_getcb_readdata (mng_handle hHandle);
|
---|
823 | #endif
|
---|
824 |
|
---|
825 | /* see _setcb_ */
|
---|
826 | #ifdef MNG_SUPPORT_WRITE
|
---|
827 | MNG_EXT mng_writedata MNG_DECL mng_getcb_writedata (mng_handle hHandle);
|
---|
828 | #endif
|
---|
829 |
|
---|
830 | /* see _setcb_ */
|
---|
831 | MNG_EXT mng_errorproc MNG_DECL mng_getcb_errorproc (mng_handle hHandle);
|
---|
832 |
|
---|
833 | /* see _setcb_ */
|
---|
834 | #ifdef MNG_SUPPORT_TRACE
|
---|
835 | MNG_EXT mng_traceproc MNG_DECL mng_getcb_traceproc (mng_handle hHandle);
|
---|
836 | #endif
|
---|
837 |
|
---|
838 | /* see _setcb_ */
|
---|
839 | #ifdef MNG_SUPPORT_READ
|
---|
840 | MNG_EXT mng_processheader MNG_DECL mng_getcb_processheader (mng_handle hHandle);
|
---|
841 | MNG_EXT mng_processtext MNG_DECL mng_getcb_processtext (mng_handle hHandle);
|
---|
842 | MNG_EXT mng_processsave MNG_DECL mng_getcb_processsave (mng_handle hHandle);
|
---|
843 | MNG_EXT mng_processseek MNG_DECL mng_getcb_processseek (mng_handle hHandle);
|
---|
844 | MNG_EXT mng_processneed MNG_DECL mng_getcb_processneed (mng_handle hHandle);
|
---|
845 | MNG_EXT mng_processunknown MNG_DECL mng_getcb_processunknown (mng_handle hHandle);
|
---|
846 | MNG_EXT mng_processterm MNG_DECL mng_getcb_processterm (mng_handle hHandle);
|
---|
847 | #endif
|
---|
848 |
|
---|
849 | /* see _setcb_ */
|
---|
850 | #ifdef MNG_SUPPORT_DISPLAY
|
---|
851 | MNG_EXT mng_getcanvasline MNG_DECL mng_getcb_getcanvasline (mng_handle hHandle);
|
---|
852 | MNG_EXT mng_getbkgdline MNG_DECL mng_getcb_getbkgdline (mng_handle hHandle);
|
---|
853 | MNG_EXT mng_getalphaline MNG_DECL mng_getcb_getalphaline (mng_handle hHandle);
|
---|
854 | MNG_EXT mng_refresh MNG_DECL mng_getcb_refresh (mng_handle hHandle);
|
---|
855 |
|
---|
856 | /* see _setcb_ */
|
---|
857 | MNG_EXT mng_gettickcount MNG_DECL mng_getcb_gettickcount (mng_handle hHandle);
|
---|
858 | MNG_EXT mng_settimer MNG_DECL mng_getcb_settimer (mng_handle hHandle);
|
---|
859 |
|
---|
860 | /* see _setcb_ */
|
---|
861 | #ifdef MNG_APP_CMS
|
---|
862 | MNG_EXT mng_processgamma MNG_DECL mng_getcb_processgamma (mng_handle hHandle);
|
---|
863 | MNG_EXT mng_processchroma MNG_DECL mng_getcb_processchroma (mng_handle hHandle);
|
---|
864 | MNG_EXT mng_processsrgb MNG_DECL mng_getcb_processsrgb (mng_handle hHandle);
|
---|
865 | MNG_EXT mng_processiccp MNG_DECL mng_getcb_processiccp (mng_handle hHandle);
|
---|
866 | MNG_EXT mng_processarow MNG_DECL mng_getcb_processarow (mng_handle hHandle);
|
---|
867 | #endif /* MNG_APP_CMS */
|
---|
868 | #endif /* MNG_SUPPORT_DISPLAY */
|
---|
869 |
|
---|
870 | /* ************************************************************************** */
|
---|
871 | /* * * */
|
---|
872 | /* * Property set functions * */
|
---|
873 | /* * * */
|
---|
874 | /* ************************************************************************** */
|
---|
875 |
|
---|
876 | /* Application data pointer */
|
---|
877 | /* provided for application use; not used by the library */
|
---|
878 | MNG_EXT mng_retcode MNG_DECL mng_set_userdata (mng_handle hHandle,
|
---|
879 | mng_ptr pUserdata);
|
---|
880 |
|
---|
881 | /* The style of the drawing- & background-canvas */
|
---|
882 | /* only used for displaying images */
|
---|
883 | /* both are initially set to 24-bit RGB (eg. 8-bit per channel) */
|
---|
884 | MNG_EXT mng_retcode MNG_DECL mng_set_canvasstyle (mng_handle hHandle,
|
---|
885 | mng_uint32 iStyle);
|
---|
886 | MNG_EXT mng_retcode MNG_DECL mng_set_bkgdstyle (mng_handle hHandle,
|
---|
887 | mng_uint32 iStyle);
|
---|
888 |
|
---|
889 | /* The default background color */
|
---|
890 | /* only used if the getbkgdline callback is not defined */
|
---|
891 | /* for initially painting the canvas and restoring (part of) the background */
|
---|
892 | MNG_EXT mng_retcode MNG_DECL mng_set_bgcolor (mng_handle hHandle,
|
---|
893 | mng_uint16 iRed,
|
---|
894 | mng_uint16 iGreen,
|
---|
895 | mng_uint16 iBlue);
|
---|
896 |
|
---|
897 | /* Indicates preferred use of the bKGD chunk for PNG images */
|
---|
898 | MNG_EXT mng_retcode MNG_DECL mng_set_usebkgd (mng_handle hHandle,
|
---|
899 | mng_bool bUseBKGD);
|
---|
900 |
|
---|
901 | /* Indicates storage of read chunks */
|
---|
902 | /* only useful if you #define mng_store_chunks */
|
---|
903 | /* can be used to dynamically change storage management */
|
---|
904 | MNG_EXT mng_retcode MNG_DECL mng_set_storechunks (mng_handle hHandle,
|
---|
905 | mng_bool bStorechunks);
|
---|
906 |
|
---|
907 | /* Indicates breaks requested when processing SAVE/SEEK */
|
---|
908 | /* set this to let the app handle section breaks; the library will return
|
---|
909 | MNG_NEEDSECTIONWAIT return-codes for each SEEK chunk */
|
---|
910 | MNG_EXT mng_retcode MNG_DECL mng_set_sectionbreaks (mng_handle hHandle,
|
---|
911 | mng_bool bSectionbreaks);
|
---|
912 |
|
---|
913 | /* Indicates storage of playback info (ON by default!) */
|
---|
914 | /* can be used to turn off caching of playback info; this is useful to
|
---|
915 | specifically optimize MNG-video playback; note that if caching is turned off
|
---|
916 | LOOP chunks will be flagged as errors! TERM chunks will be ignored and only
|
---|
917 | passed to the processterm() callback if it is defined by the app; also, this
|
---|
918 | feature can only be used with mng_readdisplay(); mng_read(),
|
---|
919 | mng_display_reset() and mng_display_goxxxx() will return an error;
|
---|
920 | once this option is turned off it can't be turned on for the same stream!!! */
|
---|
921 | MNG_EXT mng_retcode MNG_DECL mng_set_cacheplayback (mng_handle hHandle,
|
---|
922 | mng_bool bCacheplayback);
|
---|
923 |
|
---|
924 | /* Indicates automatic progressive refreshes for large images (ON by default!) */
|
---|
925 | /* turn this off if you do not want intermittent painting while a large image
|
---|
926 | is being read. useful if the input-stream comes from a fast medium, such
|
---|
927 | as a local harddisk */
|
---|
928 | MNG_EXT mng_retcode MNG_DECL mng_set_doprogressive (mng_handle hHandle,
|
---|
929 | mng_bool bDoProgressive);
|
---|
930 |
|
---|
931 | /* Indicates existence and required checking of the CRC in input streams,
|
---|
932 | and generation in output streams */
|
---|
933 | /* !!!! Use this ONLY if you know what you are doing !!!! */
|
---|
934 | /* The value is a combination of the following flags:
|
---|
935 | 0x0000001 = CRC is present in the input stream
|
---|
936 | 0x0000002 = CRC must be generated in the output stream
|
---|
937 | 0x0000010 = CRC should be checked for ancillary chunks
|
---|
938 | 0x0000020 = a faulty CRC for ancillary chunks generates a warning only
|
---|
939 | 0x0000040 = a faulty CRC for ancillary chunks generates an error
|
---|
940 | 0x0000100 = CRC should be checked for critical chunks
|
---|
941 | 0x0000200 = a faulty CRC for critical chunks generates a warning only
|
---|
942 | 0x0000400 = a faulty CRC for critical chunks generates an error
|
---|
943 |
|
---|
944 | The default is 0x00000533 = CRC present in input streams; should be checked;
|
---|
945 | warning for ancillary chunks; error for critical
|
---|
946 | chunks; generate CRC for output streams
|
---|
947 |
|
---|
948 | Note that some combinations are meaningless; eg. if the CRC is not present
|
---|
949 | it won't do any good to turn the checking flags on; if a checking flag
|
---|
950 | is off, it doesn't do any good to ask for generation of warnings or errors.
|
---|
951 | Also libmng will generate either an error or a warning, not both,
|
---|
952 | so if you specify both the default will be to generate an error!
|
---|
953 | The only useful combinations for input are 331, 551, 351, 531, 0, 301, 501
|
---|
954 | and optionally 031 and 051, but only checking ancillary chunks and not
|
---|
955 | critical chunks is generally not a very good idea!!!
|
---|
956 | If you've also writing these values should be combined with 0x02 if
|
---|
957 | CRC's are required in the output stream
|
---|
958 | */
|
---|
959 | MNG_EXT mng_retcode MNG_DECL mng_set_crcmode (mng_handle hHandle,
|
---|
960 | mng_uint32 iCrcmode);
|
---|
961 |
|
---|
962 | /* Color-management necessaries */
|
---|
963 | /*
|
---|
964 | *************************************************************************
|
---|
965 | !!!!!!!! THIS NEXT BIT IS IMPORTANT !!!!!!!!!
|
---|
966 | *************************************************************************
|
---|
967 |
|
---|
968 | If you have defined MNG_FULL_CMS (and are using lcms), you will have to
|
---|
969 | think hard about the following routines.
|
---|
970 |
|
---|
971 | lcms requires 2 profiles to work off the differences in the input-image
|
---|
972 | and the output-device. The ICC profile for the input-image will be
|
---|
973 | embedded within it to reflect its color-characteristics, but the output
|
---|
974 | profile depends on the output-device, which is something only *YOU* know
|
---|
975 | about. sRGB (standard RGB) is common for x86 compatible environments
|
---|
976 | (eg. Windows, Linux and some others)
|
---|
977 |
|
---|
978 | If you are compiling for a sRGB compliant system you probably won't have
|
---|
979 | to do anything special. (unless you want to of course)
|
---|
980 |
|
---|
981 | If you are compiling for a non-sRGB compliant system
|
---|
982 | (eg. SGI, Mac, Next, others...)
|
---|
983 | you *MUST* define a proper ICC profile for the generic output-device
|
---|
984 | associated with that platform.
|
---|
985 |
|
---|
986 | In either event, you may also want to offer an option to your users to
|
---|
987 | set the profile manually, or, if you know how, set it from a
|
---|
988 | system-defined default.
|
---|
989 |
|
---|
990 | TO RECAP: for sRGB systems (Windows, Linux) no action required!
|
---|
991 | for non-sRGB systems (SGI, Mac, Next) ACTION REQUIRED!
|
---|
992 |
|
---|
993 | Please visit http://www.srgb.com, http://www.color.org and
|
---|
994 | http://www.littlecms.com for more info.
|
---|
995 |
|
---|
996 | *************************************************************************
|
---|
997 | !!!!!!!! THE BIT ABOVE IS IMPORTANT !!!!!!!!!
|
---|
998 | *************************************************************************
|
---|
999 | */
|
---|
1000 | /* mng_set_srgb tells libmng if it's running on a sRGB compliant system or not
|
---|
1001 | the default is already set to MNG_TRUE */
|
---|
1002 | /* mng_set_outputprofile, mng_set_outputprofile2, mng_set_outputsrgb
|
---|
1003 | are used to set the default profile describing the output-device
|
---|
1004 | by default it is already initialized with an sRGB profile */
|
---|
1005 | /* mng_set_srgbprofile, mng_set_srgbprofile2, mng_set_srgbimplicit
|
---|
1006 | are used to set the default profile describing a standard sRGB device
|
---|
1007 | this is used when the input-image is tagged only as being sRGB, but the
|
---|
1008 | output-device is defined as not being sRGB compliant
|
---|
1009 | by default it is already initialized with a standard sRGB profile */
|
---|
1010 | #if defined(MNG_SUPPORT_DISPLAY)
|
---|
1011 | MNG_EXT mng_retcode MNG_DECL mng_set_srgb (mng_handle hHandle,
|
---|
1012 | mng_bool bIssRGB);
|
---|
1013 | MNG_EXT mng_retcode MNG_DECL mng_set_outputprofile (mng_handle hHandle,
|
---|
1014 | mng_pchar zFilename);
|
---|
1015 | MNG_EXT mng_retcode MNG_DECL mng_set_outputprofile2 (mng_handle hHandle,
|
---|
1016 | mng_uint32 iProfilesize,
|
---|
1017 | mng_ptr pProfile);
|
---|
1018 | MNG_EXT mng_retcode MNG_DECL mng_set_outputsrgb (mng_handle hHandle);
|
---|
1019 | MNG_EXT mng_retcode MNG_DECL mng_set_srgbprofile (mng_handle hHandle,
|
---|
1020 | mng_pchar zFilename);
|
---|
1021 | MNG_EXT mng_retcode MNG_DECL mng_set_srgbprofile2 (mng_handle hHandle,
|
---|
1022 | mng_uint32 iProfilesize,
|
---|
1023 | mng_ptr pProfile);
|
---|
1024 | MNG_EXT mng_retcode MNG_DECL mng_set_srgbimplicit (mng_handle hHandle);
|
---|
1025 | #endif
|
---|
1026 |
|
---|
1027 | #if defined(MNG_FULL_CMS) || defined(MNG_GAMMA_ONLY) || defined(MNG_APP_CMS)
|
---|
1028 | /* Gamma settings */
|
---|
1029 | /* ... blabla (explain gamma processing a little; eg. formula & stuff) ... */
|
---|
1030 | MNG_EXT mng_retcode MNG_DECL mng_set_viewgamma (mng_handle hHandle,
|
---|
1031 | mng_float dGamma);
|
---|
1032 | MNG_EXT mng_retcode MNG_DECL mng_set_displaygamma (mng_handle hHandle,
|
---|
1033 | mng_float dGamma);
|
---|
1034 | MNG_EXT mng_retcode MNG_DECL mng_set_dfltimggamma (mng_handle hHandle,
|
---|
1035 | mng_float dGamma);
|
---|
1036 | MNG_EXT mng_retcode MNG_DECL mng_set_viewgammaint (mng_handle hHandle,
|
---|
1037 | mng_uint32 iGamma);
|
---|
1038 | MNG_EXT mng_retcode MNG_DECL mng_set_displaygammaint (mng_handle hHandle,
|
---|
1039 | mng_uint32 iGamma);
|
---|
1040 | MNG_EXT mng_retcode MNG_DECL mng_set_dfltimggammaint (mng_handle hHandle,
|
---|
1041 | mng_uint32 iGamma);
|
---|
1042 | #endif
|
---|
1043 |
|
---|
1044 | #ifndef MNG_SKIP_MAXCANVAS
|
---|
1045 | /* Ultimate clipping size */
|
---|
1046 | /* used to limit extreme graphics from overloading the system */
|
---|
1047 | /* if a graphic exceeds these limits a warning is issued, which can
|
---|
1048 | be ignored by the app (using the errorproc callback). in that case
|
---|
1049 | the library will use these settings to clip the input graphic, and
|
---|
1050 | the app's canvas must account for this */
|
---|
1051 | MNG_EXT mng_retcode MNG_DECL mng_set_maxcanvaswidth (mng_handle hHandle,
|
---|
1052 | mng_uint32 iMaxwidth);
|
---|
1053 | MNG_EXT mng_retcode MNG_DECL mng_set_maxcanvasheight (mng_handle hHandle,
|
---|
1054 | mng_uint32 iMaxheight);
|
---|
1055 | MNG_EXT mng_retcode MNG_DECL mng_set_maxcanvassize (mng_handle hHandle,
|
---|
1056 | mng_uint32 iMaxwidth,
|
---|
1057 | mng_uint32 iMaxheight);
|
---|
1058 | #endif
|
---|
1059 |
|
---|
1060 | /* ZLIB default compression parameters */
|
---|
1061 | /* these are used when writing out chunks */
|
---|
1062 | /* they are also used when compressing PNG image-data or JNG alpha-data;
|
---|
1063 | in this case you can set them just before calling mng_putimgdata_ihdr */
|
---|
1064 | /* set to your liking; usually the defaults will suffice though! */
|
---|
1065 | /* check the documentation for ZLIB for details on these parameters */
|
---|
1066 | #ifdef MNG_INCLUDE_ZLIB
|
---|
1067 | MNG_EXT mng_retcode MNG_DECL mng_set_zlib_level (mng_handle hHandle,
|
---|
1068 | mng_int32 iZlevel);
|
---|
1069 | MNG_EXT mng_retcode MNG_DECL mng_set_zlib_method (mng_handle hHandle,
|
---|
1070 | mng_int32 iZmethod);
|
---|
1071 | MNG_EXT mng_retcode MNG_DECL mng_set_zlib_windowbits (mng_handle hHandle,
|
---|
1072 | mng_int32 iZwindowbits);
|
---|
1073 | MNG_EXT mng_retcode MNG_DECL mng_set_zlib_memlevel (mng_handle hHandle,
|
---|
1074 | mng_int32 iZmemlevel);
|
---|
1075 | MNG_EXT mng_retcode MNG_DECL mng_set_zlib_strategy (mng_handle hHandle,
|
---|
1076 | mng_int32 iZstrategy);
|
---|
1077 |
|
---|
1078 | MNG_EXT mng_retcode MNG_DECL mng_set_zlib_maxidat (mng_handle hHandle,
|
---|
1079 | mng_uint32 iMaxIDAT);
|
---|
1080 | #endif /* MNG_INCLUDE_ZLIB */
|
---|
1081 |
|
---|
1082 | /* JNG default compression parameters (based on IJG code) */
|
---|
1083 | /* these are used when compressing JNG image-data; so you can set them
|
---|
1084 | just before calling mng_putimgdata_jhdr */
|
---|
1085 | /* set to your liking; usually the defaults will suffice though! */
|
---|
1086 | /* check the documentation for IJGSRC6B for details on these parameters */
|
---|
1087 | #ifdef MNG_INCLUDE_JNG
|
---|
1088 | #ifdef MNG_INCLUDE_IJG6B
|
---|
1089 | MNG_EXT mng_retcode MNG_DECL mng_set_jpeg_dctmethod (mng_handle hHandle,
|
---|
1090 | mngjpeg_dctmethod eJPEGdctmethod);
|
---|
1091 | #endif
|
---|
1092 | MNG_EXT mng_retcode MNG_DECL mng_set_jpeg_quality (mng_handle hHandle,
|
---|
1093 | mng_int32 iJPEGquality);
|
---|
1094 | MNG_EXT mng_retcode MNG_DECL mng_set_jpeg_smoothing (mng_handle hHandle,
|
---|
1095 | mng_int32 iJPEGsmoothing);
|
---|
1096 | MNG_EXT mng_retcode MNG_DECL mng_set_jpeg_progressive(mng_handle hHandle,
|
---|
1097 | mng_bool bJPEGprogressive);
|
---|
1098 | MNG_EXT mng_retcode MNG_DECL mng_set_jpeg_optimized (mng_handle hHandle,
|
---|
1099 | mng_bool bJPEGoptimized);
|
---|
1100 |
|
---|
1101 | MNG_EXT mng_retcode MNG_DECL mng_set_jpeg_maxjdat (mng_handle hHandle,
|
---|
1102 | mng_uint32 iMaxJDAT);
|
---|
1103 | #endif /* MNG_INCLUDE_JNG */
|
---|
1104 |
|
---|
1105 | /* Suspension-mode setting */
|
---|
1106 | /* use this to activate the internal suspension-buffer to improve
|
---|
1107 | read-suspension processing */
|
---|
1108 | /* TODO: write-suspension ??? */
|
---|
1109 | #if defined(MNG_SUPPORT_READ)
|
---|
1110 | MNG_EXT mng_retcode MNG_DECL mng_set_suspensionmode (mng_handle hHandle,
|
---|
1111 | mng_bool bSuspensionmode);
|
---|
1112 | #endif
|
---|
1113 |
|
---|
1114 | /* Speed setting */
|
---|
1115 | /* use this to influence the display-speed of animations */
|
---|
1116 | #if defined(MNG_SUPPORT_DISPLAY)
|
---|
1117 | MNG_EXT mng_retcode MNG_DECL mng_set_speed (mng_handle hHandle,
|
---|
1118 | mng_speedtype iSpeed);
|
---|
1119 | #endif
|
---|
1120 |
|
---|
1121 | /* ************************************************************************** */
|
---|
1122 | /* * * */
|
---|
1123 | /* * Property get functions * */
|
---|
1124 | /* * * */
|
---|
1125 | /* ************************************************************************** */
|
---|
1126 |
|
---|
1127 | /* see _set_ */
|
---|
1128 | MNG_EXT mng_ptr MNG_DECL mng_get_userdata (mng_handle hHandle);
|
---|
1129 |
|
---|
1130 | /* Network Graphic header details */
|
---|
1131 | /* these get filled once the graphics header is processed,
|
---|
1132 | so they are available in the processheader callback; before that
|
---|
1133 | they are zeroed out and imagetype is set to it_unknown */
|
---|
1134 | /* this might be a good point for the app to initialize the drawing-canvas! */
|
---|
1135 | /* note that some fields are only set for the first(!) header-chunk:
|
---|
1136 | MNG/MHDR (imagetype = mng_it_mng) - ticks thru simplicity
|
---|
1137 | PNG/IHDR (imagetype = mng_it_png) - bitdepth thru interlace
|
---|
1138 | JNG/JHDR (imagetype = mng_it_jng) - bitdepth thru compression &
|
---|
1139 | interlace thru alphainterlace */
|
---|
1140 | MNG_EXT mng_imgtype MNG_DECL mng_get_sigtype (mng_handle hHandle);
|
---|
1141 | MNG_EXT mng_imgtype MNG_DECL mng_get_imagetype (mng_handle hHandle);
|
---|
1142 | MNG_EXT mng_uint32 MNG_DECL mng_get_imagewidth (mng_handle hHandle);
|
---|
1143 | MNG_EXT mng_uint32 MNG_DECL mng_get_imageheight (mng_handle hHandle);
|
---|
1144 |
|
---|
1145 | MNG_EXT mng_uint32 MNG_DECL mng_get_ticks (mng_handle hHandle);
|
---|
1146 | MNG_EXT mng_uint32 MNG_DECL mng_get_framecount (mng_handle hHandle);
|
---|
1147 | MNG_EXT mng_uint32 MNG_DECL mng_get_layercount (mng_handle hHandle);
|
---|
1148 | MNG_EXT mng_uint32 MNG_DECL mng_get_playtime (mng_handle hHandle);
|
---|
1149 | MNG_EXT mng_uint32 MNG_DECL mng_get_simplicity (mng_handle hHandle);
|
---|
1150 |
|
---|
1151 | MNG_EXT mng_uint8 MNG_DECL mng_get_bitdepth (mng_handle hHandle);
|
---|
1152 | MNG_EXT mng_uint8 MNG_DECL mng_get_colortype (mng_handle hHandle);
|
---|
1153 | MNG_EXT mng_uint8 MNG_DECL mng_get_compression (mng_handle hHandle);
|
---|
1154 | MNG_EXT mng_uint8 MNG_DECL mng_get_filter (mng_handle hHandle);
|
---|
1155 | MNG_EXT mng_uint8 MNG_DECL mng_get_interlace (mng_handle hHandle);
|
---|
1156 | MNG_EXT mng_uint8 MNG_DECL mng_get_alphabitdepth (mng_handle hHandle);
|
---|
1157 | MNG_EXT mng_uint8 MNG_DECL mng_get_alphacompression(mng_handle hHandle);
|
---|
1158 | MNG_EXT mng_uint8 MNG_DECL mng_get_alphafilter (mng_handle hHandle);
|
---|
1159 | MNG_EXT mng_uint8 MNG_DECL mng_get_alphainterlace (mng_handle hHandle);
|
---|
1160 |
|
---|
1161 | /* indicates the predicted alpha-depth required to properly display the image */
|
---|
1162 | /* gets set once the graphics header is processed and is available in the
|
---|
1163 | processheader callback for any type of input-image (PNG, JNG or MNG) */
|
---|
1164 | /* possible values are 0,1,2,4,8,16
|
---|
1165 | 0 = no transparency required
|
---|
1166 | 1 = on/off transparency required (alpha-values are 0 or 2^bit_depth-1)
|
---|
1167 | 2+ = semi-transparency required (values will be scaled to the bitdepth of the
|
---|
1168 | canvasstyle supplied by the application) */
|
---|
1169 | MNG_EXT mng_uint8 MNG_DECL mng_get_alphadepth (mng_handle hHandle);
|
---|
1170 |
|
---|
1171 | /* defines whether a refresh() callback is called for an interlace pass (PNG)
|
---|
1172 | or progressive scan (JNG) */
|
---|
1173 | /* returns the interlace pass number for PNG or a fabricated pass number for JNG;
|
---|
1174 | returns 0 in all other cases */
|
---|
1175 | /* only useful if the image_type = mng_it_png or mng_it_jng and if the image
|
---|
1176 | is actually interlaced (PNG) or progressive (JNG) */
|
---|
1177 | #ifdef MNG_SUPPORT_DISPLAY
|
---|
1178 | MNG_EXT mng_uint8 MNG_DECL mng_get_refreshpass (mng_handle hHandle);
|
---|
1179 | #endif
|
---|
1180 |
|
---|
1181 | /* see _set_ */
|
---|
1182 | MNG_EXT mng_uint32 MNG_DECL mng_get_canvasstyle (mng_handle hHandle);
|
---|
1183 | MNG_EXT mng_uint32 MNG_DECL mng_get_bkgdstyle (mng_handle hHandle);
|
---|
1184 |
|
---|
1185 | /* see _set_ */
|
---|
1186 | MNG_EXT mng_retcode MNG_DECL mng_get_bgcolor (mng_handle hHandle,
|
---|
1187 | mng_uint16* iRed,
|
---|
1188 | mng_uint16* iGreen,
|
---|
1189 | mng_uint16* iBlue);
|
---|
1190 |
|
---|
1191 | /* see _set_ */
|
---|
1192 | MNG_EXT mng_bool MNG_DECL mng_get_usebkgd (mng_handle hHandle);
|
---|
1193 |
|
---|
1194 | /* see _set_ */
|
---|
1195 | MNG_EXT mng_bool MNG_DECL mng_get_storechunks (mng_handle hHandle);
|
---|
1196 |
|
---|
1197 | /* see _set_ */
|
---|
1198 | MNG_EXT mng_bool MNG_DECL mng_get_sectionbreaks (mng_handle hHandle);
|
---|
1199 |
|
---|
1200 | /* see _set_ */
|
---|
1201 | MNG_EXT mng_bool MNG_DECL mng_get_cacheplayback (mng_handle hHandle);
|
---|
1202 |
|
---|
1203 | /* see _set_ */
|
---|
1204 | MNG_EXT mng_bool MNG_DECL mng_get_doprogressive (mng_handle hHandle);
|
---|
1205 |
|
---|
1206 | /* see _set_ */
|
---|
1207 | MNG_EXT mng_uint32 MNG_DECL mng_get_crcmode (mng_handle hHandle);
|
---|
1208 |
|
---|
1209 | /* see _set_ */
|
---|
1210 | #if defined(MNG_SUPPORT_DISPLAY) && defined(MNG_FULL_CMS)
|
---|
1211 | MNG_EXT mng_bool MNG_DECL mng_get_srgb (mng_handle hHandle);
|
---|
1212 | #endif
|
---|
1213 |
|
---|
1214 | /* see _set_ */
|
---|
1215 | MNG_EXT mng_float MNG_DECL mng_get_viewgamma (mng_handle hHandle);
|
---|
1216 | MNG_EXT mng_float MNG_DECL mng_get_displaygamma (mng_handle hHandle);
|
---|
1217 | MNG_EXT mng_float MNG_DECL mng_get_dfltimggamma (mng_handle hHandle);
|
---|
1218 | MNG_EXT mng_uint32 MNG_DECL mng_get_viewgammaint (mng_handle hHandle);
|
---|
1219 | MNG_EXT mng_uint32 MNG_DECL mng_get_displaygammaint (mng_handle hHandle);
|
---|
1220 | MNG_EXT mng_uint32 MNG_DECL mng_get_dfltimggammaint (mng_handle hHandle);
|
---|
1221 |
|
---|
1222 | #ifndef MNG_SKIP_MAXCANVAS
|
---|
1223 | /* see _set_ */
|
---|
1224 | MNG_EXT mng_uint32 MNG_DECL mng_get_maxcanvaswidth (mng_handle hHandle);
|
---|
1225 | MNG_EXT mng_uint32 MNG_DECL mng_get_maxcanvasheight (mng_handle hHandle);
|
---|
1226 | #endif
|
---|
1227 |
|
---|
1228 | /* see _set_ */
|
---|
1229 | #ifdef MNG_INCLUDE_ZLIB
|
---|
1230 | MNG_EXT mng_int32 MNG_DECL mng_get_zlib_level (mng_handle hHandle);
|
---|
1231 | MNG_EXT mng_int32 MNG_DECL mng_get_zlib_method (mng_handle hHandle);
|
---|
1232 | MNG_EXT mng_int32 MNG_DECL mng_get_zlib_windowbits (mng_handle hHandle);
|
---|
1233 | MNG_EXT mng_int32 MNG_DECL mng_get_zlib_memlevel (mng_handle hHandle);
|
---|
1234 | MNG_EXT mng_int32 MNG_DECL mng_get_zlib_strategy (mng_handle hHandle);
|
---|
1235 |
|
---|
1236 | MNG_EXT mng_uint32 MNG_DECL mng_get_zlib_maxidat (mng_handle hHandle);
|
---|
1237 | #endif /* MNG_INCLUDE_ZLIB */
|
---|
1238 |
|
---|
1239 | /* see _set_ */
|
---|
1240 | #ifdef MNG_INCLUDE_JNG
|
---|
1241 | #ifdef MNG_INCLUDE_IJG6B
|
---|
1242 | MNG_EXT mngjpeg_dctmethod
|
---|
1243 | MNG_DECL mng_get_jpeg_dctmethod (mng_handle hHandle);
|
---|
1244 | #endif
|
---|
1245 | MNG_EXT mng_int32 MNG_DECL mng_get_jpeg_quality (mng_handle hHandle);
|
---|
1246 | MNG_EXT mng_int32 MNG_DECL mng_get_jpeg_smoothing (mng_handle hHandle);
|
---|
1247 | MNG_EXT mng_bool MNG_DECL mng_get_jpeg_progressive(mng_handle hHandle);
|
---|
1248 | MNG_EXT mng_bool MNG_DECL mng_get_jpeg_optimized (mng_handle hHandle);
|
---|
1249 |
|
---|
1250 | MNG_EXT mng_uint32 MNG_DECL mng_get_jpeg_maxjdat (mng_handle hHandle);
|
---|
1251 | #endif /* MNG_INCLUDE_JNG */
|
---|
1252 |
|
---|
1253 | /* see _set_ */
|
---|
1254 | #if defined(MNG_SUPPORT_READ)
|
---|
1255 | MNG_EXT mng_bool MNG_DECL mng_get_suspensionmode (mng_handle hHandle);
|
---|
1256 | #endif
|
---|
1257 |
|
---|
1258 | /* see _set_ */
|
---|
1259 | #if defined(MNG_SUPPORT_DISPLAY)
|
---|
1260 | MNG_EXT mng_speedtype
|
---|
1261 | MNG_DECL mng_get_speed (mng_handle hHandle);
|
---|
1262 | #endif
|
---|
1263 |
|
---|
1264 | /* Image-level */
|
---|
1265 | /* this can be used inside the processtext callback to determine the level of
|
---|
1266 | text of the image being processed; the value 1 is returned for top-level
|
---|
1267 | texts, and the value 2 for a text inside an embedded image inside a MNG */
|
---|
1268 | MNG_EXT mng_uint32 MNG_DECL mng_get_imagelevel (mng_handle hHandle);
|
---|
1269 |
|
---|
1270 | /* BACK info */
|
---|
1271 | /* can be used to retrieve the color & mandatory values for the last processed
|
---|
1272 | BACK chunk of a MNG (will fail for other image-types);
|
---|
1273 | if no BACK chunk was processed yet, it will return all zeroes */
|
---|
1274 | #ifdef MNG_SUPPORT_DISPLAY
|
---|
1275 | MNG_EXT mng_retcode MNG_DECL mng_get_lastbackchunk (mng_handle hHandle,
|
---|
1276 | mng_uint16* iRed,
|
---|
1277 | mng_uint16* iGreen,
|
---|
1278 | mng_uint16* iBlue,
|
---|
1279 | mng_uint8* iMandatory);
|
---|
1280 | #endif
|
---|
1281 |
|
---|
1282 | /* SEEK info */
|
---|
1283 | /* can be used to retrieve the segmentname of the last processed SEEK chunk;
|
---|
1284 | if no SEEK chunk was processed or its segmentname was empty, the function
|
---|
1285 | will return an empty string; the provided buffer must be at least 80 bytes!! */
|
---|
1286 | #ifdef MNG_SUPPORT_DISPLAY
|
---|
1287 | MNG_EXT mng_retcode MNG_DECL mng_get_lastseekname (mng_handle hHandle,
|
---|
1288 | mng_pchar zSegmentname);
|
---|
1289 | #endif
|
---|
1290 |
|
---|
1291 | /* FRAM info */
|
---|
1292 | /* can be used to retrieve the current FRAM delay; this may be useful when
|
---|
1293 | retrieving a stream of frames with their corresponding delays by "fake"
|
---|
1294 | reading and displaying the file */
|
---|
1295 | #ifdef MNG_SUPPORT_DISPLAY
|
---|
1296 | MNG_EXT mng_uint32 MNG_DECL mng_get_currframdelay (mng_handle hHandle);
|
---|
1297 | #endif
|
---|
1298 |
|
---|
1299 | /* Display status variables */
|
---|
1300 | /* these get filled & updated during display processing */
|
---|
1301 | /* starttime is the tickcount at the start of displaying the animation */
|
---|
1302 | /* runtime is the actual number of millisecs since the start of the animation */
|
---|
1303 | /* currentframe, currentlayer & currentplaytime indicate the current
|
---|
1304 | frame/layer/playtime(msecs) in the animation (these keep increasing;
|
---|
1305 | even after the animation loops back to the TERM chunk) */
|
---|
1306 | /* totalframes, totallayers & totalplaytime are filled after a complete run
|
---|
1307 | of an animation (eg. at MEND); they are also valid after just reading the MNG */
|
---|
1308 | #ifdef MNG_SUPPORT_DISPLAY
|
---|
1309 | MNG_EXT mng_uint32 MNG_DECL mng_get_starttime (mng_handle hHandle);
|
---|
1310 | MNG_EXT mng_uint32 MNG_DECL mng_get_runtime (mng_handle hHandle);
|
---|
1311 | #ifndef MNG_NO_CURRENT_INFO
|
---|
1312 | MNG_EXT mng_uint32 MNG_DECL mng_get_currentframe (mng_handle hHandle);
|
---|
1313 | MNG_EXT mng_uint32 MNG_DECL mng_get_currentlayer (mng_handle hHandle);
|
---|
1314 | MNG_EXT mng_uint32 MNG_DECL mng_get_currentplaytime (mng_handle hHandle);
|
---|
1315 | MNG_EXT mng_uint32 MNG_DECL mng_get_totalframes (mng_handle hHandle);
|
---|
1316 | MNG_EXT mng_uint32 MNG_DECL mng_get_totallayers (mng_handle hHandle);
|
---|
1317 | MNG_EXT mng_uint32 MNG_DECL mng_get_totalplaytime (mng_handle hHandle);
|
---|
1318 | #endif
|
---|
1319 | #endif
|
---|
1320 |
|
---|
1321 | /* Status variables */
|
---|
1322 | /* these indicate the internal state of the library */
|
---|
1323 | /* most indicate exactly what you would expect -
|
---|
1324 | status_error: true if the last function call returned an errorcode
|
---|
1325 | status_reading: true if the library is (still) reading an image
|
---|
1326 | status_suspendbreak: true if the library has suspended for "I/O"
|
---|
1327 | status_creating: true if the library is in the middle of creating an image
|
---|
1328 | status_writing: true if the library is in the middle of writing an image
|
---|
1329 | status_displaying: true if the library is displaying an image
|
---|
1330 | status_running: true if display processing is active (eg. not frozen or reset)
|
---|
1331 | status_timerbreak: true if the library has suspended for a "timer-break"
|
---|
1332 | status_dynamic: true if the library encountered an evNT chunk in the MNG
|
---|
1333 | status_runningevent: true if the library is processing an external event */
|
---|
1334 | /* eg. mng_readdisplay() will turn the reading, displaying and running status on;
|
---|
1335 | when EOF is reached the reading status will be turned off */
|
---|
1336 | MNG_EXT mng_bool MNG_DECL mng_status_error (mng_handle hHandle);
|
---|
1337 | #ifdef MNG_SUPPORT_READ
|
---|
1338 | MNG_EXT mng_bool MNG_DECL mng_status_reading (mng_handle hHandle);
|
---|
1339 | MNG_EXT mng_bool MNG_DECL mng_status_suspendbreak (mng_handle hHandle);
|
---|
1340 | #endif
|
---|
1341 | #ifdef MNG_SUPPORT_WRITE
|
---|
1342 | MNG_EXT mng_bool MNG_DECL mng_status_creating (mng_handle hHandle);
|
---|
1343 | MNG_EXT mng_bool MNG_DECL mng_status_writing (mng_handle hHandle);
|
---|
1344 | #endif
|
---|
1345 | #ifdef MNG_SUPPORT_DISPLAY
|
---|
1346 | MNG_EXT mng_bool MNG_DECL mng_status_displaying (mng_handle hHandle);
|
---|
1347 | MNG_EXT mng_bool MNG_DECL mng_status_running (mng_handle hHandle);
|
---|
1348 | MNG_EXT mng_bool MNG_DECL mng_status_timerbreak (mng_handle hHandle);
|
---|
1349 | #endif
|
---|
1350 | #ifdef MNG_SUPPORT_DYNAMICMNG
|
---|
1351 | MNG_EXT mng_bool MNG_DECL mng_status_dynamic (mng_handle hHandle);
|
---|
1352 | MNG_EXT mng_bool MNG_DECL mng_status_runningevent (mng_handle hHandle);
|
---|
1353 | #endif
|
---|
1354 |
|
---|
1355 | /* ************************************************************************** */
|
---|
1356 | /* * * */
|
---|
1357 | /* * Chunk access functions * */
|
---|
1358 | /* * * */
|
---|
1359 | /* ************************************************************************** */
|
---|
1360 |
|
---|
1361 | #ifdef MNG_ACCESS_CHUNKS
|
---|
1362 |
|
---|
1363 | /* ************************************************************************** */
|
---|
1364 |
|
---|
1365 | /* use this to iterate the stored chunks */
|
---|
1366 | /* requires MNG_ACCESS_CHUNKS & MNG_STORE_CHUNKS */
|
---|
1367 | /* starts from the supplied chunk-index-nr; the first chunk has index 0!! */
|
---|
1368 | MNG_EXT mng_retcode MNG_DECL mng_iterate_chunks (mng_handle hHandle,
|
---|
1369 | mng_uint32 iChunkseq,
|
---|
1370 | mng_iteratechunk fProc);
|
---|
1371 |
|
---|
1372 | /* use the next function inside your 'iteratechunk' callback to copy
|
---|
1373 | the given chunk to a new mng you are creating */
|
---|
1374 | /* the 'out' handle should be in 'create' status! */
|
---|
1375 | #ifdef MNG_SUPPORT_WRITE
|
---|
1376 | MNG_EXT mng_retcode MNG_DECL mng_copy_chunk (mng_handle hHandle,
|
---|
1377 | mng_handle hChunk,
|
---|
1378 | mng_handle hHandleOut);
|
---|
1379 | #endif
|
---|
1380 |
|
---|
1381 | /* ************************************************************************** */
|
---|
1382 |
|
---|
1383 | /* use these to get chunk data from within the callback in iterate_chunks */
|
---|
1384 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_ihdr (mng_handle hHandle,
|
---|
1385 | mng_handle hChunk,
|
---|
1386 | mng_uint32 *iWidth,
|
---|
1387 | mng_uint32 *iHeight,
|
---|
1388 | mng_uint8 *iBitdepth,
|
---|
1389 | mng_uint8 *iColortype,
|
---|
1390 | mng_uint8 *iCompression,
|
---|
1391 | mng_uint8 *iFilter,
|
---|
1392 | mng_uint8 *iInterlace);
|
---|
1393 |
|
---|
1394 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_plte (mng_handle hHandle,
|
---|
1395 | mng_handle hChunk,
|
---|
1396 | mng_uint32 *iCount,
|
---|
1397 | mng_palette8 *aPalette);
|
---|
1398 |
|
---|
1399 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_idat (mng_handle hHandle,
|
---|
1400 | mng_handle hChunk,
|
---|
1401 | mng_uint32 *iRawlen,
|
---|
1402 | mng_ptr *pRawdata);
|
---|
1403 |
|
---|
1404 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_trns (mng_handle hHandle,
|
---|
1405 | mng_handle hChunk,
|
---|
1406 | mng_bool *bEmpty,
|
---|
1407 | mng_bool *bGlobal,
|
---|
1408 | mng_uint8 *iType,
|
---|
1409 | mng_uint32 *iCount,
|
---|
1410 | mng_uint8arr *aAlphas,
|
---|
1411 | mng_uint16 *iGray,
|
---|
1412 | mng_uint16 *iRed,
|
---|
1413 | mng_uint16 *iGreen,
|
---|
1414 | mng_uint16 *iBlue,
|
---|
1415 | mng_uint32 *iRawlen,
|
---|
1416 | mng_uint8arr *aRawdata);
|
---|
1417 |
|
---|
1418 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_gama (mng_handle hHandle,
|
---|
1419 | mng_handle hChunk,
|
---|
1420 | mng_bool *bEmpty,
|
---|
1421 | mng_uint32 *iGamma);
|
---|
1422 |
|
---|
1423 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_chrm (mng_handle hHandle,
|
---|
1424 | mng_handle hChunk,
|
---|
1425 | mng_bool *bEmpty,
|
---|
1426 | mng_uint32 *iWhitepointx,
|
---|
1427 | mng_uint32 *iWhitepointy,
|
---|
1428 | mng_uint32 *iRedx,
|
---|
1429 | mng_uint32 *iRedy,
|
---|
1430 | mng_uint32 *iGreenx,
|
---|
1431 | mng_uint32 *iGreeny,
|
---|
1432 | mng_uint32 *iBluex,
|
---|
1433 | mng_uint32 *iBluey);
|
---|
1434 |
|
---|
1435 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_srgb (mng_handle hHandle,
|
---|
1436 | mng_handle hChunk,
|
---|
1437 | mng_bool *bEmpty,
|
---|
1438 | mng_uint8 *iRenderingintent);
|
---|
1439 |
|
---|
1440 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_iccp (mng_handle hHandle,
|
---|
1441 | mng_handle hChunk,
|
---|
1442 | mng_bool *bEmpty,
|
---|
1443 | mng_uint32 *iNamesize,
|
---|
1444 | mng_pchar *zName,
|
---|
1445 | mng_uint8 *iCompression,
|
---|
1446 | mng_uint32 *iProfilesize,
|
---|
1447 | mng_ptr *pProfile);
|
---|
1448 |
|
---|
1449 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_text (mng_handle hHandle,
|
---|
1450 | mng_handle hChunk,
|
---|
1451 | mng_uint32 *iKeywordsize,
|
---|
1452 | mng_pchar *zKeyword,
|
---|
1453 | mng_uint32 *iTextsize,
|
---|
1454 | mng_pchar *zText);
|
---|
1455 |
|
---|
1456 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_ztxt (mng_handle hHandle,
|
---|
1457 | mng_handle hChunk,
|
---|
1458 | mng_uint32 *iKeywordsize,
|
---|
1459 | mng_pchar *zKeyword,
|
---|
1460 | mng_uint8 *iCompression,
|
---|
1461 | mng_uint32 *iTextsize,
|
---|
1462 | mng_pchar *zText);
|
---|
1463 |
|
---|
1464 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_itxt (mng_handle hHandle,
|
---|
1465 | mng_handle hChunk,
|
---|
1466 | mng_uint32 *iKeywordsize,
|
---|
1467 | mng_pchar *zKeyword,
|
---|
1468 | mng_uint8 *iCompressionflag,
|
---|
1469 | mng_uint8 *iCompressionmethod,
|
---|
1470 | mng_uint32 *iLanguagesize,
|
---|
1471 | mng_pchar *zLanguage,
|
---|
1472 | mng_uint32 *iTranslationsize,
|
---|
1473 | mng_pchar *zTranslation,
|
---|
1474 | mng_uint32 *iTextsize,
|
---|
1475 | mng_pchar *zText);
|
---|
1476 |
|
---|
1477 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_bkgd (mng_handle hHandle,
|
---|
1478 | mng_handle hChunk,
|
---|
1479 | mng_bool *bEmpty,
|
---|
1480 | mng_uint8 *iType,
|
---|
1481 | mng_uint8 *iIndex,
|
---|
1482 | mng_uint16 *iGray,
|
---|
1483 | mng_uint16 *iRed,
|
---|
1484 | mng_uint16 *iGreen,
|
---|
1485 | mng_uint16 *iBlue);
|
---|
1486 |
|
---|
1487 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_phys (mng_handle hHandle,
|
---|
1488 | mng_handle hChunk,
|
---|
1489 | mng_bool *bEmpty,
|
---|
1490 | mng_uint32 *iSizex,
|
---|
1491 | mng_uint32 *iSizey,
|
---|
1492 | mng_uint8 *iUnit);
|
---|
1493 |
|
---|
1494 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_sbit (mng_handle hHandle,
|
---|
1495 | mng_handle hChunk,
|
---|
1496 | mng_bool *bEmpty,
|
---|
1497 | mng_uint8 *iType,
|
---|
1498 | mng_uint8arr4 *aBits);
|
---|
1499 |
|
---|
1500 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_splt (mng_handle hHandle,
|
---|
1501 | mng_handle hChunk,
|
---|
1502 | mng_bool *bEmpty,
|
---|
1503 | mng_uint32 *iNamesize,
|
---|
1504 | mng_pchar *zName,
|
---|
1505 | mng_uint8 *iSampledepth,
|
---|
1506 | mng_uint32 *iEntrycount,
|
---|
1507 | mng_ptr *pEntries);
|
---|
1508 |
|
---|
1509 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_hist (mng_handle hHandle,
|
---|
1510 | mng_handle hChunk,
|
---|
1511 | mng_uint32 *iEntrycount,
|
---|
1512 | mng_uint16arr *aEntries);
|
---|
1513 |
|
---|
1514 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_time (mng_handle hHandle,
|
---|
1515 | mng_handle hChunk,
|
---|
1516 | mng_uint16 *iYear,
|
---|
1517 | mng_uint8 *iMonth,
|
---|
1518 | mng_uint8 *iDay,
|
---|
1519 | mng_uint8 *iHour,
|
---|
1520 | mng_uint8 *iMinute,
|
---|
1521 | mng_uint8 *iSecond);
|
---|
1522 |
|
---|
1523 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_mhdr (mng_handle hHandle,
|
---|
1524 | mng_handle hChunk,
|
---|
1525 | mng_uint32 *iWidth,
|
---|
1526 | mng_uint32 *iHeight,
|
---|
1527 | mng_uint32 *iTicks,
|
---|
1528 | mng_uint32 *iLayercount,
|
---|
1529 | mng_uint32 *iFramecount,
|
---|
1530 | mng_uint32 *iPlaytime,
|
---|
1531 | mng_uint32 *iSimplicity);
|
---|
1532 |
|
---|
1533 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_loop (mng_handle hHandle,
|
---|
1534 | mng_handle hChunk,
|
---|
1535 | mng_uint8 *iLevel,
|
---|
1536 | mng_uint32 *iRepeat,
|
---|
1537 | mng_uint8 *iTermination,
|
---|
1538 | mng_uint32 *iItermin,
|
---|
1539 | mng_uint32 *iItermax,
|
---|
1540 | mng_uint32 *iCount,
|
---|
1541 | mng_uint32p *pSignals);
|
---|
1542 |
|
---|
1543 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_endl (mng_handle hHandle,
|
---|
1544 | mng_handle hChunk,
|
---|
1545 | mng_uint8 *iLevel);
|
---|
1546 |
|
---|
1547 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_defi (mng_handle hHandle,
|
---|
1548 | mng_handle hChunk,
|
---|
1549 | mng_uint16 *iObjectid,
|
---|
1550 | mng_uint8 *iDonotshow,
|
---|
1551 | mng_uint8 *iConcrete,
|
---|
1552 | mng_bool *bHasloca,
|
---|
1553 | mng_int32 *iXlocation,
|
---|
1554 | mng_int32 *iYlocation,
|
---|
1555 | mng_bool *bHasclip,
|
---|
1556 | mng_int32 *iLeftcb,
|
---|
1557 | mng_int32 *iRightcb,
|
---|
1558 | mng_int32 *iTopcb,
|
---|
1559 | mng_int32 *iBottomcb);
|
---|
1560 |
|
---|
1561 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_basi (mng_handle hHandle,
|
---|
1562 | mng_handle hChunk,
|
---|
1563 | mng_uint32 *iWidth,
|
---|
1564 | mng_uint32 *iHeight,
|
---|
1565 | mng_uint8 *iBitdepth,
|
---|
1566 | mng_uint8 *iColortype,
|
---|
1567 | mng_uint8 *iCompression,
|
---|
1568 | mng_uint8 *iFilter,
|
---|
1569 | mng_uint8 *iInterlace,
|
---|
1570 | mng_uint16 *iRed,
|
---|
1571 | mng_uint16 *iGreen,
|
---|
1572 | mng_uint16 *iBlue,
|
---|
1573 | mng_uint16 *iAlpha,
|
---|
1574 | mng_uint8 *iViewable);
|
---|
1575 |
|
---|
1576 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_clon (mng_handle hHandle,
|
---|
1577 | mng_handle hChunk,
|
---|
1578 | mng_uint16 *iSourceid,
|
---|
1579 | mng_uint16 *iCloneid,
|
---|
1580 | mng_uint8 *iClonetype,
|
---|
1581 | mng_uint8 *iDonotshow,
|
---|
1582 | mng_uint8 *iConcrete,
|
---|
1583 | mng_bool *bHasloca,
|
---|
1584 | mng_uint8 *iLocationtype,
|
---|
1585 | mng_int32 *iLocationx,
|
---|
1586 | mng_int32 *iLocationy);
|
---|
1587 |
|
---|
1588 | #ifndef MNG_SKIPCHUNK_PAST
|
---|
1589 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_past (mng_handle hHandle,
|
---|
1590 | mng_handle hChunk,
|
---|
1591 | mng_uint16 *iDestid,
|
---|
1592 | mng_uint8 *iTargettype,
|
---|
1593 | mng_int32 *iTargetx,
|
---|
1594 | mng_int32 *iTargety,
|
---|
1595 | mng_uint32 *iCount);
|
---|
1596 |
|
---|
1597 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_past_src (mng_handle hHandle,
|
---|
1598 | mng_handle hChunk,
|
---|
1599 | mng_uint32 iEntry,
|
---|
1600 | mng_uint16 *iSourceid,
|
---|
1601 | mng_uint8 *iComposition,
|
---|
1602 | mng_uint8 *iOrientation,
|
---|
1603 | mng_uint8 *iOffsettype,
|
---|
1604 | mng_int32 *iOffsetx,
|
---|
1605 | mng_int32 *iOffsety,
|
---|
1606 | mng_uint8 *iBoundarytype,
|
---|
1607 | mng_int32 *iBoundaryl,
|
---|
1608 | mng_int32 *iBoundaryr,
|
---|
1609 | mng_int32 *iBoundaryt,
|
---|
1610 | mng_int32 *iBoundaryb);
|
---|
1611 | #endif
|
---|
1612 |
|
---|
1613 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_disc (mng_handle hHandle,
|
---|
1614 | mng_handle hChunk,
|
---|
1615 | mng_uint32 *iCount,
|
---|
1616 | mng_uint16p *pObjectids);
|
---|
1617 |
|
---|
1618 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_back (mng_handle hHandle,
|
---|
1619 | mng_handle hChunk,
|
---|
1620 | mng_uint16 *iRed,
|
---|
1621 | mng_uint16 *iGreen,
|
---|
1622 | mng_uint16 *iBlue,
|
---|
1623 | mng_uint8 *iMandatory,
|
---|
1624 | mng_uint16 *iImageid,
|
---|
1625 | mng_uint8 *iTile);
|
---|
1626 |
|
---|
1627 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_fram (mng_handle hHandle,
|
---|
1628 | mng_handle hChunk,
|
---|
1629 | mng_bool *bEmpty,
|
---|
1630 | mng_uint8 *iMode,
|
---|
1631 | mng_uint32 *iNamesize,
|
---|
1632 | mng_pchar *zName,
|
---|
1633 | mng_uint8 *iChangedelay,
|
---|
1634 | mng_uint8 *iChangetimeout,
|
---|
1635 | mng_uint8 *iChangeclipping,
|
---|
1636 | mng_uint8 *iChangesyncid,
|
---|
1637 | mng_uint32 *iDelay,
|
---|
1638 | mng_uint32 *iTimeout,
|
---|
1639 | mng_uint8 *iBoundarytype,
|
---|
1640 | mng_int32 *iBoundaryl,
|
---|
1641 | mng_int32 *iBoundaryr,
|
---|
1642 | mng_int32 *iBoundaryt,
|
---|
1643 | mng_int32 *iBoundaryb,
|
---|
1644 | mng_uint32 *iCount,
|
---|
1645 | mng_uint32p *pSyncids);
|
---|
1646 |
|
---|
1647 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_move (mng_handle hHandle,
|
---|
1648 | mng_handle hChunk,
|
---|
1649 | mng_uint16 *iFirstid,
|
---|
1650 | mng_uint16 *iLastid,
|
---|
1651 | mng_uint8 *iMovetype,
|
---|
1652 | mng_int32 *iMovex,
|
---|
1653 | mng_int32 *iMovey);
|
---|
1654 |
|
---|
1655 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_clip (mng_handle hHandle,
|
---|
1656 | mng_handle hChunk,
|
---|
1657 | mng_uint16 *iFirstid,
|
---|
1658 | mng_uint16 *iLastid,
|
---|
1659 | mng_uint8 *iCliptype,
|
---|
1660 | mng_int32 *iClipl,
|
---|
1661 | mng_int32 *iClipr,
|
---|
1662 | mng_int32 *iClipt,
|
---|
1663 | mng_int32 *iClipb);
|
---|
1664 |
|
---|
1665 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_show (mng_handle hHandle,
|
---|
1666 | mng_handle hChunk,
|
---|
1667 | mng_bool *bEmpty,
|
---|
1668 | mng_uint16 *iFirstid,
|
---|
1669 | mng_uint16 *iLastid,
|
---|
1670 | mng_uint8 *iMode);
|
---|
1671 |
|
---|
1672 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_term (mng_handle hHandle,
|
---|
1673 | mng_handle hChunk,
|
---|
1674 | mng_uint8 *iTermaction,
|
---|
1675 | mng_uint8 *iIteraction,
|
---|
1676 | mng_uint32 *iDelay,
|
---|
1677 | mng_uint32 *iItermax);
|
---|
1678 |
|
---|
1679 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_save (mng_handle hHandle,
|
---|
1680 | mng_handle hChunk,
|
---|
1681 | mng_bool *bEmpty,
|
---|
1682 | mng_uint8 *iOffsettype,
|
---|
1683 | mng_uint32 *iCount);
|
---|
1684 |
|
---|
1685 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_save_entry (mng_handle hHandle,
|
---|
1686 | mng_handle hChunk,
|
---|
1687 | mng_uint32 iEntry,
|
---|
1688 | mng_uint8 *iEntrytype,
|
---|
1689 | mng_uint32arr2 *iOffset,
|
---|
1690 | mng_uint32arr2 *iStarttime,
|
---|
1691 | mng_uint32 *iLayernr,
|
---|
1692 | mng_uint32 *iFramenr,
|
---|
1693 | mng_uint32 *iNamesize,
|
---|
1694 | mng_pchar *zName);
|
---|
1695 |
|
---|
1696 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_seek (mng_handle hHandle,
|
---|
1697 | mng_handle hChunk,
|
---|
1698 | mng_uint32 *iNamesize,
|
---|
1699 | mng_pchar *zName);
|
---|
1700 |
|
---|
1701 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_expi (mng_handle hHandle,
|
---|
1702 | mng_handle hChunk,
|
---|
1703 | mng_uint16 *iSnapshotid,
|
---|
1704 | mng_uint32 *iNamesize,
|
---|
1705 | mng_pchar *zName);
|
---|
1706 |
|
---|
1707 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_fpri (mng_handle hHandle,
|
---|
1708 | mng_handle hChunk,
|
---|
1709 | mng_uint8 *iDeltatype,
|
---|
1710 | mng_uint8 *iPriority);
|
---|
1711 |
|
---|
1712 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_need (mng_handle hHandle,
|
---|
1713 | mng_handle hChunk,
|
---|
1714 | mng_uint32 *iKeywordssize,
|
---|
1715 | mng_pchar *zKeywords);
|
---|
1716 |
|
---|
1717 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_phyg (mng_handle hHandle,
|
---|
1718 | mng_handle hChunk,
|
---|
1719 | mng_bool *bEmpty,
|
---|
1720 | mng_uint32 *iSizex,
|
---|
1721 | mng_uint32 *iSizey,
|
---|
1722 | mng_uint8 *iUnit);
|
---|
1723 |
|
---|
1724 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_jhdr (mng_handle hHandle,
|
---|
1725 | mng_handle hChunk,
|
---|
1726 | mng_uint32 *iWidth,
|
---|
1727 | mng_uint32 *iHeight,
|
---|
1728 | mng_uint8 *iColortype,
|
---|
1729 | mng_uint8 *iImagesampledepth,
|
---|
1730 | mng_uint8 *iImagecompression,
|
---|
1731 | mng_uint8 *iImageinterlace,
|
---|
1732 | mng_uint8 *iAlphasampledepth,
|
---|
1733 | mng_uint8 *iAlphacompression,
|
---|
1734 | mng_uint8 *iAlphafilter,
|
---|
1735 | mng_uint8 *iAlphainterlace);
|
---|
1736 |
|
---|
1737 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_jdat (mng_handle hHandle,
|
---|
1738 | mng_handle hChunk,
|
---|
1739 | mng_uint32 *iRawlen,
|
---|
1740 | mng_ptr *pRawdata);
|
---|
1741 |
|
---|
1742 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_jdaa (mng_handle hHandle,
|
---|
1743 | mng_handle hChunk,
|
---|
1744 | mng_uint32 *iRawlen,
|
---|
1745 | mng_ptr *pRawdata);
|
---|
1746 |
|
---|
1747 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_dhdr (mng_handle hHandle,
|
---|
1748 | mng_handle hChunk,
|
---|
1749 | mng_uint16 *iObjectid,
|
---|
1750 | mng_uint8 *iImagetype,
|
---|
1751 | mng_uint8 *iDeltatype,
|
---|
1752 | mng_uint32 *iBlockwidth,
|
---|
1753 | mng_uint32 *iBlockheight,
|
---|
1754 | mng_uint32 *iBlockx,
|
---|
1755 | mng_uint32 *iBlocky);
|
---|
1756 |
|
---|
1757 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_prom (mng_handle hHandle,
|
---|
1758 | mng_handle hChunk,
|
---|
1759 | mng_uint8 *iColortype,
|
---|
1760 | mng_uint8 *iSampledepth,
|
---|
1761 | mng_uint8 *iFilltype);
|
---|
1762 |
|
---|
1763 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_pplt (mng_handle hHandle,
|
---|
1764 | mng_handle hChunk,
|
---|
1765 | mng_uint8 *iDeltatype,
|
---|
1766 | mng_uint32 *iCount);
|
---|
1767 |
|
---|
1768 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_pplt_entry (mng_handle hHandle,
|
---|
1769 | mng_handle hChunk,
|
---|
1770 | mng_uint32 iEntry,
|
---|
1771 | mng_uint16 *iRed,
|
---|
1772 | mng_uint16 *iGreen,
|
---|
1773 | mng_uint16 *iBlue,
|
---|
1774 | mng_uint16 *iAlpha,
|
---|
1775 | mng_bool *bUsed);
|
---|
1776 |
|
---|
1777 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_drop (mng_handle hHandle,
|
---|
1778 | mng_handle hChunk,
|
---|
1779 | mng_uint32 *iCount,
|
---|
1780 | mng_chunkidp *pChunknames);
|
---|
1781 |
|
---|
1782 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_dbyk (mng_handle hHandle,
|
---|
1783 | mng_handle hChunk,
|
---|
1784 | mng_chunkid *iChunkname,
|
---|
1785 | mng_uint8 *iPolarity,
|
---|
1786 | mng_uint32 *iKeywordssize,
|
---|
1787 | mng_pchar *zKeywords);
|
---|
1788 |
|
---|
1789 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_ordr (mng_handle hHandle,
|
---|
1790 | mng_handle hChunk,
|
---|
1791 | mng_uint32 *iCount);
|
---|
1792 |
|
---|
1793 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_ordr_entry (mng_handle hHandle,
|
---|
1794 | mng_handle hChunk,
|
---|
1795 | mng_uint32 iEntry,
|
---|
1796 | mng_chunkid *iChunkname,
|
---|
1797 | mng_uint8 *iOrdertype);
|
---|
1798 |
|
---|
1799 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_magn (mng_handle hHandle,
|
---|
1800 | mng_handle hChunk,
|
---|
1801 | mng_uint16 *iFirstid,
|
---|
1802 | mng_uint16 *iLastid,
|
---|
1803 | mng_uint16 *iMethodX,
|
---|
1804 | mng_uint16 *iMX,
|
---|
1805 | mng_uint16 *iMY,
|
---|
1806 | mng_uint16 *iML,
|
---|
1807 | mng_uint16 *iMR,
|
---|
1808 | mng_uint16 *iMT,
|
---|
1809 | mng_uint16 *iMB,
|
---|
1810 | mng_uint16 *iMethodY);
|
---|
1811 |
|
---|
1812 | #ifdef MNG_INCLUDE_MPNG_PROPOSAL
|
---|
1813 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_mpng (mng_handle hHandle,
|
---|
1814 | mng_handle hChunk,
|
---|
1815 | mng_uint32 *iFramewidth,
|
---|
1816 | mng_uint32 *iFrameheight,
|
---|
1817 | mng_uint16 *iNumplays,
|
---|
1818 | mng_uint16 *iTickspersec,
|
---|
1819 | mng_uint8 *iCompressionmethod,
|
---|
1820 | mng_uint32 *iCount);
|
---|
1821 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_mpng_frame (mng_handle hHandle,
|
---|
1822 | mng_handle hChunk,
|
---|
1823 | mng_uint32 iEntry,
|
---|
1824 | mng_uint32 *iX,
|
---|
1825 | mng_uint32 *iY,
|
---|
1826 | mng_uint32 *iWidth,
|
---|
1827 | mng_uint32 *iHeight,
|
---|
1828 | mng_int32 *iXoffset,
|
---|
1829 | mng_int32 *iYoffset,
|
---|
1830 | mng_uint16 *iTicks);
|
---|
1831 | #endif
|
---|
1832 |
|
---|
1833 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_evnt (mng_handle hHandle,
|
---|
1834 | mng_handle hChunk,
|
---|
1835 | mng_uint32 *iCount);
|
---|
1836 |
|
---|
1837 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_evnt_entry (mng_handle hHandle,
|
---|
1838 | mng_handle hChunk,
|
---|
1839 | mng_uint32 iEntry,
|
---|
1840 | mng_uint8 *iEventtype,
|
---|
1841 | mng_uint8 *iMasktype,
|
---|
1842 | mng_int32 *iLeft,
|
---|
1843 | mng_int32 *iRight,
|
---|
1844 | mng_int32 *iTop,
|
---|
1845 | mng_int32 *iBottom,
|
---|
1846 | mng_uint16 *iObjectid,
|
---|
1847 | mng_uint8 *iIndex,
|
---|
1848 | mng_uint32 *iSegmentnamesize,
|
---|
1849 | mng_pchar *zSegmentname);
|
---|
1850 |
|
---|
1851 | MNG_EXT mng_retcode MNG_DECL mng_getchunk_unknown (mng_handle hHandle,
|
---|
1852 | mng_handle hChunk,
|
---|
1853 | mng_chunkid *iChunkname,
|
---|
1854 | mng_uint32 *iRawlen,
|
---|
1855 | mng_ptr *pRawdata);
|
---|
1856 |
|
---|
1857 | /* ************************************************************************** */
|
---|
1858 |
|
---|
1859 | #ifdef MNG_INCLUDE_WRITE_PROCS
|
---|
1860 |
|
---|
1861 | /* use these to create new chunks at the end of the chunk-list */
|
---|
1862 | /* requires at least MNG_ACCESS_CHUNKS (MNG_SUPPORT_WRITE may be nice too) */
|
---|
1863 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_ihdr (mng_handle hHandle,
|
---|
1864 | mng_uint32 iWidth,
|
---|
1865 | mng_uint32 iHeight,
|
---|
1866 | mng_uint8 iBitdepth,
|
---|
1867 | mng_uint8 iColortype,
|
---|
1868 | mng_uint8 iCompression,
|
---|
1869 | mng_uint8 iFilter,
|
---|
1870 | mng_uint8 iInterlace);
|
---|
1871 |
|
---|
1872 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_plte (mng_handle hHandle,
|
---|
1873 | mng_uint32 iCount,
|
---|
1874 | mng_palette8 aPalette);
|
---|
1875 |
|
---|
1876 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_idat (mng_handle hHandle,
|
---|
1877 | mng_uint32 iRawlen,
|
---|
1878 | mng_ptr pRawdata);
|
---|
1879 |
|
---|
1880 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_iend (mng_handle hHandle);
|
---|
1881 |
|
---|
1882 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_trns (mng_handle hHandle,
|
---|
1883 | mng_bool bEmpty,
|
---|
1884 | mng_bool bGlobal,
|
---|
1885 | mng_uint8 iType,
|
---|
1886 | mng_uint32 iCount,
|
---|
1887 | mng_uint8arr aAlphas,
|
---|
1888 | mng_uint16 iGray,
|
---|
1889 | mng_uint16 iRed,
|
---|
1890 | mng_uint16 iGreen,
|
---|
1891 | mng_uint16 iBlue,
|
---|
1892 | mng_uint32 iRawlen,
|
---|
1893 | mng_uint8arr aRawdata);
|
---|
1894 |
|
---|
1895 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_gama (mng_handle hHandle,
|
---|
1896 | mng_bool bEmpty,
|
---|
1897 | mng_uint32 iGamma);
|
---|
1898 |
|
---|
1899 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_chrm (mng_handle hHandle,
|
---|
1900 | mng_bool bEmpty,
|
---|
1901 | mng_uint32 iWhitepointx,
|
---|
1902 | mng_uint32 iWhitepointy,
|
---|
1903 | mng_uint32 iRedx,
|
---|
1904 | mng_uint32 iRedy,
|
---|
1905 | mng_uint32 iGreenx,
|
---|
1906 | mng_uint32 iGreeny,
|
---|
1907 | mng_uint32 iBluex,
|
---|
1908 | mng_uint32 iBluey);
|
---|
1909 |
|
---|
1910 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_srgb (mng_handle hHandle,
|
---|
1911 | mng_bool bEmpty,
|
---|
1912 | mng_uint8 iRenderingintent);
|
---|
1913 |
|
---|
1914 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_iccp (mng_handle hHandle,
|
---|
1915 | mng_bool bEmpty,
|
---|
1916 | mng_uint32 iNamesize,
|
---|
1917 | mng_pchar zName,
|
---|
1918 | mng_uint8 iCompression,
|
---|
1919 | mng_uint32 iProfilesize,
|
---|
1920 | mng_ptr pProfile);
|
---|
1921 |
|
---|
1922 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_text (mng_handle hHandle,
|
---|
1923 | mng_uint32 iKeywordsize,
|
---|
1924 | mng_pchar zKeyword,
|
---|
1925 | mng_uint32 iTextsize,
|
---|
1926 | mng_pchar zText);
|
---|
1927 |
|
---|
1928 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_ztxt (mng_handle hHandle,
|
---|
1929 | mng_uint32 iKeywordsize,
|
---|
1930 | mng_pchar zKeyword,
|
---|
1931 | mng_uint8 iCompression,
|
---|
1932 | mng_uint32 iTextsize,
|
---|
1933 | mng_pchar zText);
|
---|
1934 |
|
---|
1935 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_itxt (mng_handle hHandle,
|
---|
1936 | mng_uint32 iKeywordsize,
|
---|
1937 | mng_pchar zKeyword,
|
---|
1938 | mng_uint8 iCompressionflag,
|
---|
1939 | mng_uint8 iCompressionmethod,
|
---|
1940 | mng_uint32 iLanguagesize,
|
---|
1941 | mng_pchar zLanguage,
|
---|
1942 | mng_uint32 iTranslationsize,
|
---|
1943 | mng_pchar zTranslation,
|
---|
1944 | mng_uint32 iTextsize,
|
---|
1945 | mng_pchar zText);
|
---|
1946 |
|
---|
1947 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_bkgd (mng_handle hHandle,
|
---|
1948 | mng_bool bEmpty,
|
---|
1949 | mng_uint8 iType,
|
---|
1950 | mng_uint8 iIndex,
|
---|
1951 | mng_uint16 iGray,
|
---|
1952 | mng_uint16 iRed,
|
---|
1953 | mng_uint16 iGreen,
|
---|
1954 | mng_uint16 iBlue);
|
---|
1955 |
|
---|
1956 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_phys (mng_handle hHandle,
|
---|
1957 | mng_bool bEmpty,
|
---|
1958 | mng_uint32 iSizex,
|
---|
1959 | mng_uint32 iSizey,
|
---|
1960 | mng_uint8 iUnit);
|
---|
1961 |
|
---|
1962 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_sbit (mng_handle hHandle,
|
---|
1963 | mng_bool bEmpty,
|
---|
1964 | mng_uint8 iType,
|
---|
1965 | mng_uint8arr4 aBits);
|
---|
1966 |
|
---|
1967 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_splt (mng_handle hHandle,
|
---|
1968 | mng_bool bEmpty,
|
---|
1969 | mng_uint32 iNamesize,
|
---|
1970 | mng_pchar zName,
|
---|
1971 | mng_uint8 iSampledepth,
|
---|
1972 | mng_uint32 iEntrycount,
|
---|
1973 | mng_ptr pEntries);
|
---|
1974 |
|
---|
1975 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_hist (mng_handle hHandle,
|
---|
1976 | mng_uint32 iEntrycount,
|
---|
1977 | mng_uint16arr aEntries);
|
---|
1978 |
|
---|
1979 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_time (mng_handle hHandle,
|
---|
1980 | mng_uint16 iYear,
|
---|
1981 | mng_uint8 iMonth,
|
---|
1982 | mng_uint8 iDay,
|
---|
1983 | mng_uint8 iHour,
|
---|
1984 | mng_uint8 iMinute,
|
---|
1985 | mng_uint8 iSecond);
|
---|
1986 |
|
---|
1987 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_mhdr (mng_handle hHandle,
|
---|
1988 | mng_uint32 iWidth,
|
---|
1989 | mng_uint32 iHeight,
|
---|
1990 | mng_uint32 iTicks,
|
---|
1991 | mng_uint32 iLayercount,
|
---|
1992 | mng_uint32 iFramecount,
|
---|
1993 | mng_uint32 iPlaytime,
|
---|
1994 | mng_uint32 iSimplicity);
|
---|
1995 |
|
---|
1996 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_mend (mng_handle hHandle);
|
---|
1997 |
|
---|
1998 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_loop (mng_handle hHandle,
|
---|
1999 | mng_uint8 iLevel,
|
---|
2000 | mng_uint32 iRepeat,
|
---|
2001 | mng_uint8 iTermination,
|
---|
2002 | mng_uint32 iItermin,
|
---|
2003 | mng_uint32 iItermax,
|
---|
2004 | mng_uint32 iCount,
|
---|
2005 | mng_uint32p pSignals);
|
---|
2006 |
|
---|
2007 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_endl (mng_handle hHandle,
|
---|
2008 | mng_uint8 iLevel);
|
---|
2009 |
|
---|
2010 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_defi (mng_handle hHandle,
|
---|
2011 | mng_uint16 iObjectid,
|
---|
2012 | mng_uint8 iDonotshow,
|
---|
2013 | mng_uint8 iConcrete,
|
---|
2014 | mng_bool bHasloca,
|
---|
2015 | mng_int32 iXlocation,
|
---|
2016 | mng_int32 iYlocation,
|
---|
2017 | mng_bool bHasclip,
|
---|
2018 | mng_int32 iLeftcb,
|
---|
2019 | mng_int32 iRightcb,
|
---|
2020 | mng_int32 iTopcb,
|
---|
2021 | mng_int32 iBottomcb);
|
---|
2022 |
|
---|
2023 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_basi (mng_handle hHandle,
|
---|
2024 | mng_uint32 iWidth,
|
---|
2025 | mng_uint32 iHeight,
|
---|
2026 | mng_uint8 iBitdepth,
|
---|
2027 | mng_uint8 iColortype,
|
---|
2028 | mng_uint8 iCompression,
|
---|
2029 | mng_uint8 iFilter,
|
---|
2030 | mng_uint8 iInterlace,
|
---|
2031 | mng_uint16 iRed,
|
---|
2032 | mng_uint16 iGreen,
|
---|
2033 | mng_uint16 iBlue,
|
---|
2034 | mng_uint16 iAlpha,
|
---|
2035 | mng_uint8 iViewable);
|
---|
2036 |
|
---|
2037 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_clon (mng_handle hHandle,
|
---|
2038 | mng_uint16 iSourceid,
|
---|
2039 | mng_uint16 iCloneid,
|
---|
2040 | mng_uint8 iClonetype,
|
---|
2041 | mng_uint8 iDonotshow,
|
---|
2042 | mng_uint8 iConcrete,
|
---|
2043 | mng_bool bHasloca,
|
---|
2044 | mng_uint8 iLocationtype,
|
---|
2045 | mng_int32 iLocationx,
|
---|
2046 | mng_int32 iLocationy);
|
---|
2047 |
|
---|
2048 | #ifndef MNG_SKIPCHUNK_PAST
|
---|
2049 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_past (mng_handle hHandle,
|
---|
2050 | mng_uint16 iDestid,
|
---|
2051 | mng_uint8 iTargettype,
|
---|
2052 | mng_int32 iTargetx,
|
---|
2053 | mng_int32 iTargety,
|
---|
2054 | mng_uint32 iCount);
|
---|
2055 |
|
---|
2056 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_past_src (mng_handle hHandle,
|
---|
2057 | mng_uint32 iEntry,
|
---|
2058 | mng_uint16 iSourceid,
|
---|
2059 | mng_uint8 iComposition,
|
---|
2060 | mng_uint8 iOrientation,
|
---|
2061 | mng_uint8 iOffsettype,
|
---|
2062 | mng_int32 iOffsetx,
|
---|
2063 | mng_int32 iOffsety,
|
---|
2064 | mng_uint8 iBoundarytype,
|
---|
2065 | mng_int32 iBoundaryl,
|
---|
2066 | mng_int32 iBoundaryr,
|
---|
2067 | mng_int32 iBoundaryt,
|
---|
2068 | mng_int32 iBoundaryb);
|
---|
2069 | #endif
|
---|
2070 |
|
---|
2071 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_disc (mng_handle hHandle,
|
---|
2072 | mng_uint32 iCount,
|
---|
2073 | mng_uint16p pObjectids);
|
---|
2074 |
|
---|
2075 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_back (mng_handle hHandle,
|
---|
2076 | mng_uint16 iRed,
|
---|
2077 | mng_uint16 iGreen,
|
---|
2078 | mng_uint16 iBlue,
|
---|
2079 | mng_uint8 iMandatory,
|
---|
2080 | mng_uint16 iImageid,
|
---|
2081 | mng_uint8 iTile);
|
---|
2082 |
|
---|
2083 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_fram (mng_handle hHandle,
|
---|
2084 | mng_bool bEmpty,
|
---|
2085 | mng_uint8 iMode,
|
---|
2086 | mng_uint32 iNamesize,
|
---|
2087 | mng_pchar zName,
|
---|
2088 | mng_uint8 iChangedelay,
|
---|
2089 | mng_uint8 iChangetimeout,
|
---|
2090 | mng_uint8 iChangeclipping,
|
---|
2091 | mng_uint8 iChangesyncid,
|
---|
2092 | mng_uint32 iDelay,
|
---|
2093 | mng_uint32 iTimeout,
|
---|
2094 | mng_uint8 iBoundarytype,
|
---|
2095 | mng_int32 iBoundaryl,
|
---|
2096 | mng_int32 iBoundaryr,
|
---|
2097 | mng_int32 iBoundaryt,
|
---|
2098 | mng_int32 iBoundaryb,
|
---|
2099 | mng_uint32 iCount,
|
---|
2100 | mng_uint32p pSyncids);
|
---|
2101 |
|
---|
2102 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_move (mng_handle hHandle,
|
---|
2103 | mng_uint16 iFirstid,
|
---|
2104 | mng_uint16 iLastid,
|
---|
2105 | mng_uint8 iMovetype,
|
---|
2106 | mng_int32 iMovex,
|
---|
2107 | mng_int32 iMovey);
|
---|
2108 |
|
---|
2109 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_clip (mng_handle hHandle,
|
---|
2110 | mng_uint16 iFirstid,
|
---|
2111 | mng_uint16 iLastid,
|
---|
2112 | mng_uint8 iCliptype,
|
---|
2113 | mng_int32 iClipl,
|
---|
2114 | mng_int32 iClipr,
|
---|
2115 | mng_int32 iClipt,
|
---|
2116 | mng_int32 iClipb);
|
---|
2117 |
|
---|
2118 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_show (mng_handle hHandle,
|
---|
2119 | mng_bool bEmpty,
|
---|
2120 | mng_uint16 iFirstid,
|
---|
2121 | mng_uint16 iLastid,
|
---|
2122 | mng_uint8 iMode);
|
---|
2123 |
|
---|
2124 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_term (mng_handle hHandle,
|
---|
2125 | mng_uint8 iTermaction,
|
---|
2126 | mng_uint8 iIteraction,
|
---|
2127 | mng_uint32 iDelay,
|
---|
2128 | mng_uint32 iItermax);
|
---|
2129 |
|
---|
2130 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_save (mng_handle hHandle,
|
---|
2131 | mng_bool bEmpty,
|
---|
2132 | mng_uint8 iOffsettype,
|
---|
2133 | mng_uint32 iCount);
|
---|
2134 |
|
---|
2135 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_save_entry (mng_handle hHandle,
|
---|
2136 | mng_uint32 iEntry,
|
---|
2137 | mng_uint8 iEntrytype,
|
---|
2138 | mng_uint32arr2 iOffset,
|
---|
2139 | mng_uint32arr2 iStarttime,
|
---|
2140 | mng_uint32 iLayernr,
|
---|
2141 | mng_uint32 iFramenr,
|
---|
2142 | mng_uint32 iNamesize,
|
---|
2143 | mng_pchar zName);
|
---|
2144 |
|
---|
2145 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_seek (mng_handle hHandle,
|
---|
2146 | mng_uint32 iNamesize,
|
---|
2147 | mng_pchar zName);
|
---|
2148 |
|
---|
2149 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_expi (mng_handle hHandle,
|
---|
2150 | mng_uint16 iSnapshotid,
|
---|
2151 | mng_uint32 iNamesize,
|
---|
2152 | mng_pchar zName);
|
---|
2153 |
|
---|
2154 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_fpri (mng_handle hHandle,
|
---|
2155 | mng_uint8 iDeltatype,
|
---|
2156 | mng_uint8 iPriority);
|
---|
2157 |
|
---|
2158 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_need (mng_handle hHandle,
|
---|
2159 | mng_uint32 iKeywordssize,
|
---|
2160 | mng_pchar zKeywords);
|
---|
2161 |
|
---|
2162 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_phyg (mng_handle hHandle,
|
---|
2163 | mng_bool bEmpty,
|
---|
2164 | mng_uint32 iSizex,
|
---|
2165 | mng_uint32 iSizey,
|
---|
2166 | mng_uint8 iUnit);
|
---|
2167 |
|
---|
2168 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_jhdr (mng_handle hHandle,
|
---|
2169 | mng_uint32 iWidth,
|
---|
2170 | mng_uint32 iHeight,
|
---|
2171 | mng_uint8 iColortype,
|
---|
2172 | mng_uint8 iImagesampledepth,
|
---|
2173 | mng_uint8 iImagecompression,
|
---|
2174 | mng_uint8 iImageinterlace,
|
---|
2175 | mng_uint8 iAlphasampledepth,
|
---|
2176 | mng_uint8 iAlphacompression,
|
---|
2177 | mng_uint8 iAlphafilter,
|
---|
2178 | mng_uint8 iAlphainterlace);
|
---|
2179 |
|
---|
2180 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_jdat (mng_handle hHandle,
|
---|
2181 | mng_uint32 iRawlen,
|
---|
2182 | mng_ptr pRawdata);
|
---|
2183 |
|
---|
2184 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_jdaa (mng_handle hHandle,
|
---|
2185 | mng_uint32 iRawlen,
|
---|
2186 | mng_ptr pRawdata);
|
---|
2187 |
|
---|
2188 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_jsep (mng_handle hHandle);
|
---|
2189 |
|
---|
2190 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_dhdr (mng_handle hHandle,
|
---|
2191 | mng_uint16 iObjectid,
|
---|
2192 | mng_uint8 iImagetype,
|
---|
2193 | mng_uint8 iDeltatype,
|
---|
2194 | mng_uint32 iBlockwidth,
|
---|
2195 | mng_uint32 iBlockheight,
|
---|
2196 | mng_uint32 iBlockx,
|
---|
2197 | mng_uint32 iBlocky);
|
---|
2198 |
|
---|
2199 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_prom (mng_handle hHandle,
|
---|
2200 | mng_uint8 iColortype,
|
---|
2201 | mng_uint8 iSampledepth,
|
---|
2202 | mng_uint8 iFilltype);
|
---|
2203 |
|
---|
2204 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_ipng (mng_handle hHandle);
|
---|
2205 |
|
---|
2206 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_pplt (mng_handle hHandle,
|
---|
2207 | mng_uint8 iDeltatype,
|
---|
2208 | mng_uint32 iCount);
|
---|
2209 |
|
---|
2210 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_pplt_entry (mng_handle hHandle,
|
---|
2211 | mng_uint32 iEntry,
|
---|
2212 | mng_uint16 iRed,
|
---|
2213 | mng_uint16 iGreen,
|
---|
2214 | mng_uint16 iBlue,
|
---|
2215 | mng_uint16 iAlpha);
|
---|
2216 |
|
---|
2217 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_jpng (mng_handle hHandle);
|
---|
2218 |
|
---|
2219 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_drop (mng_handle hHandle,
|
---|
2220 | mng_uint32 iCount,
|
---|
2221 | mng_chunkidp pChunknames);
|
---|
2222 |
|
---|
2223 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_dbyk (mng_handle hHandle,
|
---|
2224 | mng_chunkid iChunkname,
|
---|
2225 | mng_uint8 iPolarity,
|
---|
2226 | mng_uint32 iKeywordssize,
|
---|
2227 | mng_pchar zKeywords);
|
---|
2228 |
|
---|
2229 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_ordr (mng_handle hHandle,
|
---|
2230 | mng_uint32 iCount);
|
---|
2231 |
|
---|
2232 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_ordr_entry (mng_handle hHandle,
|
---|
2233 | mng_uint32 iEntry,
|
---|
2234 | mng_chunkid iChunkname,
|
---|
2235 | mng_uint8 iOrdertype);
|
---|
2236 |
|
---|
2237 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_magn (mng_handle hHandle,
|
---|
2238 | mng_uint16 iFirstid,
|
---|
2239 | mng_uint16 iLastid,
|
---|
2240 | mng_uint16 iMethodX,
|
---|
2241 | mng_uint16 iMX,
|
---|
2242 | mng_uint16 iMY,
|
---|
2243 | mng_uint16 iML,
|
---|
2244 | mng_uint16 iMR,
|
---|
2245 | mng_uint16 iMT,
|
---|
2246 | mng_uint16 iMB,
|
---|
2247 | mng_uint16 iMethodY);
|
---|
2248 |
|
---|
2249 | #ifdef MNG_INCLUDE_MPNG_PROPOSAL
|
---|
2250 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_mpng (mng_handle hHandle,
|
---|
2251 | mng_uint32 iFramewidth,
|
---|
2252 | mng_uint32 iFrameheight,
|
---|
2253 | mng_uint16 iNumplays,
|
---|
2254 | mng_uint16 iTickspersec,
|
---|
2255 | mng_uint8 iCompressionmethod,
|
---|
2256 | mng_uint32 iCount);
|
---|
2257 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_mpng_frame (mng_handle hHandle,
|
---|
2258 | mng_uint32 iEntry,
|
---|
2259 | mng_uint32 iX,
|
---|
2260 | mng_uint32 iY,
|
---|
2261 | mng_uint32 iWidth,
|
---|
2262 | mng_uint32 iHeight,
|
---|
2263 | mng_int32 iXoffset,
|
---|
2264 | mng_int32 iYoffset,
|
---|
2265 | mng_uint16 iTicks);
|
---|
2266 | #endif
|
---|
2267 |
|
---|
2268 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_evnt (mng_handle hHandle,
|
---|
2269 | mng_uint32 iCount);
|
---|
2270 |
|
---|
2271 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_evnt_entry (mng_handle hHandle,
|
---|
2272 | mng_uint32 iEntry,
|
---|
2273 | mng_uint8 iEventtype,
|
---|
2274 | mng_uint8 iMasktype,
|
---|
2275 | mng_int32 iLeft,
|
---|
2276 | mng_int32 iRight,
|
---|
2277 | mng_int32 iTop,
|
---|
2278 | mng_int32 iBottom,
|
---|
2279 | mng_uint16 iObjectid,
|
---|
2280 | mng_uint8 iIndex,
|
---|
2281 | mng_uint32 iSegmentnamesize,
|
---|
2282 | mng_pchar zSegmentname);
|
---|
2283 |
|
---|
2284 | MNG_EXT mng_retcode MNG_DECL mng_putchunk_unknown (mng_handle hHandle,
|
---|
2285 | mng_chunkid iChunkname,
|
---|
2286 | mng_uint32 iRawlen,
|
---|
2287 | mng_ptr pRawdata);
|
---|
2288 |
|
---|
2289 | #endif /* MNG_INCLUDE_WRITE_PROCS */
|
---|
2290 |
|
---|
2291 | /* ************************************************************************** */
|
---|
2292 |
|
---|
2293 | /* use these functions to access the actual image-data in stored chunks,
|
---|
2294 | as opposed to the IDAT/JDAT data */
|
---|
2295 | /* to get accurate pixel-data the canvasstyle should seriously reflect the
|
---|
2296 | bitdepth/colortype combination of the preceding IHDR/JHDR/BASI/DHDR;
|
---|
2297 | all input can be converted to rgb(a)8 (rgb(a)16 for 16-bit images), but
|
---|
2298 | there are only limited conversions back (see below for putimgdata) */
|
---|
2299 |
|
---|
2300 | /* call this function if you want to extract the nth image from the list;
|
---|
2301 | the first image is designated seqnr 0! */
|
---|
2302 | /* this function finds the IHDR/JHDR/BASI/DHDR with the appropriate seqnr,
|
---|
2303 | starting from the beginning of the chunk-list; this may tend to get a little
|
---|
2304 | slow for animations with a large number of chunks for images near the end */
|
---|
2305 | /* supplying a seqnr past the last image in the animation will return with
|
---|
2306 | an errorcode */
|
---|
2307 | MNG_EXT mng_retcode MNG_DECL mng_getimgdata_seq (mng_handle hHandle,
|
---|
2308 | mng_uint32 iSeqnr,
|
---|
2309 | mng_uint32 iCanvasstyle,
|
---|
2310 | mng_getcanvasline fGetcanvasline);
|
---|
2311 |
|
---|
2312 | /* both the following functions will search forward to find the first IDAT/JDAT,
|
---|
2313 | and then traverse back to find the start of the image (IHDR,JHDR,DHDR,BASI);
|
---|
2314 | note that this is very fast compared to decoding the IDAT/JDAT, so there's
|
---|
2315 | not really a need for optimization; either can be called from the
|
---|
2316 | iterate_chunks callback when a IHDR/JHDR is encountered; for BASI/DHDR there
|
---|
2317 | may not be real image-data so it's wisest to keep iterating till the IEND,
|
---|
2318 | and then call either of these functions if necessary (remember the correct seqnr!) */
|
---|
2319 |
|
---|
2320 | /* call this function if you want to extract the image starting at or after the nth
|
---|
2321 | position in the chunk-list; this number is returned in the iterate_chunks callback */
|
---|
2322 | MNG_EXT mng_retcode MNG_DECL mng_getimgdata_chunkseq (mng_handle hHandle,
|
---|
2323 | mng_uint32 iSeqnr,
|
---|
2324 | mng_uint32 iCanvasstyle,
|
---|
2325 | mng_getcanvasline fGetcanvasline);
|
---|
2326 |
|
---|
2327 | /* call this function if you want to extract the image starting at or after the
|
---|
2328 | indicated chunk; the handle of a chunk is returned in the iterate_chunks callback */
|
---|
2329 | MNG_EXT mng_retcode MNG_DECL mng_getimgdata_chunk (mng_handle hHandle,
|
---|
2330 | mng_handle hChunk,
|
---|
2331 | mng_uint32 iCanvasstyle,
|
---|
2332 | mng_getcanvasline fGetcanvasline);
|
---|
2333 |
|
---|
2334 | /* ************************************************************************** */
|
---|
2335 |
|
---|
2336 | #ifdef MNG_INCLUDE_WRITE_PROCS
|
---|
2337 |
|
---|
2338 | /* use the following functions to add image-data to the list of stored chunks */
|
---|
2339 | /* note that this only adds the IDAT or JDAT chunks and no others; you must call
|
---|
2340 | one of these functions after you 'put' the initial chunks of the image and
|
---|
2341 | before you 'put' the closing chunks */
|
---|
2342 | /* the canvasstyle should seriously reflect the bitdepth/colortype combination;
|
---|
2343 | eg. bitdepth=16 would expect a 16-bit canvasstyle,
|
---|
2344 | colortype=g or ga would expect a gray or gray+alpha style respectively
|
---|
2345 | and so on, and so forth ...
|
---|
2346 | (nb. the number of conversions will be extremely limited for the moment!) */
|
---|
2347 |
|
---|
2348 | MNG_EXT mng_retcode MNG_DECL mng_putimgdata_ihdr (mng_handle hHandle,
|
---|
2349 | mng_uint32 iWidth,
|
---|
2350 | mng_uint32 iHeight,
|
---|
2351 | mng_uint8 iColortype,
|
---|
2352 | mng_uint8 iBitdepth,
|
---|
2353 | mng_uint8 iCompression,
|
---|
2354 | mng_uint8 iFilter,
|
---|
2355 | mng_uint8 iInterlace,
|
---|
2356 | mng_uint32 iCanvasstyle,
|
---|
2357 | mng_getcanvasline fGetcanvasline);
|
---|
2358 |
|
---|
2359 | MNG_EXT mng_retcode MNG_DECL mng_putimgdata_jhdr (mng_handle hHandle,
|
---|
2360 | mng_uint32 iWidth,
|
---|
2361 | mng_uint32 iHeight,
|
---|
2362 | mng_uint8 iColortype,
|
---|
2363 | mng_uint8 iBitdepth,
|
---|
2364 | mng_uint8 iCompression,
|
---|
2365 | mng_uint8 iInterlace,
|
---|
2366 | mng_uint8 iAlphaBitdepth,
|
---|
2367 | mng_uint8 iAlphaCompression,
|
---|
2368 | mng_uint8 iAlphaFilter,
|
---|
2369 | mng_uint8 iAlphaInterlace,
|
---|
2370 | mng_uint32 iCanvasstyle,
|
---|
2371 | mng_getcanvasline fGetcanvasline);
|
---|
2372 |
|
---|
2373 | /* ************************************************************************** */
|
---|
2374 |
|
---|
2375 | /* use the following functions to set the framecount/layercount/playtime or
|
---|
2376 | simplicity of an animation you are creating; this may be useful if these
|
---|
2377 | variables are calculated during the creation-process */
|
---|
2378 |
|
---|
2379 | MNG_EXT mng_retcode MNG_DECL mng_updatemngheader (mng_handle hHandle,
|
---|
2380 | mng_uint32 iFramecount,
|
---|
2381 | mng_uint32 iLayercount,
|
---|
2382 | mng_uint32 iPlaytime);
|
---|
2383 |
|
---|
2384 | MNG_EXT mng_retcode MNG_DECL mng_updatemngsimplicity (mng_handle hHandle,
|
---|
2385 | mng_uint32 iSimplicity);
|
---|
2386 |
|
---|
2387 | /* ************************************************************************** */
|
---|
2388 |
|
---|
2389 | #endif /* MNG_INCLUDE_WRITE_PROCS */
|
---|
2390 |
|
---|
2391 | #endif /* MNG_ACCESS_CHUNKS */
|
---|
2392 |
|
---|
2393 | /* ************************************************************************** */
|
---|
2394 | /* * * */
|
---|
2395 | /* * Error-code structure * */
|
---|
2396 | /* * * */
|
---|
2397 | /* * 0b0000 00xx xxxx xxxx - basic errors; severity 9 (environment) * */
|
---|
2398 | /* * 0b0000 01xx xxxx xxxx - chunk errors; severity 9 (image induced) * */
|
---|
2399 | /* * 0b0000 10xx xxxx xxxx - severity 5 errors (application induced) * */
|
---|
2400 | /* * 0b0001 00xx xxxx xxxx - severity 2 warnings (recoverable) * */
|
---|
2401 | /* * 0b0010 00xx xxxx xxxx - severity 1 warnings (recoverable) * */
|
---|
2402 | /* * * */
|
---|
2403 | /* ************************************************************************** */
|
---|
2404 |
|
---|
2405 | #define MNG_NOERROR (mng_retcode)0 /* er.. indicates all's well */
|
---|
2406 |
|
---|
2407 | #define MNG_OUTOFMEMORY (mng_retcode)1 /* oops, buy some megabytes! */
|
---|
2408 | #define MNG_INVALIDHANDLE (mng_retcode)2 /* call mng_initialize first */
|
---|
2409 | #define MNG_NOCALLBACK (mng_retcode)3 /* set the callbacks please */
|
---|
2410 | #define MNG_UNEXPECTEDEOF (mng_retcode)4 /* what'd ya do with the data? */
|
---|
2411 | #define MNG_ZLIBERROR (mng_retcode)5 /* zlib burped */
|
---|
2412 | #define MNG_JPEGERROR (mng_retcode)6 /* jpglib complained */
|
---|
2413 | #define MNG_LCMSERROR (mng_retcode)7 /* little cms stressed out */
|
---|
2414 | #define MNG_NOOUTPUTPROFILE (mng_retcode)8 /* no output-profile defined */
|
---|
2415 | #define MNG_NOSRGBPROFILE (mng_retcode)9 /* no sRGB-profile defined */
|
---|
2416 | #define MNG_BUFOVERFLOW (mng_retcode)10 /* zlib output-buffer overflow */
|
---|
2417 | #define MNG_FUNCTIONINVALID (mng_retcode)11 /* ay, totally inappropriate */
|
---|
2418 | #define MNG_OUTPUTERROR (mng_retcode)12 /* disk full ? */
|
---|
2419 | #define MNG_JPEGBUFTOOSMALL (mng_retcode)13 /* can't handle buffer overflow*/
|
---|
2420 | #define MNG_NEEDMOREDATA (mng_retcode)14 /* I'm hungry, give me more */
|
---|
2421 | #define MNG_NEEDTIMERWAIT (mng_retcode)15 /* Sleep a while then wake me */
|
---|
2422 | #define MNG_NEEDSECTIONWAIT (mng_retcode)16 /* just processed a SEEK */
|
---|
2423 | #define MNG_LOOPWITHCACHEOFF (mng_retcode)17 /* LOOP when playback info off */
|
---|
2424 |
|
---|
2425 | #define MNG_DLLNOTLOADED (mng_retcode)99 /* late binding failed */
|
---|
2426 |
|
---|
2427 | #define MNG_APPIOERROR (mng_retcode)901 /* application I/O error */
|
---|
2428 | #define MNG_APPTIMERERROR (mng_retcode)902 /* application timing error */
|
---|
2429 | #define MNG_APPCMSERROR (mng_retcode)903 /* application CMS error */
|
---|
2430 | #define MNG_APPMISCERROR (mng_retcode)904 /* application other error */
|
---|
2431 | #define MNG_APPTRACEABORT (mng_retcode)905 /* application aborts on trace */
|
---|
2432 |
|
---|
2433 | #define MNG_INTERNALERROR (mng_retcode)999 /* internal inconsistancy */
|
---|
2434 |
|
---|
2435 | #define MNG_INVALIDSIG (mng_retcode)1025 /* invalid graphics file */
|
---|
2436 | #define MNG_INVALIDCRC (mng_retcode)1027 /* crc check failed */
|
---|
2437 | #define MNG_INVALIDLENGTH (mng_retcode)1028 /* chunklength mystifies me */
|
---|
2438 | #define MNG_SEQUENCEERROR (mng_retcode)1029 /* invalid chunk sequence */
|
---|
2439 | #define MNG_CHUNKNOTALLOWED (mng_retcode)1030 /* completely out-of-place */
|
---|
2440 | #define MNG_MULTIPLEERROR (mng_retcode)1031 /* only one occurence allowed */
|
---|
2441 | #define MNG_PLTEMISSING (mng_retcode)1032 /* indexed-color requires PLTE */
|
---|
2442 | #define MNG_IDATMISSING (mng_retcode)1033 /* IHDR-block requires IDAT */
|
---|
2443 | #define MNG_CANNOTBEEMPTY (mng_retcode)1034 /* must contain some data */
|
---|
2444 | #define MNG_GLOBALLENGTHERR (mng_retcode)1035 /* global data incorrect */
|
---|
2445 | #define MNG_INVALIDBITDEPTH (mng_retcode)1036 /* bitdepth out-of-range */
|
---|
2446 | #define MNG_INVALIDCOLORTYPE (mng_retcode)1037 /* colortype out-of-range */
|
---|
2447 | #define MNG_INVALIDCOMPRESS (mng_retcode)1038 /* compression method invalid */
|
---|
2448 | #define MNG_INVALIDFILTER (mng_retcode)1039 /* filter method invalid */
|
---|
2449 | #define MNG_INVALIDINTERLACE (mng_retcode)1040 /* interlace method invalid */
|
---|
2450 | #define MNG_NOTENOUGHIDAT (mng_retcode)1041 /* ran out of compressed data */
|
---|
2451 | #define MNG_PLTEINDEXERROR (mng_retcode)1042 /* palette-index out-of-range */
|
---|
2452 | #define MNG_NULLNOTFOUND (mng_retcode)1043 /* couldn't find null-separator*/
|
---|
2453 | #define MNG_KEYWORDNULL (mng_retcode)1044 /* keyword cannot be empty */
|
---|
2454 | #define MNG_OBJECTUNKNOWN (mng_retcode)1045 /* the object can't be found */
|
---|
2455 | #define MNG_OBJECTEXISTS (mng_retcode)1046 /* the object already exists */
|
---|
2456 | #define MNG_TOOMUCHIDAT (mng_retcode)1047 /* got too much compressed data*/
|
---|
2457 | #define MNG_INVSAMPLEDEPTH (mng_retcode)1048 /* sampledepth out-of-range */
|
---|
2458 | #define MNG_INVOFFSETSIZE (mng_retcode)1049 /* invalid offset-size */
|
---|
2459 | #define MNG_INVENTRYTYPE (mng_retcode)1050 /* invalid entry-type */
|
---|
2460 | #define MNG_ENDWITHNULL (mng_retcode)1051 /* may not end with NULL */
|
---|
2461 | #define MNG_INVIMAGETYPE (mng_retcode)1052 /* invalid image_type */
|
---|
2462 | #define MNG_INVDELTATYPE (mng_retcode)1053 /* invalid delta_type */
|
---|
2463 | #define MNG_INVALIDINDEX (mng_retcode)1054 /* index-value invalid */
|
---|
2464 | #define MNG_TOOMUCHJDAT (mng_retcode)1055 /* got too much compressed data*/
|
---|
2465 | #define MNG_JPEGPARMSERR (mng_retcode)1056 /* JHDR/JPEG parms do not match*/
|
---|
2466 | #define MNG_INVFILLMETHOD (mng_retcode)1057 /* invalid fill_method */
|
---|
2467 | #define MNG_OBJNOTCONCRETE (mng_retcode)1058 /* object must be concrete */
|
---|
2468 | #define MNG_TARGETNOALPHA (mng_retcode)1059 /* object has no alpha-channel */
|
---|
2469 | #define MNG_MNGTOOCOMPLEX (mng_retcode)1060 /* can't handle complexity */
|
---|
2470 | #define MNG_UNKNOWNCRITICAL (mng_retcode)1061 /* unknown critical chunk found*/
|
---|
2471 | #define MNG_UNSUPPORTEDNEED (mng_retcode)1062 /* nEED requirement unsupported*/
|
---|
2472 | #define MNG_INVALIDDELTA (mng_retcode)1063 /* Delta operation illegal */
|
---|
2473 | #define MNG_INVALIDMETHOD (mng_retcode)1064 /* invalid MAGN method */
|
---|
2474 | #define MNG_IMPROBABLELENGTH (mng_retcode)1065 /* impropable chunk length */
|
---|
2475 | #define MNG_INVALIDBLOCK (mng_retcode)1066 /* invalid delta block */
|
---|
2476 | #define MNG_INVALIDEVENT (mng_retcode)1067 /* invalid event_type */
|
---|
2477 | #define MNG_INVALIDMASK (mng_retcode)1068 /* invalid mask_type */
|
---|
2478 | #define MNG_NOMATCHINGLOOP (mng_retcode)1069 /* ENDL without matching LOOP */
|
---|
2479 | #define MNG_SEEKNOTFOUND (mng_retcode)1070 /* EvNT points to unknown SEEK */
|
---|
2480 | #define MNG_OBJNOTABSTRACT (mng_retcode)1071 /* object must be abstract */
|
---|
2481 | #define MNG_TERMSEQERROR (mng_retcode)1072 /* TERM in wrong place */
|
---|
2482 | #define MNG_INVALIDFIELDVAL (mng_retcode)1073 /* invalid fieldvalue (generic)*/
|
---|
2483 | #define MNG_INVALIDWIDTH (mng_retcode)1074 /* invalid frame/image width */
|
---|
2484 | #define MNG_INVALIDHEIGHT (mng_retcode)1075 /* invalid frame/image height */
|
---|
2485 |
|
---|
2486 | #define MNG_INVALIDCNVSTYLE (mng_retcode)2049 /* can't make anything of this */
|
---|
2487 | #define MNG_WRONGCHUNK (mng_retcode)2050 /* accessing the wrong chunk */
|
---|
2488 | #define MNG_INVALIDENTRYIX (mng_retcode)2051 /* accessing the wrong entry */
|
---|
2489 | #define MNG_NOHEADER (mng_retcode)2052 /* must have had header first */
|
---|
2490 | #define MNG_NOCORRCHUNK (mng_retcode)2053 /* can't find parent chunk */
|
---|
2491 | #define MNG_NOMHDR (mng_retcode)2054 /* no MNG header available */
|
---|
2492 |
|
---|
2493 | #define MNG_IMAGETOOLARGE (mng_retcode)4097 /* input-image way too big */
|
---|
2494 | #define MNG_NOTANANIMATION (mng_retcode)4098 /* file not a MNG */
|
---|
2495 | #define MNG_FRAMENRTOOHIGH (mng_retcode)4099 /* frame-nr out-of-range */
|
---|
2496 | #define MNG_LAYERNRTOOHIGH (mng_retcode)4100 /* layer-nr out-of-range */
|
---|
2497 | #define MNG_PLAYTIMETOOHIGH (mng_retcode)4101 /* playtime out-of-range */
|
---|
2498 | #define MNG_FNNOTIMPLEMENTED (mng_retcode)4102 /* function not yet available */
|
---|
2499 |
|
---|
2500 | #define MNG_IMAGEFROZEN (mng_retcode)8193 /* stopped displaying */
|
---|
2501 |
|
---|
2502 | #define MNG_LCMS_NOHANDLE 1 /* LCMS returned NULL handle */
|
---|
2503 | #define MNG_LCMS_NOMEM 2 /* LCMS returned NULL gammatab */
|
---|
2504 | #define MNG_LCMS_NOTRANS 3 /* LCMS returned NULL transform*/
|
---|
2505 |
|
---|
2506 | /* ************************************************************************** */
|
---|
2507 | /* * * */
|
---|
2508 | /* * Canvas styles * */
|
---|
2509 | /* * * */
|
---|
2510 | /* * Note that the intentions are pretty darn good, but that the focus * */
|
---|
2511 | /* * is currently on 8-bit color support * */
|
---|
2512 | /* * * */
|
---|
2513 | /* * The RGB8_A8 style is defined for apps that require a separate * */
|
---|
2514 | /* * canvas for the color-planes and the alpha-plane (eg. mozilla) * */
|
---|
2515 | /* * This requires for the app to supply the "getalphaline" callback!!! * */
|
---|
2516 | /* * * */
|
---|
2517 | /* ************************************************************************** */
|
---|
2518 |
|
---|
2519 | #define MNG_CANVAS_RGB8 0x00000000L
|
---|
2520 | #define MNG_CANVAS_RGBA8 0x00001000L
|
---|
2521 | #define MNG_CANVAS_RGBA8_PM 0x00009000L
|
---|
2522 | #define MNG_CANVAS_ARGB8 0x00003000L
|
---|
2523 | #define MNG_CANVAS_ARGB8_PM 0x0000B000L
|
---|
2524 | #define MNG_CANVAS_RGB8_A8 0x00005000L
|
---|
2525 | #define MNG_CANVAS_BGR8 0x00000001L
|
---|
2526 | #define MNG_CANVAS_BGRX8 0x00010001L
|
---|
2527 | #define MNG_CANVAS_BGRA8 0x00001001L
|
---|
2528 | #define MNG_CANVAS_BGRA8PM 0x00009001L /* backward compatibility */
|
---|
2529 | #define MNG_CANVAS_BGRA8_PM 0x00009001L
|
---|
2530 | #define MNG_CANVAS_ABGR8 0x00003001L
|
---|
2531 | #define MNG_CANVAS_ABGR8_PM 0x0000B001L
|
---|
2532 | #define MNG_CANVAS_RGB16 0x00000100L /* not supported yet */
|
---|
2533 | #define MNG_CANVAS_RGBA16 0x00001100L /* not supported yet */
|
---|
2534 | #define MNG_CANVAS_ARGB16 0x00003100L /* not supported yet */
|
---|
2535 | #define MNG_CANVAS_BGR16 0x00000101L /* not supported yet */
|
---|
2536 | #define MNG_CANVAS_BGRA16 0x00001101L /* not supported yet */
|
---|
2537 | #define MNG_CANVAS_ABGR16 0x00003101L /* not supported yet */
|
---|
2538 | #define MNG_CANVAS_GRAY8 0x00000002L /* not supported yet */
|
---|
2539 | #define MNG_CANVAS_GRAY16 0x00000102L /* not supported yet */
|
---|
2540 | #define MNG_CANVAS_GRAYA8 0x00001002L /* not supported yet */
|
---|
2541 | #define MNG_CANVAS_GRAYA16 0x00001102L /* not supported yet */
|
---|
2542 | #define MNG_CANVAS_AGRAY8 0x00003002L /* not supported yet */
|
---|
2543 | #define MNG_CANVAS_AGRAY16 0x00003102L /* not supported yet */
|
---|
2544 | #define MNG_CANVAS_DX15 0x00000003L /* not supported yet */
|
---|
2545 | #define MNG_CANVAS_DX16 0x00000004L /* not supported yet */
|
---|
2546 |
|
---|
2547 | #define MNG_CANVAS_RGB565 0x00000005L
|
---|
2548 | #define MNG_CANVAS_RGBA565 0x00001005L
|
---|
2549 | #define MNG_CANVAS_BGR565 0x00000006L
|
---|
2550 | #define MNG_CANVAS_BGRA565 0x00001006L
|
---|
2551 | #define MNG_CANVAS_BGR565_A8 0x00004006L
|
---|
2552 |
|
---|
2553 | #define MNG_CANVAS_RGB555 0x00000007L
|
---|
2554 | #define MNG_CANVAS_BGR555 0x00000008L
|
---|
2555 |
|
---|
2556 | #define MNG_CANVAS_PIXELTYPE(C) (C & 0x000000FFL)
|
---|
2557 | #define MNG_CANVAS_BITDEPTH(C) (C & 0x00000100L)
|
---|
2558 | #define MNG_CANVAS_HASALPHA(C) (C & 0x00001000L)
|
---|
2559 | #define MNG_CANVAS_ALPHAFIRST(C) (C & 0x00002000L)
|
---|
2560 | #define MNG_CANVAS_ALPHASEPD(C) (C & 0x00004000L)
|
---|
2561 | #define MNG_CANVAS_ALPHAPM(C) (C & 0x00008000L)
|
---|
2562 | #define MNG_CANVAS_HASFILLER(C) (C & 0x00010000L)
|
---|
2563 |
|
---|
2564 | #define MNG_CANVAS_RGB(C) (MNG_CANVAS_PIXELTYPE (C) == 0)
|
---|
2565 | #define MNG_CANVAS_BGR(C) (MNG_CANVAS_PIXELTYPE (C) == 1)
|
---|
2566 | #define MNG_CANVAS_GRAY(C) (MNG_CANVAS_PIXELTYPE (C) == 2)
|
---|
2567 | #define MNG_CANVAS_DIRECTX15(C) (MNG_CANVAS_PIXELTYPE (C) == 3)
|
---|
2568 | #define MNG_CANVAS_DIRECTX16(C) (MNG_CANVAS_PIXELTYPE (C) == 4)
|
---|
2569 | #define MNG_CANVAS_RGB_565(C) (MNG_CANVAS_PIXELTYPE (C) == 5)
|
---|
2570 | #define MNG_CANVAS_BGR_565(C) (MNG_CANVAS_PIXELTYPE (C) == 6)
|
---|
2571 | #define MNG_CANVAS_8BIT(C) (!MNG_CANVAS_BITDEPTH (C))
|
---|
2572 | #define MNG_CANVAS_16BIT(C) (MNG_CANVAS_BITDEPTH (C))
|
---|
2573 | #define MNG_CANVAS_PIXELFIRST(C) (!MNG_CANVAS_ALPHAFIRST (C))
|
---|
2574 |
|
---|
2575 | /* ************************************************************************** */
|
---|
2576 | /* * * */
|
---|
2577 | /* * Chunk names (idea adapted from libpng 1.1.0 - png.h) * */
|
---|
2578 | /* * * */
|
---|
2579 | /* ************************************************************************** */
|
---|
2580 |
|
---|
2581 | #define MNG_UINT_HUH 0x40404040L
|
---|
2582 |
|
---|
2583 | #define MNG_UINT_BACK 0x4241434bL
|
---|
2584 | #define MNG_UINT_BASI 0x42415349L
|
---|
2585 | #define MNG_UINT_CLIP 0x434c4950L
|
---|
2586 | #define MNG_UINT_CLON 0x434c4f4eL
|
---|
2587 | #define MNG_UINT_DBYK 0x4442594bL
|
---|
2588 | #define MNG_UINT_DEFI 0x44454649L
|
---|
2589 | #define MNG_UINT_DHDR 0x44484452L
|
---|
2590 | #define MNG_UINT_DISC 0x44495343L
|
---|
2591 | #define MNG_UINT_DROP 0x44524f50L
|
---|
2592 | #define MNG_UINT_ENDL 0x454e444cL
|
---|
2593 | #define MNG_UINT_FRAM 0x4652414dL
|
---|
2594 | #define MNG_UINT_IDAT 0x49444154L
|
---|
2595 | #define MNG_UINT_IEND 0x49454e44L
|
---|
2596 | #define MNG_UINT_IHDR 0x49484452L
|
---|
2597 | #define MNG_UINT_IJNG 0x494a4e47L
|
---|
2598 | #define MNG_UINT_IPNG 0x49504e47L
|
---|
2599 | #define MNG_UINT_JDAA 0x4a444141L
|
---|
2600 | #define MNG_UINT_JDAT 0x4a444154L
|
---|
2601 | #define MNG_UINT_JHDR 0x4a484452L
|
---|
2602 | #define MNG_UINT_JSEP 0x4a534550L
|
---|
2603 | #define MNG_UINT_JdAA 0x4a644141L
|
---|
2604 | #define MNG_UINT_LOOP 0x4c4f4f50L
|
---|
2605 | #define MNG_UINT_MAGN 0x4d41474eL
|
---|
2606 | #define MNG_UINT_MEND 0x4d454e44L
|
---|
2607 | #define MNG_UINT_MHDR 0x4d484452L
|
---|
2608 | #define MNG_UINT_MOVE 0x4d4f5645L
|
---|
2609 | #define MNG_UINT_ORDR 0x4f524452L
|
---|
2610 | #define MNG_UINT_PAST 0x50415354L
|
---|
2611 | #define MNG_UINT_PLTE 0x504c5445L
|
---|
2612 | #define MNG_UINT_PPLT 0x50504c54L
|
---|
2613 | #define MNG_UINT_PROM 0x50524f4dL
|
---|
2614 | #define MNG_UINT_SAVE 0x53415645L
|
---|
2615 | #define MNG_UINT_SEEK 0x5345454bL
|
---|
2616 | #define MNG_UINT_SHOW 0x53484f57L
|
---|
2617 | #define MNG_UINT_TERM 0x5445524dL
|
---|
2618 | #define MNG_UINT_adAT 0x61644154L
|
---|
2619 | #define MNG_UINT_ahDR 0x61684452L
|
---|
2620 | #define MNG_UINT_bKGD 0x624b4744L
|
---|
2621 | #define MNG_UINT_cHRM 0x6348524dL
|
---|
2622 | #define MNG_UINT_eXPI 0x65585049L
|
---|
2623 | #define MNG_UINT_evNT 0x65764e54L
|
---|
2624 | #define MNG_UINT_fPRI 0x66505249L
|
---|
2625 | #define MNG_UINT_gAMA 0x67414d41L
|
---|
2626 | #define MNG_UINT_hIST 0x68495354L
|
---|
2627 | #define MNG_UINT_iCCP 0x69434350L
|
---|
2628 | #define MNG_UINT_iTXt 0x69545874L
|
---|
2629 | #define MNG_UINT_mpNG 0x6d704e47L
|
---|
2630 | #define MNG_UINT_nEED 0x6e454544L
|
---|
2631 | #define MNG_UINT_oFFs 0x6f464673L
|
---|
2632 | #define MNG_UINT_pCAL 0x7043414cL
|
---|
2633 | #define MNG_UINT_pHYg 0x70444167L
|
---|
2634 | #define MNG_UINT_pHYs 0x70485973L
|
---|
2635 | #define MNG_UINT_sBIT 0x73424954L
|
---|
2636 | #define MNG_UINT_sCAL 0x7343414cL
|
---|
2637 | #define MNG_UINT_sPLT 0x73504c54L
|
---|
2638 | #define MNG_UINT_sRGB 0x73524742L
|
---|
2639 | #define MNG_UINT_tEXt 0x74455874L
|
---|
2640 | #define MNG_UINT_tIME 0x74494d45L
|
---|
2641 | #define MNG_UINT_tRNS 0x74524e53L
|
---|
2642 | #define MNG_UINT_zTXt 0x7a545874L
|
---|
2643 |
|
---|
2644 | /* ************************************************************************** */
|
---|
2645 | /* * * */
|
---|
2646 | /* * Chunk property values * */
|
---|
2647 | /* * * */
|
---|
2648 | /* ************************************************************************** */
|
---|
2649 |
|
---|
2650 | #define MNG_BITDEPTH_1 1 /* IHDR, BASI, JHDR, PROM */
|
---|
2651 | #define MNG_BITDEPTH_2 2
|
---|
2652 | #define MNG_BITDEPTH_4 4
|
---|
2653 | #define MNG_BITDEPTH_8 8 /* sPLT */
|
---|
2654 | #define MNG_BITDEPTH_16 16
|
---|
2655 |
|
---|
2656 | #define MNG_COLORTYPE_GRAY 0 /* IHDR, BASI, PROM */
|
---|
2657 | #define MNG_COLORTYPE_RGB 2
|
---|
2658 | #define MNG_COLORTYPE_INDEXED 3
|
---|
2659 | #define MNG_COLORTYPE_GRAYA 4
|
---|
2660 | #define MNG_COLORTYPE_RGBA 6
|
---|
2661 |
|
---|
2662 | #define MNG_COMPRESSION_DEFLATE 0 /* IHDR, zTXt, iTXt, iCCP,
|
---|
2663 | BASI, JHDR */
|
---|
2664 |
|
---|
2665 | #define MNG_FILTER_ADAPTIVE 0 /* IHDR, BASI, JHDR */
|
---|
2666 | /* #define MNG_FILTER_NO_ADAPTIVE 1
|
---|
2667 | #define MNG_FILTER_NO_DIFFERING 0
|
---|
2668 | #define MNG_FILTER_DIFFERING 0x40
|
---|
2669 | #define MNG_FILTER_MASK (MNG_FILTER_NO_ADAPTIVE | MNG_FILTER_DIFFERING) */
|
---|
2670 | #ifdef FILTER192
|
---|
2671 | #define MNG_FILTER_DIFFERING 0xC0
|
---|
2672 | #endif
|
---|
2673 | #ifdef FILTER193
|
---|
2674 | #define MNG_FILTER_NOFILTER 0xC1
|
---|
2675 | #endif
|
---|
2676 |
|
---|
2677 | #define MNG_INTERLACE_NONE 0 /* IHDR, BASI, JHDR */
|
---|
2678 | #define MNG_INTERLACE_ADAM7 1
|
---|
2679 |
|
---|
2680 | #define MNG_FILTER_NONE 0 /* IDAT */
|
---|
2681 | #define MNG_FILTER_SUB 1
|
---|
2682 | #define MNG_FILTER_UP 2
|
---|
2683 | #define MNG_FILTER_AVERAGE 3
|
---|
2684 | #define MNG_FILTER_PAETH 4
|
---|
2685 |
|
---|
2686 | #define MNG_INTENT_PERCEPTUAL 0 /* sRGB */
|
---|
2687 | #define MNG_INTENT_RELATIVECOLORIMETRIC 1
|
---|
2688 | #define MNG_INTENT_SATURATION 2
|
---|
2689 | #define MNG_INTENT_ABSOLUTECOLORIMETRIC 3
|
---|
2690 | /* tEXt, zTXt, iTXt */
|
---|
2691 | #define MNG_TEXT_TITLE "Title"
|
---|
2692 | #define MNG_TEXT_AUTHOR "Author"
|
---|
2693 | #define MNG_TEXT_DESCRIPTION "Description"
|
---|
2694 | #define MNG_TEXT_COPYRIGHT "Copyright"
|
---|
2695 | #define MNG_TEXT_CREATIONTIME "Creation Time"
|
---|
2696 | #define MNG_TEXT_SOFTWARE "Software"
|
---|
2697 | #define MNG_TEXT_DISCLAIMER "Disclaimer"
|
---|
2698 | #define MNG_TEXT_WARNING "Warning"
|
---|
2699 | #define MNG_TEXT_SOURCE "Source"
|
---|
2700 | #define MNG_TEXT_COMMENT "Comment"
|
---|
2701 |
|
---|
2702 | #define MNG_FLAG_UNCOMPRESSED 0 /* iTXt */
|
---|
2703 | #define MNG_FLAG_COMPRESSED 1
|
---|
2704 |
|
---|
2705 | #define MNG_UNIT_UNKNOWN 0 /* pHYs, pHYg */
|
---|
2706 | #define MNG_UNIT_METER 1
|
---|
2707 | /* MHDR */
|
---|
2708 | #define MNG_SIMPLICITY_VALID 0x00000001
|
---|
2709 | #define MNG_SIMPLICITY_SIMPLEFEATURES 0x00000002
|
---|
2710 | #define MNG_SIMPLICITY_COMPLEXFEATURES 0x00000004
|
---|
2711 | #define MNG_SIMPLICITY_TRANSPARENCY 0x00000008
|
---|
2712 | #define MNG_SIMPLICITY_JNG 0x00000010
|
---|
2713 | #define MNG_SIMPLICITY_DELTAPNG 0x00000020
|
---|
2714 |
|
---|
2715 | #define MNG_TERMINATION_DECODER_NC 0 /* LOOP */
|
---|
2716 | #define MNG_TERMINATION_USER_NC 1
|
---|
2717 | #define MNG_TERMINATION_EXTERNAL_NC 2
|
---|
2718 | #define MNG_TERMINATION_DETERMINISTIC_NC 3
|
---|
2719 | #define MNG_TERMINATION_DECODER_C 4
|
---|
2720 | #define MNG_TERMINATION_USER_C 5
|
---|
2721 | #define MNG_TERMINATION_EXTERNAL_C 6
|
---|
2722 | #define MNG_TERMINATION_DETERMINISTIC_C 7
|
---|
2723 |
|
---|
2724 | #define MNG_DONOTSHOW_VISIBLE 0 /* DEFI */
|
---|
2725 | #define MNG_DONOTSHOW_NOTVISIBLE 1
|
---|
2726 |
|
---|
2727 | #define MNG_ABSTRACT 0 /* DEFI */
|
---|
2728 | #define MNG_CONCRETE 1
|
---|
2729 |
|
---|
2730 | #define MNG_NOTVIEWABLE 0 /* BASI */
|
---|
2731 | #define MNG_VIEWABLE 1
|
---|
2732 |
|
---|
2733 | #define MNG_FULL_CLONE 0 /* CLON */
|
---|
2734 | #define MNG_PARTIAL_CLONE 1
|
---|
2735 | #define MNG_RENUMBER 2
|
---|
2736 |
|
---|
2737 | #define MNG_CONCRETE_ASPARENT 0 /* CLON */
|
---|
2738 | #define MNG_CONCRETE_MAKEABSTRACT 1
|
---|
2739 |
|
---|
2740 | #define MNG_LOCATION_ABSOLUTE 0 /* CLON, MOVE */
|
---|
2741 | #define MNG_LOCATION_RELATIVE 1
|
---|
2742 |
|
---|
2743 | #ifndef MNG_SKIPCHUNK_PAST
|
---|
2744 | #define MNG_TARGET_ABSOLUTE 0 /* PAST */
|
---|
2745 | #define MNG_TARGET_RELATIVE_SAMEPAST 1
|
---|
2746 | #define MNG_TARGET_RELATIVE_PREVPAST 2
|
---|
2747 |
|
---|
2748 | #define MNG_COMPOSITE_OVER 0 /* PAST */
|
---|
2749 | #define MNG_COMPOSITE_REPLACE 1
|
---|
2750 | #define MNG_COMPOSITE_UNDER 2
|
---|
2751 |
|
---|
2752 | #define MNG_ORIENTATION_SAME 0 /* PAST */
|
---|
2753 | #define MNG_ORIENTATION_180DEG 2
|
---|
2754 | #define MNG_ORIENTATION_FLIPHORZ 4
|
---|
2755 | #define MNG_ORIENTATION_FLIPVERT 6
|
---|
2756 | #define MNG_ORIENTATION_TILED 8
|
---|
2757 |
|
---|
2758 | #define MNG_OFFSET_ABSOLUTE 0 /* PAST */
|
---|
2759 | #define MNG_OFFSET_RELATIVE 1
|
---|
2760 | #endif
|
---|
2761 |
|
---|
2762 | #define MNG_BOUNDARY_ABSOLUTE 0 /* PAST, FRAM */
|
---|
2763 | #define MNG_BOUNDARY_RELATIVE 1
|
---|
2764 |
|
---|
2765 | #define MNG_BACKGROUNDCOLOR_MANDATORY 0x01 /* BACK */
|
---|
2766 | #define MNG_BACKGROUNDIMAGE_MANDATORY 0x02 /* BACK */
|
---|
2767 |
|
---|
2768 | #define MNG_BACKGROUNDIMAGE_NOTILE 0 /* BACK */
|
---|
2769 | #define MNG_BACKGROUNDIMAGE_TILE 1
|
---|
2770 |
|
---|
2771 | #define MNG_FRAMINGMODE_NOCHANGE 0 /* FRAM */
|
---|
2772 | #define MNG_FRAMINGMODE_1 1
|
---|
2773 | #define MNG_FRAMINGMODE_2 2
|
---|
2774 | #define MNG_FRAMINGMODE_3 3
|
---|
2775 | #define MNG_FRAMINGMODE_4 4
|
---|
2776 |
|
---|
2777 | #define MNG_CHANGEDELAY_NO 0 /* FRAM */
|
---|
2778 | #define MNG_CHANGEDELAY_NEXTSUBFRAME 1
|
---|
2779 | #define MNG_CHANGEDELAY_DEFAULT 2
|
---|
2780 |
|
---|
2781 | #define MNG_CHANGETIMOUT_NO 0 /* FRAM */
|
---|
2782 | #define MNG_CHANGETIMOUT_DETERMINISTIC_1 1
|
---|
2783 | #define MNG_CHANGETIMOUT_DETERMINISTIC_2 2
|
---|
2784 | #define MNG_CHANGETIMOUT_DECODER_1 3
|
---|
2785 | #define MNG_CHANGETIMOUT_DECODER_2 4
|
---|
2786 | #define MNG_CHANGETIMOUT_USER_1 5
|
---|
2787 | #define MNG_CHANGETIMOUT_USER_2 6
|
---|
2788 | #define MNG_CHANGETIMOUT_EXTERNAL_1 7
|
---|
2789 | #define MNG_CHANGETIMOUT_EXTERNAL_2 8
|
---|
2790 |
|
---|
2791 | #define MNG_CHANGECLIPPING_NO 0 /* FRAM */
|
---|
2792 | #define MNG_CHANGECLIPPING_NEXTSUBFRAME 1
|
---|
2793 | #define MNG_CHANGECLIPPING_DEFAULT 2
|
---|
2794 |
|
---|
2795 | #define MNG_CHANGESYNCID_NO 0 /* FRAM */
|
---|
2796 | #define MNG_CHANGESYNCID_NEXTSUBFRAME 1
|
---|
2797 | #define MNG_CHANGESYNCID_DEFAULT 2
|
---|
2798 |
|
---|
2799 | #define MNG_CLIPPING_ABSOLUTE 0 /* CLIP */
|
---|
2800 | #define MNG_CLIPPING_RELATIVE 1
|
---|
2801 |
|
---|
2802 | #define MNG_SHOWMODE_0 0 /* SHOW */
|
---|
2803 | #define MNG_SHOWMODE_1 1
|
---|
2804 | #define MNG_SHOWMODE_2 2
|
---|
2805 | #define MNG_SHOWMODE_3 3
|
---|
2806 | #define MNG_SHOWMODE_4 4
|
---|
2807 | #define MNG_SHOWMODE_5 5
|
---|
2808 | #define MNG_SHOWMODE_6 6
|
---|
2809 | #define MNG_SHOWMODE_7 7
|
---|
2810 |
|
---|
2811 | #define MNG_TERMACTION_LASTFRAME 0 /* TERM */
|
---|
2812 | #define MNG_TERMACTION_CLEAR 1
|
---|
2813 | #define MNG_TERMACTION_FIRSTFRAME 2
|
---|
2814 | #define MNG_TERMACTION_REPEAT 3
|
---|
2815 |
|
---|
2816 | #define MNG_ITERACTION_LASTFRAME 0 /* TERM */
|
---|
2817 | #define MNG_ITERACTION_CLEAR 1
|
---|
2818 | #define MNG_ITERACTION_FIRSTFRAME 2
|
---|
2819 |
|
---|
2820 | #define MNG_SAVEOFFSET_4BYTE 4 /* SAVE */
|
---|
2821 | #define MNG_SAVEOFFSET_8BYTE 8
|
---|
2822 |
|
---|
2823 | #define MNG_SAVEENTRY_SEGMENTFULL 0 /* SAVE */
|
---|
2824 | #define MNG_SAVEENTRY_SEGMENT 1
|
---|
2825 | #define MNG_SAVEENTRY_SUBFRAME 2
|
---|
2826 | #define MNG_SAVEENTRY_EXPORTEDIMAGE 3
|
---|
2827 |
|
---|
2828 | #define MNG_PRIORITY_ABSOLUTE 0 /* fPRI */
|
---|
2829 | #define MNG_PRIORITY_RELATIVE 1
|
---|
2830 |
|
---|
2831 | #ifdef MNG_INCLUDE_JNG
|
---|
2832 | #define MNG_COLORTYPE_JPEGGRAY 8 /* JHDR */
|
---|
2833 | #define MNG_COLORTYPE_JPEGCOLOR 10
|
---|
2834 | #define MNG_COLORTYPE_JPEGGRAYA 12
|
---|
2835 | #define MNG_COLORTYPE_JPEGCOLORA 14
|
---|
2836 |
|
---|
2837 | #define MNG_BITDEPTH_JPEG8 8 /* JHDR */
|
---|
2838 | #define MNG_BITDEPTH_JPEG12 12
|
---|
2839 | #define MNG_BITDEPTH_JPEG8AND12 20
|
---|
2840 |
|
---|
2841 | #define MNG_COMPRESSION_BASELINEJPEG 8 /* JHDR */
|
---|
2842 |
|
---|
2843 | #define MNG_INTERLACE_SEQUENTIAL 0 /* JHDR */
|
---|
2844 | #define MNG_INTERLACE_PROGRESSIVE 8
|
---|
2845 | #endif /* MNG_INCLUDE_JNG */
|
---|
2846 |
|
---|
2847 | #define MNG_IMAGETYPE_UNKNOWN 0 /* DHDR */
|
---|
2848 | #define MNG_IMAGETYPE_PNG 1
|
---|
2849 | #define MNG_IMAGETYPE_JNG 2
|
---|
2850 |
|
---|
2851 | #define MNG_DELTATYPE_REPLACE 0 /* DHDR */
|
---|
2852 | #define MNG_DELTATYPE_BLOCKPIXELADD 1
|
---|
2853 | #define MNG_DELTATYPE_BLOCKALPHAADD 2
|
---|
2854 | #define MNG_DELTATYPE_BLOCKCOLORADD 3
|
---|
2855 | #define MNG_DELTATYPE_BLOCKPIXELREPLACE 4
|
---|
2856 | #define MNG_DELTATYPE_BLOCKALPHAREPLACE 5
|
---|
2857 | #define MNG_DELTATYPE_BLOCKCOLORREPLACE 6
|
---|
2858 | #define MNG_DELTATYPE_NOCHANGE 7
|
---|
2859 |
|
---|
2860 | #define MNG_FILLMETHOD_LEFTBITREPLICATE 0 /* PROM */
|
---|
2861 | #define MNG_FILLMETHOD_ZEROFILL 1
|
---|
2862 |
|
---|
2863 | #define MNG_DELTATYPE_REPLACERGB 0 /* PPLT */
|
---|
2864 | #define MNG_DELTATYPE_DELTARGB 1
|
---|
2865 | #define MNG_DELTATYPE_REPLACEALPHA 2
|
---|
2866 | #define MNG_DELTATYPE_DELTAALPHA 3
|
---|
2867 | #define MNG_DELTATYPE_REPLACERGBA 4
|
---|
2868 | #define MNG_DELTATYPE_DELTARGBA 5
|
---|
2869 |
|
---|
2870 | #define MNG_POLARITY_ONLY 0 /* DBYK */
|
---|
2871 | #define MNG_POLARITY_ALLBUT 1
|
---|
2872 |
|
---|
2873 | #define MNG_EVENT_NONE 0 /* evNT */
|
---|
2874 | #define MNG_EVENT_MOUSEENTER 1
|
---|
2875 | #define MNG_EVENT_MOUSEMOVE 2
|
---|
2876 | #define MNG_EVENT_MOUSEEXIT 3
|
---|
2877 | #define MNG_EVENT_MOUSEDOWN 4
|
---|
2878 | #define MNG_EVENT_MOUSEUP 5
|
---|
2879 |
|
---|
2880 | #define MNG_MASK_NONE 0 /* evNT */
|
---|
2881 | #define MNG_MASK_BOX 1
|
---|
2882 | #define MNG_MASK_OBJECT 2
|
---|
2883 | #define MNG_MASK_OBJECTIX 3
|
---|
2884 | #define MNG_MASK_BOXOBJECT 4
|
---|
2885 | #define MNG_MASK_BOXOBJECTIX 5
|
---|
2886 |
|
---|
2887 | /* ************************************************************************** */
|
---|
2888 | /* * * */
|
---|
2889 | /* * Processtext callback types * */
|
---|
2890 | /* * * */
|
---|
2891 | /* ************************************************************************** */
|
---|
2892 |
|
---|
2893 | #define MNG_TYPE_TEXT 0
|
---|
2894 | #define MNG_TYPE_ZTXT 1
|
---|
2895 | #define MNG_TYPE_ITXT 2
|
---|
2896 |
|
---|
2897 | /* ************************************************************************** */
|
---|
2898 | /* * * */
|
---|
2899 | /* * CRC processing masks * */
|
---|
2900 | /* * * */
|
---|
2901 | /* ************************************************************************** */
|
---|
2902 |
|
---|
2903 | #define MNG_CRC_INPUT 0x0000000f
|
---|
2904 | #define MNG_CRC_INPUT_NONE 0x00000000
|
---|
2905 | #define MNG_CRC_INPUT_PRESENT 0x00000001
|
---|
2906 | #define MNG_CRC_OUTPUT 0x000000f0
|
---|
2907 | #define MNG_CRC_OUTPUT_NONE 0x00000000
|
---|
2908 | #define MNG_CRC_OUTPUT_GENERATE 0x00000020
|
---|
2909 | #define MNG_CRC_OUTPUT_DUMMY 0x00000040
|
---|
2910 | #define MNG_CRC_ANCILLARY 0x00000f00
|
---|
2911 | #define MNG_CRC_ANCILLARY_IGNORE 0x00000000
|
---|
2912 | #define MNG_CRC_ANCILLARY_DISCARD 0x00000100
|
---|
2913 | #define MNG_CRC_ANCILLARY_WARNING 0x00000200
|
---|
2914 | #define MNG_CRC_ANCILLARY_ERROR 0x00000300
|
---|
2915 | #define MNG_CRC_CRITICAL 0x0000f000
|
---|
2916 | #define MNG_CRC_CRITICAL_IGNORE 0x00000000
|
---|
2917 | #define MNG_CRC_CRITICAL_WARNING 0x00002000
|
---|
2918 | #define MNG_CRC_CRITICAL_ERROR 0x00003000
|
---|
2919 | #define MNG_CRC_DEFAULT 0x00002121
|
---|
2920 |
|
---|
2921 | /* ************************************************************************** */
|
---|
2922 |
|
---|
2923 | #ifdef __cplusplus
|
---|
2924 | }
|
---|
2925 | #endif
|
---|
2926 |
|
---|
2927 | #endif /* _libmng_h_ */
|
---|
2928 |
|
---|
2929 | /* ************************************************************************** */
|
---|
2930 | /* * end of file * */
|
---|
2931 | /* ************************************************************************** */
|
---|
2932 |
|
---|