| 1 |
{%MainUnit castleinternalpng.pas} |
| 2 |
{ |
| 3 |
Copied from fpc/trunk/packages/libpng/src/png.pp, |
| 4 |
and somewhat fixed (added missing constants, |
| 5 |
added missing png_set_expand_gray_1_2_4_to_8, |
| 6 |
removed the deprecated variables and functions). |
| 7 |
|
| 8 |
This unit allows both static and dynamic linking to libpng. |
| 9 |
(Although we use it only for static linking.) |
| 10 |
Contrary to castleinternalpng_dynamic.inc, that allows only dynamic linking. |
| 11 |
Advantage of castleinternalpng_dynamic.inc approach is that you can specify |
| 12 |
alternative names for png library file, and you do the initialization |
| 13 |
at runtime at any moment. |
| 14 |
} |
| 15 |
|
| 16 |
{$ifndef NO_SMART_LINK} |
| 17 |
{$smartlink on} |
| 18 |
{$endif} |
| 19 |
|
| 20 |
interface |
| 21 |
|
| 22 |
{ Automatically converted by H2Pas 0.99.15 from png.h } |
| 23 |
{ The following command line parameters were used: |
| 24 |
png.h |
| 25 |
} |
| 26 |
|
| 27 |
{$PACKRECORDS C} |
| 28 |
|
| 29 |
uses |
| 30 |
ctypes, |
| 31 |
zlib; |
| 32 |
|
| 33 |
Const |
| 34 |
{$ifdef MSWINDOWS} |
| 35 |
LibPng = 'libpng13'; // Library name |
| 36 |
{ matching lib version for libpng13.dll, needed for initialization } |
| 37 |
PNG_LIBPNG_VER_STRING='1.2.12'; |
| 38 |
{$else MSWINDOWS} |
| 39 |
LibPng = 'png'; // Library name |
| 40 |
{ matching lib version for libpng, needed for initialization } |
| 41 |
PNG_LIBPNG_VER_STRING='1.2.12'; |
| 42 |
{$linklib png} |
| 43 |
{$endif MSWINDOWS} |
| 44 |
|
| 45 |
{ All consts below added by Kambi. } |
| 46 |
|
| 47 |
const |
| 48 |
{ Supported compression types for text in PNG files (tEXt, and zTXt). |
| 49 |
* The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. } |
| 50 |
PNG_TEXT_COMPRESSION_NONE_WR = -3; |
| 51 |
PNG_TEXT_COMPRESSION_zTXt_WR = -2; |
| 52 |
PNG_TEXT_COMPRESSION_NONE = -1; |
| 53 |
PNG_TEXT_COMPRESSION_zTXt = 0; |
| 54 |
PNG_ITXT_COMPRESSION_NONE = 1; |
| 55 |
PNG_ITXT_COMPRESSION_zTXt = 2; |
| 56 |
PNG_TEXT_COMPRESSION_LAST = 3; { Not a valid value } |
| 57 |
|
| 58 |
{ Maximum positive integer used in PNG is (2^31)-1 } |
| 59 |
PNG_MAX_UINT = High(UInt32); |
| 60 |
|
| 61 |
{ These describe the color_type field in png_info. } |
| 62 |
{ color type masks } |
| 63 |
PNG_COLOR_MASK_PALETTE = 1; |
| 64 |
PNG_COLOR_MASK_COLOR = 2; |
| 65 |
PNG_COLOR_MASK_ALPHA = 4; |
| 66 |
|
| 67 |
{ color types. Note that not all combinations are legal } |
| 68 |
PNG_COLOR_TYPE_GRAY = 0; |
| 69 |
PNG_COLOR_TYPE_PALETTE = (PNG_COLOR_MASK_COLOR or PNG_COLOR_MASK_PALETTE); |
| 70 |
PNG_COLOR_TYPE_RGB = (PNG_COLOR_MASK_COLOR); |
| 71 |
PNG_COLOR_TYPE_RGB_ALPHA = (PNG_COLOR_MASK_COLOR or PNG_COLOR_MASK_ALPHA); |
| 72 |
PNG_COLOR_TYPE_GRAY_ALPHA = (PNG_COLOR_MASK_ALPHA); |
| 73 |
{ aliases } |
| 74 |
PNG_COLOR_TYPE_RGBA = PNG_COLOR_TYPE_RGB_ALPHA; |
| 75 |
PNG_COLOR_TYPE_GA = PNG_COLOR_TYPE_GRAY_ALPHA; |
| 76 |
|
| 77 |
{ This is for compression type. PNG 1.0-1.2 only define the single type. } |
| 78 |
PNG_COMPRESSION_TYPE_BASE = 0 { Deflate method 8, 32K window }; |
| 79 |
PNG_COMPRESSION_TYPE_DEFAULT = PNG_COMPRESSION_TYPE_BASE; |
| 80 |
|
| 81 |
{ This is for filter type. PNG 1.0-1.2 only define the single type. } |
| 82 |
PNG_FILTER_TYPE_BASE = 0 { Single row per-byte filtering }; |
| 83 |
PNG_INTRAPIXEL_DIFFERENCING = 64 { Used only in MNG datastreams }; |
| 84 |
PNG_FILTER_TYPE_DEFAULT = PNG_FILTER_TYPE_BASE; |
| 85 |
|
| 86 |
{ These are for the interlacing type. These values should NOT be changed. } |
| 87 |
PNG_INTERLACE_NONE = 0 { Non-interlaced image }; |
| 88 |
PNG_INTERLACE_ADAM7 = 1 { Adam7 interlacing }; |
| 89 |
PNG_INTERLACE_LAST = 2 { Not a valid value }; |
| 90 |
|
| 91 |
{ These are for the oFFs chunk. These values should NOT be changed. } |
| 92 |
PNG_OFFSET_PIXEL = 0 { Offset in pixels }; |
| 93 |
PNG_OFFSET_MICROMETER = 1 { Offset in micrometers (1/10^6 meter) }; |
| 94 |
PNG_OFFSET_LAST = 2 { Not a valid value }; |
| 95 |
|
| 96 |
{ These are for the pCAL chunk. These values should NOT be changed. } |
| 97 |
PNG_EQUATION_LINEAR = 0 { Linear transformation }; |
| 98 |
PNG_EQUATION_BASE_E = 1 { Exponential base e transform }; |
| 99 |
PNG_EQUATION_ARBITRARY = 2 { Arbitrary base exponential transform }; |
| 100 |
PNG_EQUATION_HYPERBOLIC = 3 { Hyperbolic sine transformation }; |
| 101 |
PNG_EQUATION_LAST = 4 { Not a valid value }; |
| 102 |
|
| 103 |
{ These are for the sCAL chunk. These values should NOT be changed. } |
| 104 |
PNG_SCALE_UNKNOWN = 0 { unknown unit (image scale) }; |
| 105 |
PNG_SCALE_METER = 1 { meters per pixel }; |
| 106 |
PNG_SCALE_RADIAN = 2 { radians per pixel }; |
| 107 |
PNG_SCALE_LAST = 3 { Not a valid value }; |
| 108 |
|
| 109 |
{ These are for the pHYs chunk. These values should NOT be changed. } |
| 110 |
PNG_RESOLUTION_UNKNOWN = 0 { pixels/unknown unit (aspect ratio) }; |
| 111 |
PNG_RESOLUTION_METER = 1 { pixels/meter }; |
| 112 |
PNG_RESOLUTION_LAST = 2 { Not a valid value }; |
| 113 |
|
| 114 |
{ These are for the sRGB chunk. These values should NOT be changed. } |
| 115 |
PNG_sRGB_INTENT_PERCEPTUAL =0; |
| 116 |
PNG_sRGB_INTENT_RELATIVE =1; |
| 117 |
PNG_sRGB_INTENT_SATURATION =2; |
| 118 |
PNG_sRGB_INTENT_ABSOLUTE =3; |
| 119 |
PNG_sRGB_INTENT_LAST = 4 { Not a valid value }; |
| 120 |
|
| 121 |
{ This is for text chunks } |
| 122 |
PNG_KEYWORD_MAX_LENGTH = 79; |
| 123 |
|
| 124 |
{ Maximum number of entries in PLTE/sPLT/tRNS arrays } |
| 125 |
PNG_MAX_PALETTE_LENGTH = 256; |
| 126 |
|
| 127 |
{ These determine if an ancillary chunk's data has been successfully read |
| 128 |
* from the PNG header, or if the application has filled in the corresponding |
| 129 |
* data in the info_struct to be written into the output file. The values |
| 130 |
* of the PNG_INFO_<chunk> defines should NOT be changed. |
| 131 |
} |
| 132 |
PNG_INFO_gAMA = $0001; |
| 133 |
PNG_INFO_sBIT = $0002; |
| 134 |
PNG_INFO_cHRM = $0004; |
| 135 |
PNG_INFO_PLTE = $0008; |
| 136 |
PNG_INFO_tRNS = $0010; |
| 137 |
PNG_INFO_bKGD = $0020; |
| 138 |
PNG_INFO_hIST = $0040; |
| 139 |
PNG_INFO_pHYs = $0080; |
| 140 |
PNG_INFO_oFFs = $0100; |
| 141 |
PNG_INFO_tIME = $0200; |
| 142 |
PNG_INFO_pCAL = $0400; |
| 143 |
PNG_INFO_sRGB = $0800 { GR-P, 0.96a }; |
| 144 |
PNG_INFO_iCCP = $1000 { ESR, 1.0.6 }; |
| 145 |
PNG_INFO_sPLT = $2000 { ESR, 1.0.6 }; |
| 146 |
PNG_INFO_sCAL = $4000 { ESR, 1.0.6 }; |
| 147 |
PNG_INFO_IDAT = $8000 { ESR, 1.0.6 }; |
| 148 |
|
| 149 |
{ Transform masks for the high-level interface } |
| 150 |
PNG_TRANSFORM_IDENTITY = $0000 { read and write }; |
| 151 |
PNG_TRANSFORM_STRIP_16 = $0001 { read only }; |
| 152 |
PNG_TRANSFORM_STRIP_ALPHA = $0002 { read only }; |
| 153 |
PNG_TRANSFORM_PACKING = $0004 { read and write }; |
| 154 |
PNG_TRANSFORM_PACKSWAP = $0008 { read and write }; |
| 155 |
PNG_TRANSFORM_EXPAND = $0010 { read only }; |
| 156 |
PNG_TRANSFORM_INVERT_MONO = $0020 { read and write }; |
| 157 |
PNG_TRANSFORM_SHIFT = $0040 { read and write }; |
| 158 |
PNG_TRANSFORM_BGR = $0080 { read and write }; |
| 159 |
PNG_TRANSFORM_SWAP_ALPHA = $0100 { read and write }; |
| 160 |
PNG_TRANSFORM_SWAP_ENDIAN = $0200 { read and write }; |
| 161 |
PNG_TRANSFORM_INVERT_ALPHA = $0400 { read and write }; |
| 162 |
PNG_TRANSFORM_STRIP_FILLER = $0800 { WRITE only }; |
| 163 |
|
| 164 |
{ Flags for MNG supported features } |
| 165 |
PNG_FLAG_MNG_EMPTY_PLTE = $01; |
| 166 |
PNG_FLAG_MNG_FILTER_64 = $04; |
| 167 |
PNG_ALL_MNG_FEATURES = $05; |
| 168 |
|
| 169 |
{ png_set_filler : Add a filler byte to 24-bit RGB images. } |
| 170 |
{ The values of the PNG_FILLER_ defines should NOT be changed } |
| 171 |
PNG_FILLER_BEFORE =0; |
| 172 |
PNG_FILLER_AFTER =1; |
| 173 |
|
| 174 |
{ png_set_background : Handle alpha and tRNS by replacing with a background color. } |
| 175 |
PNG_BACKGROUND_GAMMA_UNKNOWN =0; |
| 176 |
PNG_BACKGROUND_GAMMA_SCREEN =1; |
| 177 |
PNG_BACKGROUND_GAMMA_FILE =2; |
| 178 |
PNG_BACKGROUND_GAMMA_UNIQUE =3; |
| 179 |
|
| 180 |
{ Values for png_set_crc_action() to say how to handle CRC errors in |
| 181 |
* ancillary and critical chunks, and whether to use the data contained |
| 182 |
* therein. Note that it is impossible to "discard" data in a critical |
| 183 |
* chunk. For versions prior to 0.90, the action was always error/quit, |
| 184 |
* whereas in version 0.90 and later, the action for CRC errors in ancillary |
| 185 |
* chunks is warn/discard. These values should NOT be changed. |
| 186 |
* |
| 187 |
* value action:critical action:ancillary |
| 188 |
} |
| 189 |
PNG_CRC_DEFAULT = 0 { error/quit warn/discard data }; |
| 190 |
PNG_CRC_ERROR_QUIT = 1 { error/quit error/quit }; |
| 191 |
PNG_CRC_WARN_DISCARD = 2 { (INVALID) warn/discard data }; |
| 192 |
PNG_CRC_WARN_USE = 3 { warn/use data warn/use data }; |
| 193 |
PNG_CRC_QUIET_USE = 4 { quiet/use data quiet/use data }; |
| 194 |
PNG_CRC_NO_CHANGE = 5 { use current value use current value }; |
| 195 |
|
| 196 |
{ Flags for png_set_filter() to say which filters to use. The flags |
| 197 |
* are chosen so that they don't conflict with real filter types |
| 198 |
* below, in case they are supplied instead of the #defined constants. |
| 199 |
* These values should NOT be changed. |
| 200 |
} |
| 201 |
PNG_NO_FILTERS = $00; |
| 202 |
PNG_FILTER_NONE = $08; |
| 203 |
PNG_FILTER_SUB = $10; |
| 204 |
PNG_FILTER_UP = $20; |
| 205 |
PNG_FILTER_AVG = $40; |
| 206 |
PNG_FILTER_PAETH = $80; |
| 207 |
PNG_ALL_FILTERS = (PNG_FILTER_NONE or PNG_FILTER_SUB or PNG_FILTER_UP or |
| 208 |
PNG_FILTER_AVG or PNG_FILTER_PAETH); |
| 209 |
|
| 210 |
{ Filter values (not flags) - used in pngwrite.c, pngwutil.c for now. |
| 211 |
* These defines should NOT be changed. |
| 212 |
} |
| 213 |
PNG_FILTER_VALUE_NONE =0; |
| 214 |
PNG_FILTER_VALUE_SUB =1; |
| 215 |
PNG_FILTER_VALUE_UP =2; |
| 216 |
PNG_FILTER_VALUE_AVG =3; |
| 217 |
PNG_FILTER_VALUE_PAETH =4; |
| 218 |
PNG_FILTER_VALUE_LAST =5; |
| 219 |
|
| 220 |
{ Heuristic used for row filter selection. These defines should NOT be |
| 221 |
* changed. |
| 222 |
} |
| 223 |
PNG_FILTER_HEURISTIC_DEFAULT = 0 { Currently "UNWEIGHTED" }; |
| 224 |
PNG_FILTER_HEURISTIC_UNWEIGHTED = 1 { Used by libpng < 0.95 }; |
| 225 |
PNG_FILTER_HEURISTIC_WEIGHTED = 2 { Experimental feature }; |
| 226 |
PNG_FILTER_HEURISTIC_LAST = 3 { Not a valid value }; |
| 227 |
|
| 228 |
{ For compatibility with castleinternalpng_dynamic.inc . This is always available. } |
| 229 |
CastlePngInitialized = true; |
| 230 |
|
| 231 |
type |
| 232 |
png_time_t = CInt32; |
| 233 |
png_int = CInt32; |
| 234 |
z_stream = TZStream; |
| 235 |
|
| 236 |
png_uint_32 = dword; |
| 237 |
png_int_32 = CInt32; |
| 238 |
png_uint_16 = word; |
| 239 |
png_int_16 = smallint; |
| 240 |
png_byte = byte; |
| 241 |
ppng_uint_32 = ^png_uint_32; |
| 242 |
ppng_int_32 = ^png_int_32; |
| 243 |
ppng_uint_16 = ^png_uint_16; |
| 244 |
ppng_int_16 = ^png_int_16; |
| 245 |
ppng_byte = ^png_byte; |
| 246 |
pppng_uint_32 = ^ppng_uint_32; |
| 247 |
pppng_int_32 = ^ppng_int_32; |
| 248 |
pppng_uint_16 = ^ppng_uint_16; |
| 249 |
pppng_int_16 = ^ppng_int_16; |
| 250 |
pppng_byte = ^ppng_byte; |
| 251 |
png_size_t = csize_t; |
| 252 |
png_fixed_point = png_int_32; |
| 253 |
ppng_fixed_point = ^png_fixed_point; |
| 254 |
pppng_fixed_point = ^ppng_fixed_point; |
| 255 |
png_voidp = pointer; |
| 256 |
png_bytep = Ppng_byte; |
| 257 |
ppng_bytep = ^png_bytep; |
| 258 |
png_uint_32p = Ppng_uint_32; |
| 259 |
png_int_32p = Ppng_int_32; |
| 260 |
png_uint_16p = Ppng_uint_16; |
| 261 |
ppng_uint_16p = ^png_uint_16p; |
| 262 |
png_int_16p = Ppng_int_16; |
| 263 |
(* Const before type ignored *) |
| 264 |
png_const_charp = Pchar; |
| 265 |
png_charp = Pchar; |
| 266 |
ppng_charp = ^png_charp; |
| 267 |
png_fixed_point_p = Ppng_fixed_point; |
| 268 |
TFile = Pointer; |
| 269 |
png_FILE_p = ^FILE; |
| 270 |
png_doublep = Pdouble; |
| 271 |
png_bytepp = PPpng_byte; |
| 272 |
png_uint_32pp = PPpng_uint_32; |
| 273 |
png_int_32pp = PPpng_int_32; |
| 274 |
png_uint_16pp = PPpng_uint_16; |
| 275 |
png_int_16pp = PPpng_int_16; |
| 276 |
(* Const before type ignored *) |
| 277 |
png_const_charpp = PPchar; |
| 278 |
png_charpp = PPchar; |
| 279 |
ppng_charpp = ^png_charpp; |
| 280 |
png_fixed_point_pp = PPpng_fixed_point; |
| 281 |
png_doublepp = PPdouble; |
| 282 |
png_charppp = PPPchar; |
| 283 |
Pcharf = Pchar; |
| 284 |
PPcharf = ^Pcharf; |
| 285 |
png_zcharp = Pcharf; |
| 286 |
png_zcharpp = PPcharf; |
| 287 |
png_zstreamp = Pzstream; |
| 288 |
|
| 289 |
{$ifdef LIBPNG_DEPRECATED} |
| 290 |
var |
| 291 |
{$ifndef darwin} |
| 292 |
png_libpng_ver : array[0..11] of char; cvar; external; |
| 293 |
png_pass_start : array[0..6] of CInt32; cvar; external; |
| 294 |
png_pass_inc : array[0..6] of CInt32; cvar; external; |
| 295 |
png_pass_ystart : array[0..6] of CInt32; cvar; external; |
| 296 |
png_pass_yinc : array[0..6] of CInt32; cvar; external; |
| 297 |
png_pass_mask : array[0..6] of CInt32; cvar; external; |
| 298 |
png_pass_dsp_mask : array[0..6] of CInt32; cvar; external; |
| 299 |
{$else darwin} |
| 300 |
png_libpng_ver : array[0..11] of char; external LibPng name 'png_libpng_ver'; |
| 301 |
png_pass_start : array[0..6] of CInt32; external LibPng name 'png_pass_start'; |
| 302 |
png_pass_inc : array[0..6] of CInt32; external LibPng name 'png_pass_inc'; |
| 303 |
png_pass_ystart : array[0..6] of CInt32; external LibPng name 'png_pass_ystart'; |
| 304 |
png_pass_yinc : array[0..6] of CInt32; external LibPng name 'png_pass_yinc'; |
| 305 |
png_pass_mask : array[0..6] of CInt32; external LibPng name 'png_pass_mask'; |
| 306 |
png_pass_dsp_mask : array[0..6] of CInt32; external LibPng name 'png_pass_dsp_mask'; |
| 307 |
{$endif darwin} |
| 308 |
{$endif LIBPNG_DEPRECATED} |
| 309 |
|
| 310 |
Type |
| 311 |
png_color = record |
| 312 |
red : png_byte; |
| 313 |
green : png_byte; |
| 314 |
blue : png_byte; |
| 315 |
end; |
| 316 |
ppng_color = ^png_color; |
| 317 |
pppng_color = ^ppng_color; |
| 318 |
|
| 319 |
png_color_struct = png_color; |
| 320 |
png_colorp = Ppng_color; |
| 321 |
ppng_colorp = ^png_colorp; |
| 322 |
png_colorpp = PPpng_color; |
| 323 |
png_color_16 = record |
| 324 |
index : png_byte; |
| 325 |
red : png_uint_16; |
| 326 |
green : png_uint_16; |
| 327 |
blue : png_uint_16; |
| 328 |
gray : png_uint_16; |
| 329 |
end; |
| 330 |
ppng_color_16 = ^png_color_16 ; |
| 331 |
pppng_color_16 = ^ppng_color_16 ; |
| 332 |
png_color_16_struct = png_color_16; |
| 333 |
png_color_16p = Ppng_color_16; |
| 334 |
ppng_color_16p = ^png_color_16p; |
| 335 |
png_color_16pp = PPpng_color_16; |
| 336 |
png_color_8 = record |
| 337 |
red : png_byte; |
| 338 |
green : png_byte; |
| 339 |
blue : png_byte; |
| 340 |
gray : png_byte; |
| 341 |
alpha : png_byte; |
| 342 |
end; |
| 343 |
ppng_color_8 = ^png_color_8; |
| 344 |
pppng_color_8 = ^ppng_color_8; |
| 345 |
png_color_8_struct = png_color_8; |
| 346 |
png_color_8p = Ppng_color_8; |
| 347 |
ppng_color_8p = ^png_color_8p; |
| 348 |
png_color_8pp = PPpng_color_8; |
| 349 |
png_sPLT_entry = record |
| 350 |
red : png_uint_16; |
| 351 |
green : png_uint_16; |
| 352 |
blue : png_uint_16; |
| 353 |
alpha : png_uint_16; |
| 354 |
frequency : png_uint_16; |
| 355 |
end; |
| 356 |
ppng_sPLT_entry = ^png_sPLT_entry; |
| 357 |
pppng_sPLT_entry = ^ppng_sPLT_entry; |
| 358 |
png_sPLT_entry_struct = png_sPLT_entry; |
| 359 |
png_sPLT_entryp = Ppng_sPLT_entry; |
| 360 |
png_sPLT_entrypp = PPpng_sPLT_entry; |
| 361 |
png_sPLT_t = record |
| 362 |
name : png_charp; |
| 363 |
depth : png_byte; |
| 364 |
entries : png_sPLT_entryp; |
| 365 |
nentries : png_int_32; |
| 366 |
end; |
| 367 |
ppng_sPLT_t = ^png_sPLT_t; |
| 368 |
pppng_sPLT_t = ^ppng_sPLT_t; |
| 369 |
png_sPLT_struct = png_sPLT_t; |
| 370 |
png_sPLT_tp = Ppng_sPLT_t; |
| 371 |
png_sPLT_tpp = PPpng_sPLT_t; |
| 372 |
png_text = record |
| 373 |
compression : CInt32; |
| 374 |
key : png_charp; |
| 375 |
text : png_charp; |
| 376 |
text_length : png_size_t; |
| 377 |
end; |
| 378 |
ppng_text = ^png_text; |
| 379 |
pppng_text = ^ppng_text; |
| 380 |
|
| 381 |
png_text_struct = png_text; |
| 382 |
png_textp = Ppng_text; |
| 383 |
ppng_textp = ^png_textp; |
| 384 |
png_textpp = PPpng_text; |
| 385 |
png_time = record |
| 386 |
year : png_uint_16; |
| 387 |
month : png_byte; |
| 388 |
day : png_byte; |
| 389 |
hour : png_byte; |
| 390 |
minute : png_byte; |
| 391 |
second : png_byte; |
| 392 |
end; |
| 393 |
ppng_time = ^png_time; |
| 394 |
pppng_time = ^ppng_time; |
| 395 |
|
| 396 |
png_time_struct = png_time; |
| 397 |
png_timep = Ppng_time; |
| 398 |
PPNG_TIMEP = ^PNG_TIMEP; |
| 399 |
png_timepp = PPpng_time; |
| 400 |
png_unknown_chunk = record |
| 401 |
name : array[0..4] of png_byte; |
| 402 |
data : Ppng_byte; |
| 403 |
size : png_size_t; |
| 404 |
location : png_byte; |
| 405 |
end; |
| 406 |
ppng_unknown_chunk = ^png_unknown_chunk; |
| 407 |
pppng_unknown_chunk = ^ppng_unknown_chunk; |
| 408 |
|
| 409 |
png_unknown_chunk_t = png_unknown_chunk; |
| 410 |
png_unknown_chunkp = Ppng_unknown_chunk; |
| 411 |
png_unknown_chunkpp = PPpng_unknown_chunk; |
| 412 |
png_info = record |
| 413 |
width : png_uint_32; |
| 414 |
height : png_uint_32; |
| 415 |
valid : png_uint_32; |
| 416 |
rowbytes : png_uint_32; |
| 417 |
palette : png_colorp; |
| 418 |
num_palette : png_uint_16; |
| 419 |
num_trans : png_uint_16; |
| 420 |
bit_depth : png_byte; |
| 421 |
color_type : png_byte; |
| 422 |
compression_type : png_byte; |
| 423 |
filter_type : png_byte; |
| 424 |
interlace_type : png_byte; |
| 425 |
channels : png_byte; |
| 426 |
pixel_depth : png_byte; |
| 427 |
spare_byte : png_byte; |
| 428 |
signature : array[0..7] of png_byte; |
| 429 |
gamma : double; |
| 430 |
srgb_intent : png_byte; |
| 431 |
num_text : CInt32; |
| 432 |
max_text : CInt32; |
| 433 |
text : png_textp; |
| 434 |
mod_time : png_time; |
| 435 |
sig_bit : png_color_8; |
| 436 |
trans : png_bytep; |
| 437 |
trans_values : png_color_16; |
| 438 |
background : png_color_16; |
| 439 |
x_offset : png_int_32; |
| 440 |
y_offset : png_int_32; |
| 441 |
offset_unit_type : png_byte; |
| 442 |
x_pixels_per_unit : png_uint_32; |
| 443 |
y_pixels_per_unit : png_uint_32; |
| 444 |
phys_unit_type : png_byte; |
| 445 |
hist : png_uint_16p; |
| 446 |
x_white : double; |
| 447 |
y_white : double; |
| 448 |
x_red : double; |
| 449 |
y_red : double; |
| 450 |
x_green : double; |
| 451 |
y_green : double; |
| 452 |
x_blue : double; |
| 453 |
y_blue : double; |
| 454 |
pcal_purpose : png_charp; |
| 455 |
pcal_X0 : png_int_32; |
| 456 |
pcal_X1 : png_int_32; |
| 457 |
pcal_units : png_charp; |
| 458 |
pcal_params : png_charpp; |
| 459 |
pcal_type : png_byte; |
| 460 |
pcal_nparams : png_byte; |
| 461 |
free_me : png_uint_32; |
| 462 |
unknown_chunks : png_unknown_chunkp; |
| 463 |
unknown_chunks_num : png_size_t; |
| 464 |
iccp_name : png_charp; |
| 465 |
iccp_profile : png_charp; |
| 466 |
iccp_proflen : png_uint_32; |
| 467 |
iccp_compression : png_byte; |
| 468 |
splt_palettes : png_sPLT_tp; |
| 469 |
splt_palettes_num : png_uint_32; |
| 470 |
scal_unit : png_byte; |
| 471 |
scal_pixel_width : double; |
| 472 |
scal_pixel_height : double; |
| 473 |
scal_s_width : png_charp; |
| 474 |
scal_s_height : png_charp; |
| 475 |
row_pointers : png_bytepp; |
| 476 |
int_gamma : png_fixed_point; |
| 477 |
int_x_white : png_fixed_point; |
| 478 |
int_y_white : png_fixed_point; |
| 479 |
int_x_red : png_fixed_point; |
| 480 |
int_y_red : png_fixed_point; |
| 481 |
int_x_green : png_fixed_point; |
| 482 |
int_y_green : png_fixed_point; |
| 483 |
int_x_blue : png_fixed_point; |
| 484 |
int_y_blue : png_fixed_point; |
| 485 |
end; |
| 486 |
ppng_info = ^png_info; |
| 487 |
pppng_info = ^ppng_info; |
| 488 |
|
| 489 |
png_info_struct = png_info; |
| 490 |
png_infop = Ppng_info; |
| 491 |
png_infopp = PPpng_info; |
| 492 |
png_row_info = record |
| 493 |
width : png_uint_32; |
| 494 |
rowbytes : png_uint_32; |
| 495 |
color_type : png_byte; |
| 496 |
bit_depth : png_byte; |
| 497 |
channels : png_byte; |
| 498 |
pixel_depth : png_byte; |
| 499 |
end; |
| 500 |
ppng_row_info = ^png_row_info; |
| 501 |
pppng_row_info = ^ppng_row_info; |
| 502 |
|
| 503 |
png_row_info_struct = png_row_info; |
| 504 |
png_row_infop = Ppng_row_info; |
| 505 |
png_row_infopp = PPpng_row_info; |
| 506 |
// png_struct_def = png_struct; |
| 507 |
png_structp = ^png_struct; |
| 508 |
|
| 509 |
|
| 510 |
|
| 511 |
png_error_ptr = Procedure(Arg1 : png_structp; Arg2 : png_const_charp);cdecl; |
| 512 |
png_rw_ptr = Procedure(Arg1 : png_structp; Arg2 : png_bytep; Arg3 : png_size_t);cdecl; |
| 513 |
png_flush_ptr = procedure (Arg1 : png_structp) ;cdecl; |
| 514 |
png_read_status_ptr = procedure (Arg1 : png_structp; Arg2 : png_uint_32; Arg3: png_int);cdecl; |
| 515 |
png_write_status_ptr = Procedure (Arg1 : png_structp; Arg2:png_uint_32;Arg3 : png_int) ;cdecl; |
| 516 |
png_progressive_info_ptr = Procedure (Arg1 : png_structp; Arg2 : png_infop) ;cdecl; |
| 517 |
png_progressive_end_ptr = Procedure (Arg1 : png_structp; Arg2 : png_infop) ;cdecl; |
| 518 |
png_progressive_row_ptr = Procedure (Arg1 : png_structp; Arg2 : png_bytep; Arg3 : png_uint_32; Arg4 : png_int) ;cdecl; |
| 519 |
png_user_transform_ptr = Procedure (Arg1 : png_structp; Arg2 : png_row_infop; Arg3 : png_bytep) ;cdecl; |
| 520 |
png_user_chunk_ptr = Function (Arg1 : png_structp; Arg2 : png_unknown_chunkp): CInt32;cdecl; |
| 521 |
png_unknown_chunk_ptr = Procedure (Arg1 : png_structp);cdecl; |
| 522 |
png_malloc_ptr = Function (Arg1 : png_structp; Arg2 : png_size_t) : png_voidp ;cdecl; |
| 523 |
png_free_ptr = Procedure (Arg1 : png_structp; Arg2 : png_voidp) ; cdecl; |
| 524 |
|
| 525 |
png_struct_def = record |
| 526 |
jmpbuf : jmp_buf; |
| 527 |
error_fn : png_error_ptr; |
| 528 |
warning_fn : png_error_ptr; |
| 529 |
error_ptr : png_voidp; |
| 530 |
write_data_fn : png_rw_ptr; |
| 531 |
read_data_fn : png_rw_ptr; |
| 532 |
io_ptr : png_voidp; |
| 533 |
read_user_transform_fn : png_user_transform_ptr; |
| 534 |
write_user_transform_fn : png_user_transform_ptr; |
| 535 |
user_transform_ptr : png_voidp; |
| 536 |
user_transform_depth : png_byte; |
| 537 |
user_transform_channels : png_byte; |
| 538 |
mode : png_uint_32; |
| 539 |
flags : png_uint_32; |
| 540 |
transformations : png_uint_32; |
| 541 |
zstream : z_stream; |
| 542 |
zbuf : png_bytep; |
| 543 |
zbuf_size : png_size_t; |
| 544 |
zlib_level : CInt32; |
| 545 |
zlib_method : CInt32; |
| 546 |
zlib_window_bits : CInt32; |
| 547 |
zlib_mem_level : CInt32; |
| 548 |
zlib_strategy : CInt32; |
| 549 |
width : png_uint_32; |
| 550 |
height : png_uint_32; |
| 551 |
num_rows : png_uint_32; |
| 552 |
usr_width : png_uint_32; |
| 553 |
rowbytes : png_uint_32; |
| 554 |
irowbytes : png_uint_32; |
| 555 |
iwidth : png_uint_32; |
| 556 |
row_number : png_uint_32; |
| 557 |
prev_row : png_bytep; |
| 558 |
row_buf : png_bytep; |
| 559 |
sub_row : png_bytep; |
| 560 |
up_row : png_bytep; |
| 561 |
avg_row : png_bytep; |
| 562 |
paeth_row : png_bytep; |
| 563 |
row_info : png_row_info; |
| 564 |
idat_size : png_uint_32; |
| 565 |
crc : png_uint_32; |
| 566 |
palette : png_colorp; |
| 567 |
num_palette : png_uint_16; |
| 568 |
num_trans : png_uint_16; |
| 569 |
chunk_name : array[0..4] of png_byte; |
| 570 |
compression : png_byte; |
| 571 |
filter : png_byte; |
| 572 |
interlaced : png_byte; |
| 573 |
pass : png_byte; |
| 574 |
do_filter : png_byte; |
| 575 |
color_type : png_byte; |
| 576 |
bit_depth : png_byte; |
| 577 |
usr_bit_depth : png_byte; |
| 578 |
pixel_depth : png_byte; |
| 579 |
channels : png_byte; |
| 580 |
usr_channels : png_byte; |
| 581 |
sig_bytes : png_byte; |
| 582 |
filler : png_uint_16; |
| 583 |
background_gamma_type : png_byte; |
| 584 |
background_gamma : double; |
| 585 |
background : png_color_16; |
| 586 |
background_1 : png_color_16; |
| 587 |
output_flush_fn : png_flush_ptr; |
| 588 |
flush_dist : png_uint_32; |
| 589 |
flush_rows : png_uint_32; |
| 590 |
gamma_shift : CInt32; |
| 591 |
gamma : double; |
| 592 |
screen_gamma : double; |
| 593 |
gamma_table : png_bytep; |
| 594 |
gamma_from_1 : png_bytep; |
| 595 |
gamma_to_1 : png_bytep; |
| 596 |
gamma_16_table : png_uint_16pp; |
| 597 |
gamma_16_from_1 : png_uint_16pp; |
| 598 |
gamma_16_to_1 : png_uint_16pp; |
| 599 |
sig_bit : png_color_8; |
| 600 |
shift : png_color_8; |
| 601 |
trans : png_bytep; |
| 602 |
trans_values : png_color_16; |
| 603 |
read_row_fn : png_read_status_ptr; |
| 604 |
write_row_fn : png_write_status_ptr; |
| 605 |
info_fn : png_progressive_info_ptr; |
| 606 |
row_fn : png_progressive_row_ptr; |
| 607 |
end_fn : png_progressive_end_ptr; |
| 608 |
save_buffer_ptr : png_bytep; |
| 609 |
save_buffer : png_bytep; |
| 610 |
current_buffer_ptr : png_bytep; |
| 611 |
current_buffer : png_bytep; |
| 612 |
push_length : png_uint_32; |
| 613 |
skip_length : png_uint_32; |
| 614 |
save_buffer_size : png_size_t; |
| 615 |
save_buffer_max : png_size_t; |
| 616 |
buffer_size : png_size_t; |
| 617 |
current_buffer_size : png_size_t; |
| 618 |
process_mode : CInt32; |
| 619 |
cur_palette : CInt32; |
| 620 |
current_text_size : png_size_t; |
| 621 |
current_text_left : png_size_t; |
| 622 |
current_text : png_charp; |
| 623 |
current_text_ptr : png_charp; |
| 624 |
palette_lookup : png_bytep; |
| 625 |
dither_index : png_bytep; |
| 626 |
hist : png_uint_16p; |
| 627 |
heuristic_method : png_byte; |
| 628 |
num_prev_filters : png_byte; |
| 629 |
prev_filters : png_bytep; |
| 630 |
filter_weights : png_uint_16p; |
| 631 |
inv_filter_weights : png_uint_16p; |
| 632 |
filter_costs : png_uint_16p; |
| 633 |
inv_filter_costs : png_uint_16p; |
| 634 |
time_buffer : png_charp; |
| 635 |
free_me : png_uint_32; |
| 636 |
user_chunk_ptr : png_voidp; |
| 637 |
read_user_chunk_fn : png_user_chunk_ptr; |
| 638 |
num_chunk_list : CInt32; |
| 639 |
chunk_list : png_bytep; |
| 640 |
rgb_to_gray_status : png_byte; |
| 641 |
rgb_to_gray_red_coeff : png_uint_16; |
| 642 |
rgb_to_gray_green_coeff : png_uint_16; |
| 643 |
rgb_to_gray_blue_coeff : png_uint_16; |
| 644 |
empty_plte_permitted : png_byte; |
| 645 |
int_gamma : png_fixed_point; |
| 646 |
end; |
| 647 |
ppng_struct_def = ^png_struct_def; |
| 648 |
pppng_struct_def = ^ppng_struct_def; |
| 649 |
png_struct = png_struct_def; |
| 650 |
ppng_struct = ^png_struct; |
| 651 |
pppng_struct = ^ppng_struct; |
| 652 |
|
| 653 |
version_1_0_8 = png_structp; |
| 654 |
png_structpp = PPpng_struct; |
| 655 |
|
| 656 |
function png_access_version_number:png_uint_32;cdecl; external LibPng; |
| 657 |
procedure png_set_sig_bytes(png_ptr:png_structp; num_bytes:CInt32);cdecl; external LibPng; |
| 658 |
function png_sig_cmp(sig:png_bytep; start:png_size_t; num_to_check:png_size_t):CInt32;cdecl; external LibPng; |
| 659 |
function png_create_read_struct(user_png_ver:png_const_charp; error_ptr:png_voidp; error_fn:png_error_ptr; warn_fn:png_error_ptr):png_structp;cdecl; external LibPng; |
| 660 |
function png_create_write_struct(user_png_ver:png_const_charp; error_ptr:png_voidp; error_fn:png_error_ptr; warn_fn:png_error_ptr):png_structp;cdecl; external LibPng; |
| 661 |
function png_get_compression_buffer_size(png_ptr:png_structp):png_uint_32;cdecl; external LibPng; |
| 662 |
procedure png_set_compression_buffer_size(png_ptr:png_structp; size:png_uint_32);cdecl; external LibPng; |
| 663 |
function png_reset_zstream(png_ptr:png_structp):CInt32;cdecl; external LibPng; |
| 664 |
procedure png_write_chunk(png_ptr:png_structp; chunk_name:png_bytep; data:png_bytep; length:png_size_t);cdecl; external LibPng; |
| 665 |
procedure png_write_chunk_start(png_ptr:png_structp; chunk_name:png_bytep; length:png_uint_32);cdecl; external LibPng; |
| 666 |
procedure png_write_chunk_data(png_ptr:png_structp; data:png_bytep; length:png_size_t);cdecl; external LibPng; |
| 667 |
procedure png_write_chunk_end(png_ptr:png_structp);cdecl; external LibPng; |
| 668 |
function png_create_info_struct(png_ptr:png_structp):png_infop;cdecl; external LibPng; |
| 669 |
procedure png_write_info_before_PLTE(png_ptr:png_structp; info_ptr:png_infop);cdecl; external LibPng; |
| 670 |
procedure png_write_info(png_ptr:png_structp; info_ptr:png_infop);cdecl; external LibPng; |
| 671 |
procedure png_read_info(png_ptr:png_structp; info_ptr:png_infop);cdecl; external LibPng; |
| 672 |
function png_convert_to_rfc1123(png_ptr:png_structp; ptime:png_timep):png_charp;cdecl; external LibPng; |
| 673 |
procedure png_convert_from_struct_tm(ptime:png_timep; ttime:Pointer);cdecl; external LibPng; |
| 674 |
procedure png_convert_from_time_t(ptime:png_timep; ttime:png_time_t);cdecl; external LibPng; |
| 675 |
procedure png_set_expand(png_ptr:png_structp);cdecl; external LibPng; |
| 676 |
procedure png_set_palette_to_rgb(png_ptr:png_structp);cdecl; external LibPng; |
| 677 |
procedure png_set_tRNS_to_alpha(png_ptr:png_structp);cdecl; external LibPng; |
| 678 |
procedure png_set_bgr(png_ptr:png_structp);cdecl; external LibPng; |
| 679 |
procedure png_set_gray_to_rgb(png_ptr:png_structp);cdecl; external LibPng; |
| 680 |
procedure png_set_rgb_to_gray(png_ptr:png_structp; error_action:CInt32; red:double; green:double);cdecl; external LibPng; |
| 681 |
procedure png_set_rgb_to_gray_fixed(png_ptr:png_structp; error_action:CInt32; red:png_fixed_point; green:png_fixed_point);cdecl; external LibPng; |
| 682 |
function png_get_rgb_to_gray_status(png_ptr:png_structp):png_byte;cdecl; external LibPng; |
| 683 |
procedure png_build_grayscale_palette(bit_depth:CInt32; palette:png_colorp);cdecl; external LibPng; |
| 684 |
procedure png_set_strip_alpha(png_ptr:png_structp);cdecl; external LibPng; |
| 685 |
procedure png_set_swap_alpha(png_ptr:png_structp);cdecl; external LibPng; |
| 686 |
procedure png_set_invert_alpha(png_ptr:png_structp);cdecl; external LibPng; |
| 687 |
procedure png_set_filler(png_ptr:png_structp; filler:png_uint_32; flags:CInt32);cdecl; external LibPng; |
| 688 |
procedure png_set_swap(png_ptr:png_structp);cdecl; external LibPng; |
| 689 |
procedure png_set_packing(png_ptr:png_structp);cdecl; external LibPng; |
| 690 |
procedure png_set_packswap(png_ptr:png_structp);cdecl; external LibPng; |
| 691 |
procedure png_set_shift(png_ptr:png_structp; true_bits:png_color_8p);cdecl; external LibPng; |
| 692 |
function png_set_interlace_handling(png_ptr:png_structp):CInt32;cdecl; external LibPng; |
| 693 |
procedure png_set_invert_mono(png_ptr:png_structp);cdecl; external LibPng; |
| 694 |
procedure png_set_background(png_ptr:png_structp; background_color:png_color_16p; background_gamma_code:CInt32; need_expand:CInt32; background_gamma:double);cdecl; external LibPng; |
| 695 |
procedure png_set_strip_16(png_ptr:png_structp);cdecl; external LibPng; |
| 696 |
procedure png_set_gamma(png_ptr:png_structp; screen_gamma:double; default_file_gamma:double);cdecl; external LibPng; |
| 697 |
procedure png_set_flush(png_ptr:png_structp; nrows:CInt32);cdecl; external LibPng; |
| 698 |
procedure png_write_flush(png_ptr:png_structp);cdecl; external LibPng; |
| 699 |
procedure png_start_read_image(png_ptr:png_structp);cdecl; external LibPng; |
| 700 |
procedure png_read_update_info(png_ptr:png_structp; info_ptr:png_infop);cdecl; external LibPng; |
| 701 |
procedure png_read_rows(png_ptr:png_structp; row:png_bytepp; display_row:png_bytepp; num_rows:png_uint_32);cdecl; external LibPng; |
| 702 |
procedure png_read_row(png_ptr:png_structp; row:png_bytep; display_row:png_bytep);cdecl; external LibPng; |
| 703 |
procedure png_read_image(png_ptr:png_structp; image:png_bytepp);cdecl; external LibPng; |
| 704 |
procedure png_write_row(png_ptr:png_structp; row:png_bytep);cdecl; external LibPng; |
| 705 |
procedure png_write_rows(png_ptr:png_structp; row:png_bytepp; num_rows:png_uint_32);cdecl; external LibPng; |
| 706 |
procedure png_write_image(png_ptr:png_structp; image:png_bytepp);cdecl; external LibPng; |
| 707 |
procedure png_write_end(png_ptr:png_structp; info_ptr:png_infop);cdecl; external LibPng; |
| 708 |
procedure png_read_end(png_ptr:png_structp; info_ptr:png_infop);cdecl; external LibPng; |
| 709 |
procedure png_destroy_info_struct(png_ptr:png_structp; info_ptr_ptr:png_infopp);cdecl; external LibPng; |
| 710 |
procedure png_destroy_read_struct(png_ptr_ptr:png_structpp; info_ptr_ptr:png_infopp; end_info_ptr_ptr:png_infopp);cdecl; external LibPng; |
| 711 |
procedure png_destroy_write_struct(png_ptr_ptr:png_structpp; info_ptr_ptr:png_infopp);cdecl; external LibPng; |
| 712 |
procedure png_set_crc_action(png_ptr:png_structp; crit_action:CInt32; ancil_action:CInt32);cdecl; external LibPng; |
| 713 |
procedure png_set_filter(png_ptr:png_structp; method:CInt32; filters:CInt32);cdecl; external LibPng; |
| 714 |
procedure png_set_filter_heuristics(png_ptr:png_structp; heuristic_method:CInt32; num_weights:CInt32; filter_weights:png_doublep; filter_costs:png_doublep);cdecl; external LibPng; |
| 715 |
procedure png_set_compression_level(png_ptr:png_structp; level:CInt32);cdecl; external LibPng; |
| 716 |
procedure png_set_compression_mem_level(png_ptr:png_structp; mem_level:CInt32);cdecl; external LibPng; |
| 717 |
procedure png_set_compression_strategy(png_ptr:png_structp; strategy:CInt32);cdecl; external LibPng; |
| 718 |
procedure png_set_compression_window_bits(png_ptr:png_structp; window_bits:CInt32);cdecl; external LibPng; |
| 719 |
procedure png_set_compression_method(png_ptr:png_structp; method:CInt32);cdecl; external LibPng; |
| 720 |
procedure png_init_io(png_ptr:png_structp; fp:png_FILE_p);cdecl; external LibPng; |
| 721 |
procedure png_set_error_fn(png_ptr:png_structp; error_ptr:png_voidp; error_fn:png_error_ptr; warning_fn:png_error_ptr);cdecl; external LibPng; |
| 722 |
function png_get_error_ptr(png_ptr:png_structp):png_voidp;cdecl; external LibPng; |
| 723 |
procedure png_set_write_fn(png_ptr:png_structp; io_ptr:png_voidp; write_data_fn:png_rw_ptr; output_flush_fn:png_flush_ptr);cdecl; external LibPng; |
| 724 |
procedure png_set_read_fn(png_ptr:png_structp; io_ptr:png_voidp; read_data_fn:png_rw_ptr);cdecl; external LibPng; |
| 725 |
function png_get_io_ptr(png_ptr:png_structp):png_voidp;cdecl; external LibPng; |
| 726 |
procedure png_set_read_status_fn(png_ptr:png_structp; read_row_fn:png_read_status_ptr);cdecl; external LibPng; |
| 727 |
procedure png_set_write_status_fn(png_ptr:png_structp; write_row_fn:png_write_status_ptr);cdecl; external LibPng; |
| 728 |
procedure png_set_read_user_transform_fn(png_ptr:png_structp; read_user_transform_fn:png_user_transform_ptr);cdecl; external LibPng; |
| 729 |
procedure png_set_write_user_transform_fn(png_ptr:png_structp; write_user_transform_fn:png_user_transform_ptr);cdecl; external LibPng; |
| 730 |
procedure png_set_user_transform_info(png_ptr:png_structp; user_transform_ptr:png_voidp; user_transform_depth:CInt32; user_transform_channels:CInt32);cdecl; external LibPng; |
| 731 |
function png_get_user_transform_ptr(png_ptr:png_structp):png_voidp;cdecl; external LibPng; |
| 732 |
procedure png_set_read_user_chunk_fn(png_ptr:png_structp; user_chunk_ptr:png_voidp; read_user_chunk_fn:png_user_chunk_ptr);cdecl; external LibPng; |
| 733 |
function png_get_user_chunk_ptr(png_ptr:png_structp):png_voidp;cdecl; external LibPng; |
| 734 |
procedure png_set_progressive_read_fn(png_ptr:png_structp; progressive_ptr:png_voidp; info_fn:png_progressive_info_ptr; row_fn:png_progressive_row_ptr; end_fn:png_progressive_end_ptr);cdecl; external LibPng; |
| 735 |
function png_get_progressive_ptr(png_ptr:png_structp):png_voidp;cdecl; external LibPng; |
| 736 |
procedure png_process_data(png_ptr:png_structp; info_ptr:png_infop; buffer:png_bytep; buffer_size:png_size_t);cdecl; external LibPng; |
| 737 |
procedure png_progressive_combine_row(png_ptr:png_structp; old_row:png_bytep; new_row:png_bytep);cdecl; external LibPng; |
| 738 |
function png_malloc(png_ptr:png_structp; size:png_uint_32):png_voidp;cdecl; external LibPng; |
| 739 |
procedure png_free(png_ptr:png_structp; ptr:png_voidp);cdecl; external LibPng; |
| 740 |
procedure png_free_data(png_ptr:png_structp; info_ptr:png_infop; free_me:png_uint_32; num:CInt32);cdecl; external LibPng; |
| 741 |
procedure png_data_freer(png_ptr:png_structp; info_ptr:png_infop; freer:CInt32; mask:png_uint_32);cdecl; external LibPng; |
| 742 |
procedure png_error(png_ptr:png_structp; error:png_const_charp);cdecl; external LibPng; |
| 743 |
procedure png_chunk_error(png_ptr:png_structp; error:png_const_charp);cdecl; external LibPng; |
| 744 |
procedure png_warning(png_ptr:png_structp; message:png_const_charp);cdecl; external LibPng; |
| 745 |
procedure png_chunk_warning(png_ptr:png_structp; message:png_const_charp);cdecl; external LibPng; |
| 746 |
function png_get_valid(png_ptr:png_structp; info_ptr:png_infop; flag:png_uint_32):png_uint_32;cdecl; external LibPng; |
| 747 |
function png_get_rowbytes(png_ptr:png_structp; info_ptr:png_infop):png_uint_32;cdecl; external LibPng; |
| 748 |
function png_get_rows(png_ptr:png_structp; info_ptr:png_infop):png_bytepp;cdecl; external LibPng; |
| 749 |
procedure png_set_rows(png_ptr:png_structp; info_ptr:png_infop; row_pointers:png_bytepp);cdecl; external LibPng; |
| 750 |
function png_get_channels(png_ptr:png_structp; info_ptr:png_infop):png_byte;cdecl; external LibPng; |
| 751 |
function png_get_image_width(png_ptr:png_structp; info_ptr:png_infop):png_uint_32;cdecl; external LibPng; |
| 752 |
function png_get_image_height(png_ptr:png_structp; info_ptr:png_infop):png_uint_32;cdecl; external LibPng; |
| 753 |
function png_get_bit_depth(png_ptr:png_structp; info_ptr:png_infop):png_byte;cdecl; external LibPng; |
| 754 |
function png_get_color_type(png_ptr:png_structp; info_ptr:png_infop):png_byte;cdecl; external LibPng; |
| 755 |
function png_get_filter_type(png_ptr:png_structp; info_ptr:png_infop):png_byte;cdecl; external LibPng; |
| 756 |
function png_get_interlace_type(png_ptr:png_structp; info_ptr:png_infop):png_byte;cdecl; external LibPng; |
| 757 |
function png_get_compression_type(png_ptr:png_structp; info_ptr:png_infop):png_byte;cdecl; external LibPng; |
| 758 |
function png_get_pixels_per_meter(png_ptr:png_structp; info_ptr:png_infop):png_uint_32;cdecl; external LibPng; |
| 759 |
function png_get_x_pixels_per_meter(png_ptr:png_structp; info_ptr:png_infop):png_uint_32;cdecl; external LibPng; |
| 760 |
function png_get_y_pixels_per_meter(png_ptr:png_structp; info_ptr:png_infop):png_uint_32;cdecl; external LibPng; |
| 761 |
function png_get_pixel_aspect_ratio(png_ptr:png_structp; info_ptr:png_infop):double;cdecl; external LibPng; |
| 762 |
function png_get_x_offset_pixels(png_ptr:png_structp; info_ptr:png_infop):png_int_32;cdecl; external LibPng; |
| 763 |
function png_get_y_offset_pixels(png_ptr:png_structp; info_ptr:png_infop):png_int_32;cdecl; external LibPng; |
| 764 |
function png_get_x_offset_microns(png_ptr:png_structp; info_ptr:png_infop):png_int_32;cdecl; external LibPng; |
| 765 |
function png_get_y_offset_microns(png_ptr:png_structp; info_ptr:png_infop):png_int_32;cdecl; external LibPng; |
| 766 |
function png_get_signature(png_ptr:png_structp; info_ptr:png_infop):png_bytep;cdecl; external LibPng; |
| 767 |
function png_get_bKGD(png_ptr:png_structp; info_ptr:png_infop; background:Ppng_color_16p):png_uint_32;cdecl; external LibPng; |
| 768 |
procedure png_set_bKGD(png_ptr:png_structp; info_ptr:png_infop; background:png_color_16p);cdecl; external LibPng; |
| 769 |
function png_get_cHRM(png_ptr:png_structp; info_ptr:png_infop; white_x:Pdouble; white_y:Pdouble; red_x:Pdouble; |
| 770 |
red_y:Pdouble; green_x:Pdouble; green_y:Pdouble; blue_x:Pdouble; blue_y:Pdouble):png_uint_32;cdecl; external LibPng; |
| 771 |
function png_get_cHRM_fixed(png_ptr:png_structp; info_ptr:png_infop; int_white_x:Ppng_fixed_point; int_white_y:Ppng_fixed_point; int_red_x:Ppng_fixed_point; |
| 772 |
int_red_y:Ppng_fixed_point; int_green_x:Ppng_fixed_point; int_green_y:Ppng_fixed_point; int_blue_x:Ppng_fixed_point; int_blue_y:Ppng_fixed_point):png_uint_32;cdecl; external LibPng; |
| 773 |
procedure png_set_cHRM(png_ptr:png_structp; info_ptr:png_infop; white_x:double; white_y:double; red_x:double; |
| 774 |
red_y:double; green_x:double; green_y:double; blue_x:double; blue_y:double);cdecl; external LibPng; |
| 775 |
procedure png_set_cHRM_fixed(png_ptr:png_structp; info_ptr:png_infop; int_white_x:png_fixed_point; int_white_y:png_fixed_point; int_red_x:png_fixed_point; |
| 776 |
int_red_y:png_fixed_point; int_green_x:png_fixed_point; int_green_y:png_fixed_point; int_blue_x:png_fixed_point; int_blue_y:png_fixed_point);cdecl; external LibPng; |
| 777 |
function png_get_gAMA(png_ptr:png_structp; info_ptr:png_infop; file_gamma:Pdouble):png_uint_32;cdecl; external LibPng; |
| 778 |
function png_get_gAMA_fixed(png_ptr:png_structp; info_ptr:png_infop; int_file_gamma:Ppng_fixed_point):png_uint_32;cdecl; external LibPng; |
| 779 |
procedure png_set_gAMA(png_ptr:png_structp; info_ptr:png_infop; file_gamma:double);cdecl; external LibPng; |
| 780 |
procedure png_set_gAMA_fixed(png_ptr:png_structp; info_ptr:png_infop; int_file_gamma:png_fixed_point);cdecl; external LibPng; |
| 781 |
function png_get_hIST(png_ptr:png_structp; info_ptr:png_infop; hist:Ppng_uint_16p):png_uint_32;cdecl; external LibPng; |
| 782 |
procedure png_set_hIST(png_ptr:png_structp; info_ptr:png_infop; hist:png_uint_16p);cdecl; external LibPng; |
| 783 |
function png_get_IHDR(png_ptr:png_structp; info_ptr:png_infop; width:Ppng_uint_32; height:Ppng_uint_32; bit_depth:PCInt32; |
| 784 |
color_type:PCInt32; interlace_type:PCInt32; compression_type:PCInt32; filter_type:PCInt32):png_uint_32;cdecl; external LibPng; |
| 785 |
procedure png_set_IHDR(png_ptr:png_structp; info_ptr:png_infop; width:png_uint_32; height:png_uint_32; bit_depth:CInt32; |
| 786 |
color_type:CInt32; interlace_type:CInt32; compression_type:CInt32; filter_type:CInt32);cdecl; external LibPng; |
| 787 |
function png_get_oFFs(png_ptr:png_structp; info_ptr:png_infop; offset_x:Ppng_int_32; offset_y:Ppng_int_32; unit_type:PCInt32):png_uint_32;cdecl; external LibPng; |
| 788 |
procedure png_set_oFFs(png_ptr:png_structp; info_ptr:png_infop; offset_x:png_int_32; offset_y:png_int_32; unit_type:CInt32);cdecl; external LibPng; |
| 789 |
function png_get_pCAL(png_ptr:png_structp; info_ptr:png_infop; purpose:Ppng_charp; X0:Ppng_int_32; X1:Ppng_int_32; |
| 790 |
atype:PCInt32; nparams:PCInt32; units:Ppng_charp; params:Ppng_charpp):png_uint_32;cdecl; external LibPng; |
| 791 |
procedure png_set_pCAL(png_ptr:png_structp; info_ptr:png_infop; purpose:png_charp; X0:png_int_32; X1:png_int_32; |
| 792 |
atype:CInt32; nparams:CInt32; units:png_charp; params:png_charpp);cdecl; external LibPng; |
| 793 |
function png_get_pHYs(png_ptr:png_structp; info_ptr:png_infop; res_x:Ppng_uint_32; res_y:Ppng_uint_32; unit_type:PCInt32):png_uint_32;cdecl; external LibPng; |
| 794 |
procedure png_set_pHYs(png_ptr:png_structp; info_ptr:png_infop; res_x:png_uint_32; res_y:png_uint_32; unit_type:CInt32);cdecl; external LibPng; |
| 795 |
function png_get_PLTE(png_ptr:png_structp; info_ptr:png_infop; palette:Ppng_colorp; num_palette:PCInt32):png_uint_32;cdecl; external LibPng; |
| 796 |
procedure png_set_PLTE(png_ptr:png_structp; info_ptr:png_infop; palette:png_colorp; num_palette:CInt32);cdecl; external LibPng; |
| 797 |
function png_get_sBIT(png_ptr:png_structp; info_ptr:png_infop; sig_bit:Ppng_color_8p):png_uint_32;cdecl; external LibPng; |
| 798 |
procedure png_set_sBIT(png_ptr:png_structp; info_ptr:png_infop; sig_bit:png_color_8p);cdecl; external LibPng; |
| 799 |
function png_get_sRGB(png_ptr:png_structp; info_ptr:png_infop; intent:PCInt32):png_uint_32;cdecl; external LibPng; |
| 800 |
procedure png_set_sRGB(png_ptr:png_structp; info_ptr:png_infop; intent:CInt32);cdecl; external LibPng; |
| 801 |
procedure png_set_sRGB_gAMA_and_cHRM(png_ptr:png_structp; info_ptr:png_infop; intent:CInt32);cdecl; external LibPng; |
| 802 |
function png_get_iCCP(png_ptr:png_structp; info_ptr:png_infop; name:png_charpp; compression_type:PCInt32; profile:png_charpp; |
| 803 |
proflen:Ppng_uint_32):png_uint_32;cdecl; external LibPng; |
| 804 |
procedure png_set_iCCP(png_ptr:png_structp; info_ptr:png_infop; name:png_charp; compression_type:CInt32; profile:png_charp; |
| 805 |
proflen:png_uint_32);cdecl; external LibPng; |
| 806 |
function png_get_sPLT(png_ptr:png_structp; info_ptr:png_infop; entries:png_sPLT_tpp):png_uint_32;cdecl; external LibPng; |
| 807 |
procedure png_set_sPLT(png_ptr:png_structp; info_ptr:png_infop; entries:png_sPLT_tp; nentries:CInt32);cdecl; external LibPng; |
| 808 |
function png_get_text(png_ptr:png_structp; info_ptr:png_infop; text_ptr:Ppng_textp; num_text:PCInt32):png_uint_32;cdecl; external LibPng; |
| 809 |
procedure png_set_text(png_ptr:png_structp; info_ptr:png_infop; text_ptr:png_textp; num_text:CInt32);cdecl; external LibPng; |
| 810 |
function png_get_tIME(png_ptr:png_structp; info_ptr:png_infop; mod_time:Ppng_timep):png_uint_32;cdecl; external LibPng; |
| 811 |
procedure png_set_tIME(png_ptr:png_structp; info_ptr:png_infop; mod_time:png_timep);cdecl; external LibPng; |
| 812 |
function png_get_tRNS(png_ptr:png_structp; info_ptr:png_infop; trans:Ppng_bytep; num_trans:PCInt32; trans_values:Ppng_color_16p):png_uint_32;cdecl; external LibPng; |
| 813 |
procedure png_set_tRNS(png_ptr:png_structp; info_ptr:png_infop; trans:png_bytep; num_trans:CInt32; trans_values:png_color_16p);cdecl; external LibPng; |
| 814 |
function png_get_sCAL(png_ptr:png_structp; info_ptr:png_infop; aunit:PCInt32; width:Pdouble; height:Pdouble):png_uint_32;cdecl; external LibPng; |
| 815 |
procedure png_set_sCAL(png_ptr:png_structp; info_ptr:png_infop; aunit:CInt32; width:double; height:double);cdecl; external LibPng; |
| 816 |
procedure png_set_keep_unknown_chunks(png_ptr:png_structp; keep:CInt32; chunk_list:png_bytep; num_chunks:CInt32);cdecl; external LibPng; |
| 817 |
procedure png_set_unknown_chunks(png_ptr:png_structp; info_ptr:png_infop; unknowns:png_unknown_chunkp; num_unknowns:CInt32);cdecl; external LibPng; |
| 818 |
procedure png_set_unknown_chunk_location(png_ptr:png_structp; info_ptr:png_infop; chunk:CInt32; location:CInt32);cdecl; external LibPng; |
| 819 |
function png_get_unknown_chunks(png_ptr:png_structp; info_ptr:png_infop; entries:png_unknown_chunkpp):png_uint_32;cdecl; external LibPng; |
| 820 |
procedure png_set_invalid(png_ptr:png_structp; info_ptr:png_infop; mask:CInt32);cdecl; external LibPng; |
| 821 |
procedure png_read_png(png_ptr:png_structp; info_ptr:png_infop; transforms:CInt32; params:png_voidp);cdecl; external LibPng; |
| 822 |
procedure png_write_png(png_ptr:png_structp; info_ptr:png_infop; transforms:CInt32; params:png_voidp);cdecl; external LibPng; |
| 823 |
function png_get_header_ver(png_ptr:png_structp):png_charp;cdecl; external LibPng; |
| 824 |
function png_get_header_version(png_ptr:png_structp):png_charp;cdecl; external LibPng; |
| 825 |
function png_get_libpng_ver(png_ptr:png_structp):png_charp;cdecl; external LibPng; |
| 826 |
|
| 827 |
{ Kambi added } |
| 828 |
procedure png_set_expand_gray_1_2_4_to_8(png_ptr: png_structp);cdecl; external LibPng; |
| 829 |
|
| 830 |
{$ifdef LIBPNG_DEPRECATED} |
| 831 |
procedure png_write_destroy_info(info_ptr:png_infop);cdecl; external LibPng; |
| 832 |
procedure png_set_sCAL_s(png_ptr:png_structp; info_ptr:png_infop; aunit:CInt32; swidth:png_charp; sheight:png_charp);cdecl; external LibPng; |
| 833 |
procedure png_set_dither(png_ptr:png_structp; palette:png_colorp; num_palette:CInt32; maximum_colors:CInt32; histogram:png_uint_16p; |
| 834 |
full_dither:CInt32);cdecl; external LibPng; |
| 835 |
procedure png_info_init(info_ptr:png_infop);cdecl; external LibPng; |
| 836 |
procedure png_read_destroy(png_ptr:png_structp; info_ptr:png_infop; end_info_ptr:png_infop);cdecl; external LibPng; |
| 837 |
procedure png_write_destroy(png_ptr:png_structp);cdecl; external LibPng; |
| 838 |
procedure png_permit_empty_plte(png_ptr:png_structp; empty_plte_permitted:CInt32);cdecl; external LibPng; |
| 839 |
function png_check_sig(sig:png_bytep; num:CInt32):CInt32;cdecl; external LibPng; |
| 840 |
function png_memcpy_check(png_ptr:png_structp; s1:png_voidp; s2:png_voidp; size:png_uint_32):png_voidp;cdecl; external LibPng; |
| 841 |
function png_memset_check(png_ptr:png_structp; s1:png_voidp; value:CInt32; size:png_uint_32):png_voidp;cdecl; external LibPng; |
| 842 |
procedure png_set_gray_1_2_4_to_8(png_ptr:png_structp);cdecl; external LibPng; |
| 843 |
{$endif} |
| 844 |
|
| 845 |
implementation |
| 846 |
|
| 847 |
end. |