]> git.saurik.com Git - wxWidgets.git/blame - src/png/scripts/pngdef.pas
The UseAntiAliasing is off by default on wxMac. Add a menu item to
[wxWidgets.git] / src / png / scripts / pngdef.pas
CommitLineData
c6b71bff
GD
1unit 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
7interface
8
9const
10 PNG_LIBPNG_VER_STRING = '1.2.4';
11 PNG_LIBPNG_VER = 10204;
12
13type
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
129const
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
248procedure png_build_grayscale_palette(bit_depth: int; palette: png_colorp);
249 stdcall;
250function png_check_sig(sig: png_bytep; num: int): int;
251 stdcall;
252procedure png_chunk_error(png_ptr: png_structp;
253 const mess: png_charp);
254 stdcall;
255procedure png_chunk_warning(png_ptr: png_structp;
256 const mess: png_charp);
257 stdcall;
258procedure png_convert_from_time_t(ptime: png_timep; ttime: time_t);
259 stdcall;
260function png_convert_to_rfc1123(png_ptr: png_structp; ptime: png_timep):
261 png_charp;
262 stdcall;
263function png_create_info_struct(png_ptr: png_structp): png_infop;
264 stdcall;
265function 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;
269function png_get_copyright(png_ptr: png_structp): png_charp;
270 stdcall;
271function png_get_header_ver(png_ptr: png_structp): png_charp;
272 stdcall;
273function png_get_header_version(png_ptr: png_structp): png_charp;
274 stdcall;
275function png_get_libpng_ver(png_ptr: png_structp): png_charp;
276 stdcall;
277function 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;
281procedure png_destroy_info_struct(png_ptr: png_structp;
282 info_ptr_ptr: png_infopp);
283 stdcall;
284procedure png_destroy_read_struct(png_ptr_ptr: png_structpp;
285 info_ptr_ptr, end_info_ptr_ptr: png_infopp);
286 stdcall;
287procedure png_destroy_write_struct(png_ptr_ptr: png_structpp;
288 info_ptr_ptr: png_infopp);
289 stdcall;
290function 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;
295function 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;
299function png_get_bKGD(png_ptr: png_structp; info_ptr: png_infop;
300 var background: png_color_16p): png_uint_32;
301 stdcall;
302function png_get_bit_depth(png_ptr: png_structp; info_ptr: png_infop):
303 png_byte;
304 stdcall;
305function 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;
309function png_get_channels(png_ptr: png_structp; info_ptr: png_infop):
310 png_byte;
311 stdcall;
312function png_get_color_type(png_ptr: png_structp; info_ptr: png_infop):
313 png_byte;
314 stdcall;
315function png_get_compression_type(png_ptr: png_structp;
316 info_ptr: png_infop): png_byte;
317 stdcall;
318function png_get_error_ptr(png_ptr: png_structp): png_voidp;
319 stdcall;
320function png_get_filter_type(png_ptr: png_structp; info_ptr: png_infop):
321 png_byte;
322 stdcall;
323function png_get_gAMA(png_ptr: png_structp; info_ptr: png_infop;
324 var file_gamma: double): png_uint_32;
325 stdcall;
326function png_get_hIST(png_ptr: png_structp; info_ptr: png_infop;
327 var hist: png_uint_16p): png_uint_32;
328 stdcall;
329function png_get_image_height(png_ptr: png_structp; info_ptr: png_infop):
330 png_uint_32;
331 stdcall;
332function png_get_image_width(png_ptr: png_structp; info_ptr: png_infop):
333 png_uint_32;
334 stdcall;
335function png_get_interlace_type(png_ptr: png_structp;
336 info_ptr: png_infop): png_byte;
337 stdcall;
338function png_get_io_ptr(png_ptr: png_structp): png_voidp;
339 stdcall;
340function 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;
344function 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
348function 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;
353function 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;
357function png_get_pixel_aspect_ratio(png_ptr: png_structp;
358 info_ptr: png_infop): float;
359 stdcall;
360function png_get_pixels_per_meter(png_ptr: png_structp;
361 info_ptr: png_infop): png_uint_32;
362 stdcall;
363function png_get_progressive_ptr(png_ptr: png_structp): png_voidp;
364 stdcall;
365function png_get_rgb_to_gray_status(png_ptr: png_structp);
366 stdcall;
367function png_get_rowbytes(png_ptr: png_structp; info_ptr: png_infop):
368 png_uint_32;
369 stdcall;
370function png_get_rows(png_ptr: png_structp; info_ptr: png_infop):
371 png_bytepp;
372 stdcall;
373function png_get_sBIT(png_ptr: png_structp; info_ptr: png_infop;
374 var sig_bits: png_color_8p): png_uint_32;
375 stdcall;
376function png_get_sRGB(png_ptr: png_structp; info_ptr: png_infop;
377 var file_srgb_intent: int): png_uint_32;
378 stdcall;
379function png_get_signature(png_ptr: png_structp; info_ptr: png_infop):
380 png_bytep;
381 stdcall;
382function png_get_tIME(png_ptr: png_structp; info_ptr: png_infop;
383 var mod_time: png_timep): png_uint_32;
384 stdcall;
385function 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;
389function 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;
393function png_get_user_chunk_ptr(png_ptr: png_structp):
394 png_voidp;
395 stdcall;
396function png_get_valid(png_ptr: png_structp; info_ptr: png_infop;
397 flag: png_uint_32): png_uint_32;
398 stdcall;
399function png_get_x_offset_microns(png_ptr: png_structp;
400 info_ptr: png_infop): png_uint_32;
401 stdcall;
402function png_get_x_offset_pixels(png_ptr: png_structp;
403 info_ptr: png_infop): png_uint_32;
404 stdcall;
405function png_get_x_pixels_per_meter(png_ptr: png_structp;
406 info_ptr: png_infop): png_uint_32;
407 stdcall;
408function png_get_y_offset_microns(png_ptr: png_structp;
409 info_ptr: png_infop): png_uint_32;
410 stdcall;
411function png_get_y_offset_pixels(png_ptr: png_structp;
412 info_ptr: png_infop): png_uint_32;
413 stdcall;
414function png_get_y_pixels_per_meter(png_ptr: png_structp;
415 info_ptr: png_infop): png_uint_32;
416 stdcall;
417procedure png_process_data(png_ptr: png_structp; info_ptr: png_infop;
418 buffer: png_bytep; buffer_size: png_size_t);
419 stdcall;
420procedure png_progressive_combine_row(png_ptr: png_structp;
421 old_row, new_row: png_bytep);
422 stdcall;
423procedure png_read_end(png_ptr: png_structp; info_ptr: png_infop);
424 stdcall;
425procedure png_read_image(png_ptr: png_structp; image: png_bytepp);
426 stdcall;
427procedure png_read_info(png_ptr: png_structp; info_ptr: png_infop);
428 stdcall;
429procedure png_read_row(png_ptr: png_structp; row, dsp_row: png_bytep);
430 stdcall;
431procedure png_read_rows(png_ptr: png_structp; row, display_row:
432 png_bytepp; num_rows: png_uint_32);
433 stdcall;
434procedure png_read_update_info(png_ptr: png_structp; info_ptr: png_infop);
435 stdcall;
436procedure 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;
440procedure png_set_PLTE(png_ptr: png_structp; info_ptr: png_infop;
441 palette: png_colorp; num_palette: int);
442 stdcall;
443procedure png_set_bKGD(png_ptr: png_structp; info_ptr: png_infop;
444 background: png_color_16p);
445 stdcall;
446procedure 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;
451procedure png_set_bgr(png_ptr: png_structp);
452 stdcall;
453procedure 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;
457procedure 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;
461procedure png_set_compression_level(png_ptr: png_structp; level: int);
462 stdcall;
463procedure png_set_compression_mem_level(png_ptr: png_structp;
464 mem_level: int);
465 stdcall;
466procedure png_set_compression_method(png_ptr: png_structp; method: int);
467 stdcall;
468procedure png_set_compression_strategy(png_ptr: png_structp;
469 strategy: int);
470 stdcall;
471procedure png_set_compression_window_bits(png_ptr: png_structp;
472 window_bits: int);
473 stdcall;
474procedure png_set_crc_action(png_ptr: png_structp;
475 crit_action, ancil_action: int);
476 stdcall;
477procedure 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;
481procedure png_set_error_fn(png_ptr: png_structp; error_ptr: png_voidp;
482 error_fn, warning_fn: png_error_ptr);
483 stdcall;
484procedure png_set_expand(png_ptr: png_structp);
485 stdcall;
486procedure png_set_filler(png_ptr: png_structp; filler: png_uint_32;
487 filler_loc: int);
488 stdcall;
489procedure png_set_filter(png_ptr: png_structp; method, filters: int);
490 stdcall;
491procedure png_set_filter_heuristics(png_ptr: png_structp;
492 heuristic_method, num_weights: int;
493 filter_weights, filter_costs: png_doublep);
494 stdcall;
495procedure png_set_flush(png_ptr: png_structp; nrows: int);
496 stdcall;
497procedure png_set_gAMA(png_ptr: png_structp; info_ptr: png_infop;
498 file_gamma: double);
499 stdcall;
500procedure png_set_gAMA_fixed(png_ptr: png_structp; info_ptr: png_infop;
501 file_gamma: png_fixed_point);
502 stdcall;
503procedure png_set_gamma(png_ptr: png_structp; screen_gamma,
504 default_file_gamma: double);
505 stdcall;
506procedure png_set_gray_1_2_4_to_8(png_ptr: png_structp);
507 stdcall;
508procedure png_set_gray_to_rgb(png_ptr: png_structp);
509 stdcall;
510procedure png_set_hIST(png_ptr: png_structp; info_ptr: png_infop;
511 hist: png_uint_16p);
512 stdcall;
513function png_set_interlace_handling(png_ptr: png_structp): int;
514 stdcall;
515procedure png_set_invalid(png_ptr: png_structp; info_ptr:png_infop;
516 mask: int);
517 stdcall;
518procedure png_set_invert_alpha(png_ptr: png_structp);
519 stdcall;
520procedure png_set_invert_mono(png_ptr: png_structp);
521 stdcall;
522procedure png_set_oFFs(png_ptr: png_structp; info_ptr: png_infop;
523 offset_x, offset_y: png_uint_32; unit_type: int);
524 stdcall;
525procedure png_set_palette_to_rgb(png_ptr: png_structp);
526 stdcall;
527procedure 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;
532procedure png_set_pHYs(png_ptr: png_structp; info_ptr: png_infop;
533 res_x, res_y: png_uint_32; unit_type: int);
534 stdcall;
535procedure png_set_packing(png_ptr: png_structp);
536 stdcall;
537procedure png_set_packswap(png_ptr: png_structp);
538 stdcall;
539procedure 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;
545procedure png_set_read_fn(png_ptr: png_structp;
546 io_ptr: png_voidp; read_data_fn: png_rw_ptr);
547 stdcall;
548procedure png_set_read_status_fn(png_ptr: png_structp;
549 read_row_fn: png_read_status_ptr);
550 stdcall;
551procedure png_set_read_user_chunk_fn(png_ptr: png_structp;
552 read_user_chunk_fn: png_user_chunk_ptr);
553 stdcall;
554procedure png_set_read_user_transform_fn(png_ptr: png_structp;
555 read_user_transform_fn: png_user_transform_ptr);
556 stdcall;
557procedure png_set_rgb_to_gray(png_ptr: png_structp; int: error_action;
558 red_weight, green_weight: double);
559 stdcall;
560procedure png_set_rgb_to_gray_fixed(png_ptr: png_structp; int: error_action;
561 red_weight, green_weight: png_fixed_point);
562 stdcall;
563procedure png_set_rows(png_ptr: png_structp; info_ptr: png_infop;
564 row_pointers: png_bytepp);
565 stdcall;
566procedure png_set_sBIT(png_ptr: png_structp; info_ptr: png_infop;
567 sig_bits: png_color_8p);
568 stdcall;
569procedure png_set_sRGB(png_ptr: png_structp; info_ptr: png_infop;
570 intent: int);
571 stdcall;
572procedure png_set_sRGB_gAMA_and_cHRM(png_ptr: png_structp;
573 info_ptr: png_infop; intent: int);
574 stdcall;
575procedure png_set_shift(png_ptr: png_structp; true_bits: png_color_8p);
576 stdcall;
577procedure png_set_sig_bytes(png_ptr: png_structp; num_bytes: int);
578 stdcall;
579procedure png_set_strip_16(png_ptr: png_structp);
580 stdcall;
581procedure png_set_strip_alpha(png_ptr: png_structp);
582 stdcall;
583procedure png_set_swap(png_ptr: png_structp);
584 stdcall;
585procedure png_set_swap_alpha(png_ptr: png_structp);
586 stdcall;
587procedure png_set_tIME(png_ptr: png_structp; info_ptr: png_infop;
588 mod_time: png_timep);
589 stdcall;
590procedure 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;
594procedure png_set_tRNS_to_alpha(png_ptr: png_structp);
595 stdcall;
596procedure png_set_text(png_ptr: png_structp; info_ptr: png_infop;
597 text_ptr: png_textp; num_text: int);
598 stdcall;
599procedure 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;
603procedure png_set_write_status_fn(png_ptr: png_structp;
604 write_row_fn: png_write_status_ptr);
605 stdcall;
606procedure png_set_write_user_transform_fn(png_ptr: png_structp;
607 write_user_transform_fn: png_user_transform_ptr);
608 stdcall;
609function png_sig_cmp(sig: png_bytep; start, num_to_check: png_size_t):
610 int;
611 stdcall;
612procedure png_start_read_image(png_ptr: png_structp);
613 stdcall;
614procedure png_write_chunk(png_ptr: png_structp;
615 chunk_name, data: png_bytep; length: png_size_t);
616 stdcall;
617procedure png_write_chunk_data(png_ptr: png_structp;
618 data: png_bytep; length: png_size_t);
619 stdcall;
620procedure png_write_chunk_end(png_ptr: png_structp);
621 stdcall;
622procedure png_write_chunk_start(png_ptr: png_structp;
623 chunk_name: png_bytep; length: png_uint_32);
624 stdcall;
625procedure png_write_end(png_ptr: png_structp; info_ptr: png_infop);
626 stdcall;
627procedure png_write_flush(png_ptr: png_structp);
628 stdcall;
629procedure png_write_image(png_ptr: png_structp; image: png_bytepp);
630 stdcall;
631procedure png_write_info(png_ptr: png_structp; info_ptr: png_infop);
632 stdcall;
633procedure png_write_info_before_PLTE(png_ptr: png_structp; info_ptr: png_infop);
634 stdcall;
635procedure png_write_row(png_ptr: png_structp; row: png_bytep);
636 stdcall;
637procedure png_write_rows(png_ptr: png_structp; row: png_bytepp;
638 num_rows: png_uint_32);
639 stdcall;
640procedure 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;
644procedure png_get_sPLT(png_ptr: png_structp;
645 info_ptr: png_infop; entries: png_spalette_pp): png_uint_32;
646 stdcall;
647procedure 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;
651procedure png_free_data(png_ptr: png_structp; info_ptr: png_infop; num: int);
652 stdcall;
653procedure png_set_sPLT(png_ptr: png_structp; info_ptr: png_infop;
654 entries: png_spalette_p; nentries: int);
655 stdcall;
656
657implementation
658
659const
660 pngDLL = 'png32bd.dll';
661
662procedure png_build_grayscale_palette; external pngDLL;
663function png_check_sig; external pngDLL;
664procedure png_chunk_error; external pngDLL;
665procedure png_chunk_warning; external pngDLL;
666procedure png_convert_from_time_t; external pngDLL;
667function png_convert_to_rfc1123; external pngDLL;
668function png_create_info_struct; external pngDLL;
669function png_create_read_struct; external pngDLL;
670function png_create_write_struct; external pngDLL;
671procedure png_destroy_info_struct; external pngDLL;
672procedure png_destroy_read_struct; external pngDLL;
673procedure png_destroy_write_struct; external pngDLL;
674function png_get_IHDR; external pngDLL;
675function png_get_PLTE; external pngDLL;
676function png_get_bKGD; external pngDLL;
677function png_get_bit_depth; external pngDLL;
678function png_get_cHRM; external pngDLL;
679function png_get_channels; external pngDLL;
680function png_get_color_type; external pngDLL;
681function png_get_compression_type; external pngDLL;
682function png_get_error_ptr; external pngDLL;
683function png_get_filter_type; external pngDLL;
684function png_get_gAMA; external pngDLL;
685function png_get_hIST; external pngDLL;
686function png_get_image_height; external pngDLL;
687function png_get_image_width; external pngDLL;
688function png_get_interlace_type; external pngDLL;
689function png_get_io_ptr; external pngDLL;
690function png_get_oFFs; external pngDLL;
691function png_get_pCAL; external pngDLL;
692function png_get_pHYs; external pngDLL;
693function png_get_pixel_aspect_ratio; external pngDLL;
694function png_get_pixels_per_meter; external pngDLL;
695function png_get_progressive_ptr; external pngDLL;
696function png_get_rowbytes; external pngDLL;
697function png_get_rows; external pngDLL;
698function png_get_sBIT; external pngDLL;
699function png_get_sRGB; external pngDLL;
700function png_get_signature; external pngDLL;
701function png_get_tIME; external pngDLL;
702function png_get_tRNS; external pngDLL;
703function png_get_text; external pngDLL;
704function png_get_user_chunk_ptr; external pngDLL;
705function png_get_valid; external pngDLL;
706function png_get_x_offset_microns; external pngDLL;
707function png_get_x_offset_pixels; external pngDLL;
708function png_get_x_pixels_per_meter; external pngDLL;
709function png_get_y_offset_microns; external pngDLL;
710function png_get_y_offset_pixels; external pngDLL;
711function png_get_y_pixels_per_meter; external pngDLL;
712procedure png_process_data; external pngDLL;
713procedure png_progressive_combine_row; external pngDLL;
714procedure png_read_end; external pngDLL;
715procedure png_read_image; external pngDLL;
716procedure png_read_info; external pngDLL;
717procedure png_read_row; external pngDLL;
718procedure png_read_rows; external pngDLL;
719procedure png_read_update_info; external pngDLL;
720procedure png_set_IHDR; external pngDLL;
721procedure png_set_PLTE; external pngDLL;
722procedure png_set_bKGD; external pngDLL;
723procedure png_set_background; external pngDLL;
724procedure png_set_bgr; external pngDLL;
725procedure png_set_cHRM; external pngDLL;
726procedure png_set_cHRM_fixed; external pngDLL;
727procedure png_set_compression_level; external pngDLL;
728procedure png_set_compression_mem_level; external pngDLL;
729procedure png_set_compression_method; external pngDLL;
730procedure png_set_compression_strategy; external pngDLL;
731procedure png_set_compression_window_bits; external pngDLL;
732procedure png_set_crc_action; external pngDLL;
733procedure png_set_dither; external pngDLL;
734procedure png_set_error_fn; external pngDLL;
735procedure png_set_expand; external pngDLL;
736procedure png_set_filler; external pngDLL;
737procedure png_set_filter; external pngDLL;
738procedure png_set_filter_heuristics; external pngDLL;
739procedure png_set_flush; external pngDLL;
740procedure png_set_gAMA; external pngDLL;
741procedure png_set_gAMA_fixed; external pngDLL;
742procedure png_set_gamma; external pngDLL;
743procedure png_set_gray_to_rgb; external pngDLL;
744procedure png_set_hIST; external pngDLL;
745function png_set_interlace_handling; external pngDLL;
746procedure png_set_invert_alpha; external pngDLL;
747procedure png_set_invert_mono; external pngDLL;
748procedure png_set_oFFs; external pngDLL;
749procedure png_set_pCAL; external pngDLL;
750procedure png_set_pHYs; external pngDLL;
751procedure png_set_packing; external pngDLL;
752procedure png_set_packswap; external pngDLL;
753procedure png_set_progressive_read_fn; external pngDLL;
754procedure png_set_read_fn; external pngDLL;
755procedure png_set_read_status_fn; external pngDLL;
756procedure png_set_read_user_transform_fn; external pngDLL;
757procedure png_set_rgb_to_gray; external pngDLL;
758procedure png_set_rgb_to_gray_fixed; external pngDLL;
759procedure png_set_rows; external pngDLL;
760procedure png_set_sBIT; external pngDLL;
761procedure png_set_sRGB; external pngDLL;
762procedure png_set_sRGB_gAMA_and_cHRM; external pngDLL;
763procedure png_set_shift; external pngDLL;
764procedure png_set_sig_bytes; external pngDLL;
765procedure png_set_strip_16; external pngDLL;
766procedure png_set_strip_alpha; external pngDLL;
767procedure png_set_swap; external pngDLL;
768procedure png_set_swap_alpha; external pngDLL;
769procedure png_set_tIME; external pngDLL;
770procedure png_set_tRNS; external pngDLL;
771procedure png_set_text; external pngDLL;
772procedure png_set_user_chunk_fn; external pngDLL;
773procedure png_set_write_fn; external pngDLL;
774procedure png_set_write_status_fn; external pngDLL;
775procedure png_set_write_user_transform_fn; external pngDLL;
776function png_sig_cmp; external pngDLL;
777procedure png_start_read_image; external pngDLL;
778procedure png_write_chunk; external pngDLL;
779procedure png_write_chunk_data; external pngDLL;
780procedure png_write_chunk_end; external pngDLL;
781procedure png_write_chunk_start; external pngDLL;
782procedure png_write_end; external pngDLL;
783procedure png_write_flush; external pngDLL;
784procedure png_write_image; external pngDLL;
785procedure png_write_info; external pngDLL;
786procedure png_write_info_before_PLTE; external pngDLL;
787procedure png_write_row; external pngDLL;
788procedure png_write_rows; external pngDLL;
789procedure png_get_iCCP; external pngDLL;
790procedure png_get_sPLT; external pngDLL;
791procedure png_set_iCCP; external pngDLL;
792procedure png_set_sPLT; external pngDLL;
793procedure png_free_data; external pngDLL;
794
795end.