OLD | NEW |
1 /* png.h - header file for PNG reference library | 1 /* png.h - header file for PNG reference library |
2 * | 2 * |
3 * libpng version 1.2.45 - July 7, 2011 | 3 * libpng version 1.2.52 - November 20, 2014 |
4 * Copyright (c) 1998-2011 Glenn Randers-Pehrson | 4 * Copyright (c) 1998-2014 Glenn Randers-Pehrson |
5 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) | 5 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) |
6 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) | 6 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) |
7 * | 7 * |
8 * This code is released under the libpng license (See LICENSE, below) | 8 * This code is released under the libpng license (See LICENSE, below) |
9 * | 9 * |
10 * Authors and maintainers: | 10 * Authors and maintainers: |
11 * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat | 11 * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat |
12 * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger | 12 * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger |
13 * libpng versions 0.97, January 1998, through 1.2.45 - July 7, 2011: Glenn | 13 * libpng versions 0.97, January 1998, through 1.2.52 - November 20, 2014: Glen
n |
14 * See also "Contributing Authors", below. | 14 * See also "Contributing Authors", below. |
15 * | 15 * |
16 * Note about libpng version numbers: | 16 * Note about libpng version numbers: |
17 * | 17 * |
18 * Due to various miscommunications, unforeseen code incompatibilities | 18 * Due to various miscommunications, unforeseen code incompatibilities |
19 * and occasional factors outside the authors' control, version numbering | 19 * and occasional factors outside the authors' control, version numbering |
20 * on the library has not always been consistent and straightforward. | 20 * on the library has not always been consistent and straightforward. |
21 * The following table summarizes matters since version 0.89c, which was | 21 * The following table summarizes matters since version 0.89c, which was |
22 * the first widely used release: | 22 * the first widely used release: |
23 * | 23 * |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 * 1.2.42 13 10242 12.so.0.42[.0] | 256 * 1.2.42 13 10242 12.so.0.42[.0] |
257 * 1.2.43beta01-05 13 10243 12.so.0.43[.0] | 257 * 1.2.43beta01-05 13 10243 12.so.0.43[.0] |
258 * 1.0.53rc01-02 10 10053 10.so.0.53[.0] | 258 * 1.0.53rc01-02 10 10053 10.so.0.53[.0] |
259 * 1.2.43rc01-02 13 10243 12.so.0.43[.0] | 259 * 1.2.43rc01-02 13 10243 12.so.0.43[.0] |
260 * 1.0.53 10 10053 10.so.0.53[.0] | 260 * 1.0.53 10 10053 10.so.0.53[.0] |
261 * 1.2.43 13 10243 12.so.0.43[.0] | 261 * 1.2.43 13 10243 12.so.0.43[.0] |
262 * 1.2.44beta01-03 13 10244 12.so.0.44[.0] | 262 * 1.2.44beta01-03 13 10244 12.so.0.44[.0] |
263 * 1.2.44rc01-03 13 10244 12.so.0.44[.0] | 263 * 1.2.44rc01-03 13 10244 12.so.0.44[.0] |
264 * 1.2.44 13 10244 12.so.0.44[.0] | 264 * 1.2.44 13 10244 12.so.0.44[.0] |
265 * 1.2.45beta01-03 13 10245 12.so.0.45[.0] | 265 * 1.2.45beta01-03 13 10245 12.so.0.45[.0] |
266 * 1.0.55rc01 13 10055 10.so.0.55[.0] | 266 * 1.0.55rc01 10 10055 10.so.0.55[.0] |
267 * 1.2.45rc01 13 10245 12.so.0.45[.0] | 267 * 1.2.45rc01 13 10245 12.so.0.45[.0] |
268 * 1.0.55 13 10055 10.so.0.55[.0] | 268 * 1.0.55 10 10055 10.so.0.55[.0] |
269 * 1.2.45 13 10245 12.so.0.45[.0] | 269 * 1.2.45 13 10245 12.so.0.45[.0] |
| 270 * 1.2.46rc01-02 13 10246 12.so.0.46[.0] |
| 271 * 1.0.56 10 10056 10.so.0.56[.0] |
| 272 * 1.2.46 13 10246 12.so.0.46[.0] |
| 273 * 1.2.47beta01 13 10247 12.so.0.47[.0] |
| 274 * 1.2.47rc01 13 10247 12.so.0.47[.0] |
| 275 * 1.0.57rc01 10 10057 10.so.0.57[.0] |
| 276 * 1.2.47 13 10247 12.so.0.47[.0] |
| 277 * 1.0.57 10 10057 10.so.0.57[.0] |
| 278 * 1.2.48beta01 13 10248 12.so.0.48[.0] |
| 279 * 1.2.48rc01-02 13 10248 12.so.0.48[.0] |
| 280 * 1.0.58 10 10058 10.so.0.58[.0] |
| 281 * 1.2.48 13 10248 12.so.0.48[.0] |
| 282 * 1.2.49rc01 13 10249 12.so.0.49[.0] |
| 283 * 1.0.59 10 10059 10.so.0.59[.0] |
| 284 * 1.2.49 13 10249 12.so.0.49[.0] |
| 285 * 1.0.60 10 10060 10.so.0.60[.0] |
| 286 * 1.2.50 13 10250 12.so.0.50[.0] |
| 287 * 1.2.51beta01-05 13 10251 12.so.0.51[.0] |
| 288 * 1.2.51rc01-04 13 10251 12.so.0.51[.0] |
| 289 * 1.0.61 10 10061 10.so.0.61[.0] |
| 290 * 1.2.51 13 10251 12.so.0.51[.0] |
| 291 * 1.2.52beta01 13 10252 12.so.0.52[.0] |
| 292 * 1.2.52rc01-02 13 10252 12.so.0.52[.0] |
| 293 * 1.0.62 10 10062 10.so.0.62[.0] |
| 294 * 1.2.52 13 10252 12.so.0.52[.0] |
270 * | 295 * |
271 * Henceforth the source version will match the shared-library major | 296 * Henceforth the source version will match the shared-library major |
272 * and minor numbers; the shared-library major version number will be | 297 * and minor numbers; the shared-library major version number will be |
273 * used for changes in backward compatibility, as it is intended. The | 298 * used for changes in backward compatibility, as it is intended. The |
274 * PNG_LIBPNG_VER macro, which is not used within libpng but is available | 299 * PNG_LIBPNG_VER macro, which is not used within libpng but is available |
275 * for applications, is an unsigned integer of the form xyyzz corresponding | 300 * for applications, is an unsigned integer of the form xyyzz corresponding |
276 * to the source version x.y.z (leading zeros in y and z). Beta versions | 301 * to the source version x.y.z (leading zeros in y and z). Beta versions |
277 * were given the previous public release number plus a letter, until | 302 * were given the previous public release number plus a letter, until |
278 * version 1.0.6j; from then on they were given the upcoming public | 303 * version 1.0.6j; from then on they were given the upcoming public |
279 * release number plus "betaNN" or "rcNN". | 304 * release number plus "betaNN" or "rcNN". |
(...skipping 11 matching lines...) Expand all Loading... |
291 */ | 316 */ |
292 | 317 |
293 /* | 318 /* |
294 * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: | 319 * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: |
295 * | 320 * |
296 * If you modify libpng you may insert additional notices immediately following | 321 * If you modify libpng you may insert additional notices immediately following |
297 * this sentence. | 322 * this sentence. |
298 * | 323 * |
299 * This code is released under the libpng license. | 324 * This code is released under the libpng license. |
300 * | 325 * |
301 * libpng versions 1.2.6, August 15, 2004, through 1.2.45, July 7, 2011, are | 326 * libpng versions 1.2.6, August 15, 2004, through 1.2.52, November 20, 2014, ar
e |
302 * Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are | 327 * Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson, and are |
303 * distributed according to the same disclaimer and license as libpng-1.2.5 | 328 * distributed according to the same disclaimer and license as libpng-1.2.5 |
304 * with the following individual added to the list of Contributing Authors: | 329 * with the following individual added to the list of Contributing Authors: |
305 * | 330 * |
306 * Cosmin Truta | 331 * Cosmin Truta |
307 * | 332 * |
308 * libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are | 333 * libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are |
309 * Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are | 334 * Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are |
310 * distributed according to the same disclaimer and license as libpng-1.0.6 | 335 * distributed according to the same disclaimer and license as libpng-1.0.6 |
311 * with the following individuals added to the list of Contributing Authors: | 336 * with the following individuals added to the list of Contributing Authors: |
312 * | 337 * |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 * with testing, bug fixes, and patience. This wouldn't have been | 428 * with testing, bug fixes, and patience. This wouldn't have been |
404 * possible without all of you. | 429 * possible without all of you. |
405 * | 430 * |
406 * Thanks to Frank J. T. Wojcik for helping with the documentation. | 431 * Thanks to Frank J. T. Wojcik for helping with the documentation. |
407 */ | 432 */ |
408 | 433 |
409 /* | 434 /* |
410 * Y2K compliance in libpng: | 435 * Y2K compliance in libpng: |
411 * ========================= | 436 * ========================= |
412 * | 437 * |
413 * July 7, 2011 | 438 * November 20, 2014 |
414 * | 439 * |
415 * Since the PNG Development group is an ad-hoc body, we can't make | 440 * Since the PNG Development group is an ad-hoc body, we can't make |
416 * an official declaration. | 441 * an official declaration. |
417 * | 442 * |
418 * This is your unofficial assurance that libpng from version 0.71 and | 443 * This is your unofficial assurance that libpng from version 0.71 and |
419 * upward through 1.2.45 are Y2K compliant. It is my belief that earlier | 444 * upward through 1.2.52 are Y2K compliant. It is my belief that earlier |
420 * versions were also Y2K compliant. | 445 * versions were also Y2K compliant. |
421 * | 446 * |
422 * Libpng only has three year fields. One is a 2-byte unsigned integer | 447 * Libpng only has three year fields. One is a 2-byte unsigned integer |
423 * that will hold years up to 65535. The other two hold the date in text | 448 * that will hold years up to 65535. The other two hold the date in text |
424 * format, and will hold years up to 9999. | 449 * format, and will hold years up to 9999. |
425 * | 450 * |
426 * The integer is | 451 * The integer is |
427 * "png_uint_16 year" in png_time_struct. | 452 * "png_uint_16 year" in png_time_struct. |
428 * | 453 * |
429 * The strings are | 454 * The strings are |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 #ifndef PNG_H | 490 #ifndef PNG_H |
466 #define PNG_H | 491 #define PNG_H |
467 | 492 |
468 /* This is not the place to learn how to use libpng. The file libpng.txt | 493 /* This is not the place to learn how to use libpng. The file libpng.txt |
469 * describes how to use libpng, and the file example.c summarizes it | 494 * describes how to use libpng, and the file example.c summarizes it |
470 * with some code on which to build. This file is useful for looking | 495 * with some code on which to build. This file is useful for looking |
471 * at the actual function definitions and structure components. | 496 * at the actual function definitions and structure components. |
472 */ | 497 */ |
473 | 498 |
474 /* Version information for png.h - this should match the version in png.c */ | 499 /* Version information for png.h - this should match the version in png.c */ |
475 #define PNG_LIBPNG_VER_STRING "1.2.45" | 500 #define PNG_LIBPNG_VER_STRING "1.2.52" |
476 #define PNG_HEADER_VERSION_STRING \ | 501 #define PNG_HEADER_VERSION_STRING \ |
477 " libpng version 1.2.45 - July 7, 2011\n" | 502 " libpng version 1.2.52 - November 20, 2014\n" |
478 | 503 |
479 #define PNG_LIBPNG_VER_SONUM 0 | 504 #define PNG_LIBPNG_VER_SONUM 0 |
480 #define PNG_LIBPNG_VER_DLLNUM 13 | 505 #define PNG_LIBPNG_VER_DLLNUM 13 |
481 | 506 |
482 /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ | 507 /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ |
483 #define PNG_LIBPNG_VER_MAJOR 1 | 508 #define PNG_LIBPNG_VER_MAJOR 1 |
484 #define PNG_LIBPNG_VER_MINOR 2 | 509 #define PNG_LIBPNG_VER_MINOR 2 |
485 #define PNG_LIBPNG_VER_RELEASE 45 | 510 #define PNG_LIBPNG_VER_RELEASE 52 |
486 /* This should match the numeric part of the final component of | 511 /* This should match the numeric part of the final component of |
487 * PNG_LIBPNG_VER_STRING, omitting any leading zero: | 512 * PNG_LIBPNG_VER_STRING, omitting any leading zero: |
488 */ | 513 */ |
489 | 514 |
490 #define PNG_LIBPNG_VER_BUILD 0 | 515 #define PNG_LIBPNG_VER_BUILD 0 |
491 | 516 |
492 /* Release Status */ | 517 /* Release Status */ |
493 #define PNG_LIBPNG_BUILD_ALPHA 1 | 518 #define PNG_LIBPNG_BUILD_ALPHA 1 |
494 #define PNG_LIBPNG_BUILD_BETA 2 | 519 #define PNG_LIBPNG_BUILD_BETA 2 |
495 #define PNG_LIBPNG_BUILD_RC 3 | 520 #define PNG_LIBPNG_BUILD_RC 3 |
496 #define PNG_LIBPNG_BUILD_STABLE 4 | 521 #define PNG_LIBPNG_BUILD_STABLE 4 |
497 #define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7 | 522 #define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7 |
498 | 523 |
499 /* Release-Specific Flags */ | 524 /* Release-Specific Flags */ |
500 #define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with | 525 #define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with |
501 PNG_LIBPNG_BUILD_STABLE only */ | 526 PNG_LIBPNG_BUILD_STABLE only */ |
502 #define PNG_LIBPNG_BUILD_PRIVATE 16 /* Cannot be OR'ed with | 527 #define PNG_LIBPNG_BUILD_PRIVATE 16 /* Cannot be OR'ed with |
503 PNG_LIBPNG_BUILD_SPECIAL */ | 528 PNG_LIBPNG_BUILD_SPECIAL */ |
504 #define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with | 529 #define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with |
505 PNG_LIBPNG_BUILD_PRIVATE */ | 530 PNG_LIBPNG_BUILD_PRIVATE */ |
506 | 531 |
507 #define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE | 532 #define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE |
508 | 533 |
509 /* Careful here. At one time, Guy wanted to use 082, but that would be octal. | 534 /* Careful here. At one time, Guy wanted to use 082, but that would be octal. |
510 * We must not include leading zeros. | 535 * We must not include leading zeros. |
511 * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only | 536 * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only |
512 * version 1.0.0 was mis-numbered 100 instead of 10000). From | 537 * version 1.0.0 was mis-numbered 100 instead of 10000). From |
513 * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release | 538 * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release |
514 */ | 539 */ |
515 #define PNG_LIBPNG_VER 10245 /* 1.2.45 */ | 540 #define PNG_LIBPNG_VER 10252 /* 1.2.52 */ |
516 | 541 |
517 #ifndef PNG_VERSION_INFO_ONLY | 542 #ifndef PNG_VERSION_INFO_ONLY |
518 /* Include the compression library's header */ | 543 /* Include the compression library's header */ |
519 #include "zlib.h" | 544 #include "zlib.h" |
520 #endif | 545 #endif |
521 | 546 |
522 /* Include all user configurable info, including optional assembler routines */ | 547 /* Include all user configurable info, including optional assembler routines */ |
523 #include "pngconf.h" | 548 #include "pngconf.h" |
524 | 549 |
525 /* | 550 /* |
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1545 /* New member added in libpng-1.2.30 */ | 1570 /* New member added in libpng-1.2.30 */ |
1546 png_charp chunkdata PNG_DEPSTRUCT; /* buffer for reading chunk data */ | 1571 png_charp chunkdata PNG_DEPSTRUCT; /* buffer for reading chunk data */ |
1547 | 1572 |
1548 | 1573 |
1549 }; | 1574 }; |
1550 | 1575 |
1551 | 1576 |
1552 /* This triggers a compiler error in png.c, if png.c and png.h | 1577 /* This triggers a compiler error in png.c, if png.c and png.h |
1553 * do not agree upon the version number. | 1578 * do not agree upon the version number. |
1554 */ | 1579 */ |
1555 typedef png_structp version_1_2_45; | 1580 typedef png_structp version_1_2_52; |
1556 | 1581 |
1557 typedef png_struct FAR * FAR * png_structpp; | 1582 typedef png_struct FAR * FAR * png_structpp; |
1558 | 1583 |
1559 /* Here are the function definitions most commonly used. This is not | 1584 /* Here are the function definitions most commonly used. This is not |
1560 * the place to find out how to use libpng. See libpng.txt for the | 1585 * the place to find out how to use libpng. See libpng.txt for the |
1561 * full explanation, see example.c for the summary. This just provides | 1586 * full explanation, see example.c for the summary. This just provides |
1562 * a simple one line description of the use of each function. | 1587 * a simple one line description of the use of each function. |
1563 */ | 1588 */ |
1564 | 1589 |
1565 /* Returns the version number of the library */ | 1590 /* Returns the version number of the library */ |
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2632 | 2657 |
2633 #if (PNG_DEBUG > 1) | 2658 #if (PNG_DEBUG > 1) |
2634 /* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on non-ISO | 2659 /* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on non-ISO |
2635 * compilers. | 2660 * compilers. |
2636 */ | 2661 */ |
2637 # ifdef __STDC__ | 2662 # ifdef __STDC__ |
2638 # ifndef png_debug | 2663 # ifndef png_debug |
2639 # define png_debug(l,m) \ | 2664 # define png_debug(l,m) \ |
2640 { \ | 2665 { \ |
2641 int num_tabs=l; \ | 2666 int num_tabs=l; \ |
2642 fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ | 2667 fprintf(PNG_DEBUG_FILE,"%s" m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ |
2643 (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \ | 2668 (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \ |
2644 } | 2669 } |
2645 # endif | 2670 # endif |
2646 # ifndef png_debug1 | 2671 # ifndef png_debug1 |
2647 # define png_debug1(l,m,p1) \ | 2672 # define png_debug1(l,m,p1) \ |
2648 { \ | 2673 { \ |
2649 int num_tabs=l; \ | 2674 int num_tabs=l; \ |
2650 fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ | 2675 fprintf(PNG_DEBUG_FILE,"%s" m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ |
2651 (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \ | 2676 (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \ |
2652 } | 2677 } |
2653 # endif | 2678 # endif |
2654 # ifndef png_debug2 | 2679 # ifndef png_debug2 |
2655 # define png_debug2(l,m,p1,p2) \ | 2680 # define png_debug2(l,m,p1,p2) \ |
2656 { \ | 2681 { \ |
2657 int num_tabs=l; \ | 2682 int num_tabs=l; \ |
2658 fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ | 2683 fprintf(PNG_DEBUG_FILE,"%s" m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ |
2659 (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \ | 2684 (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \ |
2660 } | 2685 } |
2661 # endif | 2686 # endif |
2662 # else /* __STDC __ */ | 2687 # else /* __STDC __ */ |
2663 # ifndef png_debug | 2688 # ifndef png_debug |
2664 # define png_debug(l,m) \ | 2689 # define png_debug(l,m) \ |
2665 { \ | 2690 { \ |
2666 int num_tabs=l; \ | 2691 int num_tabs=l; \ |
2667 char format[256]; \ | 2692 char format[256]; \ |
2668 snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ | 2693 snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ |
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3784 | 3809 |
3785 #endif /* PNG_INTERNAL */ | 3810 #endif /* PNG_INTERNAL */ |
3786 | 3811 |
3787 #ifdef __cplusplus | 3812 #ifdef __cplusplus |
3788 } | 3813 } |
3789 #endif | 3814 #endif |
3790 | 3815 |
3791 #endif /* PNG_VERSION_INFO_ONLY */ | 3816 #endif /* PNG_VERSION_INFO_ONLY */ |
3792 /* Do not put anything past this line */ | 3817 /* Do not put anything past this line */ |
3793 #endif /* PNG_H */ | 3818 #endif /* PNG_H */ |
OLD | NEW |