branch | GCC_SURGE |
changeset 31 | 5daf16870df6 |
parent 30 | 5dc02b23752f |
27:93b982ccede2 | 31:5daf16870df6 |
---|---|
1 .TH LIBPNG 3 "September 10, 2009" |
1 .TH LIBPNG 3 "January 3, 2010" |
2 .SH NAME |
2 .SH NAME |
3 libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40 |
3 libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0 |
4 .SH SYNOPSIS |
4 .SH SYNOPSIS |
5 \fI\fB |
5 \fI\fB |
6 |
6 |
7 \fB#include <png.h>\fP |
7 \fB#include <png.h>\fP |
8 |
8 |
10 |
10 |
11 \fBpng_uint_32 png_access_version_number \fI(void\fP\fB);\fP |
11 \fBpng_uint_32 png_access_version_number \fI(void\fP\fB);\fP |
12 |
12 |
13 \fI\fB |
13 \fI\fB |
14 |
14 |
15 \fBint png_check_sig (png_bytep \fP\fIsig\fP\fB, int \fInum\fP\fB);\fP |
15 \fBvoid png_benign_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP |
16 |
|
17 \fI\fB |
|
18 |
|
19 \fBvoid png_chunk_benign_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP |
|
16 |
20 |
17 \fI\fB |
21 \fI\fB |
18 |
22 |
19 \fBvoid png_chunk_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP |
23 \fBvoid png_chunk_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP |
20 |
24 |
54 |
58 |
55 \fBpng_structp png_create_write_struct_2(png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP |
59 \fBpng_structp png_create_write_struct_2(png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP |
56 |
60 |
57 \fI\fB |
61 \fI\fB |
58 |
62 |
59 \fBint png_debug(int \fP\fIlevel\fP\fB, png_const_charp \fImessage\fP\fB);\fP |
|
60 |
|
61 \fI\fB |
|
62 |
|
63 \fBint png_debug1(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fIp1\fP\fB);\fP |
|
64 |
|
65 \fI\fB |
|
66 |
|
67 \fBint png_debug2(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fP\fIp1\fP\fB, \fIp2\fP\fB);\fP |
|
68 |
|
69 \fI\fB |
|
70 |
|
71 \fBvoid png_destroy_info_struct (png_structp \fP\fIpng_ptr\fP\fB, png_infopp \fIinfo_ptr_ptr\fP\fB);\fP |
63 \fBvoid png_destroy_info_struct (png_structp \fP\fIpng_ptr\fP\fB, png_infopp \fIinfo_ptr_ptr\fP\fB);\fP |
72 |
64 |
73 \fI\fB |
65 \fI\fB |
74 |
66 |
75 \fBvoid png_destroy_read_struct (png_structpp \fP\fIpng_ptr_ptr\fP\fB, png_infopp \fP\fIinfo_ptr_ptr\fP\fB, png_infopp \fIend_info_ptr_ptr\fP\fB);\fP |
67 \fBvoid png_destroy_read_struct (png_structpp \fP\fIpng_ptr_ptr\fP\fB, png_infopp \fP\fIinfo_ptr_ptr\fP\fB, png_infopp \fIend_info_ptr_ptr\fP\fB);\fP |
118 |
110 |
119 \fBpng_uint_32 png_get_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*white_x\fP\fB, png_uint_32 \fP\fI*white_y\fP\fB, png_uint_32 \fP\fI*red_x\fP\fB, png_uint_32 \fP\fI*red_y\fP\fB, png_uint_32 \fP\fI*green_x\fP\fB, png_uint_32 \fP\fI*green_y\fP\fB, png_uint_32 \fP\fI*blue_x\fP\fB, png_uint_32 \fI*blue_y\fP\fB);\fP |
111 \fBpng_uint_32 png_get_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*white_x\fP\fB, png_uint_32 \fP\fI*white_y\fP\fB, png_uint_32 \fP\fI*red_x\fP\fB, png_uint_32 \fP\fI*red_y\fP\fB, png_uint_32 \fP\fI*green_x\fP\fB, png_uint_32 \fP\fI*green_y\fP\fB, png_uint_32 \fP\fI*blue_x\fP\fB, png_uint_32 \fI*blue_y\fP\fB);\fP |
120 |
112 |
121 \fI\fB |
113 \fI\fB |
122 |
114 |
115 \fBpng_uint_32 png_get_chunk_cache_max (png_structp \fIpng_ptr\fP\fB);\fP |
|
116 |
|
117 \fI\fB |
|
118 |
|
123 \fBpng_byte png_get_color_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
119 \fBpng_byte png_get_color_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
124 |
120 |
125 \fI\fB |
121 \fI\fB |
126 |
122 |
123 \fBpng_uint_32 png_get_compression_buffer_size (png_structp \fIpng_ptr\fP\fB);\fP |
|
124 |
|
125 \fI\fB |
|
126 |
|
127 \fBpng_byte png_get_compression_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
127 \fBpng_byte png_get_compression_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
128 |
128 |
129 \fI\fB |
129 \fI\fB |
130 |
130 |
131 \fBpng_byte png_get_copyright (png_structp \fIpng_ptr\fP\fB);\fP |
131 \fBpng_byte png_get_copyright (png_structp \fIpng_ptr\fP\fB);\fP |
174 |
174 |
175 \fBpng_uint_32 png_get_image_width (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
175 \fBpng_uint_32 png_get_image_width (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
176 |
176 |
177 \fI\fB |
177 \fI\fB |
178 |
178 |
179 \fB#if \fI!defined(PNG_1_0_X) |
|
180 |
|
181 \fBpng_int_32 png_get_int_32 (png_bytep \fIbuf\fP\fB);\fP |
179 \fBpng_int_32 png_get_int_32 (png_bytep \fIbuf\fP\fB);\fP |
182 |
180 |
183 \fI\fB#endif |
|
184 |
|
185 \fI\fB |
181 \fI\fB |
186 |
182 |
187 \fBpng_byte png_get_interlace_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
183 \fBpng_byte png_get_interlace_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
188 |
184 |
189 \fI\fB |
185 \fI\fB |
260 |
256 |
261 \fBpng_uint_32 png_get_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_timep \fI*mod_time\fP\fB);\fP |
257 \fBpng_uint_32 png_get_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_timep \fI*mod_time\fP\fB);\fP |
262 |
258 |
263 \fI\fB |
259 \fI\fB |
264 |
260 |
265 \fBpng_uint_32 png_get_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fI*trans\fP\fB, int \fP\fI*num_trans\fP\fB, png_color_16p \fI*trans_values\fP\fB);\fP |
261 \fBpng_uint_32 png_get_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fI*trans\fP\fB, int \fP\fI*num_trans\fP\fB, png_color_16p \fI*trans_color\fP\fB);\fP |
266 |
262 |
267 \fI\fB |
263 \fI\fB |
268 |
264 |
269 \fB#if \fI!defined(PNG_1_0_X) |
265 \fB/* This function is really an inline macro. \fI*/ |
270 |
266 |
271 \fBpng_uint_16 png_get_uint_16 (png_bytep \fIbuf\fP\fB);\fP |
267 \fBpng_uint_16 png_get_uint_16 (png_bytep \fIbuf\fP\fB);\fP |
272 |
268 |
273 \fI\fB |
269 \fI\fB |
274 |
270 |
275 \fBpng_uint_32 png_get_uint_31 (png_bytep \fIbuf\fP\fB);\fP |
271 \fBpng_uint_32 png_get_uint_31 (png_bytep \fIbuf\fP\fB);\fP |
276 |
272 |
277 \fI\fB |
273 \fI\fB |
278 |
274 |
275 \fB/* This function is really an inline macro. \fI*/ |
|
276 |
|
279 \fBpng_uint_32 png_get_uint_32 (png_bytep \fIbuf\fP\fB);\fP |
277 \fBpng_uint_32 png_get_uint_32 (png_bytep \fIbuf\fP\fB);\fP |
280 |
278 |
281 \fI\fB#endif |
|
282 |
|
283 \fI\fB |
279 \fI\fB |
284 |
280 |
285 \fBpng_uint_32 png_get_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_unknown_chunkpp \fIunknowns\fP\fB);\fP |
281 \fBpng_uint_32 png_get_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_unknown_chunkpp \fIunknowns\fP\fB);\fP |
286 |
282 |
287 \fI\fB |
283 \fI\fB |
328 |
324 |
329 \fBpng_uint_32 png_get_y_pixels_per_meter (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
325 \fBpng_uint_32 png_get_y_pixels_per_meter (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
330 |
326 |
331 \fI\fB |
327 \fI\fB |
332 |
328 |
333 \fBpng_uint_32 png_get_compression_buffer_size (png_structp \fIpng_ptr\fP\fB);\fP |
|
334 |
|
335 \fI\fB |
|
336 |
|
337 \fBint png_handle_as_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP |
329 \fBint png_handle_as_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP |
338 |
330 |
339 \fI\fB |
331 \fI\fB |
340 |
332 |
341 \fBvoid png_init_io (png_structp \fP\fIpng_ptr\fP\fB, FILE \fI*fp\fP\fB);\fP |
333 \fBvoid png_init_io (png_structp \fP\fIpng_ptr\fP\fB, FILE \fI*fp\fP\fB);\fP |
342 |
334 |
343 \fI\fB |
335 \fI\fB |
344 |
336 |
345 \fBDEPRECATED: void png_info_init (png_infop \fIinfo_ptr\fP\fB);\fP |
337 \fBpng_voidp png_malloc (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP |
346 |
338 |
347 \fI\fB |
339 \fI\fB |
348 |
340 |
349 \fBDEPRECATED: void png_info_init_2 (png_infopp \fP\fIptr_ptr\fP\fB, png_size_t \fIpng_info_struct_size\fP\fB);\fP |
341 \fBpng_voidp png_malloc_default(png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP |
350 |
|
351 \fI\fB |
|
352 |
|
353 \fBpng_voidp png_malloc (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP |
|
354 |
|
355 \fI\fB |
|
356 |
|
357 \fBpng_voidp png_malloc_default(png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP |
|
358 |
342 |
359 \fI\fB |
343 \fI\fB |
360 |
344 |
361 \fBvoidp png_memcpy (png_voidp \fP\fIs1\fP\fB, png_voidp \fP\fIs2\fP\fB, png_size_t \fIsize\fP\fB);\fP |
345 \fBvoidp png_memcpy (png_voidp \fP\fIs1\fP\fB, png_voidp \fP\fIs2\fP\fB, png_size_t \fIsize\fP\fB);\fP |
362 |
346 |
363 \fI\fB |
347 \fI\fB |
364 |
348 |
365 \fBpng_voidp png_memcpy_check (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIs1\fP\fB, png_voidp \fP\fIs2\fP\fB, png_uint_32 \fIsize\fP\fB);\fP |
|
366 |
|
367 \fI\fB |
|
368 |
|
369 \fBvoidp png_memset (png_voidp \fP\fIs1\fP\fB, int \fP\fIvalue\fP\fB, png_size_t \fIsize\fP\fB);\fP |
349 \fBvoidp png_memset (png_voidp \fP\fIs1\fP\fB, int \fP\fIvalue\fP\fB, png_size_t \fIsize\fP\fB);\fP |
370 |
350 |
371 \fI\fB |
351 \fI\fB |
372 |
352 |
373 \fBpng_voidp png_memset_check (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIs1\fP\fB, int \fP\fIvalue\fP\fB, png_uint_32 \fIsize\fP\fB);\fP |
|
374 |
|
375 \fI\fB |
|
376 |
|
377 \fBDEPRECATED: void png_permit_empty_plte (png_structp \fP\fIpng_ptr\fP\fB, int \fIempty_plte_permitted\fP\fB);\fP |
|
378 |
|
379 \fI\fB |
|
380 |
|
381 \fBvoid png_process_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_size\fP\fB);\fP |
353 \fBvoid png_process_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_size\fP\fB);\fP |
382 |
354 |
383 \fI\fB |
355 \fI\fB |
384 |
356 |
385 \fBvoid png_progressive_combine_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIold_row\fP\fB, png_bytep \fInew_row\fP\fB);\fP |
357 \fBvoid png_progressive_combine_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIold_row\fP\fB, png_bytep \fInew_row\fP\fB);\fP |
386 |
358 |
387 \fI\fB |
359 \fI\fB |
388 |
360 |
389 \fBvoid png_read_destroy (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_infop \fIend_info_ptr\fP\fB);\fP |
|
390 |
|
391 \fI\fB |
|
392 |
|
393 \fBvoid png_read_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
361 \fBvoid png_read_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
394 |
362 |
395 \fI\fB |
363 \fI\fB |
396 |
364 |
397 \fBvoid png_read_image (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fIimage\fP\fB);\fP |
365 \fBvoid png_read_image (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fIimage\fP\fB);\fP |
398 |
366 |
399 \fI\fB |
367 \fI\fB |
400 |
368 |
401 \fBDEPRECATED: void png_read_init (png_structp \fIpng_ptr\fP\fB);\fP |
|
402 |
|
403 \fI\fB |
|
404 |
|
405 \fBDEPRECATED: void png_read_init_2 (png_structpp \fP\fIptr_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP |
|
406 |
|
407 \fI\fB |
|
408 |
|
409 \fBvoid png_read_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
369 \fBvoid png_read_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
410 |
370 |
411 \fI\fB |
371 \fI\fB |
412 |
372 |
413 \fBvoid png_read_png (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fItransforms\fP\fB, png_voidp \fIparams\fP\fB);\fP |
373 \fBvoid png_read_png (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fItransforms\fP\fB, png_voidp \fIparams\fP\fB);\fP |
424 |
384 |
425 \fBvoid png_read_update_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
385 \fBvoid png_read_update_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
426 |
386 |
427 \fI\fB |
387 \fI\fB |
428 |
388 |
429 \fB#if \fI!defined(PNG_1_0_X) |
|
430 |
|
431 \fBpng_save_int_32 (png_bytep \fP\fIbuf\fP\fB, png_int_32 \fIi\fP\fB);\fP |
389 \fBpng_save_int_32 (png_bytep \fP\fIbuf\fP\fB, png_int_32 \fIi\fP\fB);\fP |
432 |
390 |
433 \fI\fB |
391 \fI\fB |
434 |
392 |
435 \fBvoid png_save_uint_16 (png_bytep \fP\fIbuf\fP\fB, unsigned int \fIi\fP\fB);\fP |
393 \fBvoid png_save_uint_16 (png_bytep \fP\fIbuf\fP\fB, unsigned int \fIi\fP\fB);\fP |
440 |
398 |
441 \fI\fB |
399 \fI\fB |
442 |
400 |
443 \fBvoid png_set_add_alpha (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, int \fIflags\fP\fB);\fP |
401 \fBvoid png_set_add_alpha (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, int \fIflags\fP\fB);\fP |
444 |
402 |
445 \fI\fB#endif |
|
446 |
|
447 \fI\fB |
403 \fI\fB |
448 |
404 |
449 \fBvoid png_set_background (png_structp \fP\fIpng_ptr\fP\fB, png_color_16p \fP\fIbackground_color\fP\fB, int \fP\fIbackground_gamma_code\fP\fB, int \fP\fIneed_expand\fP\fB, double \fIbackground_gamma\fP\fB);\fP |
405 \fBvoid png_set_background (png_structp \fP\fIpng_ptr\fP\fB, png_color_16p \fP\fIbackground_color\fP\fB, int \fP\fIbackground_gamma_code\fP\fB, int \fP\fIneed_expand\fP\fB, double \fIbackground_gamma\fP\fB);\fP |
450 |
406 |
451 \fI\fB |
407 \fI\fB |
464 |
420 |
465 \fBvoid png_set_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIwhite_x\fP\fB, png_uint_32 \fP\fIwhite_y\fP\fB, png_uint_32 \fP\fIred_x\fP\fB, png_uint_32 \fP\fIred_y\fP\fB, png_uint_32 \fP\fIgreen_x\fP\fB, png_uint_32 \fP\fIgreen_y\fP\fB, png_uint_32 \fP\fIblue_x\fP\fB, png_uint_32 \fIblue_y\fP\fB);\fP |
421 \fBvoid png_set_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIwhite_x\fP\fB, png_uint_32 \fP\fIwhite_y\fP\fB, png_uint_32 \fP\fIred_x\fP\fB, png_uint_32 \fP\fIred_y\fP\fB, png_uint_32 \fP\fIgreen_x\fP\fB, png_uint_32 \fP\fIgreen_y\fP\fB, png_uint_32 \fP\fIblue_x\fP\fB, png_uint_32 \fIblue_y\fP\fB);\fP |
466 |
422 |
467 \fI\fB |
423 \fI\fB |
468 |
424 |
425 \fBvoid png_set_chunk_cache_max (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIuser_chunk_cache_max\fP\fB);\fP |
|
426 |
|
427 \fI\fB |
|
428 |
|
469 \fBvoid png_set_compression_level (png_structp \fP\fIpng_ptr\fP\fB, int \fIlevel\fP\fB);\fP |
429 \fBvoid png_set_compression_level (png_structp \fP\fIpng_ptr\fP\fB, int \fIlevel\fP\fB);\fP |
470 |
430 |
471 \fI\fB |
431 \fI\fB |
472 |
432 |
473 \fBvoid png_set_compression_mem_level (png_structp \fP\fIpng_ptr\fP\fB, int \fImem_level\fP\fB);\fP |
433 \fBvoid png_set_compression_mem_level (png_structp \fP\fIpng_ptr\fP\fB, int \fImem_level\fP\fB);\fP |
572 |
532 |
573 \fBvoid png_set_keep_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIkeep\fP\fB, png_bytep \fP\fIchunk_list\fP\fB, int \fInum_chunks\fP\fB);\fP |
533 \fBvoid png_set_keep_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIkeep\fP\fB, png_bytep \fP\fIchunk_list\fP\fB, int \fInum_chunks\fP\fB);\fP |
574 |
534 |
575 \fI\fB |
535 \fI\fB |
576 |
536 |
537 \fBjmp_buf* png_set_longjmp_fn (png_structp \fP\fIpng_ptr\fP\fB, png_longjmp_ptr \fP\fIlongjmp_fn\fP\fB, size_t \fIjmp_buf_size\fP\fB);\fP |
|
538 |
|
539 \fI\fB |
|
540 |
|
577 \fBvoid png_set_mem_fn(png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP |
541 \fBvoid png_set_mem_fn(png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP |
578 |
542 |
579 \fI\fB |
543 \fI\fB |
580 |
544 |
581 \fBvoid png_set_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIoffset_x\fP\fB, png_uint_32 \fP\fIoffset_y\fP\fB, int \fIunit_type\fP\fB);\fP |
545 \fBvoid png_set_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIoffset_x\fP\fB, png_uint_32 \fP\fIoffset_y\fP\fB, int \fIunit_type\fP\fB);\fP |
684 |
648 |
685 \fBvoid png_set_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_timep \fImod_time\fP\fB);\fP |
649 \fBvoid png_set_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_timep \fImod_time\fP\fB);\fP |
686 |
650 |
687 \fI\fB |
651 \fI\fB |
688 |
652 |
689 \fBvoid png_set_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fItrans\fP\fB, int \fP\fInum_trans\fP\fB, png_color_16p \fItrans_values\fP\fB);\fP |
653 \fBvoid png_set_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fItrans\fP\fB, int \fP\fInum_trans\fP\fB, png_color_16p \fItrans_color\fP\fB);\fP |
690 |
654 |
691 \fI\fB |
655 \fI\fB |
692 |
656 |
693 \fBvoid png_set_tRNS_to_alpha(png_structp \fIpng_ptr\fP\fB);\fP |
657 \fBvoid png_set_tRNS_to_alpha(png_structp \fIpng_ptr\fP\fB);\fP |
694 |
658 |
756 |
720 |
757 \fBvoid png_write_chunk_start (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIchunk_name\fP\fB, png_uint_32 \fIlength\fP\fB);\fP |
721 \fBvoid png_write_chunk_start (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIchunk_name\fP\fB, png_uint_32 \fIlength\fP\fB);\fP |
758 |
722 |
759 \fI\fB |
723 \fI\fB |
760 |
724 |
761 \fBvoid png_write_destroy (png_structp \fIpng_ptr\fP\fB);\fP |
|
762 |
|
763 \fI\fB |
|
764 |
|
765 \fBvoid png_write_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
725 \fBvoid png_write_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
766 |
726 |
767 \fI\fB |
727 \fI\fB |
768 |
728 |
769 \fBvoid png_write_flush (png_structp \fIpng_ptr\fP\fB);\fP |
729 \fBvoid png_write_flush (png_structp \fIpng_ptr\fP\fB);\fP |
772 |
732 |
773 \fBvoid png_write_image (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fIimage\fP\fB);\fP |
733 \fBvoid png_write_image (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fIimage\fP\fB);\fP |
774 |
734 |
775 \fI\fB |
735 \fI\fB |
776 |
736 |
777 \fBDEPRECATED: void png_write_init (png_structp \fIpng_ptr\fP\fB);\fP |
|
778 |
|
779 \fI\fB |
|
780 |
|
781 \fBDEPRECATED: void png_write_init_2 (png_structpp \fP\fIptr_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP |
|
782 |
|
783 \fI\fB |
|
784 |
|
785 \fBvoid png_write_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
737 \fBvoid png_write_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
786 |
738 |
787 \fI\fB |
739 \fI\fB |
788 |
740 |
789 \fBvoid png_write_info_before_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
741 \fBvoid png_write_info_before_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP |
797 \fBvoid png_write_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIrow\fP\fB);\fP |
749 \fBvoid png_write_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIrow\fP\fB);\fP |
798 |
750 |
799 \fI\fB |
751 \fI\fB |
800 |
752 |
801 \fBvoid png_write_rows (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fP\fIrow\fP\fB, png_uint_32 \fInum_rows\fP\fB);\fP |
753 \fBvoid png_write_rows (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fP\fIrow\fP\fB, png_uint_32 \fInum_rows\fP\fB);\fP |
754 |
|
755 \fI\fB |
|
756 |
|
757 \fBvoid png_write_sig (png_structp \fIpng_ptr\fP\fB);\fP |
|
802 |
758 |
803 \fI\fB |
759 \fI\fB |
804 |
760 |
805 \fBvoidpf png_zalloc (voidpf \fP\fIpng_ptr\fP\fB, uInt \fP\fIitems\fP\fB, uInt \fIsize\fP\fB);\fP |
761 \fBvoidpf png_zalloc (voidpf \fP\fIpng_ptr\fP\fB, uInt \fP\fIitems\fP\fB, uInt \fIsize\fP\fB);\fP |
806 |
762 |
819 compression library. |
775 compression library. |
820 Following is a copy of the libpng.txt file that accompanies libpng. |
776 Following is a copy of the libpng.txt file that accompanies libpng. |
821 .SH LIBPNG.TXT |
777 .SH LIBPNG.TXT |
822 libpng.txt - A description on how to use and modify libpng |
778 libpng.txt - A description on how to use and modify libpng |
823 |
779 |
824 libpng version 1.2.40 - September 10, 2009 |
780 libpng version 1.4.0 - January 3, 2010 |
825 Updated and distributed by Glenn Randers-Pehrson |
781 Updated and distributed by Glenn Randers-Pehrson |
826 <glennrp at users.sourceforge.net> |
782 <glennrp at users.sourceforge.net> |
827 Copyright (c) 1998-2009 Glenn Randers-Pehrson |
783 Copyright (c) 1998-2009 Glenn Randers-Pehrson |
828 |
784 |
829 This document is released under the libpng license. |
785 This document is released under the libpng license. |
830 For conditions of distribution and use, see the disclaimer |
786 For conditions of distribution and use, see the disclaimer |
831 and license in png.h |
787 and license in png.h |
832 |
788 |
833 Based on: |
789 Based on: |
834 |
790 |
835 libpng versions 0.97, January 1998, through 1.2.40 - September 10, 2009 |
791 libpng versions 0.97, January 1998, through 1.4.0 - January 3, 2010 |
836 Updated and distributed by Glenn Randers-Pehrson |
792 Updated and distributed by Glenn Randers-Pehrson |
837 Copyright (c) 1998-2009 Glenn Randers-Pehrson |
793 Copyright (c) 1998-2009 Glenn Randers-Pehrson |
838 |
794 |
839 libpng 1.0 beta 6 version 0.96 May 28, 1997 |
795 libpng 1.0 beta 6 version 0.96 May 28, 1997 |
840 Updated and distributed by Andreas Dilger |
796 Updated and distributed by Andreas Dilger |
859 it is heavily commented and should include everything most people |
815 it is heavily commented and should include everything most people |
860 will need. We assume that libpng is already installed; see the |
816 will need. We assume that libpng is already installed; see the |
861 INSTALL file for instructions on how to install libpng. |
817 INSTALL file for instructions on how to install libpng. |
862 |
818 |
863 For examples of libpng usage, see the files "example.c", "pngtest.c", |
819 For examples of libpng usage, see the files "example.c", "pngtest.c", |
864 and the files in the "contrib" directory, all of which are included in the |
820 and the files in the "contrib" directory, all of which are included in |
865 libpng distribution. |
821 the libpng distribution. |
866 |
822 |
867 Libpng was written as a companion to the PNG specification, as a way |
823 Libpng was written as a companion to the PNG specification, as a way |
868 of reducing the amount of time and effort it takes to support the PNG |
824 of reducing the amount of time and effort it takes to support the PNG |
869 file format in application programs. |
825 file format in application programs. |
870 |
826 |
1228 before calling png_read_info(), png_read_png(), or png_process_data(). |
1184 before calling png_read_info(), png_read_png(), or png_process_data(). |
1229 If you need to retrieve the limits that are being applied, use |
1185 If you need to retrieve the limits that are being applied, use |
1230 |
1186 |
1231 width_max = png_get_user_width_max(png_ptr); |
1187 width_max = png_get_user_width_max(png_ptr); |
1232 height_max = png_get_user_height_max(png_ptr); |
1188 height_max = png_get_user_height_max(png_ptr); |
1189 |
|
1190 The PNG specification sets no limit on the number of ancillary chunks |
|
1191 allowed in a PNG datastream. You can impose a limit on the total number |
|
1192 of sPLT, tEXt, iTXt, zTXt, and unknown chunks that will be stored, with |
|
1193 |
|
1194 png_set_chunk_cache_max(png_ptr, user_chunk_cache_max); |
|
1195 |
|
1196 where 0x7fffffffL means unlimited. You can retrieve this limit with |
|
1197 |
|
1198 chunk_cache_max = png_get_chunk_cache_max(png_ptr); |
|
1199 |
|
1200 This limit also applies to the number of buffers that can be allocated |
|
1201 by png_decompress_chunk() while decompressing iTXt, zTXt, and iCCP chunks. |
|
1233 |
1202 |
1234 .SS The high-level read interface |
1203 .SS The high-level read interface |
1235 |
1204 |
1236 At this point there are two ways to proceed; through the high-level |
1205 At this point there are two ways to proceed; through the high-level |
1237 read interface, or through a sequence of low-level read operations. |
1206 read interface, or through a sequence of low-level read operations. |
1256 PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA |
1225 PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA |
1257 to AG |
1226 to AG |
1258 PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity |
1227 PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity |
1259 to transparency |
1228 to transparency |
1260 PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples |
1229 PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples |
1230 PNG_TRANSFORM_GRAY_TO_RGB Expand grayscale samples |
|
1231 to RGB (or GA to RGBA) |
|
1261 |
1232 |
1262 (This excludes setting a background color, doing gamma transformation, |
1233 (This excludes setting a background color, doing gamma transformation, |
1263 dithering, and setting filler.) If this is the case, simply do this: |
1234 dithering, and setting filler.) If this is the case, simply do this: |
1264 |
1235 |
1265 png_read_png(png_ptr, info_ptr, png_transforms, NULL) |
1236 png_read_png(png_ptr, info_ptr, png_transforms, NULL) |
1266 |
1237 |
1267 where png_transforms is an integer containing the bitwise OR of |
1238 where png_transforms is an integer containing the bitwise OR of some |
1268 some set of transformation flags. This call is equivalent to png_read_info(), |
1239 set of transformation flags. This call is equivalent to png_read_info(), |
1269 followed the set of transformations indicated by the transform mask, |
1240 followed the set of transformations indicated by the transform mask, |
1270 then png_read_image(), and finally png_read_end(). |
1241 then png_read_image(), and finally png_read_end(). |
1271 |
1242 |
1272 (The final parameter of this call is not yet used. Someday it might point |
1243 (The final parameter of this call is not yet used. Someday it might point |
1273 to transformation parameters required by some future input transform.) |
1244 to transformation parameters required by some future input transform.) |
1364 a MNG-1.0 datastream) |
1335 a MNG-1.0 datastream) |
1365 compression_type - (must be PNG_COMPRESSION_TYPE_BASE |
1336 compression_type - (must be PNG_COMPRESSION_TYPE_BASE |
1366 for PNG 1.0) |
1337 for PNG 1.0) |
1367 interlace_type - (PNG_INTERLACE_NONE or |
1338 interlace_type - (PNG_INTERLACE_NONE or |
1368 PNG_INTERLACE_ADAM7) |
1339 PNG_INTERLACE_ADAM7) |
1369 Any or all of interlace_type, compression_type, of |
1340 |
1341 Any or all of interlace_type, compression_type, or |
|
1370 filter_method can be NULL if you are |
1342 filter_method can be NULL if you are |
1371 not interested in their values. |
1343 not interested in their values. |
1372 |
1344 |
1373 channels = png_get_channels(png_ptr, info_ptr); |
1345 Note that png_get_IHDR() returns 32-bit data into |
1374 channels - number of channels of info for the |
1346 the application's width and height variables. |
1375 color type (valid values are 1 (GRAY, |
1347 This is an unsafe situation if these are 16-bit |
1376 PALETTE), 2 (GRAY_ALPHA), 3 (RGB), |
1348 variables. In such situations, the |
1377 4 (RGB_ALPHA or RGB + filler byte)) |
1349 png_get_image_width() and png_get_image_height() |
1378 rowbytes = png_get_rowbytes(png_ptr, info_ptr); |
1350 functions described below are safer. |
1379 rowbytes - number of bytes needed to hold a row |
|
1380 |
|
1381 signature = png_get_signature(png_ptr, info_ptr); |
|
1382 signature - holds the signature read from the |
|
1383 file (if any). The data is kept in |
|
1384 the same offset it would be if the |
|
1385 whole signature were read (i.e. if an |
|
1386 application had already read in 4 |
|
1387 bytes of signature before starting |
|
1388 libpng, the remaining 4 bytes would |
|
1389 be in signature[4] through signature[7] |
|
1390 (see png_set_sig_bytes())). |
|
1391 |
|
1392 |
1351 |
1393 width = png_get_image_width(png_ptr, |
1352 width = png_get_image_width(png_ptr, |
1394 info_ptr); |
1353 info_ptr); |
1395 height = png_get_image_height(png_ptr, |
1354 height = png_get_image_height(png_ptr, |
1396 info_ptr); |
1355 info_ptr); |
1403 compression_type = png_get_compression_type(png_ptr, |
1362 compression_type = png_get_compression_type(png_ptr, |
1404 info_ptr); |
1363 info_ptr); |
1405 interlace_type = png_get_interlace_type(png_ptr, |
1364 interlace_type = png_get_interlace_type(png_ptr, |
1406 info_ptr); |
1365 info_ptr); |
1407 |
1366 |
1367 channels = png_get_channels(png_ptr, info_ptr); |
|
1368 channels - number of channels of info for the |
|
1369 color type (valid values are 1 (GRAY, |
|
1370 PALETTE), 2 (GRAY_ALPHA), 3 (RGB), |
|
1371 4 (RGB_ALPHA or RGB + filler byte)) |
|
1372 rowbytes = png_get_rowbytes(png_ptr, info_ptr); |
|
1373 rowbytes - number of bytes needed to hold a row |
|
1374 |
|
1375 signature = png_get_signature(png_ptr, info_ptr); |
|
1376 signature - holds the signature read from the |
|
1377 file (if any). The data is kept in |
|
1378 the same offset it would be if the |
|
1379 whole signature were read (i.e. if an |
|
1380 application had already read in 4 |
|
1381 bytes of signature before starting |
|
1382 libpng, the remaining 4 bytes would |
|
1383 be in signature[4] through signature[7] |
|
1384 (see png_set_sig_bytes())). |
|
1408 |
1385 |
1409 These are also important, but their validity depends on whether the chunk |
1386 These are also important, but their validity depends on whether the chunk |
1410 has been read. The png_get_valid(png_ptr, info_ptr, PNG_INFO_<chunk>) and |
1387 has been read. The png_get_valid(png_ptr, info_ptr, PNG_INFO_<chunk>) and |
1411 png_get_<chunk>(png_ptr, info_ptr, ...) functions return non-zero if the |
1388 png_get_<chunk>(png_ptr, info_ptr, ...) functions return non-zero if the |
1412 data has been read, or zero if it is missing. The parameters to the |
1389 data has been read, or zero if it is missing. The parameters to the |
1413 png_get_<chunk> are set directly if they are simple data types, or a pointer |
1390 png_get_<chunk> are set directly if they are simple data types, or a |
1414 into the info_ptr is returned for any complex types. |
1391 pointer into the info_ptr is returned for any complex types. |
1415 |
1392 |
1416 png_get_PLTE(png_ptr, info_ptr, &palette, |
1393 png_get_PLTE(png_ptr, info_ptr, &palette, |
1417 &num_palette); |
1394 &num_palette); |
1418 palette - the palette for the file |
1395 palette - the palette for the file |
1419 (array of png_color) |
1396 (array of png_color) |
1447 (PNG_INFO_sBIT) each of the gray, |
1424 (PNG_INFO_sBIT) each of the gray, |
1448 red, green, and blue channels, |
1425 red, green, and blue channels, |
1449 whichever are appropriate for the |
1426 whichever are appropriate for the |
1450 given color type (png_color_16) |
1427 given color type (png_color_16) |
1451 |
1428 |
1452 png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, |
1429 png_get_tRNS(png_ptr, info_ptr, &trans_alpha, |
1453 &trans_values); |
1430 &num_trans, &trans_color); |
1454 trans - array of transparent entries for |
1431 trans_alpha - array of alpha (transparency) |
1455 palette (PNG_INFO_tRNS) |
1432 entries for palette (PNG_INFO_tRNS) |
1456 trans_values - graylevel or color sample values of |
1433 trans_color - graylevel or color sample values of |
1457 the single transparent color for |
1434 the single transparent color for |
1458 non-paletted images (PNG_INFO_tRNS) |
1435 non-paletted images (PNG_INFO_tRNS) |
1459 num_trans - number of transparent entries |
1436 num_trans - number of transparent entries |
1460 (PNG_INFO_tRNS) |
1437 (PNG_INFO_tRNS) |
1461 |
1438 |
1493 after decompression, 0 for tEXt/zTXt |
1470 after decompression, 0 for tEXt/zTXt |
1494 text_ptr[i].lang - language of comment (empty |
1471 text_ptr[i].lang - language of comment (empty |
1495 string for unknown). |
1472 string for unknown). |
1496 text_ptr[i].lang_key - keyword in UTF-8 |
1473 text_ptr[i].lang_key - keyword in UTF-8 |
1497 (empty string for unknown). |
1474 (empty string for unknown). |
1475 Note that the itxt_length, lang, and lang_key |
|
1476 members of the text_ptr structure only exist |
|
1477 when the library is built with iTXt chunk support. |
|
1478 |
|
1498 num_text - number of comments (same as |
1479 num_text - number of comments (same as |
1499 num_comments; you can put NULL here |
1480 num_comments; you can put NULL here |
1500 to avoid the duplication) |
1481 to avoid the duplication) |
1501 Note while png_set_text() will accept text, language, |
1482 Note while png_set_text() will accept text, language, |
1502 and translated keywords that can be NULL pointers, the |
1483 and translated keywords that can be NULL pointers, the |
1672 things. |
1653 things. |
1673 |
1654 |
1674 As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was |
1655 As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was |
1675 added. It expands the sample depth without changing tRNS to alpha. |
1656 added. It expands the sample depth without changing tRNS to alpha. |
1676 |
1657 |
1658 As of libpng version 1.4.0, not all possible expansions are supported. |
|
1659 |
|
1660 In the following table, the 01 means grayscale with depth<8, 31 means |
|
1661 indexed with depth<8, other numerals represent the color type, "T" means |
|
1662 the tRNS chunk is present, A means an alpha channel is present, and O |
|
1663 means tRNS or alpha is present but all pixels in the image are opaque. |
|
1664 |
|
1665 FROM 01 31 0 0T 0O 2 2T 2O 3 3T 3O 4A 4O 6A 6O |
|
1666 TO |
|
1667 01 - |
|
1668 31 - |
|
1669 0 1 - |
|
1670 0T - |
|
1671 0O - |
|
1672 2 GX - |
|
1673 2T - |
|
1674 2O - |
|
1675 3 1 - |
|
1676 3T - |
|
1677 3O - |
|
1678 4A T - |
|
1679 4O - |
|
1680 6A GX TX TX - |
|
1681 6O GX TX - |
|
1682 |
|
1683 Within the matrix, |
|
1684 "-" means the transformation is not supported. |
|
1685 "X" means the transformation is obtained by png_set_expand(). |
|
1686 "1" means the transformation is obtained by |
|
1687 png_set_expand_gray_1_2_4_to_8 |
|
1688 "G" means the transformation is obtained by |
|
1689 png_set_gray_to_rgb(). |
|
1690 "P" means the transformation is obtained by |
|
1691 png_set_expand_palette_to_rgb(). |
|
1692 "T" means the transformation is obtained by |
|
1693 png_set_tRNS_to_alpha(). |
|
1694 |
|
1677 PNG can have files with 16 bits per channel. If you only can handle |
1695 PNG can have files with 16 bits per channel. If you only can handle |
1678 8 bits per channel, this will strip the pixels down to 8 bit. |
1696 8 bits per channel, this will strip the pixels down to 8 bit. |
1679 |
1697 |
1680 if (bit_depth == 16) |
1698 if (bit_depth == 16) |
1681 png_set_strip_16(png_ptr); |
1699 png_set_strip_16(png_ptr); |
1705 if (bit_depth < 8) |
1723 if (bit_depth < 8) |
1706 png_set_packing(png_ptr); |
1724 png_set_packing(png_ptr); |
1707 |
1725 |
1708 PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels |
1726 PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels |
1709 stored in a PNG image have been "scaled" or "shifted" up to the next |
1727 stored in a PNG image have been "scaled" or "shifted" up to the next |
1710 higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] to |
1728 higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] |
1711 8 bits/sample in the range [0, 255]). However, it is also possible to |
1729 to 8 bits/sample in the range [0, 255]). However, it is also possible |
1712 convert the PNG pixel data back to the original bit depth of the image. |
1730 to convert the PNG pixel data back to the original bit depth of the |
1713 This call reduces the pixels back down to the original bit depth: |
1731 image. This call reduces the pixels back down to the original bit depth: |
1714 |
1732 |
1715 png_color_8p sig_bit; |
1733 png_color_8p sig_bit; |
1716 |
1734 |
1717 if (png_get_sBIT(png_ptr, info_ptr, &sig_bit)) |
1735 if (png_get_sBIT(png_ptr, info_ptr, &sig_bit)) |
1718 png_set_shift(png_ptr, sig_bit); |
1736 png_set_shift(png_ptr, sig_bit); |
1895 if (png_get_gAMA(png_ptr, info_ptr, &gamma)) |
1913 if (png_get_gAMA(png_ptr, info_ptr, &gamma)) |
1896 png_set_gamma(png_ptr, screen_gamma, gamma); |
1914 png_set_gamma(png_ptr, screen_gamma, gamma); |
1897 else |
1915 else |
1898 png_set_gamma(png_ptr, screen_gamma, 0.45455); |
1916 png_set_gamma(png_ptr, screen_gamma, 0.45455); |
1899 |
1917 |
1900 If you need to reduce an RGB file to a paletted file, or if a paletted |
|
1901 file has more entries then will fit on your screen, png_set_dither() |
|
1902 will do that. Note that this is a simple match dither that merely |
|
1903 finds the closest color available. This should work fairly well with |
|
1904 optimized palettes, and fairly badly with linear color cubes. If you |
|
1905 pass a palette that is larger then maximum_colors, the file will |
|
1906 reduce the number of colors in the palette so it will fit into |
|
1907 maximum_colors. If there is a histogram, it will use it to make |
|
1908 more intelligent choices when reducing the palette. If there is no |
|
1909 histogram, it may not do as good a job. |
|
1910 |
|
1911 if (color_type & PNG_COLOR_MASK_COLOR) |
|
1912 { |
|
1913 if (png_get_valid(png_ptr, info_ptr, |
|
1914 PNG_INFO_PLTE)) |
|
1915 { |
|
1916 png_uint_16p histogram = NULL; |
|
1917 |
|
1918 png_get_hIST(png_ptr, info_ptr, |
|
1919 &histogram); |
|
1920 png_set_dither(png_ptr, palette, num_palette, |
|
1921 max_screen_colors, histogram, 1); |
|
1922 } |
|
1923 else |
|
1924 { |
|
1925 png_color std_color_cube[MAX_SCREEN_COLORS] = |
|
1926 { ... colors ... }; |
|
1927 |
|
1928 png_set_dither(png_ptr, std_color_cube, |
|
1929 MAX_SCREEN_COLORS, MAX_SCREEN_COLORS, |
|
1930 NULL,0); |
|
1931 } |
|
1932 } |
|
1933 |
|
1934 PNG files describe monochrome as black being zero and white being one. |
1918 PNG files describe monochrome as black being zero and white being one. |
1935 The following code will reverse this (make black be one and white be |
1919 The following code will reverse this (make black be one and white be |
1936 zero): |
1920 zero): |
1937 |
1921 |
1938 if (bit_depth == 1 && color_type == PNG_COLOR_TYPE_GRAY) |
1922 if (bit_depth == 1 && color_type == PNG_COLOR_TYPE_GRAY) |
2155 seq - sequence number of item to be freed |
2139 seq - sequence number of item to be freed |
2156 (-1 for all items) |
2140 (-1 for all items) |
2157 |
2141 |
2158 This function may be safely called when the relevant storage has |
2142 This function may be safely called when the relevant storage has |
2159 already been freed, or has not yet been allocated, or was allocated |
2143 already been freed, or has not yet been allocated, or was allocated |
2160 by the user and not by libpng, and will in those |
2144 by the user and not by libpng, and will in those cases do nothing. |
2161 cases do nothing. The "seq" parameter is ignored if only one item |
2145 The "seq" parameter is ignored if only one item of the selected data |
2162 of the selected data type, such as PLTE, is allowed. If "seq" is not |
2146 type, such as PLTE, is allowed. If "seq" is not -1, and multiple items |
2163 -1, and multiple items are allowed for the data type identified in |
2147 are allowed for the data type identified in the mask, such as text or |
2164 the mask, such as text or sPLT, only the n'th item in the structure |
2148 sPLT, only the n'th item in the structure is freed, where n is "seq". |
2165 is freed, where n is "seq". |
|
2166 |
2149 |
2167 The default behavior is only to free data that was allocated internally |
2150 The default behavior is only to free data that was allocated internally |
2168 by libpng. This can be changed, so that libpng will not free the data, |
2151 by libpng. This can be changed, so that libpng will not free the data, |
2169 or so that it will free data that was allocated by the user with png_malloc() |
2152 or so that it will free data that was allocated by the user with png_malloc() |
2170 or png_zalloc() and passed in via a png_set_*() function, with |
2153 or png_zalloc() and passed in via a png_set_*() function, with |
2199 the key member, and png_free_data() will free only text_ptr.key. Similarly, |
2182 the key member, and png_free_data() will free only text_ptr.key. Similarly, |
2200 if you transfer responsibility for free'ing text_ptr from libpng to your |
2183 if you transfer responsibility for free'ing text_ptr from libpng to your |
2201 application, your application must not separately free those members. |
2184 application, your application must not separately free those members. |
2202 |
2185 |
2203 The png_free_data() function will turn off the "valid" flag for anything |
2186 The png_free_data() function will turn off the "valid" flag for anything |
2204 it frees. If you need to turn the flag off for a chunk that was freed by your |
2187 it frees. If you need to turn the flag off for a chunk that was freed by |
2205 application instead of by libpng, you can use |
2188 your application instead of by libpng, you can use |
2206 |
2189 |
2207 png_set_invalid(png_ptr, info_ptr, mask); |
2190 png_set_invalid(png_ptr, info_ptr, mask); |
2208 mask - identifies the chunks to be made invalid, |
2191 mask - identifies the chunks to be made invalid, |
2209 containing the bitwise OR of one or |
2192 containing the bitwise OR of one or |
2210 more of |
2193 more of |
2510 speed/compression ratio. The second parameter to png_set_filter() is |
2493 speed/compression ratio. The second parameter to png_set_filter() is |
2511 the filter method, for which the only valid values are 0 (as of the |
2494 the filter method, for which the only valid values are 0 (as of the |
2512 July 1999 PNG specification, version 1.2) or 64 (if you are writing |
2495 July 1999 PNG specification, version 1.2) or 64 (if you are writing |
2513 a PNG datastream that is to be embedded in a MNG datastream). The third |
2496 a PNG datastream that is to be embedded in a MNG datastream). The third |
2514 parameter is a flag that indicates which filter type(s) are to be tested |
2497 parameter is a flag that indicates which filter type(s) are to be tested |
2515 for each scanline. See the PNG specification for details on the specific filter |
2498 for each scanline. See the PNG specification for details on the specific |
2516 types. |
2499 filter types. |
2517 |
2500 |
2518 |
2501 |
2519 /* turn on or off filtering, and/or choose |
2502 /* turn on or off filtering, and/or choose |
2520 specific filters. You can use either a single |
2503 specific filters. You can use either a single |
2521 PNG_FILTER_VALUE_NAME or the bitwise OR of one |
2504 PNG_FILTER_VALUE_NAME or the bitwise OR of one |
2677 (PNG_INFO_sBIT) each of the gray, red, |
2660 (PNG_INFO_sBIT) each of the gray, red, |
2678 green, and blue channels, whichever are |
2661 green, and blue channels, whichever are |
2679 appropriate for the given color type |
2662 appropriate for the given color type |
2680 (png_color_16) |
2663 (png_color_16) |
2681 |
2664 |
2682 png_set_tRNS(png_ptr, info_ptr, trans, num_trans, |
2665 png_set_tRNS(png_ptr, info_ptr, trans_alpha, |
2683 trans_values); |
2666 num_trans, trans_color); |
2684 trans - array of transparent entries for |
2667 trans_alpha - array of alpha (transparency) |
2685 palette (PNG_INFO_tRNS) |
2668 entries for palette (PNG_INFO_tRNS) |
2686 trans_values - graylevel or color sample values |
2669 trans_color - graylevel or color sample values |
2687 (in order red, green, blue) of the |
2670 (in order red, green, blue) of the |
2688 single transparent color for |
2671 single transparent color for |
2689 non-paletted images (PNG_INFO_tRNS) |
2672 non-paletted images (PNG_INFO_tRNS) |
2690 num_trans - number of transparent entries |
2673 num_trans - number of transparent entries |
2691 (PNG_INFO_tRNS) |
2674 (PNG_INFO_tRNS) |
2720 after decompression, 0 for tEXt/zTXt |
2703 after decompression, 0 for tEXt/zTXt |
2721 text_ptr[i].lang - language of comment (NULL or |
2704 text_ptr[i].lang - language of comment (NULL or |
2722 empty for unknown). |
2705 empty for unknown). |
2723 text_ptr[i].translated_keyword - keyword in UTF-8 (NULL |
2706 text_ptr[i].translated_keyword - keyword in UTF-8 (NULL |
2724 or empty for unknown). |
2707 or empty for unknown). |
2708 Note that the itxt_length, lang, and lang_key |
|
2709 members of the text_ptr structure only exist |
|
2710 when the library is built with iTXt chunk support. |
|
2711 |
|
2725 num_text - number of comments |
2712 num_text - number of comments |
2726 |
2713 |
2727 png_set_sPLT(png_ptr, info_ptr, &palette_ptr, |
2714 png_set_sPLT(png_ptr, info_ptr, &palette_ptr, |
2728 num_spalettes); |
2715 num_spalettes); |
2729 palette_ptr - array of png_sPLT_struct structures |
2716 palette_ptr - array of png_sPLT_struct structures |
2925 |
2912 |
2926 png_write_info(png_ptr, info_ptr); |
2913 png_write_info(png_ptr, info_ptr); |
2927 |
2914 |
2928 Note that there is one transformation you may need to do before |
2915 Note that there is one transformation you may need to do before |
2929 png_write_info(). In PNG files, the alpha channel in an image is the |
2916 png_write_info(). In PNG files, the alpha channel in an image is the |
2930 level of opacity. If your data is supplied as a level of |
2917 level of opacity. If your data is supplied as a level of transparency, |
2931 transparency, you can invert the alpha channel before you write it, so |
2918 you can invert the alpha channel before you write it, so that 0 is |
2932 that 0 is fully transparent and 255 (in 8-bit or paletted images) or |
2919 fully transparent and 255 (in 8-bit or paletted images) or 65535 |
2933 65535 (in 16-bit images) is fully opaque, with |
2920 (in 16-bit images) is fully opaque, with |
2934 |
2921 |
2935 png_set_invert_alpha(png_ptr); |
2922 png_set_invert_alpha(png_ptr); |
2936 |
2923 |
2937 This must appear before png_write_info() instead of later with the |
2924 This must appear before png_write_info() instead of later with the |
2938 other transformations because in the case of paletted images the tRNS |
2925 other transformations because in the case of paletted images the tRNS |
3115 |
3102 |
3116 png_bytep row_pointer = row; |
3103 png_bytep row_pointer = row; |
3117 |
3104 |
3118 png_write_row(png_ptr, row_pointer); |
3105 png_write_row(png_ptr, row_pointer); |
3119 |
3106 |
3120 When the file is interlaced, things can get a good deal more |
3107 When the file is interlaced, things can get a good deal more complicated. |
3121 complicated. The only currently (as of the PNG Specification |
3108 The only currently (as of the PNG Specification version 1.2, dated July |
3122 version 1.2, dated July 1999) defined interlacing scheme for PNG files |
3109 1999) defined interlacing scheme for PNG files is the "Adam7" interlace |
3123 is the "Adam7" interlace scheme, that breaks down an |
3110 scheme, that breaks down an image into seven smaller images of varying |
3124 image into seven smaller images of varying size. libpng will build |
3111 size. libpng will build these images for you, or you can do them |
3125 these images for you, or you can do them yourself. If you want to |
3112 yourself. If you want to build them yourself, see the PNG specification |
3126 build them yourself, see the PNG specification for details of which |
3113 for details of which pixels to write when. |
3127 pixels to write when. |
|
3128 |
3114 |
3129 If you don't want libpng to handle the interlacing details, just |
3115 If you don't want libpng to handle the interlacing details, just |
3130 use png_set_interlace_handling() and call png_write_rows() the |
3116 use png_set_interlace_handling() and call png_write_rows() the |
3131 correct number of times to write all seven sub-images. |
3117 correct number of times to write all seven sub-images. |
3132 |
3118 |
3134 writing any rows: |
3120 writing any rows: |
3135 |
3121 |
3136 number_of_passes = |
3122 number_of_passes = |
3137 png_set_interlace_handling(png_ptr); |
3123 png_set_interlace_handling(png_ptr); |
3138 |
3124 |
3139 This will return the number of passes needed. Currently, this |
3125 This will return the number of passes needed. Currently, this is seven, |
3140 is seven, but may change if another interlace type is added. |
3126 but may change if another interlace type is added. |
3141 |
3127 |
3142 Then write the complete image number_of_passes times. |
3128 Then write the complete image number_of_passes times. |
3143 |
3129 |
3144 png_write_rows(png_ptr, row_pointers, |
3130 png_write_rows(png_ptr, row_pointers, |
3145 number_of_rows); |
3131 number_of_rows); |
3146 |
3132 |
3147 As some of these rows are not used, and thus return immediately, |
3133 As some of these rows are not used, and thus return immediately, you may |
3148 you may want to read about interlacing in the PNG specification, |
3134 want to read about interlacing in the PNG specification, and only update |
3149 and only update the rows that are actually used. |
3135 the rows that are actually used. |
3150 |
3136 |
3151 .SS Finishing a sequential write |
3137 .SS Finishing a sequential write |
3152 |
3138 |
3153 After you are finished writing the image, you should finish writing |
3139 After you are finished writing the image, you should finish writing |
3154 the file. If you are interested in writing comments or time, you should |
3140 the file. If you are interested in writing comments or time, you should |
3177 seq - sequence number of item to be freed |
3163 seq - sequence number of item to be freed |
3178 (-1 for all items) |
3164 (-1 for all items) |
3179 |
3165 |
3180 This function may be safely called when the relevant storage has |
3166 This function may be safely called when the relevant storage has |
3181 already been freed, or has not yet been allocated, or was allocated |
3167 already been freed, or has not yet been allocated, or was allocated |
3182 by the user and not by libpng, and will in those |
3168 by the user and not by libpng, and will in those cases do nothing. |
3183 cases do nothing. The "seq" parameter is ignored if only one item |
3169 The "seq" parameter is ignored if only one item of the selected data |
3184 of the selected data type, such as PLTE, is allowed. If "seq" is not |
3170 type, such as PLTE, is allowed. If "seq" is not -1, and multiple items |
3185 -1, and multiple items are allowed for the data type identified in |
3171 are allowed for the data type identified in the mask, such as text or |
3186 the mask, such as text or sPLT, only the n'th item in the structure |
3172 sPLT, only the n'th item in the structure is freed, where n is "seq". |
3187 is freed, where n is "seq". |
3173 |
3188 |
3174 If you allocated data such as a palette that you passed in to libpng |
3189 If you allocated data such as a palette that you passed |
3175 with png_set_*, you must not free it until just before the call to |
3190 in to libpng with png_set_*, you must not free it until just before the call to |
|
3191 png_destroy_write_struct(). |
3176 png_destroy_write_struct(). |
3192 |
3177 |
3193 The default behavior is only to free data that was allocated internally |
3178 The default behavior is only to free data that was allocated internally |
3194 by libpng. This can be changed, so that libpng will not free the data, |
3179 by libpng. This can be changed, so that libpng will not free the data, |
3195 or so that it will free data that was allocated by the user with png_malloc() |
3180 or so that it will free data that was allocated by the user with png_malloc() |
3251 All of the memory allocation, input/output, and error handling in libpng |
3236 All of the memory allocation, input/output, and error handling in libpng |
3252 goes through callbacks that are user-settable. The default routines are |
3237 goes through callbacks that are user-settable. The default routines are |
3253 in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change |
3238 in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change |
3254 these functions, call the appropriate png_set_*_fn() function. |
3239 these functions, call the appropriate png_set_*_fn() function. |
3255 |
3240 |
3256 Memory allocation is done through the functions png_malloc() |
3241 Memory allocation is done through the functions png_malloc(), png_calloc(), |
3257 and png_free(). These currently just call the standard C functions. If |
3242 and png_free(). These currently just call the standard C functions. |
3258 your pointers can't access more then 64K at a time, you will want to set |
3243 png_calloc() calls png_malloc() and then png_memset() to clear the newly |
3259 MAXSEG_64K in zlib.h. Since it is unlikely that the method of handling |
3244 allocated memory to zero. If your pointers can't access more then 64K |
3260 memory allocation on a platform will change between applications, these |
3245 at a time, you will want to set MAXSEG_64K in zlib.h. Since it is |
3261 functions must be modified in the library at compile time. If you prefer |
3246 unlikely that the method of handling memory allocation on a platform |
3262 to use a different method of allocating and freeing data, you can use |
3247 will change between applications, these functions must be modified in |
3263 png_create_read_struct_2() or png_create_write_struct_2() to register |
3248 the library at compile time. If you prefer to use a different method |
3264 your own functions as described above. |
3249 of allocating and freeing data, you can use png_create_read_struct_2() or |
3265 These functions also provide a void pointer that can be retrieved via |
3250 png_create_write_struct_2() to register your own functions as described |
3251 above. These functions also provide a void pointer that can be retrieved |
|
3252 via |
|
3266 |
3253 |
3267 mem_ptr=png_get_mem_ptr(png_ptr); |
3254 mem_ptr=png_get_mem_ptr(png_ptr); |
3268 |
3255 |
3269 Your replacement memory functions must have prototypes as follows: |
3256 Your replacement memory functions must have prototypes as follows: |
3270 |
3257 |
3352 |
3339 |
3353 The motivation behind using setjmp() and longjmp() is the C++ throw and |
3340 The motivation behind using setjmp() and longjmp() is the C++ throw and |
3354 catch exception handling methods. This makes the code much easier to write, |
3341 catch exception handling methods. This makes the code much easier to write, |
3355 as there is no need to check every return code of every function call. |
3342 as there is no need to check every return code of every function call. |
3356 However, there are some uncertainties about the status of local variables |
3343 However, there are some uncertainties about the status of local variables |
3357 after a longjmp, so the user may want to be careful about doing anything after |
3344 after a longjmp, so the user may want to be careful about doing anything |
3358 setjmp returns non-zero besides returning itself. Consult your compiler |
3345 after setjmp returns non-zero besides returning itself. Consult your |
3359 documentation for more details. For an alternative approach, you may wish |
3346 compiler documentation for more details. For an alternative approach, you |
3360 to use the "cexcept" facility (see http://cexcept.sourceforge.net). |
3347 may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net). |
3361 |
3348 |
3362 .SS Custom chunks |
3349 .SS Custom chunks |
3363 |
3350 |
3364 If you need to read or write custom chunks, you may need to get deeper |
3351 If you need to read or write custom chunks, you may need to get deeper |
3365 into the libpng code. The library now has mechanisms for storing |
3352 into the libpng code. The library now has mechanisms for storing |
3367 for custom chunks. However, this may not be good enough if the |
3354 for custom chunks. However, this may not be good enough if the |
3368 library code itself needs to know about interactions between your |
3355 library code itself needs to know about interactions between your |
3369 chunk and existing `intrinsic' chunks. |
3356 chunk and existing `intrinsic' chunks. |
3370 |
3357 |
3371 If you need to write a new intrinsic chunk, first read the PNG |
3358 If you need to write a new intrinsic chunk, first read the PNG |
3372 specification. Acquire a first level of |
3359 specification. Acquire a first level of understanding of how it works. |
3373 understanding of how it works. Pay particular attention to the |
3360 Pay particular attention to the sections that describe chunk names, |
3374 sections that describe chunk names, and look at how other chunks were |
3361 and look at how other chunks were designed, so you can do things |
3375 designed, so you can do things similarly. Second, check out the |
3362 similarly. Second, check out the sections of libpng that read and |
3376 sections of libpng that read and write chunks. Try to find a chunk |
3363 write chunks. Try to find a chunk that is similar to yours and use |
3377 that is similar to yours and use it as a template. More details can |
3364 it as a template. More details can be found in the comments inside |
3378 be found in the comments inside the code. It is best to handle unknown |
3365 the code. It is best to handle unknown chunks in a generic method, |
3379 chunks in a generic method, via callback functions, instead of by |
3366 via callback functions, instead of by modifying libpng functions. |
3380 modifying libpng functions. |
|
3381 |
3367 |
3382 If you wish to write your own transformation for the data, look through |
3368 If you wish to write your own transformation for the data, look through |
3383 the part of the code that does the transformations, and check out some of |
3369 the part of the code that does the transformations, and check out some of |
3384 the simpler ones to get an idea of how they work. Try to find a similar |
3370 the simpler ones to get an idea of how they work. Try to find a similar |
3385 transformation to the one you want to add and copy off of it. More details |
3371 transformation to the one you want to add and copy off of it. More details |
3419 |
3405 |
3420 .SS Configuring for compiler xxx: |
3406 .SS Configuring for compiler xxx: |
3421 |
3407 |
3422 All includes for libpng are in pngconf.h. If you need to add, change |
3408 All includes for libpng are in pngconf.h. If you need to add, change |
3423 or delete an include, this is the place to do it. |
3409 or delete an include, this is the place to do it. |
3424 The includes that are not needed outside libpng are protected by the |
3410 The includes that are not needed outside libpng are placed in pngpriv.h, |
3425 PNG_INTERNAL definition, which is only defined for those routines inside |
3411 which is only used by the routines inside libpng itself. |
3426 libpng itself. The files in libpng proper only include png.h, which |
3412 The files in libpng proper only include pngpriv.h and png.h, which |
3427 includes pngconf.h. |
3413 in turn includes pngconf.h. |
3428 |
3414 |
3429 .SS Configuring zlib: |
3415 .SS Configuring zlib: |
3430 |
3416 |
3431 There are special functions to configure the compression. Perhaps the |
3417 There are special functions to configure the compression. Perhaps the |
3432 most useful one changes the compression level, which currently uses |
3418 most useful one changes the compression level, which currently uses |
3552 You can also turn all of the transforms and ancillary chunk capabilities |
3538 You can also turn all of the transforms and ancillary chunk capabilities |
3553 off en masse with compiler directives that define |
3539 off en masse with compiler directives that define |
3554 PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS, |
3540 PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS, |
3555 or all four, |
3541 or all four, |
3556 along with directives to turn on any of the capabilities that you do |
3542 along with directives to turn on any of the capabilities that you do |
3557 want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable |
3543 want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable the extra |
3558 the extra transformations but still leave the library fully capable of reading |
3544 transformations but still leave the library fully capable of reading |
3559 and writing PNG files with all known public chunks |
3545 and writing PNG files with all known public chunks. Use of the |
3560 Use of the PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive |
3546 PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive produces a library |
3561 produces a library that is incapable of reading or writing ancillary chunks. |
3547 that is incapable of reading or writing ancillary chunks. If you are |
3562 If you are not using the progressive reading capability, you can |
3548 not using the progressive reading capability, you can turn that off |
3563 turn that off with PNG_NO_PROGRESSIVE_READ (don't confuse |
3549 with PNG_NO_PROGRESSIVE_READ (don't confuse this with the INTERLACING |
3564 this with the INTERLACING capability, which you'll still have). |
3550 capability, which you'll still have). |
3565 |
3551 |
3566 All the reading and writing specific code are in separate files, so the |
3552 All the reading and writing specific code are in separate files, so the |
3567 linker should only grab the files it needs. However, if you want to |
3553 linker should only grab the files it needs. However, if you want to |
3568 make sure, or if you are building a stand alone library, all the |
3554 make sure, or if you are building a stand alone library, all the |
3569 reading files start with pngr and all the writing files start with |
3555 reading files start with pngr and all the writing files start with |
3693 |
3679 |
3694 Support for user memory management was enabled by default. To |
3680 Support for user memory management was enabled by default. To |
3695 accomplish this, the functions png_create_read_struct_2(), |
3681 accomplish this, the functions png_create_read_struct_2(), |
3696 png_create_write_struct_2(), png_set_mem_fn(), png_get_mem_ptr(), |
3682 png_create_write_struct_2(), png_set_mem_fn(), png_get_mem_ptr(), |
3697 png_malloc_default(), and png_free_default() were added. |
3683 png_malloc_default(), and png_free_default() were added. |
3684 |
|
3685 Support for the iTXt chunk has been enabled by default as of |
|
3686 version 1.2.41. |
|
3698 |
3687 |
3699 Support for certain MNG features was enabled. |
3688 Support for certain MNG features was enabled. |
3700 |
3689 |
3701 Support for numbered error messages was added. However, we never got |
3690 Support for numbered error messages was added. However, we never got |
3702 around to actually numbering the error messages. The function |
3691 around to actually numbering the error messages. The function |
3748 png_set_asm_flags() |
3737 png_set_asm_flags() |
3749 |
3738 |
3750 We replaced all of these functions with simple stubs in libpng-1.2.20, |
3739 We replaced all of these functions with simple stubs in libpng-1.2.20, |
3751 when the Intel assembler code was removed due to a licensing issue. |
3740 when the Intel assembler code was removed due to a licensing issue. |
3752 |
3741 |
3753 .SH IX. (Omitted) |
3742 These macros are deprecated: |
3743 |
|
3744 PNG_READ_TRANSFORMS_NOT_SUPPORTED |
|
3745 PNG_PROGRESSIVE_READ_NOT_SUPPORTED |
|
3746 PNG_NO_SEQUENTIAL_READ_SUPPORTED |
|
3747 PNG_WRITE_TRANSFORMS_NOT_SUPPORTED |
|
3748 PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED |
|
3749 PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED |
|
3750 |
|
3751 They have been replaced, respectively, by: |
|
3752 |
|
3753 PNG_NO_READ_TRANSFORMS |
|
3754 PNG_NO_PROGRESSIVE_READ |
|
3755 PNG_NO_SEQUENTIAL_READ |
|
3756 PNG_NO_WRITE_TRANSFORMS |
|
3757 PNG_NO_READ_ANCILLARY_CHUNKS |
|
3758 PNG_NO_WRITE_ANCILLARY_CHUNKS |
|
3759 |
|
3760 PNG_MAX_UINT was replaced with PNG_UINT_31_MAX. It has been |
|
3761 deprecated since libpng-1.0.16 and libpng-1.2.6. |
|
3762 |
|
3763 The function |
|
3764 png_check_sig(sig, num) |
|
3765 was replaced with |
|
3766 !png_sig_cmp(sig, 0, num) |
|
3767 It has been deprecated since libpng-0.90. |
|
3768 |
|
3769 The function |
|
3770 png_set_gray_1_2_4_to_8() |
|
3771 which also expands tRNS to alpha was replaced with |
|
3772 png_set_expand_gray_1_2_4_to_8() |
|
3773 which does not. It has been deprecated since libpng-1.0.18 and 1.2.9. |
|
3774 |
|
3775 .SH IX. Changes to Libpng from version 1.0.x/1.2.x to 1.4.x |
|
3776 |
|
3777 Private libpng prototypes and macro definitions were moved from |
|
3778 png.h and pngconf.h into a new pngpriv.h header file. |
|
3779 |
|
3780 Functions png_set_benign_errors(), png_benign_error(), and |
|
3781 png_chunk_benign_error() were added. |
|
3782 |
|
3783 Support for setting the maximum amount of memory that the application |
|
3784 will allocate for reading chunks was added, as a security measure. |
|
3785 The functions png_set_chunk_cache_max() and png_get_chunk_cache_max() |
|
3786 were added to the library. |
|
3787 |
|
3788 We implemented support for I/O states by adding png_ptr member io_state |
|
3789 and functions png_get_io_chunk_name() and png_get_io_state() in pngget.c |
|
3790 |
|
3791 We added PNG_TRANSFORM_GRAY_TO_RGB to the available high-level |
|
3792 input transforms. |
|
3793 |
|
3794 Checking for and reporting of errors in the IHDR chunk is more thorough. |
|
3795 |
|
3796 Support for global arrays was removed, to improve thread safety. |
|
3797 |
|
3798 Some obsolete/deprecated macros and functions have been removed. |
|
3799 |
|
3800 Typecasted NULL definitions such as |
|
3801 #define png_voidp_NULL (png_voidp)NULL |
|
3802 were eliminated. If you used these in your application, just use |
|
3803 NULL instead. |
|
3804 |
|
3805 The png_struct and info_struct members "trans" and "trans_values" were |
|
3806 changed to "trans_alpha" and "trans_color", respectively. |
|
3807 |
|
3808 The obsolete, unused pnggccrd.c and pngvcrd.c files and related makefiles |
|
3809 were removed. |
|
3810 |
|
3811 The PNG_1_0_X and PNG_1_2_X macros were eliminated. |
|
3812 |
|
3813 The PNG_LEGACY_SUPPORTED macro was eliminated. |
|
3814 |
|
3815 Many WIN32_WCE #ifdefs were removed. |
|
3816 |
|
3817 The functions png_read_init(info_ptr), png_write_init(info_ptr), |
|
3818 png_info_init(info_ptr), png_read_destroy(), and png_write_destroy() |
|
3819 have been removed. They have been deprecated since libpng-0.95. |
|
3820 |
|
3821 The png_permit_empty_plte() was removed. It has been deprecated |
|
3822 since libpng-1.0.9. Use png_permit_mng_features() instead. |
|
3823 |
|
3824 We removed the obsolete stub functions png_get_mmx_flagmask(), |
|
3825 png_set_mmx_thresholds(), png_get_asm_flags(), |
|
3826 png_get_mmx_bitdepth_threshold(), png_get_mmx_rowbytes_threshold(), |
|
3827 png_set_asm_flags(), and png_mmx_supported() |
|
3828 |
|
3829 We removed the obsolete png_check_sig(), png_memcpy_check(), and |
|
3830 png_memset_check() functions. Instead use !png_sig_cmp(), png_memcpy(), |
|
3831 and png_memset(), respectively. |
|
3832 |
|
3833 The function png_set_gray_1_2_4_to_8() was removed. It has been |
|
3834 deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with |
|
3835 png_set_expand_gray_1_2_4_to_8() because the former function also |
|
3836 expanded palette images. |
|
3837 |
|
3838 We changed the prototype for png_malloc() from |
|
3839 png_malloc(png_structp png_ptr, png_uint_32 size) |
|
3840 to |
|
3841 png_malloc(png_structp png_ptr, png_alloc_size_t size) |
|
3842 |
|
3843 The png_calloc() function was added and is used in place of |
|
3844 of "png_malloc(); png_memset();" except in the case in png_read_png() |
|
3845 where the array consists of pointers; in this case a "for" loop is used |
|
3846 after the png_malloc() to set the pointers to NULL, to give robust. |
|
3847 behavior in case the application runs out of memory part-way through |
|
3848 the process. |
|
3849 |
|
3850 We changed the prototypes of png_get_compression_buffer_size() and |
|
3851 png_set_compression_buffer_size() to work with png_size_t instead of |
|
3852 png_uint_32. |
|
3853 |
|
3854 Support for numbered error messages was removed by default, since we |
|
3855 never got around to actually numbering the error messages. The function |
|
3856 png_set_strip_error_numbers() was removed from the library by default. |
|
3857 |
|
3858 The png_zalloc() and png_zfree() functions are no longer exported. |
|
3859 The png_zalloc() function no longer zeroes out the memory that it |
|
3860 allocates. |
|
3861 |
|
3862 We removed the trailing '.' from the warning and error messages. |
|
3754 |
3863 |
3755 .SH X. Detecting libpng |
3864 .SH X. Detecting libpng |
3756 |
3865 |
3757 The png_get_io_ptr() function has been present since libpng-0.88, has never |
3866 The png_get_io_ptr() function has been present since libpng-0.88, has never |
3758 changed, and is unaffected by conditional compilation macros. It is the |
3867 changed, and is unaffected by conditional compilation macros. It is the |
3801 return (0); |
3910 return (0); |
3802 |
3911 |
3803 We use 3-space indentation, except for continued statements which |
3912 We use 3-space indentation, except for continued statements which |
3804 are usually indented the same as the first line of the statement |
3913 are usually indented the same as the first line of the statement |
3805 plus four more spaces. |
3914 plus four more spaces. |
3915 |
|
3916 For macro definitions we use 2-space indentation, always leaving the "#" |
|
3917 in the first column. |
|
3918 |
|
3919 #ifndef PNG_NO_FEATURE |
|
3920 # ifndef PNG_FEATURE_SUPPORTED |
|
3921 # define PNG_FEATURE_SUPPORTED |
|
3922 # endif |
|
3923 #endif |
|
3806 |
3924 |
3807 Comments appear with the leading "/*" at the same indentation as |
3925 Comments appear with the leading "/*" at the same indentation as |
3808 the statement that follows the comment: |
3926 the statement that follows the comment: |
3809 |
3927 |
3810 /* Single-line comment */ |
3928 /* Single-line comment */ |
3849 body; |
3967 body; |
3850 } |
3968 } |
3851 |
3969 |
3852 The prototypes for non-exported functions (except for those in |
3970 The prototypes for non-exported functions (except for those in |
3853 pngtest) appear in |
3971 pngtest) appear in |
3854 the PNG_INTERNAL section of png.h |
3972 pngpriv.h |
3855 above the comment that says |
3973 above the comment that says |
3856 |
3974 |
3857 /* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */ |
3975 /* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */ |
3858 |
3976 |
3859 The names of all exported functions and variables begin |
3977 The names of all exported functions and variables begin |
3866 put a space between a typecast and the expression being |
3984 put a space between a typecast and the expression being |
3867 cast, nor do we put one between a function name and the |
3985 cast, nor do we put one between a function name and the |
3868 left parenthesis that follows it: |
3986 left parenthesis that follows it: |
3869 |
3987 |
3870 for (i = 2; i > 0; --i) |
3988 for (i = 2; i > 0; --i) |
3871 x[i] = a(x) + (int)b; |
3989 y[i] = a(x) + (int)b; |
3872 |
3990 |
3873 We prefer #ifdef and #ifndef to #if defined() and if !defined() |
3991 We prefer #ifdef and #ifndef to #if defined() and if !defined() |
3874 when there is only one macro being tested. |
3992 when there is only one macro being tested. |
3875 |
3993 |
3876 Other rules can be inferred by inspecting the libpng |
3994 We do not use the TAB character for indentation in the C sources. |
3877 source. |
3995 |
3996 Lines do not exceed 80 characters. |
|
3997 |
|
3998 Other rules can be inferred by inspecting the libpng source. |
|
3878 |
3999 |
3879 .SH XIII. Y2K Compliance in libpng |
4000 .SH XIII. Y2K Compliance in libpng |
3880 |
4001 |
3881 September 10, 2009 |
4002 January 3, 2010 |
3882 |
4003 |
3883 Since the PNG Development group is an ad-hoc body, we can't make |
4004 Since the PNG Development group is an ad-hoc body, we can't make |
3884 an official declaration. |
4005 an official declaration. |
3885 |
4006 |
3886 This is your unofficial assurance that libpng from version 0.71 and |
4007 This is your unofficial assurance that libpng from version 0.71 and |
3887 upward through 1.2.40 are Y2K compliant. It is my belief that earlier |
4008 upward through 1.4.0 are Y2K compliant. It is my belief that earlier |
3888 versions were also Y2K compliant. |
4009 versions were also Y2K compliant. |
3889 |
4010 |
3890 Libpng only has three year fields. One is a 2-byte unsigned integer that |
4011 Libpng only has three year fields. One is a 2-byte unsigned integer that |
3891 will hold years up to 65535. The other two hold the date in text |
4012 will hold years up to 65535. The other two hold the date in text |
3892 format, and will hold years up to 9999. |
4013 format, and will hold years up to 9999. |
4026 1.2.6beta1-4 13 10206 12.so.0.1.2.6beta1-4 |
4147 1.2.6beta1-4 13 10206 12.so.0.1.2.6beta1-4 |
4027 1.2.6rc1-5 13 10206 12.so.0.1.2.6rc1-5 |
4148 1.2.6rc1-5 13 10206 12.so.0.1.2.6rc1-5 |
4028 1.0.16 10 10016 10.so.0.1.0.16 |
4149 1.0.16 10 10016 10.so.0.1.0.16 |
4029 1.2.6 13 10206 12.so.0.1.2.6 |
4150 1.2.6 13 10206 12.so.0.1.2.6 |
4030 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2 |
4151 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2 |
4031 1.0.17rc1 10 10017 10.so.0.1.0.17rc1 |
4152 1.0.17rc1 10 10017 12.so.0.1.0.17rc1 |
4032 1.2.7rc1 13 10207 12.so.0.1.2.7rc1 |
4153 1.2.7rc1 13 10207 12.so.0.1.2.7rc1 |
4033 1.0.17 10 10017 10.so.0.1.0.17 |
4154 1.0.17 10 10017 12.so.0.1.0.17 |
4034 1.2.7 13 10207 12.so.0.1.2.7 |
4155 1.2.7 13 10207 12.so.0.1.2.7 |
4035 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5 |
4156 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5 |
4036 1.0.18rc1-5 10 10018 10.so.0.1.0.18rc1-5 |
4157 1.0.18rc1-5 10 10018 12.so.0.1.0.18rc1-5 |
4037 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5 |
4158 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5 |
4038 1.0.18 10 10018 10.so.0.1.0.18 |
4159 1.0.18 10 10018 12.so.0.1.0.18 |
4039 1.2.8 13 10208 12.so.0.1.2.8 |
4160 1.2.8 13 10208 12.so.0.1.2.8 |
4040 1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3 |
4161 1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3 |
4041 1.2.9beta4-11 13 10209 12.so.0.9[.0] |
4162 1.2.9beta4-11 13 10209 12.so.0.9[.0] |
4042 1.2.9rc1 13 10209 12.so.0.9[.0] |
4163 1.2.9rc1 13 10209 12.so.0.9[.0] |
4043 1.2.9 13 10209 12.so.0.9[.0] |
4164 1.2.9 13 10209 12.so.0.9[.0] |
4044 1.2.10beta1-8 13 10210 12.so.0.10[.0] |
4165 1.2.10beta1-7 13 10210 12.so.0.10[.0] |
4045 1.2.10rc1-3 13 10210 12.so.0.10[.0] |
4166 1.2.10rc1-2 13 10210 12.so.0.10[.0] |
4046 1.2.10 13 10210 12.so.0.10[.0] |
4167 1.2.10 13 10210 12.so.0.10[.0] |
4047 1.2.11beta1-4 13 10211 12.so.0.11[.0] |
4168 1.4.0beta1-6 14 10400 14.so.0.0[.0] |
4048 1.0.19rc1-5 10 10019 10.so.0.19[.0] |
4169 1.2.11beta1-4 13 10210 12.so.0.11[.0] |
4049 1.2.11rc1-5 13 10211 12.so.0.11[.0] |
4170 1.4.0beta7-8 14 10400 14.so.0.0[.0] |
4050 1.0.19 10 10019 10.so.0.19[.0] |
|
4051 1.2.11 13 10211 12.so.0.11[.0] |
4171 1.2.11 13 10211 12.so.0.11[.0] |
4052 1.0.20 10 10020 10.so.0.20[.0] |
|
4053 1.2.12 13 10212 12.so.0.12[.0] |
4172 1.2.12 13 10212 12.so.0.12[.0] |
4054 1.2.13beta1 13 10213 12.so.0.13[.0] |
4173 1.4.0beta9-14 14 10400 14.so.0.0[.0] |
4055 1.0.21 10 10021 10.so.0.21[.0] |
|
4056 1.2.13 13 10213 12.so.0.13[.0] |
4174 1.2.13 13 10213 12.so.0.13[.0] |
4057 1.2.14beta1-2 13 10214 12.so.0.14[.0] |
4175 1.4.0beta15-36 14 10400 14.so.0.0[.0] |
4058 1.0.22rc1 10 10022 10.so.0.22[.0] |
4176 1.4.0beta37-87 14 10400 14.so.14.0[.0] |
4059 1.2.14rc1 13 10214 12.so.0.14[.0] |
4177 1.4.0rc01 14 10400 14.so.14.0[.0] |
4060 1.2.15beta1-6 13 10215 12.so.0.15[.0] |
4178 1.4.0beta88-109 14 10400 14.so.14.0[.0] |
4061 1.0.23rc1-5 10 10023 10.so.0.23[.0] |
4179 1.4.0rc02-08 14 10400 14.so.14.0[.0] |
4062 1.2.15rc1-5 13 10215 12.so.0.15[.0] |
4180 1.4.0 14 10400 14.so.14.0[.0] |
4063 1.0.23 10 10023 10.so.0.23[.0] |
|
4064 1.2.15 13 10215 12.so.0.15[.0] |
|
4065 1.2.16beta1-2 13 10216 12.so.0.16[.0] |
|
4066 1.2.16rc1 13 10216 12.so.0.16[.0] |
|
4067 1.0.24 10 10024 10.so.0.24[.0] |
|
4068 1.2.16 13 10216 12.so.0.16[.0] |
|
4069 1.2.17beta1-2 13 10217 12.so.0.17[.0] |
|
4070 1.0.25rc1 10 10025 10.so.0.25[.0] |
|
4071 1.2.17rc1-3 13 10217 12.so.0.17[.0] |
|
4072 1.0.25 10 10025 10.so.0.25[.0] |
|
4073 1.2.17 13 10217 12.so.0.17[.0] |
|
4074 1.0.26 10 10026 10.so.0.26[.0] |
|
4075 1.2.18 13 10218 12.so.0.18[.0] |
|
4076 1.2.19beta1-31 13 10219 12.so.0.19[.0] |
|
4077 1.0.27rc1-6 10 10027 10.so.0.27[.0] |
|
4078 1.2.19rc1-6 13 10219 12.so.0.19[.0] |
|
4079 1.0.27 10 10027 10.so.0.27[.0] |
|
4080 1.2.19 13 10219 12.so.0.19[.0] |
|
4081 1.2.20beta01-04 13 10220 12.so.0.20[.0] |
|
4082 1.0.28rc1-6 10 10028 10.so.0.28[.0] |
|
4083 1.2.20rc1-6 13 10220 12.so.0.20[.0] |
|
4084 1.0.28 10 10028 10.so.0.28[.0] |
|
4085 1.2.20 13 10220 12.so.0.20[.0] |
|
4086 1.2.21beta1-2 13 10221 12.so.0.21[.0] |
|
4087 1.2.21rc1-3 13 10221 12.so.0.21[.0] |
|
4088 1.0.29 10 10029 10.so.0.29[.0] |
|
4089 1.2.21 13 10221 12.so.0.21[.0] |
|
4090 1.2.22beta1-4 13 10222 12.so.0.22[.0] |
|
4091 1.0.30rc1 13 10030 10.so.0.30[.0] |
|
4092 1.2.22rc1 13 10222 12.so.0.22[.0] |
|
4093 1.0.30 10 10030 10.so.0.30[.0] |
|
4094 1.2.22 13 10222 12.so.0.22[.0] |
|
4095 1.2.23beta01-05 13 10223 12.so.0.23[.0] |
|
4096 1.2.23rc01 13 10223 12.so.0.23[.0] |
|
4097 1.2.23 13 10223 12.so.0.23[.0] |
|
4098 1.2.24beta01-02 13 10224 12.so.0.24[.0] |
|
4099 1.2.24rc01 13 10224 12.so.0.24[.0] |
|
4100 1.2.24 13 10224 12.so.0.24[.0] |
|
4101 1.2.25beta01-06 13 10225 12.so.0.25[.0] |
|
4102 1.2.25rc01-02 13 10225 12.so.0.25[.0] |
|
4103 1.0.31 10 10031 10.so.0.31[.0] |
|
4104 1.2.25 13 10225 12.so.0.25[.0] |
|
4105 1.2.26beta01-06 13 10226 12.so.0.26[.0] |
|
4106 1.2.26rc01 13 10226 12.so.0.26[.0] |
|
4107 1.2.26 13 10226 12.so.0.26[.0] |
|
4108 1.0.32 10 10032 10.so.0.32[.0] |
|
4109 1.2.27beta01-06 13 10227 12.so.0.27[.0] |
|
4110 1.2.27rc01 13 10227 12.so.0.27[.0] |
|
4111 1.0.33 10 10033 10.so.0.33[.0] |
|
4112 1.2.27 13 10227 12.so.0.27[.0] |
|
4113 1.0.34 10 10034 10.so.0.34[.0] |
|
4114 1.2.28 13 10228 12.so.0.28[.0] |
|
4115 1.2.29beta01-03 13 10229 12.so.0.29[.0] |
|
4116 1.2.29rc01 13 10229 12.so.0.29[.0] |
|
4117 1.0.35 10 10035 10.so.0.35[.0] |
|
4118 1.2.29 13 10229 12.so.0.29[.0] |
|
4119 1.0.37 10 10037 10.so.0.37[.0] |
|
4120 1.2.30beta01-04 13 10230 12.so.0.30[.0] |
|
4121 1.0.38rc01-08 10 10038 10.so.0.38[.0] |
|
4122 1.2.30rc01-08 13 10230 12.so.0.30[.0] |
|
4123 1.0.38 10 10038 10.so.0.38[.0] |
|
4124 1.2.30 13 10230 12.so.0.30[.0] |
|
4125 1.0.39rc01-03 10 10039 10.so.0.39[.0] |
|
4126 1.2.31rc01-03 13 10231 12.so.0.31[.0] |
|
4127 1.0.39 10 10039 10.so.0.39[.0] |
|
4128 1.2.31 13 10231 12.so.0.31[.0] |
|
4129 1.2.32beta01-02 13 10232 12.so.0.32[.0] |
|
4130 1.0.40rc01 10 10040 10.so.0.40[.0] |
|
4131 1.2.32rc01 13 10232 12.so.0.32[.0] |
|
4132 1.0.40 10 10040 10.so.0.40[.0] |
|
4133 1.2.32 13 10232 12.so.0.32[.0] |
|
4134 1.2.33beta01-02 13 10233 12.so.0.33[.0] |
|
4135 1.2.33rc01-02 13 10233 12.so.0.33[.0] |
|
4136 1.0.41rc01 10 10041 10.so.0.41[.0] |
|
4137 1.2.33 13 10233 12.so.0.33[.0] |
|
4138 1.0.41 10 10041 10.so.0.41[.0] |
|
4139 1.2.34beta01-07 13 10234 12.so.0.34[.0] |
|
4140 1.0.42rc01 10 10042 10.so.0.42[.0] |
|
4141 1.2.34rc01 13 10234 12.so.0.34[.0] |
|
4142 1.0.42 10 10042 10.so.0.42[.0] |
|
4143 1.2.34 13 10234 12.so.0.34[.0] |
|
4144 1.2.35beta01-03 13 10235 12.so.0.35[.0] |
|
4145 1.0.43rc01-02 10 10043 10.so.0.43[.0] |
|
4146 1.2.35rc01-02 13 10235 12.so.0.35[.0] |
|
4147 1.0.43 10 10043 10.so.0.43[.0] |
|
4148 1.2.35 13 10235 12.so.0.35[.0] |
|
4149 1.2.36beta01-05 13 10236 12.so.0.36[.0] |
|
4150 1.2.36rc01 13 10236 12.so.0.36[.0] |
|
4151 1.0.44 10 10044 10.so.0.44[.0] |
|
4152 1.2.36 13 10236 12.so.0.36[.0] |
|
4153 1.2.37beta01-03 13 10237 12.so.0.37[.0] |
|
4154 1.2.37rc01 13 10237 12.so.0.37[.0] |
|
4155 1.2.37 13 10237 12.so.0.37[.0] |
|
4156 1.2.45 10 10045 12.so.0.45[.0] |
|
4157 1.0.46 10 10046 10.so.0.46[.0] |
|
4158 1.2.38beta01 13 10238 12.so.0.38[.0] |
|
4159 1.2.38rc01-03 13 10238 12.so.0.38[.0] |
|
4160 1.0.47 10 10047 10.so.0.47[.0] |
|
4161 1.2.38 13 10238 12.so.0.38[.0] |
|
4162 1.2.39beta01-05 13 10239 12.so.0.39[.0] |
|
4163 1.2.39rc01 13 10239 12.so.0.39[.0] |
|
4164 1.0.48 10 10048 10.so.0.48[.0] |
|
4165 1.2.39 13 10239 12.so.0.39[.0] |
|
4166 1.2.40rc01 13 10240 12.so.0.40[.0] |
|
4167 1.0.49 10 10049 10.so.0.49[.0] |
|
4168 1.2.40 13 10240 12.so.0.40[.0] |
|
4169 |
4181 |
4170 Henceforth the source version will match the shared-library minor |
4182 Henceforth the source version will match the shared-library minor |
4171 and patch numbers; the shared-library major version number will be |
4183 and patch numbers; the shared-library major version number will be |
4172 used for changes in backward compatibility, as it is intended. The |
4184 used for changes in backward compatibility, as it is intended. The |
4173 PNG_PNGLIB_VER macro, which is not used within libpng but is available |
4185 PNG_PNGLIB_VER macro, which is not used within libpng but is available |
4176 were given the previous public release number plus a letter, until |
4188 were given the previous public release number plus a letter, until |
4177 version 1.0.6j; from then on they were given the upcoming public |
4189 version 1.0.6j; from then on they were given the upcoming public |
4178 release number plus "betaNN" or "rcN". |
4190 release number plus "betaNN" or "rcN". |
4179 |
4191 |
4180 .SH "SEE ALSO" |
4192 .SH "SEE ALSO" |
4181 .IR libpngpf(3) ", " png(5) |
4193 libpngpf(3), png(5) |
4182 .LP |
4194 .LP |
4183 .IR libpng : |
4195 .IR libpng : |
4184 .IP |
4196 .IP |
4185 http://libpng.sourceforge.net (follow the [DOWNLOAD] link) |
4197 http://libpng.sourceforge.net (follow the [DOWNLOAD] link) |
4186 http://www.libpng.org/pub/png |
4198 http://www.libpng.org/pub/png |
4199 .IP |
4211 .IP |
4200 (generally) at the same location as |
4212 (generally) at the same location as |
4201 .I libpng |
4213 .I libpng |
4202 or at |
4214 or at |
4203 .br |
4215 .br |
4204 ftp://ftp.rfc-editor.org:/in-notes/rfc2083.txt |
4216 ftp://ds.internic.net/rfc/rfc2083.txt |
4205 .br |
4217 .br |
4206 or (as a W3C Recommendation) at |
4218 or (as a W3C Recommendation) at |
4207 .br |
4219 .br |
4208 http://www.w3.org/TR/REC-png.html |
4220 http://www.w3.org/TR/REC-png.html |
4209 |
4221 |
4219 with testing, bug fixes, and patience. This wouldn't have been |
4231 with testing, bug fixes, and patience. This wouldn't have been |
4220 possible without all of you. |
4232 possible without all of you. |
4221 |
4233 |
4222 Thanks to Frank J. T. Wojcik for helping with the documentation. |
4234 Thanks to Frank J. T. Wojcik for helping with the documentation. |
4223 |
4235 |
4224 Libpng version 1.2.40 - September 10, 2009: |
4236 Libpng version 1.4.0 - January 3, 2010: |
4225 Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. |
4237 Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. |
4226 Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). |
4238 Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). |
4227 |
4239 |
4228 Supported by the PNG development group |
4240 Supported by the PNG development group |
4229 .br |
4241 .br |
4242 If you modify libpng you may insert additional notices immediately following |
4254 If you modify libpng you may insert additional notices immediately following |
4243 this sentence. |
4255 this sentence. |
4244 |
4256 |
4245 This code is released under the libpng license. |
4257 This code is released under the libpng license. |
4246 |
4258 |
4247 libpng versions 1.2.6, August 15, 2004, through 1.2.40, September 10, 2009, are |
4259 libpng versions 1.2.6, August 15, 2004, through 1.4.0, January 3, 2010, are |
4248 Copyright (c) 2004,2006-2008 Glenn Randers-Pehrson, and are |
4260 Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are |
4249 distributed according to the same disclaimer and license as libpng-1.2.5 |
4261 distributed according to the same disclaimer and license as libpng-1.2.5 |
4250 with the following individual added to the list of Contributing Authors |
4262 with the following individual added to the list of Contributing Authors |
4251 |
4263 |
4252 Cosmin Truta |
4264 Cosmin Truta |
4253 |
4265 |
4341 Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a |
4353 Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a |
4342 certification mark of the Open Source Initiative. |
4354 certification mark of the Open Source Initiative. |
4343 |
4355 |
4344 Glenn Randers-Pehrson |
4356 Glenn Randers-Pehrson |
4345 glennrp at users.sourceforge.net |
4357 glennrp at users.sourceforge.net |
4346 September 10, 2009 |
4358 January 3, 2010 |
4347 |
4359 |
4348 .\" end of man page |
4360 .\" end of man page |
4349 |
4361 |