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,
|
---|
|
---|