Rev 6733 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6733 | Rev 6881 | ||
---|---|---|---|
Line 124... | Line 124... | ||
124 | end if ;COLORSPACE || GAMMA |
124 | end if ;COLORSPACE || GAMMA |
125 | 125 | ||
Line 126... | Line 126... | ||
126 | struct png_struct |
126 | struct png_struct |
127 | if PNG_SETJMP_SUPPORTED eq 1 |
127 | if PNG_SETJMP_SUPPORTED eq 1 |
128 | jmp_buf_local dd ? ;jmp_buf ;New name in 1.6.0 for jmp_buf in png_struct |
128 | jmp_buf_local rb 64 ;jmp_buf ;New name in 1.6.0 for jmp_buf in png_struct |
129 | longjmp_fn dd ? ;png_longjmp_ptr ;setjmp non-local goto function. |
129 | longjmp_fn dd ? ;png_longjmp_ptr ;setjmp non-local goto function. |
130 | jmp_buf_ptr dd ? ;jmp_buf * ;passed to longjmp_fn |
130 | jmp_buf_ptr dd ? ;jmp_buf * ;passed to longjmp_fn |
131 | jmp_buf_size dd ? ;size_t ;size of the above, if allocated |
131 | jmp_buf_size dd ? ;size_t ;size of the above, if allocated |
132 | end if |
132 | end if |
133 | error_fn dd ? ;png_error_ptr ;function for printing errors and aborting |
133 | error_fn dd ? ;png_error_ptr ;function for printing errors and aborting |
Line 152... | Line 152... | ||
152 | if (PNG_READ_USER_TRANSFORM_SUPPORTED eq 1) | (PNG_WRITE_USER_TRANSFORM_SUPPORTED eq 1) |
152 | if (PNG_READ_USER_TRANSFORM_SUPPORTED eq 1) | (PNG_WRITE_USER_TRANSFORM_SUPPORTED eq 1) |
153 | user_transform_ptr dd ? ;voidp ;user supplied struct for user transform |
153 | user_transform_ptr dd ? ;voidp ;user supplied struct for user transform |
154 | user_transform_depth db ? ;byte ;bit depth of user transformed pixels |
154 | user_transform_depth db ? ;byte ;bit depth of user transformed pixels |
155 | user_transform_channels db ? ;byte ;channels in user transformed pixels |
155 | user_transform_channels db ? ;byte ;channels in user transformed pixels |
156 | end if |
156 | rb 2 ;align |
- | 157 | end if |
|
157 | end if |
158 | end if |
158 | 159 | ||
Line 159... | Line 160... | ||
159 | mode dd ? ;uint_32 ;tells us where we are in the PNG file |
160 | mode dd ? ;uint_32 ;tells us where we are in the PNG file |
160 | flags dd ? ;uint_32 ;flags indicating various things to libpng |
161 | flags dd ? ;uint_32 ;flags indicating various things to libpng |
Line 214... | Line 215... | ||
214 | idat_size dd ? ;uint_32 ;current IDAT size for read |
215 | idat_size dd ? ;uint_32 ;current IDAT size for read |
215 | crc dd ? ;uint_32 ;current chunk CRC value |
216 | crc dd ? ;uint_32 ;current chunk CRC value |
216 | palette dd ? ;png_colorp ;palette from the input file |
217 | palette dd ? ;png_colorp ;palette from the input file |
217 | num_palette dw ? ;uint_16 ;number of color entries in palette |
218 | num_palette dw ? ;uint_16 ;number of color entries in palette |
218 | 219 | rb 2 ;align |
|
219 | ; Added at libpng-1.5.10 |
220 | ; Added at libpng-1.5.10 |
220 | if PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED eq 1 |
221 | if PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED eq 1 |
221 | num_palette_max dd ? ;int ;maximum palette index found in IDAT |
222 | num_palette_max dd ? ;int ;maximum palette index found in IDAT |
222 | end if |
223 | end if |
Line 235... | Line 236... | ||
235 | usr_channels db ? ;byte ;channels at start of write: write only |
236 | usr_channels db ? ;byte ;channels at start of write: write only |
236 | sig_bytes db ? ;byte ;magic bytes read/written from start of file |
237 | sig_bytes db ? ;byte ;magic bytes read/written from start of file |
237 | maximum_pixel_depth db ? ;byte ;pixel depth used for the row buffers |
238 | maximum_pixel_depth db ? ;byte ;pixel depth used for the row buffers |
238 | transformed_pixel_depth db ? ;byte ;pixel depth after read/write transforms |
239 | transformed_pixel_depth db ? ;byte ;pixel depth after read/write transforms |
239 | ;#if PNG_ZLIB_VERNUM >= 0x1240 |
240 | ;if PNG_ZLIB_VERNUM >= 0x1240 |
240 | zstream_start db ? ;byte ;at start of an input zlib stream |
241 | ;zstream_start db 1 ;byte ;at start of an input zlib stream |
241 | ;end if /* Zlib >= 1.2.4 */ |
242 | ;end if ;Zlib >= 1.2.4 |
242 | if (PNG_READ_FILLER_SUPPORTED eq 1) | (PNG_WRITE_FILLER_SUPPORTED eq 1) |
243 | if (PNG_READ_FILLER_SUPPORTED eq 1) | (PNG_WRITE_FILLER_SUPPORTED eq 1) |
243 | filler dw ? ;uint_16 ; filler bytes for pixel expansion |
244 | filler dw ? ;uint_16 ;filler bytes for pixel expansion |
244 | end if |
245 | end if |
245 | 246 | ||
Line 246... | Line 247... | ||
246 | if (PNG_bKGD_SUPPORTED eq 1) | (PNG_READ_BACKGROUND_SUPPORTED eq 1) | \ |
247 | if (PNG_bKGD_SUPPORTED eq 1) | (PNG_READ_BACKGROUND_SUPPORTED eq 1) | \ |
247 | (PNG_READ_ALPHA_MODE_SUPPORTED eq 1) |
248 | (PNG_READ_ALPHA_MODE_SUPPORTED eq 1) |
248 | background_gamma_type db ? ;byte |
249 | background_gamma_type db ? ;byte |
- | 250 | rb 1 ;align |
|
249 | background_gamma dd ? ;png_fixed_point |
251 | background_gamma dd ? ;png_fixed_point |
250 | background png_color_16 ;background color in screen gamma space |
252 | background png_color_16 ;background color in screen gamma space |
- | 253 | rb 1 ;align |
|
251 | if PNG_READ_GAMMA_SUPPORTED eq 1 |
254 | if PNG_READ_GAMMA_SUPPORTED eq 1 |
252 | background_1 png_color_16 ;background normalized to gamma 1.0 |
255 | background_1 png_color_16 ;background normalized to gamma 1.0 |
- | 256 | rb 1 ;align |
|
253 | end if |
257 | end if |
254 | end if ;bKGD |
258 | end if ;bKGD |
Line 255... | Line 259... | ||
255 | 259 | ||
256 | if PNG_WRITE_FLUSH_SUPPORTED eq 1 |
260 | if PNG_WRITE_FLUSH_SUPPORTED eq 1 |
Line 280... | Line 284... | ||
280 | end if |
284 | end if |
281 | 285 | ||
Line 282... | Line 286... | ||
282 | if (PNG_READ_SHIFT_SUPPORTED eq 1) | (PNG_WRITE_SHIFT_SUPPORTED eq 1) |
286 | if (PNG_READ_SHIFT_SUPPORTED eq 1) | (PNG_WRITE_SHIFT_SUPPORTED eq 1) |
283 | shift png_color_8 ;shift for significant bit tranformation |
287 | shift png_color_8 ;shift for significant bit tranformation |
- | 288 | rb 2 ;align |
|
284 | end if |
289 | end if |
Line 285... | Line 290... | ||
285 | 290 | ||
286 | if (PNG_tRNS_SUPPORTED eq 1) | (PNG_READ_BACKGROUND_SUPPORTED eq 1) \ |
291 | if (PNG_tRNS_SUPPORTED eq 1) | (PNG_READ_BACKGROUND_SUPPORTED eq 1) \ |
287 | | (PNG_READ_EXPAND_SUPPORTED eq 1) | (PNG_READ_BACKGROUND_SUPPORTED eq 1) |
292 | | (PNG_READ_EXPAND_SUPPORTED eq 1) | (PNG_READ_BACKGROUND_SUPPORTED eq 1) |
288 | trans_alpha dd ? ;bytep ;alpha values for paletted files |
293 | trans_alpha dd ? ;bytep ;alpha values for paletted files |
- | 294 | trans_color png_color_16 ;transparent color for non-paletted files |
|
289 | trans_color png_color_16 ;transparent color for non-paletted files |
295 | rb 3 ;align |
Line 290... | Line 296... | ||
290 | end if |
296 | end if |
291 | 297 | ||
292 | read_row_fn dd ? ;png_read_status_ptr ;called after each row is decoded |
298 | read_row_fn dd ? ;png_read_status_ptr ;called after each row is decoded |
Line 323... | Line 329... | ||
323 | ;#if PNG_LIBPNG_VER < 10700 |
329 | ;#if PNG_LIBPNG_VER < 10700 |
324 | ; To do: remove this from libpng-1.7 |
330 | ; To do: remove this from libpng-1.7 |
325 | if PNG_TIME_RFC1123_SUPPORTED eq 1 |
331 | if PNG_TIME_RFC1123_SUPPORTED eq 1 |
326 | time_buffer rb 29 ;char[29] ;String to hold RFC 1123 time text |
332 | time_buffer rb 29 ;char[29] ;String to hold RFC 1123 time text |
- | 333 | rb 2 ;align |
|
327 | end if |
334 | end if |
328 | ;end if |
335 | ;end if |
Line 329... | Line 336... | ||
329 | 336 | ||
Line 353... | Line 360... | ||
353 | ; These were changed from byte in libpng-1.0.6 |
360 | ; These were changed from byte in libpng-1.0.6 |
354 | rgb_to_gray_red_coeff dw ? ;uint_16 |
361 | rgb_to_gray_red_coeff dw ? ;uint_16 |
355 | rgb_to_gray_green_coeff dw ? ;uint_16 |
362 | rgb_to_gray_green_coeff dw ? ;uint_16 |
356 | ; deleted in 1.5.5: rgb_to_gray_blue_coeff; |
363 | ; deleted in 1.5.5: rgb_to_gray_blue_coeff; |
357 | end if |
364 | rb 2 ;align |
- | 365 | end if |
|
358 | 366 | ||
Line 359... | Line 367... | ||
359 | if PNG_MNG_FEATURES_SUPPORTED eq 1 |
367 | if PNG_MNG_FEATURES_SUPPORTED eq 1 |
360 | ; New member added in libpng-1.0.4 (renamed in 1.0.9) |
368 | ; New member added in libpng-1.0.4 (renamed in 1.0.9) |
361 | ; Changed from byte to uint_32 at version 1.2.0 |
369 | ; Changed from byte to uint_32 at version 1.2.0 |
362 | mng_features_permitted dd ? ;uint_32 |
370 | mng_features_permitted dd ? ;uint_32 |
Line 363... | Line 371... | ||
363 | 371 | ||
364 | ; New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 |
372 | ; New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 |
- | 373 | filter_type db ? ;byte |
|
365 | filter_type db ? ;byte |
374 | rb 3 ;align |
Line 366... | Line 375... | ||
366 | end if |
375 | end if |
Line 367... | Line 376... | ||
367 | 376 | ||
Line 385... | Line 394... | ||
385 | end if |
394 | end if |
386 | 395 | ||
Line 387... | Line 396... | ||
387 | ; New members added in libpng-1.0.16 and 1.2.6 |
396 | ; New members added in libpng-1.0.16 and 1.2.6 |
388 | compression_type db ? ;byte |
397 | compression_type db ? ;byte |
- | 398 | rb 3 ;align |
|
Line 389... | Line 399... | ||
389 | 399 | ||
390 | if PNG_USER_LIMITS_SUPPORTED eq 1 |
400 | if PNG_USER_LIMITS_SUPPORTED eq 1 |
391 | user_width_max dd ? ;uint_32 |
401 | user_width_max dd ? ;uint_32 |
Line 406... | Line 416... | ||
406 | if PNG_READ_UNKNOWN_CHUNKS_SUPPORTED eq 1 |
416 | if PNG_READ_UNKNOWN_CHUNKS_SUPPORTED eq 1 |
407 | ; Temporary storage for unknown chunk that the library doesn't recognize, |
417 | ; Temporary storage for unknown chunk that the library doesn't recognize, |
408 | ; used while reading the chunk. |
418 | ; used while reading the chunk. |
409 | 419 | ||
Line 410... | Line 420... | ||
410 | ; png_unknown_chunk unknown_chunk; |
420 | unknown_chunk png_unknown_chunk |
- | 421 | rb 3 ;align |
|
411 | end if |
422 | end if |
Line 412... | Line 423... | ||
412 | 423 | ||
413 | ; New member added in libpng-1.2.26 |
424 | ; New member added in libpng-1.2.26 |
Line 430... | Line 441... | ||
430 | ; New member added in libpng-1.5.6 |
441 | ; New member added in libpng-1.5.6 |
431 | big_prev_row dd ? ;bytep |
442 | big_prev_row dd ? ;bytep |
Line 432... | Line 443... | ||
432 | 443 | ||
433 | ; New member added in libpng-1.5.7 |
444 | ; New member added in libpng-1.5.7 |
434 | ; void (*read_filter[PNG_FILTER_VALUE_LAST-1])(png_row_infop row_info, |
- | |
Line 435... | Line 445... | ||
435 | ; bytep row, bytep prev_row); |
445 | read_filter rd PNG_FILTER_VALUE_LAST-1 |
436 | 446 | ||
437 | if PNG_READ_SUPPORTED eq 1 |
447 | if PNG_READ_SUPPORTED eq 1 |
438 | if (PNG_COLORSPACE_SUPPORTED eq 1) | (PNG_GAMMA_SUPPORTED eq 1) |
448 | if (PNG_COLORSPACE_SUPPORTED eq 1) | (PNG_GAMMA_SUPPORTED eq 1) |