]> git.saurik.com Git - wxWidgets.git/blob - src/png/scripts/pngdef.pas
Inital fill in background, removed tabs, -1->wxID_ANY, TRUE->true, FALSE->false
[wxWidgets.git] / src / png / scripts / pngdef.pas
1 unit pngdef;
2
3 // Caution: this file has fallen out of date since version 1.0.5. Write to
4 // png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu about volunteering
5 // to it up to date.
6
7 interface
8
9 const
10 PNG_LIBPNG_VER_STRING = '1.2.4';
11 PNG_LIBPNG_VER = 10204;
12
13 type
14 png_uint_32 = Cardinal;
15 png_int_32 = Longint;
16 png_uint_16 = Word;
17 png_int_16 = Smallint;
18 png_byte = Byte;
19 png_size_t = png_uint_32;
20 png_charpp = ^png_charp;
21 png_charp = PChar;
22 float = single;
23 int = Integer;
24 png_bytepp = ^png_bytep;
25 png_bytep = ^png_byte;
26 png_uint_16p = ^png_uint_16;
27 png_uint_16pp = ^png_uint_16p;
28 png_voidp = pointer;
29 time_t = Longint;
30 png_doublep = ^png_double;
31 png_double = double;
32
33 user_error_ptr = Pointer;
34 png_error_ptrp = ^png_error_ptr;
35 png_error_ptr = procedure(png_ptr: Pointer; msg: Pointer);
36 stdcall;
37 png_rw_ptrp = ^png_rw_ptr;
38 png_rw_ptr = procedure(png_ptr: Pointer; data: Pointer;
39 length: png_size_t);
40 stdcall;
41 png_flush_ptrp = ^png_flush_ptr;
42 png_flush_ptr = procedure(png_ptr: Pointer);
43 stdcall;
44 png_progressive_info_ptrp = ^png_progressive_info_ptr;
45 png_progressive_info_ptr = procedure(png_ptr: Pointer;
46 info_ptr: Pointer);
47 stdcall;
48 png_progressive_end_ptrp = ^png_progressive_end_ptr;
49 png_progressive_end_ptr = procedure(png_ptr: Pointer;
50 info_ptr: Pointer);
51 stdcall;
52 png_progressive_row_ptrp = ^png_progressive_row_ptr;
53 png_progressive_row_ptr = procedure(png_ptr: Pointer;
54 data: Pointer; length: png_uint_32;
55 count: int);
56 stdcall;
57 png_read_status_ptr = procedure(png_ptr: Pointer;
58 row_number: png_uint_32; pass: int);
59 stdcall;
60 png_write_status_ptr = procedure(png_ptr: Pointer;
61 row_number: png_uint_32; pass: int);
62 stdcall;
63 png_user_chunk_ptr = procedure(png_ptr: Pointer;
64 data: png_unknown_chunkp);
65 stdcall;
66 png_user_transform_ptr = procedure(png_ptr: Pointer;
67 row_info: Pointer; data: png_bytep);
68 stdcall;
69
70 png_colorpp = ^png_colorp;
71 png_colorp = ^png_color;
72 png_color = packed record
73 red, green, blue: png_byte;
74 end;
75
76 png_color_16pp = ^png_color_16p;
77 png_color_16p = ^png_color_16;
78 png_color_16 = packed record
79 index: png_byte; //used for palette files
80 red, green, blue: png_uint_16; //for use in red green blue files
81 gray: png_uint_16; //for use in grayscale files
82 end;
83
84 png_color_8pp = ^png_color_8p;
85 png_color_8p = ^png_color_8;
86 png_color_8 = packed record
87 red, green, blue: png_byte; //for use in red green blue files
88 gray: png_byte; //for use in grayscale files
89 alpha: png_byte; //for alpha channel files
90 end;
91
92 png_textpp = ^png_textp;
93 png_textp = ^png_text;
94 png_text = packed record
95 compression: int; //compression value
96 key: png_charp; //keyword, 1-79 character description of "text"
97 text: png_charp; //comment, may be empty ("")
98 text_length: png_size_t; //length of text field
99 end;
100
101 png_timepp = ^png_timep;
102 png_timep = ^png_time;
103 png_time = packed record
104 year: png_uint_16; //yyyy
105 month: png_byte; //1..12
106 day: png_byte; //1..31
107 hour: png_byte; //0..23
108 minute: png_byte; //0..59
109 second: png_byte; //0..60 (leap seconds)
110 end;
111
112 png_infopp = ^png_infop;
113 png_infop = Pointer;
114
115 png_row_infopp = ^png_row_infop;
116 png_row_infop = ^png_row_info;
117 png_row_info = packed record
118 width: png_uint_32; //width of row
119 rowbytes: png_size_t; //number of bytes in row
120 color_type: png_byte; //color type of row
121 bit_depth: png_byte; //bit depth of row
122 channels: png_byte; //number of channels (1, 2, 3, or 4)
123 pixel_depth: png_byte; //bits per pixel (depth * channels)
124 end;
125
126 png_structpp = ^png_structp;
127 png_structp = Pointer;
128
129 const
130
131 // Supported compression types for text in PNG files (tEXt, and zTXt).
132 // The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed.
133
134 PNG_TEXT_COMPRESSION_NONE_WR = -3;
135 PNG_TEXT_COMPRESSION_zTXt_WR = -2;
136 PNG_TEXT_COMPRESSION_NONE = -1;
137 PNG_TEXT_COMPRESSION_zTXt = 0;
138
139 // These describe the color_type field in png_info.
140 // color type masks
141
142 PNG_COLOR_MASK_PALETTE = 1;
143 PNG_COLOR_MASK_COLOR = 2;
144 PNG_COLOR_MASK_ALPHA = 4;
145
146 // color types. Note that not all combinations are legal
147
148 PNG_COLOR_TYPE_GRAY = 0;
149 PNG_COLOR_TYPE_PALETTE = PNG_COLOR_MASK_COLOR or
150 PNG_COLOR_MASK_PALETTE;
151 PNG_COLOR_TYPE_RGB = PNG_COLOR_MASK_COLOR;
152 PNG_COLOR_TYPE_RGB_ALPHA = PNG_COLOR_MASK_COLOR or
153 PNG_COLOR_MASK_ALPHA;
154 PNG_COLOR_TYPE_GRAY_ALPHA = PNG_COLOR_MASK_ALPHA;
155
156 // This is for compression type. PNG 1.0 only defines the single type.
157
158 PNG_COMPRESSION_TYPE_BASE = 0; // Deflate method 8, 32K window
159 PNG_COMPRESSION_TYPE_DEFAULT = PNG_COMPRESSION_TYPE_BASE;
160
161 // This is for filter type. PNG 1.0 only defines the single type.
162
163 PNG_FILTER_TYPE_BASE = 0; // Single row per-byte filtering
164 PNG_FILTER_TYPE_DEFAULT = PNG_FILTER_TYPE_BASE;
165
166 // These are for the interlacing type. These values should NOT be changed.
167
168 PNG_INTERLACE_NONE = 0; // Non-interlaced image
169 PNG_INTERLACE_ADAM7 = 1; // Adam7 interlacing
170
171 // These are for the oFFs chunk. These values should NOT be changed.
172
173 PNG_OFFSET_PIXEL = 0; // Offset in pixels
174 PNG_OFFSET_MICROMETER = 1; // Offset in micrometers (1/10^6 meter)
175
176 // These are for the pCAL chunk. These values should NOT be changed.
177
178 PNG_EQUATION_LINEAR = 0; // Linear transformation
179 PNG_EQUATION_BASE_E = 1; // Exponential base e transform
180 PNG_EQUATION_ARBITRARY = 2; // Arbitrary base exponential transform
181 PNG_EQUATION_HYPERBOLIC = 3; // Hyperbolic sine transformation
182
183 // These are for the pHYs chunk. These values should NOT be changed.
184
185 PNG_RESOLUTION_UNKNOWN = 0; // pixels/unknown unit (aspect ratio)
186 PNG_RESOLUTION_METER = 1; // pixels/meter
187
188 // These are for the sRGB chunk. These values should NOT be changed.
189 PNG_sRGB_INTENT_PERCEPTUAL = 0;
190 PNG_sRGB_INTENT_RELATIVE = 1;
191 PNG_sRGB_INTENT_SATURATION = 2;
192 PNG_sRGB_INTENT_ABSOLUTE = 3;
193
194 // Handle alpha and tRNS by replacing with a background color.
195 PNG_BACKGROUND_GAMMA_UNKNOWN = 0;
196 PNG_BACKGROUND_GAMMA_SCREEN = 1;
197 PNG_BACKGROUND_GAMMA_FILE = 2;
198 PNG_BACKGROUND_GAMMA_UNIQUE = 3;
199
200 // Values for png_set_crc_action() to say how to handle CRC errors in
201 // ancillary and critical chunks, and whether to use the data contained
202 // therein. Note that it is impossible to "discard" data in a critical
203 // chunk. For versions prior to 0.90, the action was always error/quit,
204 // whereas in version 0.90 and later, the action for CRC errors in ancillary
205 // chunks is warn/discard. These values should NOT be changed.
206
207 // value action:critical action:ancillary
208
209 PNG_CRC_DEFAULT = 0; // error/quit warn/discard data
210 PNG_CRC_ERROR_QUIT = 1; // error/quit error/quit
211 PNG_CRC_WARN_DISCARD = 2; // (INVALID) warn/discard data
212 PNG_CRC_WARN_USE = 3; // warn/use data warn/use data
213 PNG_CRC_QUIET_USE = 4; // quiet/use data quiet/use data
214 PNG_CRC_NO_CHANGE = 5; // use current value use current value
215
216 // Flags for png_set_filter() to say which filters to use. The flags
217 // are chosen so that they don't conflict with real filter types
218 // below, in case they are supplied instead of the #defined constants.
219 // These values should NOT be changed.
220
221 PNG_NO_FILTERS = $00;
222 PNG_FILTER_NONE = $08;
223 PNG_FILTER_SUB = $10;
224 PNG_FILTER_UP = $20;
225 PNG_FILTER_AVG = $40;
226 PNG_FILTER_PAETH = $80;
227 PNG_ALL_FILTERS = PNG_FILTER_NONE or PNG_FILTER_SUB or
228 PNG_FILTER_UP or PNG_FILTER_AVG or
229 PNG_FILTER_PAETH;
230
231 // Filter values (not flags) - used in pngwrite.c, pngwutil.c for now.
232 // These defines should NOT be changed.
233
234 PNG_FILTER_VALUE_NONE = 0;
235 PNG_FILTER_VALUE_SUB = 1;
236 PNG_FILTER_VALUE_UP = 2;
237 PNG_FILTER_VALUE_AVG = 3;
238 PNG_FILTER_VALUE_PAETH = 4;
239
240 // Heuristic used for row filter selection. These defines should NOT be
241 // changed.
242
243 PNG_FILTER_HEURISTIC_DEFAULT = 0; // Currently "UNWEIGHTED"
244 PNG_FILTER_HEURISTIC_UNWEIGHTED = 1; // Used by libpng < 0.95
245 PNG_FILTER_HEURISTIC_WEIGHTED = 2; // Experimental feature
246 PNG_FILTER_HEURISTIC_LAST = 3; // Not a valid value
247
248 procedure png_build_grayscale_palette(bit_depth: int; palette: png_colorp);
249 stdcall;
250 function png_check_sig(sig: png_bytep; num: int): int;
251 stdcall;
252 procedure png_chunk_error(png_ptr: png_structp;
253 const mess: png_charp);
254 stdcall;
255 procedure png_chunk_warning(png_ptr: png_structp;
256 const mess: png_charp);
257 stdcall;
258 procedure png_convert_from_time_t(ptime: png_timep; ttime: time_t);
259 stdcall;
260 function png_convert_to_rfc1123(png_ptr: png_structp; ptime: png_timep):
261 png_charp;
262 stdcall;
263 function png_create_info_struct(png_ptr: png_structp): png_infop;
264 stdcall;
265 function png_create_read_struct(user_png_ver: png_charp;
266 error_ptr: user_error_ptr; error_fn: png_error_ptr;
267 warn_fn: png_error_ptr): png_structp;
268 stdcall;
269 function png_get_copyright(png_ptr: png_structp): png_charp;
270 stdcall;
271 function png_get_header_ver(png_ptr: png_structp): png_charp;
272 stdcall;
273 function png_get_header_version(png_ptr: png_structp): png_charp;
274 stdcall;
275 function png_get_libpng_ver(png_ptr: png_structp): png_charp;
276 stdcall;
277 function png_create_write_struct(user_png_ver: png_charp;
278 error_ptr: user_error_ptr; error_fn: png_error_ptr;
279 warn_fn: png_error_ptr): png_structp;
280 stdcall;
281 procedure png_destroy_info_struct(png_ptr: png_structp;
282 info_ptr_ptr: png_infopp);
283 stdcall;
284 procedure png_destroy_read_struct(png_ptr_ptr: png_structpp;
285 info_ptr_ptr, end_info_ptr_ptr: png_infopp);
286 stdcall;
287 procedure png_destroy_write_struct(png_ptr_ptr: png_structpp;
288 info_ptr_ptr: png_infopp);
289 stdcall;
290 function png_get_IHDR(png_ptr: png_structp; info_ptr: png_infop;
291 var width, height: png_uint_32; var bit_depth,
292 color_type, interlace_type, compression_type,
293 filter_type: int): png_uint_32;
294 stdcall;
295 function png_get_PLTE(png_ptr: png_structp; info_ptr: png_infop;
296 var palette: png_colorp; var num_palette: int):
297 png_uint_32;
298 stdcall;
299 function png_get_bKGD(png_ptr: png_structp; info_ptr: png_infop;
300 var background: png_color_16p): png_uint_32;
301 stdcall;
302 function png_get_bit_depth(png_ptr: png_structp; info_ptr: png_infop):
303 png_byte;
304 stdcall;
305 function png_get_cHRM(png_ptr: png_structp; info_ptr: png_infop;
306 var white_x, white_y, red_x, red_y, green_x, green_y,
307 blue_x, blue_y: double): png_uint_32;
308 stdcall;
309 function png_get_channels(png_ptr: png_structp; info_ptr: png_infop):
310 png_byte;
311 stdcall;
312 function png_get_color_type(png_ptr: png_structp; info_ptr: png_infop):
313 png_byte;
314 stdcall;
315 function png_get_compression_type(png_ptr: png_structp;
316 info_ptr: png_infop): png_byte;
317 stdcall;
318 function png_get_error_ptr(png_ptr: png_structp): png_voidp;
319 stdcall;
320 function png_get_filter_type(png_ptr: png_structp; info_ptr: png_infop):
321 png_byte;
322 stdcall;
323 function png_get_gAMA(png_ptr: png_structp; info_ptr: png_infop;
324 var file_gamma: double): png_uint_32;
325 stdcall;
326 function png_get_hIST(png_ptr: png_structp; info_ptr: png_infop;
327 var hist: png_uint_16p): png_uint_32;
328 stdcall;
329 function png_get_image_height(png_ptr: png_structp; info_ptr: png_infop):
330 png_uint_32;
331 stdcall;
332 function png_get_image_width(png_ptr: png_structp; info_ptr: png_infop):
333 png_uint_32;
334 stdcall;
335 function png_get_interlace_type(png_ptr: png_structp;
336 info_ptr: png_infop): png_byte;
337 stdcall;
338 function png_get_io_ptr(png_ptr: png_structp): png_voidp;
339 stdcall;
340 function png_get_oFFs(png_ptr: png_structp; info_ptr: png_infop;
341 var offset_x, offset_y: png_uint_32;
342 var unit_type: int): png_uint_32;
343 stdcall;
344 function png_get_sCAL(png_ptr: png_structp; info_ptr: png_infop;
345 var unit:int; var width: png_uint_32; height: png_uint_32):
346 png_uint_32;
347 stdcall
348 function png_get_pCAL(png_ptr: png_structp; info_ptr: png_infop;
349 var purpose: png_charp; var X0, X1: png_int_32;
350 var typ, nparams: int; var units: png_charp;
351 var params: png_charpp): png_uint_32;
352 stdcall;
353 function png_get_pHYs(png_ptr: png_structp; info_ptr: png_infop;
354 var res_x, res_y: png_uint_32; var unit_type: int):
355 png_uint_32;
356 stdcall;
357 function png_get_pixel_aspect_ratio(png_ptr: png_structp;
358 info_ptr: png_infop): float;
359 stdcall;
360 function png_get_pixels_per_meter(png_ptr: png_structp;
361 info_ptr: png_infop): png_uint_32;
362 stdcall;
363 function png_get_progressive_ptr(png_ptr: png_structp): png_voidp;
364 stdcall;
365 function png_get_rgb_to_gray_status(png_ptr: png_structp);
366 stdcall;
367 function png_get_rowbytes(png_ptr: png_structp; info_ptr: png_infop):
368 png_uint_32;
369 stdcall;
370 function png_get_rows(png_ptr: png_structp; info_ptr: png_infop):
371 png_bytepp;
372 stdcall;
373 function png_get_sBIT(png_ptr: png_structp; info_ptr: png_infop;
374 var sig_bits: png_color_8p): png_uint_32;
375 stdcall;
376 function png_get_sRGB(png_ptr: png_structp; info_ptr: png_infop;
377 var file_srgb_intent: int): png_uint_32;
378 stdcall;
379 function png_get_signature(png_ptr: png_structp; info_ptr: png_infop):
380 png_bytep;
381 stdcall;
382 function png_get_tIME(png_ptr: png_structp; info_ptr: png_infop;
383 var mod_time: png_timep): png_uint_32;
384 stdcall;
385 function png_get_tRNS(png_ptr: png_structp; info_ptr: png_infop;
386 var trans: png_bytep; var num_trans: int;
387 var trans_values: png_color_16p): png_uint_32;
388 stdcall;
389 function png_get_text(png_ptr: png_structp; info_ptr: png_infop;
390 var text_ptr: png_textp; var num_text: int):
391 png_uint_32;
392 stdcall;
393 function png_get_user_chunk_ptr(png_ptr: png_structp):
394 png_voidp;
395 stdcall;
396 function png_get_valid(png_ptr: png_structp; info_ptr: png_infop;
397 flag: png_uint_32): png_uint_32;
398 stdcall;
399 function png_get_x_offset_microns(png_ptr: png_structp;
400 info_ptr: png_infop): png_uint_32;
401 stdcall;
402 function png_get_x_offset_pixels(png_ptr: png_structp;
403 info_ptr: png_infop): png_uint_32;
404 stdcall;
405 function png_get_x_pixels_per_meter(png_ptr: png_structp;
406 info_ptr: png_infop): png_uint_32;
407 stdcall;
408 function png_get_y_offset_microns(png_ptr: png_structp;
409 info_ptr: png_infop): png_uint_32;
410 stdcall;
411 function png_get_y_offset_pixels(png_ptr: png_structp;
412 info_ptr: png_infop): png_uint_32;
413 stdcall;
414 function png_get_y_pixels_per_meter(png_ptr: png_structp;
415 info_ptr: png_infop): png_uint_32;
416 stdcall;
417 procedure png_process_data(png_ptr: png_structp; info_ptr: png_infop;
418 buffer: png_bytep; buffer_size: png_size_t);
419 stdcall;
420 procedure png_progressive_combine_row(png_ptr: png_structp;
421 old_row, new_row: png_bytep);
422 stdcall;
423 procedure png_read_end(png_ptr: png_structp; info_ptr: png_infop);
424 stdcall;
425 procedure png_read_image(png_ptr: png_structp; image: png_bytepp);
426 stdcall;
427 procedure png_read_info(png_ptr: png_structp; info_ptr: png_infop);
428 stdcall;
429 procedure png_read_row(png_ptr: png_structp; row, dsp_row: png_bytep);
430 stdcall;
431 procedure png_read_rows(png_ptr: png_structp; row, display_row:
432 png_bytepp; num_rows: png_uint_32);
433 stdcall;
434 procedure png_read_update_info(png_ptr: png_structp; info_ptr: png_infop);
435 stdcall;
436 procedure png_set_IHDR(png_ptr: png_structp; info_ptr: png_infop;
437 width, height: png_uint_32; bit_depth, color_type,
438 interlace_type, compression_type, filter_type: int);
439 stdcall;
440 procedure png_set_PLTE(png_ptr: png_structp; info_ptr: png_infop;
441 palette: png_colorp; num_palette: int);
442 stdcall;
443 procedure png_set_bKGD(png_ptr: png_structp; info_ptr: png_infop;
444 background: png_color_16p);
445 stdcall;
446 procedure png_set_background(png_ptr: png_structp;
447 background_color: png_color_16p;
448 background_gamma_code, need_expand: int;
449 background_gamma: double);
450 stdcall;
451 procedure png_set_bgr(png_ptr: png_structp);
452 stdcall;
453 procedure png_set_cHRM(png_ptr: png_structp; info_ptr: png_infop;
454 white_x, white_y, red_x, red_y, green_x, green_y,
455 blue_x, blue_y: double);
456 stdcall;
457 procedure png_set_cHRM_fixed(png_ptr: png_structp; info_ptr: png_infop;
458 white_x, white_y, red_x, red_y, green_x, green_y,
459 blue_x, blue_y: png_fixed_point);
460 stdcall;
461 procedure png_set_compression_level(png_ptr: png_structp; level: int);
462 stdcall;
463 procedure png_set_compression_mem_level(png_ptr: png_structp;
464 mem_level: int);
465 stdcall;
466 procedure png_set_compression_method(png_ptr: png_structp; method: int);
467 stdcall;
468 procedure png_set_compression_strategy(png_ptr: png_structp;
469 strategy: int);
470 stdcall;
471 procedure png_set_compression_window_bits(png_ptr: png_structp;
472 window_bits: int);
473 stdcall;
474 procedure png_set_crc_action(png_ptr: png_structp;
475 crit_action, ancil_action: int);
476 stdcall;
477 procedure png_set_dither(png_ptr: png_structp; plaette: png_colorp;
478 num_palette, maximum_colors: int;
479 histogram: png_uint_16p; full_dither: int);
480 stdcall;
481 procedure png_set_error_fn(png_ptr: png_structp; error_ptr: png_voidp;
482 error_fn, warning_fn: png_error_ptr);
483 stdcall;
484 procedure png_set_expand(png_ptr: png_structp);
485 stdcall;
486 procedure png_set_filler(png_ptr: png_structp; filler: png_uint_32;
487 filler_loc: int);
488 stdcall;
489 procedure png_set_filter(png_ptr: png_structp; method, filters: int);
490 stdcall;
491 procedure png_set_filter_heuristics(png_ptr: png_structp;
492 heuristic_method, num_weights: int;
493 filter_weights, filter_costs: png_doublep);
494 stdcall;
495 procedure png_set_flush(png_ptr: png_structp; nrows: int);
496 stdcall;
497 procedure png_set_gAMA(png_ptr: png_structp; info_ptr: png_infop;
498 file_gamma: double);
499 stdcall;
500 procedure png_set_gAMA_fixed(png_ptr: png_structp; info_ptr: png_infop;
501 file_gamma: png_fixed_point);
502 stdcall;
503 procedure png_set_gamma(png_ptr: png_structp; screen_gamma,
504 default_file_gamma: double);
505 stdcall;
506 procedure png_set_gray_1_2_4_to_8(png_ptr: png_structp);
507 stdcall;
508 procedure png_set_gray_to_rgb(png_ptr: png_structp);
509 stdcall;
510 procedure png_set_hIST(png_ptr: png_structp; info_ptr: png_infop;
511 hist: png_uint_16p);
512 stdcall;
513 function png_set_interlace_handling(png_ptr: png_structp): int;
514 stdcall;
515 procedure png_set_invalid(png_ptr: png_structp; info_ptr:png_infop;
516 mask: int);
517 stdcall;
518 procedure png_set_invert_alpha(png_ptr: png_structp);
519 stdcall;
520 procedure png_set_invert_mono(png_ptr: png_structp);
521 stdcall;
522 procedure png_set_oFFs(png_ptr: png_structp; info_ptr: png_infop;
523 offset_x, offset_y: png_uint_32; unit_type: int);
524 stdcall;
525 procedure png_set_palette_to_rgb(png_ptr: png_structp);
526 stdcall;
527 procedure png_set_pCAL(png_ptr: png_structp; info_ptr: png_infop;
528 purpose: png_charp; X0, X1: png_int_32;
529 typ, nparams: int; units: png_charp;
530 params: png_charpp);
531 stdcall;
532 procedure png_set_pHYs(png_ptr: png_structp; info_ptr: png_infop;
533 res_x, res_y: png_uint_32; unit_type: int);
534 stdcall;
535 procedure png_set_packing(png_ptr: png_structp);
536 stdcall;
537 procedure png_set_packswap(png_ptr: png_structp);
538 stdcall;
539 procedure png_set_progressive_read_fn(png_ptr: png_structp;
540 progressive_ptr: png_voidp;
541 info_fn: png_progressive_info_ptr;
542 row_fn: png_progressive_row_ptr;
543 end_fn: png_progressive_end_ptr);
544 stdcall;
545 procedure png_set_read_fn(png_ptr: png_structp;
546 io_ptr: png_voidp; read_data_fn: png_rw_ptr);
547 stdcall;
548 procedure png_set_read_status_fn(png_ptr: png_structp;
549 read_row_fn: png_read_status_ptr);
550 stdcall;
551 procedure png_set_read_user_chunk_fn(png_ptr: png_structp;
552 read_user_chunk_fn: png_user_chunk_ptr);
553 stdcall;
554 procedure png_set_read_user_transform_fn(png_ptr: png_structp;
555 read_user_transform_fn: png_user_transform_ptr);
556 stdcall;
557 procedure png_set_rgb_to_gray(png_ptr: png_structp; int: error_action;
558 red_weight, green_weight: double);
559 stdcall;
560 procedure png_set_rgb_to_gray_fixed(png_ptr: png_structp; int: error_action;
561 red_weight, green_weight: png_fixed_point);
562 stdcall;
563 procedure png_set_rows(png_ptr: png_structp; info_ptr: png_infop;
564 row_pointers: png_bytepp);
565 stdcall;
566 procedure png_set_sBIT(png_ptr: png_structp; info_ptr: png_infop;
567 sig_bits: png_color_8p);
568 stdcall;
569 procedure png_set_sRGB(png_ptr: png_structp; info_ptr: png_infop;
570 intent: int);
571 stdcall;
572 procedure png_set_sRGB_gAMA_and_cHRM(png_ptr: png_structp;
573 info_ptr: png_infop; intent: int);
574 stdcall;
575 procedure png_set_shift(png_ptr: png_structp; true_bits: png_color_8p);
576 stdcall;
577 procedure png_set_sig_bytes(png_ptr: png_structp; num_bytes: int);
578 stdcall;
579 procedure png_set_strip_16(png_ptr: png_structp);
580 stdcall;
581 procedure png_set_strip_alpha(png_ptr: png_structp);
582 stdcall;
583 procedure png_set_swap(png_ptr: png_structp);
584 stdcall;
585 procedure png_set_swap_alpha(png_ptr: png_structp);
586 stdcall;
587 procedure png_set_tIME(png_ptr: png_structp; info_ptr: png_infop;
588 mod_time: png_timep);
589 stdcall;
590 procedure png_set_tRNS(png_ptr: png_structp; info_ptr: png_infop;
591 trans: png_bytep; num_trans: int;
592 trans_values: png_color_16p);
593 stdcall;
594 procedure png_set_tRNS_to_alpha(png_ptr: png_structp);
595 stdcall;
596 procedure png_set_text(png_ptr: png_structp; info_ptr: png_infop;
597 text_ptr: png_textp; num_text: int);
598 stdcall;
599 procedure png_set_write_fn(png_ptr: png_structp;
600 io_ptr: png_voidp; write_data_fn: png_rw_ptr;
601 output_flush_fn: png_flush_ptr);
602 stdcall;
603 procedure png_set_write_status_fn(png_ptr: png_structp;
604 write_row_fn: png_write_status_ptr);
605 stdcall;
606 procedure png_set_write_user_transform_fn(png_ptr: png_structp;
607 write_user_transform_fn: png_user_transform_ptr);
608 stdcall;
609 function png_sig_cmp(sig: png_bytep; start, num_to_check: png_size_t):
610 int;
611 stdcall;
612 procedure png_start_read_image(png_ptr: png_structp);
613 stdcall;
614 procedure png_write_chunk(png_ptr: png_structp;
615 chunk_name, data: png_bytep; length: png_size_t);
616 stdcall;
617 procedure png_write_chunk_data(png_ptr: png_structp;
618 data: png_bytep; length: png_size_t);
619 stdcall;
620 procedure png_write_chunk_end(png_ptr: png_structp);
621 stdcall;
622 procedure png_write_chunk_start(png_ptr: png_structp;
623 chunk_name: png_bytep; length: png_uint_32);
624 stdcall;
625 procedure png_write_end(png_ptr: png_structp; info_ptr: png_infop);
626 stdcall;
627 procedure png_write_flush(png_ptr: png_structp);
628 stdcall;
629 procedure png_write_image(png_ptr: png_structp; image: png_bytepp);
630 stdcall;
631 procedure png_write_info(png_ptr: png_structp; info_ptr: png_infop);
632 stdcall;
633 procedure png_write_info_before_PLTE(png_ptr: png_structp; info_ptr: png_infop);
634 stdcall;
635 procedure png_write_row(png_ptr: png_structp; row: png_bytep);
636 stdcall;
637 procedure png_write_rows(png_ptr: png_structp; row: png_bytepp;
638 num_rows: png_uint_32);
639 stdcall;
640 procedure png_get_iCCP(png_ptr: png_structp; info_ptr: png_infop;
641 name: png_charpp; compression_type: int *; profile: png_charpp;
642 proflen: png_int_32): png_bytep;
643 stdcall;
644 procedure png_get_sPLT(png_ptr: png_structp;
645 info_ptr: png_infop; entries: png_spalette_pp): png_uint_32;
646 stdcall;
647 procedure png_set_iCCP(png_ptr: png_structp; info_ptr: png_infop;
648 name: png_charp; compression_type: int; profile: png_charp;
649 proflen: int);
650 stdcall;
651 procedure png_free_data(png_ptr: png_structp; info_ptr: png_infop; num: int);
652 stdcall;
653 procedure png_set_sPLT(png_ptr: png_structp; info_ptr: png_infop;
654 entries: png_spalette_p; nentries: int);
655 stdcall;
656
657 implementation
658
659 const
660 pngDLL = 'png32bd.dll';
661
662 procedure png_build_grayscale_palette; external pngDLL;
663 function png_check_sig; external pngDLL;
664 procedure png_chunk_error; external pngDLL;
665 procedure png_chunk_warning; external pngDLL;
666 procedure png_convert_from_time_t; external pngDLL;
667 function png_convert_to_rfc1123; external pngDLL;
668 function png_create_info_struct; external pngDLL;
669 function png_create_read_struct; external pngDLL;
670 function png_create_write_struct; external pngDLL;
671 procedure png_destroy_info_struct; external pngDLL;
672 procedure png_destroy_read_struct; external pngDLL;
673 procedure png_destroy_write_struct; external pngDLL;
674 function png_get_IHDR; external pngDLL;
675 function png_get_PLTE; external pngDLL;
676 function png_get_bKGD; external pngDLL;
677 function png_get_bit_depth; external pngDLL;
678 function png_get_cHRM; external pngDLL;
679 function png_get_channels; external pngDLL;
680 function png_get_color_type; external pngDLL;
681 function png_get_compression_type; external pngDLL;
682 function png_get_error_ptr; external pngDLL;
683 function png_get_filter_type; external pngDLL;
684 function png_get_gAMA; external pngDLL;
685 function png_get_hIST; external pngDLL;
686 function png_get_image_height; external pngDLL;
687 function png_get_image_width; external pngDLL;
688 function png_get_interlace_type; external pngDLL;
689 function png_get_io_ptr; external pngDLL;
690 function png_get_oFFs; external pngDLL;
691 function png_get_pCAL; external pngDLL;
692 function png_get_pHYs; external pngDLL;
693 function png_get_pixel_aspect_ratio; external pngDLL;
694 function png_get_pixels_per_meter; external pngDLL;
695 function png_get_progressive_ptr; external pngDLL;
696 function png_get_rowbytes; external pngDLL;
697 function png_get_rows; external pngDLL;
698 function png_get_sBIT; external pngDLL;
699 function png_get_sRGB; external pngDLL;
700 function png_get_signature; external pngDLL;
701 function png_get_tIME; external pngDLL;
702 function png_get_tRNS; external pngDLL;
703 function png_get_text; external pngDLL;
704 function png_get_user_chunk_ptr; external pngDLL;
705 function png_get_valid; external pngDLL;
706 function png_get_x_offset_microns; external pngDLL;
707 function png_get_x_offset_pixels; external pngDLL;
708 function png_get_x_pixels_per_meter; external pngDLL;
709 function png_get_y_offset_microns; external pngDLL;
710 function png_get_y_offset_pixels; external pngDLL;
711 function png_get_y_pixels_per_meter; external pngDLL;
712 procedure png_process_data; external pngDLL;
713 procedure png_progressive_combine_row; external pngDLL;
714 procedure png_read_end; external pngDLL;
715 procedure png_read_image; external pngDLL;
716 procedure png_read_info; external pngDLL;
717 procedure png_read_row; external pngDLL;
718 procedure png_read_rows; external pngDLL;
719 procedure png_read_update_info; external pngDLL;
720 procedure png_set_IHDR; external pngDLL;
721 procedure png_set_PLTE; external pngDLL;
722 procedure png_set_bKGD; external pngDLL;
723 procedure png_set_background; external pngDLL;
724 procedure png_set_bgr; external pngDLL;
725 procedure png_set_cHRM; external pngDLL;
726 procedure png_set_cHRM_fixed; external pngDLL;
727 procedure png_set_compression_level; external pngDLL;
728 procedure png_set_compression_mem_level; external pngDLL;
729 procedure png_set_compression_method; external pngDLL;
730 procedure png_set_compression_strategy; external pngDLL;
731 procedure png_set_compression_window_bits; external pngDLL;
732 procedure png_set_crc_action; external pngDLL;
733 procedure png_set_dither; external pngDLL;
734 procedure png_set_error_fn; external pngDLL;
735 procedure png_set_expand; external pngDLL;
736 procedure png_set_filler; external pngDLL;
737 procedure png_set_filter; external pngDLL;
738 procedure png_set_filter_heuristics; external pngDLL;
739 procedure png_set_flush; external pngDLL;
740 procedure png_set_gAMA; external pngDLL;
741 procedure png_set_gAMA_fixed; external pngDLL;
742 procedure png_set_gamma; external pngDLL;
743 procedure png_set_gray_to_rgb; external pngDLL;
744 procedure png_set_hIST; external pngDLL;
745 function png_set_interlace_handling; external pngDLL;
746 procedure png_set_invert_alpha; external pngDLL;
747 procedure png_set_invert_mono; external pngDLL;
748 procedure png_set_oFFs; external pngDLL;
749 procedure png_set_pCAL; external pngDLL;
750 procedure png_set_pHYs; external pngDLL;
751 procedure png_set_packing; external pngDLL;
752 procedure png_set_packswap; external pngDLL;
753 procedure png_set_progressive_read_fn; external pngDLL;
754 procedure png_set_read_fn; external pngDLL;
755 procedure png_set_read_status_fn; external pngDLL;
756 procedure png_set_read_user_transform_fn; external pngDLL;
757 procedure png_set_rgb_to_gray; external pngDLL;
758 procedure png_set_rgb_to_gray_fixed; external pngDLL;
759 procedure png_set_rows; external pngDLL;
760 procedure png_set_sBIT; external pngDLL;
761 procedure png_set_sRGB; external pngDLL;
762 procedure png_set_sRGB_gAMA_and_cHRM; external pngDLL;
763 procedure png_set_shift; external pngDLL;
764 procedure png_set_sig_bytes; external pngDLL;
765 procedure png_set_strip_16; external pngDLL;
766 procedure png_set_strip_alpha; external pngDLL;
767 procedure png_set_swap; external pngDLL;
768 procedure png_set_swap_alpha; external pngDLL;
769 procedure png_set_tIME; external pngDLL;
770 procedure png_set_tRNS; external pngDLL;
771 procedure png_set_text; external pngDLL;
772 procedure png_set_user_chunk_fn; external pngDLL;
773 procedure png_set_write_fn; external pngDLL;
774 procedure png_set_write_status_fn; external pngDLL;
775 procedure png_set_write_user_transform_fn; external pngDLL;
776 function png_sig_cmp; external pngDLL;
777 procedure png_start_read_image; external pngDLL;
778 procedure png_write_chunk; external pngDLL;
779 procedure png_write_chunk_data; external pngDLL;
780 procedure png_write_chunk_end; external pngDLL;
781 procedure png_write_chunk_start; external pngDLL;
782 procedure png_write_end; external pngDLL;
783 procedure png_write_flush; external pngDLL;
784 procedure png_write_image; external pngDLL;
785 procedure png_write_info; external pngDLL;
786 procedure png_write_info_before_PLTE; external pngDLL;
787 procedure png_write_row; external pngDLL;
788 procedure png_write_rows; external pngDLL;
789 procedure png_get_iCCP; external pngDLL;
790 procedure png_get_sPLT; external pngDLL;
791 procedure png_set_iCCP; external pngDLL;
792 procedure png_set_sPLT; external pngDLL;
793 procedure png_free_data; external pngDLL;
794
795 end.