Dependencies:   emwin_lib

Fork of DMemWin by Embedded Artists

Committer:
destinyXfate
Date:
Thu Jun 02 04:52:54 2016 +0000
Revision:
2:0e2ef1edf01b
;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
destinyXfate 2:0e2ef1edf01b 1
destinyXfate 2:0e2ef1edf01b 2 /* png.h - header file for PNG reference library
destinyXfate 2:0e2ef1edf01b 3 *
destinyXfate 2:0e2ef1edf01b 4 * libpng version 1.2.15 - January 5, 2007
destinyXfate 2:0e2ef1edf01b 5 * Copyright (c) 1998-2007 Glenn Randers-Pehrson
destinyXfate 2:0e2ef1edf01b 6 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
destinyXfate 2:0e2ef1edf01b 7 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
destinyXfate 2:0e2ef1edf01b 8 *
destinyXfate 2:0e2ef1edf01b 9 * Authors and maintainers:
destinyXfate 2:0e2ef1edf01b 10 * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
destinyXfate 2:0e2ef1edf01b 11 * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
destinyXfate 2:0e2ef1edf01b 12 * libpng versions 0.97, January 1998, through 1.2.15 - January 5, 2007: Glenn
destinyXfate 2:0e2ef1edf01b 13 * See also "Contributing Authors", below.
destinyXfate 2:0e2ef1edf01b 14 *
destinyXfate 2:0e2ef1edf01b 15 * Note about libpng version numbers:
destinyXfate 2:0e2ef1edf01b 16 *
destinyXfate 2:0e2ef1edf01b 17 * Due to various miscommunications, unforeseen code incompatibilities
destinyXfate 2:0e2ef1edf01b 18 * and occasional factors outside the authors' control, version numbering
destinyXfate 2:0e2ef1edf01b 19 * on the library has not always been consistent and straightforward.
destinyXfate 2:0e2ef1edf01b 20 * The following table summarizes matters since version 0.89c, which was
destinyXfate 2:0e2ef1edf01b 21 * the first widely used release:
destinyXfate 2:0e2ef1edf01b 22 *
destinyXfate 2:0e2ef1edf01b 23 * source png.h png.h shared-lib
destinyXfate 2:0e2ef1edf01b 24 * version string int version
destinyXfate 2:0e2ef1edf01b 25 * ------- ------ ----- ----------
destinyXfate 2:0e2ef1edf01b 26 * 0.89c "1.0 beta 3" 0.89 89 1.0.89
destinyXfate 2:0e2ef1edf01b 27 * 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90]
destinyXfate 2:0e2ef1edf01b 28 * 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95]
destinyXfate 2:0e2ef1edf01b 29 * 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96]
destinyXfate 2:0e2ef1edf01b 30 * 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97]
destinyXfate 2:0e2ef1edf01b 31 * 0.97c 0.97 97 2.0.97
destinyXfate 2:0e2ef1edf01b 32 * 0.98 0.98 98 2.0.98
destinyXfate 2:0e2ef1edf01b 33 * 0.99 0.99 98 2.0.99
destinyXfate 2:0e2ef1edf01b 34 * 0.99a-m 0.99 99 2.0.99
destinyXfate 2:0e2ef1edf01b 35 * 1.00 1.00 100 2.1.0 [100 should be 10000]
destinyXfate 2:0e2ef1edf01b 36 * 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000]
destinyXfate 2:0e2ef1edf01b 37 * 1.0.1 png.h string is 10001 2.1.0
destinyXfate 2:0e2ef1edf01b 38 * 1.0.1a-e identical to the 10002 from here on, the shared library
destinyXfate 2:0e2ef1edf01b 39 * 1.0.2 source version) 10002 is 2.V where V is the source code
destinyXfate 2:0e2ef1edf01b 40 * 1.0.2a-b 10003 version, except as noted.
destinyXfate 2:0e2ef1edf01b 41 * 1.0.3 10003
destinyXfate 2:0e2ef1edf01b 42 * 1.0.3a-d 10004
destinyXfate 2:0e2ef1edf01b 43 * 1.0.4 10004
destinyXfate 2:0e2ef1edf01b 44 * 1.0.4a-f 10005
destinyXfate 2:0e2ef1edf01b 45 * 1.0.5 (+ 2 patches) 10005
destinyXfate 2:0e2ef1edf01b 46 * 1.0.5a-d 10006
destinyXfate 2:0e2ef1edf01b 47 * 1.0.5e-r 10100 (not source compatible)
destinyXfate 2:0e2ef1edf01b 48 * 1.0.5s-v 10006 (not binary compatible)
destinyXfate 2:0e2ef1edf01b 49 * 1.0.6 (+ 3 patches) 10006 (still binary incompatible)
destinyXfate 2:0e2ef1edf01b 50 * 1.0.6d-f 10007 (still binary incompatible)
destinyXfate 2:0e2ef1edf01b 51 * 1.0.6g 10007
destinyXfate 2:0e2ef1edf01b 52 * 1.0.6h 10007 10.6h (testing xy.z so-numbering)
destinyXfate 2:0e2ef1edf01b 53 * 1.0.6i 10007 10.6i
destinyXfate 2:0e2ef1edf01b 54 * 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0)
destinyXfate 2:0e2ef1edf01b 55 * 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible)
destinyXfate 2:0e2ef1edf01b 56 * 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible)
destinyXfate 2:0e2ef1edf01b 57 * 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible)
destinyXfate 2:0e2ef1edf01b 58 * 1.0.7 1 10007 (still compatible)
destinyXfate 2:0e2ef1edf01b 59 * 1.0.8beta1-4 1 10008 2.1.0.8beta1-4
destinyXfate 2:0e2ef1edf01b 60 * 1.0.8rc1 1 10008 2.1.0.8rc1
destinyXfate 2:0e2ef1edf01b 61 * 1.0.8 1 10008 2.1.0.8
destinyXfate 2:0e2ef1edf01b 62 * 1.0.9beta1-6 1 10009 2.1.0.9beta1-6
destinyXfate 2:0e2ef1edf01b 63 * 1.0.9rc1 1 10009 2.1.0.9rc1
destinyXfate 2:0e2ef1edf01b 64 * 1.0.9beta7-10 1 10009 2.1.0.9beta7-10
destinyXfate 2:0e2ef1edf01b 65 * 1.0.9rc2 1 10009 2.1.0.9rc2
destinyXfate 2:0e2ef1edf01b 66 * 1.0.9 1 10009 2.1.0.9
destinyXfate 2:0e2ef1edf01b 67 * 1.0.10beta1 1 10010 2.1.0.10beta1
destinyXfate 2:0e2ef1edf01b 68 * 1.0.10rc1 1 10010 2.1.0.10rc1
destinyXfate 2:0e2ef1edf01b 69 * 1.0.10 1 10010 2.1.0.10
destinyXfate 2:0e2ef1edf01b 70 * 1.0.11beta1-3 1 10011 2.1.0.11beta1-3
destinyXfate 2:0e2ef1edf01b 71 * 1.0.11rc1 1 10011 2.1.0.11rc1
destinyXfate 2:0e2ef1edf01b 72 * 1.0.11 1 10011 2.1.0.11
destinyXfate 2:0e2ef1edf01b 73 * 1.0.12beta1-2 2 10012 2.1.0.12beta1-2
destinyXfate 2:0e2ef1edf01b 74 * 1.0.12rc1 2 10012 2.1.0.12rc1
destinyXfate 2:0e2ef1edf01b 75 * 1.0.12 2 10012 2.1.0.12
destinyXfate 2:0e2ef1edf01b 76 * 1.1.0a-f - 10100 2.1.1.0a-f (branch abandoned)
destinyXfate 2:0e2ef1edf01b 77 * 1.2.0beta1-2 2 10200 2.1.2.0beta1-2
destinyXfate 2:0e2ef1edf01b 78 * 1.2.0beta3-5 3 10200 3.1.2.0beta3-5
destinyXfate 2:0e2ef1edf01b 79 * 1.2.0rc1 3 10200 3.1.2.0rc1
destinyXfate 2:0e2ef1edf01b 80 * 1.2.0 3 10200 3.1.2.0
destinyXfate 2:0e2ef1edf01b 81 * 1.2.1beta1-4 3 10201 3.1.2.1beta1-4
destinyXfate 2:0e2ef1edf01b 82 * 1.2.1rc1-2 3 10201 3.1.2.1rc1-2
destinyXfate 2:0e2ef1edf01b 83 * 1.2.1 3 10201 3.1.2.1
destinyXfate 2:0e2ef1edf01b 84 * 1.2.2beta1-6 12 10202 12.so.0.1.2.2beta1-6
destinyXfate 2:0e2ef1edf01b 85 * 1.0.13beta1 10 10013 10.so.0.1.0.13beta1
destinyXfate 2:0e2ef1edf01b 86 * 1.0.13rc1 10 10013 10.so.0.1.0.13rc1
destinyXfate 2:0e2ef1edf01b 87 * 1.2.2rc1 12 10202 12.so.0.1.2.2rc1
destinyXfate 2:0e2ef1edf01b 88 * 1.0.13 10 10013 10.so.0.1.0.13
destinyXfate 2:0e2ef1edf01b 89 * 1.2.2 12 10202 12.so.0.1.2.2
destinyXfate 2:0e2ef1edf01b 90 * 1.2.3rc1-6 12 10203 12.so.0.1.2.3rc1-6
destinyXfate 2:0e2ef1edf01b 91 * 1.2.3 12 10203 12.so.0.1.2.3
destinyXfate 2:0e2ef1edf01b 92 * 1.2.4beta1-3 13 10204 12.so.0.1.2.4beta1-3
destinyXfate 2:0e2ef1edf01b 93 * 1.0.14rc1 13 10014 10.so.0.1.0.14rc1
destinyXfate 2:0e2ef1edf01b 94 * 1.2.4rc1 13 10204 12.so.0.1.2.4rc1
destinyXfate 2:0e2ef1edf01b 95 * 1.0.14 10 10014 10.so.0.1.0.14
destinyXfate 2:0e2ef1edf01b 96 * 1.2.4 13 10204 12.so.0.1.2.4
destinyXfate 2:0e2ef1edf01b 97 * 1.2.5beta1-2 13 10205 12.so.0.1.2.5beta1-2
destinyXfate 2:0e2ef1edf01b 98 * 1.0.15rc1-3 10 10015 10.so.0.1.0.15rc1-3
destinyXfate 2:0e2ef1edf01b 99 * 1.2.5rc1-3 13 10205 12.so.0.1.2.5rc1-3
destinyXfate 2:0e2ef1edf01b 100 * 1.0.15 10 10015 10.so.0.1.0.15
destinyXfate 2:0e2ef1edf01b 101 * 1.2.5 13 10205 12.so.0.1.2.5
destinyXfate 2:0e2ef1edf01b 102 * 1.2.6beta1-4 13 10206 12.so.0.1.2.6beta1-4
destinyXfate 2:0e2ef1edf01b 103 * 1.0.16 10 10016 10.so.0.1.0.16
destinyXfate 2:0e2ef1edf01b 104 * 1.2.6 13 10206 12.so.0.1.2.6
destinyXfate 2:0e2ef1edf01b 105 * 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2
destinyXfate 2:0e2ef1edf01b 106 * 1.0.17rc1 10 10017 10.so.0.1.0.17rc1
destinyXfate 2:0e2ef1edf01b 107 * 1.2.7rc1 13 10207 12.so.0.1.2.7rc1
destinyXfate 2:0e2ef1edf01b 108 * 1.0.17 10 10017 10.so.0.1.0.17
destinyXfate 2:0e2ef1edf01b 109 * 1.2.7 13 10207 12.so.0.1.2.7
destinyXfate 2:0e2ef1edf01b 110 * 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5
destinyXfate 2:0e2ef1edf01b 111 * 1.0.18rc1-5 10 10018 10.so.0.1.0.18rc1-5
destinyXfate 2:0e2ef1edf01b 112 * 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5
destinyXfate 2:0e2ef1edf01b 113 * 1.0.18 10 10018 10.so.0.1.0.18
destinyXfate 2:0e2ef1edf01b 114 * 1.2.8 13 10208 12.so.0.1.2.8
destinyXfate 2:0e2ef1edf01b 115 * 1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3
destinyXfate 2:0e2ef1edf01b 116 * 1.2.9beta4-11 13 10209 12.so.0.9[.0]
destinyXfate 2:0e2ef1edf01b 117 * 1.2.9rc1 13 10209 12.so.0.9[.0]
destinyXfate 2:0e2ef1edf01b 118 * 1.2.9 13 10209 12.so.0.9[.0]
destinyXfate 2:0e2ef1edf01b 119 * 1.2.10beta1-8 13 10210 12.so.0.10[.0]
destinyXfate 2:0e2ef1edf01b 120 * 1.2.10rc1-3 13 10210 12.so.0.10[.0]
destinyXfate 2:0e2ef1edf01b 121 * 1.2.10 13 10210 12.so.0.10[.0]
destinyXfate 2:0e2ef1edf01b 122 * 1.2.11beta1-4 13 10211 12.so.0.11[.0]
destinyXfate 2:0e2ef1edf01b 123 * 1.0.19rc1-5 10 10019 10.so.0.19[.0]
destinyXfate 2:0e2ef1edf01b 124 * 1.2.11rc1-5 13 10211 12.so.0.11[.0]
destinyXfate 2:0e2ef1edf01b 125 * 1.0.19 10 10019 10.so.0.19[.0]
destinyXfate 2:0e2ef1edf01b 126 * 1.2.11 13 10211 12.so.0.11[.0]
destinyXfate 2:0e2ef1edf01b 127 * 1.0.20 10 10020 10.so.0.20[.0]
destinyXfate 2:0e2ef1edf01b 128 * 1.2.12 13 10212 12.so.0.12[.0]
destinyXfate 2:0e2ef1edf01b 129 * 1.2.13beta1 13 10213 12.so.0.13[.0]
destinyXfate 2:0e2ef1edf01b 130 * 1.0.21 10 10021 10.so.0.21[.0]
destinyXfate 2:0e2ef1edf01b 131 * 1.2.13 13 10213 12.so.0.13[.0]
destinyXfate 2:0e2ef1edf01b 132 * 1.2.14beta1-2 13 10214 12.so.0.14[.0]
destinyXfate 2:0e2ef1edf01b 133 * 1.0.22rc1 10 10022 10.so.0.22[.0]
destinyXfate 2:0e2ef1edf01b 134 * 1.2.14rc1 13 10214 12.so.0.14[.0]
destinyXfate 2:0e2ef1edf01b 135 * 1.0.22 10 10022 10.so.0.22[.0]
destinyXfate 2:0e2ef1edf01b 136 * 1.2.14 13 10214 12.so.0.14[.0]
destinyXfate 2:0e2ef1edf01b 137 * 1.2.15beta1-6 13 10215 12.so.0.15[.0]
destinyXfate 2:0e2ef1edf01b 138 * 1.0.23rc1-5 10 10023 10.so.0.23[.0]
destinyXfate 2:0e2ef1edf01b 139 * 1.2.15rc1-5 13 10215 12.so.0.15[.0]
destinyXfate 2:0e2ef1edf01b 140 * 1.0.23 10 10023 10.so.0.23[.0]
destinyXfate 2:0e2ef1edf01b 141 * 1.2.15 13 10215 12.so.0.15[.0]
destinyXfate 2:0e2ef1edf01b 142 *
destinyXfate 2:0e2ef1edf01b 143 * Henceforth the source version will match the shared-library major
destinyXfate 2:0e2ef1edf01b 144 * and minor numbers; the shared-library major version number will be
destinyXfate 2:0e2ef1edf01b 145 * used for changes in backward compatibility, as it is intended. The
destinyXfate 2:0e2ef1edf01b 146 * PNG_LIBPNG_VER macro, which is not used within libpng but is available
destinyXfate 2:0e2ef1edf01b 147 * for applications, is an unsigned integer of the form xyyzz corresponding
destinyXfate 2:0e2ef1edf01b 148 * to the source version x.y.z (leading zeros in y and z). Beta versions
destinyXfate 2:0e2ef1edf01b 149 * were given the previous public release number plus a letter, until
destinyXfate 2:0e2ef1edf01b 150 * version 1.0.6j; from then on they were given the upcoming public
destinyXfate 2:0e2ef1edf01b 151 * release number plus "betaNN" or "rcN".
destinyXfate 2:0e2ef1edf01b 152 *
destinyXfate 2:0e2ef1edf01b 153 * Binary incompatibility exists only when applications make direct access
destinyXfate 2:0e2ef1edf01b 154 * to the info_ptr or png_ptr members through png.h, and the compiled
destinyXfate 2:0e2ef1edf01b 155 * application is loaded with a different version of the library.
destinyXfate 2:0e2ef1edf01b 156 *
destinyXfate 2:0e2ef1edf01b 157 * DLLNUM will change each time there are forward or backward changes
destinyXfate 2:0e2ef1edf01b 158 * in binary compatibility (e.g., when a new feature is added).
destinyXfate 2:0e2ef1edf01b 159 *
destinyXfate 2:0e2ef1edf01b 160 * See libpng.txt or libpng.3 for more information. The PNG specification
destinyXfate 2:0e2ef1edf01b 161 * is available as a W3C Recommendation and as an ISO Specification,
destinyXfate 2:0e2ef1edf01b 162 * <http://www.w3.org/TR/2003/REC-PNG-20031110/
destinyXfate 2:0e2ef1edf01b 163 */
destinyXfate 2:0e2ef1edf01b 164
destinyXfate 2:0e2ef1edf01b 165 /*
destinyXfate 2:0e2ef1edf01b 166 * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
destinyXfate 2:0e2ef1edf01b 167 *
destinyXfate 2:0e2ef1edf01b 168 * If you modify libpng you may insert additional notices immediately following
destinyXfate 2:0e2ef1edf01b 169 * this sentence.
destinyXfate 2:0e2ef1edf01b 170 *
destinyXfate 2:0e2ef1edf01b 171 * libpng versions 1.2.6, August 15, 2004, through 1.2.15, January 5, 2007, are
destinyXfate 2:0e2ef1edf01b 172 * Copyright (c) 2004, 2007 Glenn Randers-Pehrson, and are
destinyXfate 2:0e2ef1edf01b 173 * distributed according to the same disclaimer and license as libpng-1.2.5
destinyXfate 2:0e2ef1edf01b 174 * with the following individual added to the list of Contributing Authors:
destinyXfate 2:0e2ef1edf01b 175 *
destinyXfate 2:0e2ef1edf01b 176 * Cosmin Truta
destinyXfate 2:0e2ef1edf01b 177 *
destinyXfate 2:0e2ef1edf01b 178 * libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are
destinyXfate 2:0e2ef1edf01b 179 * Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
destinyXfate 2:0e2ef1edf01b 180 * distributed according to the same disclaimer and license as libpng-1.0.6
destinyXfate 2:0e2ef1edf01b 181 * with the following individuals added to the list of Contributing Authors:
destinyXfate 2:0e2ef1edf01b 182 *
destinyXfate 2:0e2ef1edf01b 183 * Simon-Pierre Cadieux
destinyXfate 2:0e2ef1edf01b 184 * Eric S. Raymond
destinyXfate 2:0e2ef1edf01b 185 * Gilles Vollant
destinyXfate 2:0e2ef1edf01b 186 *
destinyXfate 2:0e2ef1edf01b 187 * and with the following additions to the disclaimer:
destinyXfate 2:0e2ef1edf01b 188 *
destinyXfate 2:0e2ef1edf01b 189 * There is no warranty against interference with your enjoyment of the
destinyXfate 2:0e2ef1edf01b 190 * library or against infringement. There is no warranty that our
destinyXfate 2:0e2ef1edf01b 191 * efforts or the library will fulfill any of your particular purposes
destinyXfate 2:0e2ef1edf01b 192 * or needs. This library is provided with all faults, and the entire
destinyXfate 2:0e2ef1edf01b 193 * risk of satisfactory quality, performance, accuracy, and effort is with
destinyXfate 2:0e2ef1edf01b 194 * the user.
destinyXfate 2:0e2ef1edf01b 195 *
destinyXfate 2:0e2ef1edf01b 196 * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
destinyXfate 2:0e2ef1edf01b 197 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson, and are
destinyXfate 2:0e2ef1edf01b 198 * distributed according to the same disclaimer and license as libpng-0.96,
destinyXfate 2:0e2ef1edf01b 199 * with the following individuals added to the list of Contributing Authors:
destinyXfate 2:0e2ef1edf01b 200 *
destinyXfate 2:0e2ef1edf01b 201 * Tom Lane
destinyXfate 2:0e2ef1edf01b 202 * Glenn Randers-Pehrson
destinyXfate 2:0e2ef1edf01b 203 * Willem van Schaik
destinyXfate 2:0e2ef1edf01b 204 *
destinyXfate 2:0e2ef1edf01b 205 * libpng versions 0.89, June 1996, through 0.96, May 1997, are
destinyXfate 2:0e2ef1edf01b 206 * Copyright (c) 1996, 1997 Andreas Dilger
destinyXfate 2:0e2ef1edf01b 207 * Distributed according to the same disclaimer and license as libpng-0.88,
destinyXfate 2:0e2ef1edf01b 208 * with the following individuals added to the list of Contributing Authors:
destinyXfate 2:0e2ef1edf01b 209 *
destinyXfate 2:0e2ef1edf01b 210 * John Bowler
destinyXfate 2:0e2ef1edf01b 211 * Kevin Bracey
destinyXfate 2:0e2ef1edf01b 212 * Sam Bushell
destinyXfate 2:0e2ef1edf01b 213 * Magnus Holmgren
destinyXfate 2:0e2ef1edf01b 214 * Greg Roelofs
destinyXfate 2:0e2ef1edf01b 215 * Tom Tanner
destinyXfate 2:0e2ef1edf01b 216 *
destinyXfate 2:0e2ef1edf01b 217 * libpng versions 0.5, May 1995, through 0.88, January 1996, are
destinyXfate 2:0e2ef1edf01b 218 * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
destinyXfate 2:0e2ef1edf01b 219 *
destinyXfate 2:0e2ef1edf01b 220 * For the purposes of this copyright and license, "Contributing Authors"
destinyXfate 2:0e2ef1edf01b 221 * is defined as the following set of individuals:
destinyXfate 2:0e2ef1edf01b 222 *
destinyXfate 2:0e2ef1edf01b 223 * Andreas Dilger
destinyXfate 2:0e2ef1edf01b 224 * Dave Martindale
destinyXfate 2:0e2ef1edf01b 225 * Guy Eric Schalnat
destinyXfate 2:0e2ef1edf01b 226 * Paul Schmidt
destinyXfate 2:0e2ef1edf01b 227 * Tim Wegner
destinyXfate 2:0e2ef1edf01b 228 *
destinyXfate 2:0e2ef1edf01b 229 * The PNG Reference Library is supplied "AS IS". The Contributing Authors
destinyXfate 2:0e2ef1edf01b 230 * and Group 42, Inc. disclaim all warranties, expressed or implied,
destinyXfate 2:0e2ef1edf01b 231 * including, without limitation, the warranties of merchantability and of
destinyXfate 2:0e2ef1edf01b 232 * fitness for any purpose. The Contributing Authors and Group 42, Inc.
destinyXfate 2:0e2ef1edf01b 233 * assume no liability for direct, indirect, incidental, special, exemplary,
destinyXfate 2:0e2ef1edf01b 234 * or consequential damages, which may result from the use of the PNG
destinyXfate 2:0e2ef1edf01b 235 * Reference Library, even if advised of the possibility of such damage.
destinyXfate 2:0e2ef1edf01b 236 *
destinyXfate 2:0e2ef1edf01b 237 * Permission is hereby granted to use, copy, modify, and distribute this
destinyXfate 2:0e2ef1edf01b 238 * source code, or portions hereof, for any purpose, without fee, subject
destinyXfate 2:0e2ef1edf01b 239 * to the following restrictions:
destinyXfate 2:0e2ef1edf01b 240 *
destinyXfate 2:0e2ef1edf01b 241 * 1. The origin of this source code must not be misrepresented.
destinyXfate 2:0e2ef1edf01b 242 *
destinyXfate 2:0e2ef1edf01b 243 * 2. Altered versions must be plainly marked as such and
destinyXfate 2:0e2ef1edf01b 244 * must not be misrepresented as being the original source.
destinyXfate 2:0e2ef1edf01b 245 *
destinyXfate 2:0e2ef1edf01b 246 * 3. This Copyright notice may not be removed or altered from
destinyXfate 2:0e2ef1edf01b 247 * any source or altered source distribution.
destinyXfate 2:0e2ef1edf01b 248 *
destinyXfate 2:0e2ef1edf01b 249 * The Contributing Authors and Group 42, Inc. specifically permit, without
destinyXfate 2:0e2ef1edf01b 250 * fee, and encourage the use of this source code as a component to
destinyXfate 2:0e2ef1edf01b 251 * supporting the PNG file format in commercial products. If you use this
destinyXfate 2:0e2ef1edf01b 252 * source code in a product, acknowledgment is not required but would be
destinyXfate 2:0e2ef1edf01b 253 * appreciated.
destinyXfate 2:0e2ef1edf01b 254 */
destinyXfate 2:0e2ef1edf01b 255
destinyXfate 2:0e2ef1edf01b 256 /*
destinyXfate 2:0e2ef1edf01b 257 * A "png_get_copyright" function is available, for convenient use in "about"
destinyXfate 2:0e2ef1edf01b 258 * boxes and the like:
destinyXfate 2:0e2ef1edf01b 259 *
destinyXfate 2:0e2ef1edf01b 260 * printf("%s",png_get_copyright(NULL));
destinyXfate 2:0e2ef1edf01b 261 *
destinyXfate 2:0e2ef1edf01b 262 * Also, the PNG logo (in PNG format, of course) is supplied in the
destinyXfate 2:0e2ef1edf01b 263 * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
destinyXfate 2:0e2ef1edf01b 264 */
destinyXfate 2:0e2ef1edf01b 265
destinyXfate 2:0e2ef1edf01b 266 /*
destinyXfate 2:0e2ef1edf01b 267 * Libpng is OSI Certified Open Source Software. OSI Certified is a
destinyXfate 2:0e2ef1edf01b 268 * certification mark of the Open Source Initiative.
destinyXfate 2:0e2ef1edf01b 269 */
destinyXfate 2:0e2ef1edf01b 270
destinyXfate 2:0e2ef1edf01b 271 /*
destinyXfate 2:0e2ef1edf01b 272 * The contributing authors would like to thank all those who helped
destinyXfate 2:0e2ef1edf01b 273 * with testing, bug fixes, and patience. This wouldn't have been
destinyXfate 2:0e2ef1edf01b 274 * possible without all of you.
destinyXfate 2:0e2ef1edf01b 275 *
destinyXfate 2:0e2ef1edf01b 276 * Thanks to Frank J. T. Wojcik for helping with the documentation.
destinyXfate 2:0e2ef1edf01b 277 */
destinyXfate 2:0e2ef1edf01b 278
destinyXfate 2:0e2ef1edf01b 279 /*
destinyXfate 2:0e2ef1edf01b 280 * Y2K compliance in libpng:
destinyXfate 2:0e2ef1edf01b 281 * =========================
destinyXfate 2:0e2ef1edf01b 282 *
destinyXfate 2:0e2ef1edf01b 283 * January 5, 2007
destinyXfate 2:0e2ef1edf01b 284 *
destinyXfate 2:0e2ef1edf01b 285 * Since the PNG Development group is an ad-hoc body, we can't make
destinyXfate 2:0e2ef1edf01b 286 * an official declaration.
destinyXfate 2:0e2ef1edf01b 287 *
destinyXfate 2:0e2ef1edf01b 288 * This is your unofficial assurance that libpng from version 0.71 and
destinyXfate 2:0e2ef1edf01b 289 * upward through 1.2.15 are Y2K compliant. It is my belief that earlier
destinyXfate 2:0e2ef1edf01b 290 * versions were also Y2K compliant.
destinyXfate 2:0e2ef1edf01b 291 *
destinyXfate 2:0e2ef1edf01b 292 * Libpng only has three year fields. One is a 2-byte unsigned integer
destinyXfate 2:0e2ef1edf01b 293 * that will hold years up to 65535. The other two hold the date in text
destinyXfate 2:0e2ef1edf01b 294 * format, and will hold years up to 9999.
destinyXfate 2:0e2ef1edf01b 295 *
destinyXfate 2:0e2ef1edf01b 296 * The integer is
destinyXfate 2:0e2ef1edf01b 297 * "png_uint_16 year" in png_time_struct.
destinyXfate 2:0e2ef1edf01b 298 *
destinyXfate 2:0e2ef1edf01b 299 * The strings are
destinyXfate 2:0e2ef1edf01b 300 * "png_charp time_buffer" in png_struct and
destinyXfate 2:0e2ef1edf01b 301 * "near_time_buffer", which is a local character string in png.c.
destinyXfate 2:0e2ef1edf01b 302 *
destinyXfate 2:0e2ef1edf01b 303 * There are seven time-related functions:
destinyXfate 2:0e2ef1edf01b 304 * png.c: png_convert_to_rfc_1123() in png.c
destinyXfate 2:0e2ef1edf01b 305 * (formerly png_convert_to_rfc_1152() in error)
destinyXfate 2:0e2ef1edf01b 306 * png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c
destinyXfate 2:0e2ef1edf01b 307 * png_convert_from_time_t() in pngwrite.c
destinyXfate 2:0e2ef1edf01b 308 * png_get_tIME() in pngget.c
destinyXfate 2:0e2ef1edf01b 309 * png_handle_tIME() in pngrutil.c, called in pngread.c
destinyXfate 2:0e2ef1edf01b 310 * png_set_tIME() in pngset.c
destinyXfate 2:0e2ef1edf01b 311 * png_write_tIME() in pngwutil.c, called in pngwrite.c
destinyXfate 2:0e2ef1edf01b 312 *
destinyXfate 2:0e2ef1edf01b 313 * All handle dates properly in a Y2K environment. The
destinyXfate 2:0e2ef1edf01b 314 * png_convert_from_time_t() function calls gmtime() to convert from system
destinyXfate 2:0e2ef1edf01b 315 * clock time, which returns (year - 1900), which we properly convert to
destinyXfate 2:0e2ef1edf01b 316 * the full 4-digit year. There is a possibility that applications using
destinyXfate 2:0e2ef1edf01b 317 * libpng are not passing 4-digit years into the png_convert_to_rfc_1123()
destinyXfate 2:0e2ef1edf01b 318 * function, or that they are incorrectly passing only a 2-digit year
destinyXfate 2:0e2ef1edf01b 319 * instead of "year - 1900" into the png_convert_from_struct_tm() function,
destinyXfate 2:0e2ef1edf01b 320 * but this is not under our control. The libpng documentation has always
destinyXfate 2:0e2ef1edf01b 321 * stated that it works with 4-digit years, and the APIs have been
destinyXfate 2:0e2ef1edf01b 322 * documented as such.
destinyXfate 2:0e2ef1edf01b 323 *
destinyXfate 2:0e2ef1edf01b 324 * The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned
destinyXfate 2:0e2ef1edf01b 325 * integer to hold the year, and can hold years as large as 65535.
destinyXfate 2:0e2ef1edf01b 326 *
destinyXfate 2:0e2ef1edf01b 327 * zlib, upon which libpng depends, is also Y2K compliant. It contains
destinyXfate 2:0e2ef1edf01b 328 * no date-related code.
destinyXfate 2:0e2ef1edf01b 329 *
destinyXfate 2:0e2ef1edf01b 330 * Glenn Randers-Pehrson
destinyXfate 2:0e2ef1edf01b 331 * libpng maintainer
destinyXfate 2:0e2ef1edf01b 332 * PNG Development Group
destinyXfate 2:0e2ef1edf01b 333 */
destinyXfate 2:0e2ef1edf01b 334
destinyXfate 2:0e2ef1edf01b 335 #ifndef PNG_H
destinyXfate 2:0e2ef1edf01b 336 #define PNG_H
destinyXfate 2:0e2ef1edf01b 337
destinyXfate 2:0e2ef1edf01b 338 /* This is not the place to learn how to use libpng. The file libpng.txt
destinyXfate 2:0e2ef1edf01b 339 * describes how to use libpng, and the file example.c summarizes it
destinyXfate 2:0e2ef1edf01b 340 * with some code on which to build. This file is useful for looking
destinyXfate 2:0e2ef1edf01b 341 * at the actual function definitions and structure components.
destinyXfate 2:0e2ef1edf01b 342 */
destinyXfate 2:0e2ef1edf01b 343
destinyXfate 2:0e2ef1edf01b 344 /* Version information for png.h - this should match the version in png.c */
destinyXfate 2:0e2ef1edf01b 345 #define PNG_LIBPNG_VER_STRING "1.2.15"
destinyXfate 2:0e2ef1edf01b 346 #define PNG_HEADER_VERSION_STRING \
destinyXfate 2:0e2ef1edf01b 347 " libpng version 1.2.15 - January 5, 2007 (header)\n"
destinyXfate 2:0e2ef1edf01b 348
destinyXfate 2:0e2ef1edf01b 349 #define PNG_LIBPNG_VER_SONUM 0
destinyXfate 2:0e2ef1edf01b 350 #define PNG_LIBPNG_VER_DLLNUM 13
destinyXfate 2:0e2ef1edf01b 351
destinyXfate 2:0e2ef1edf01b 352 /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
destinyXfate 2:0e2ef1edf01b 353 #define PNG_LIBPNG_VER_MAJOR 1
destinyXfate 2:0e2ef1edf01b 354 #define PNG_LIBPNG_VER_MINOR 2
destinyXfate 2:0e2ef1edf01b 355 #define PNG_LIBPNG_VER_RELEASE 15
destinyXfate 2:0e2ef1edf01b 356 /* This should match the numeric part of the final component of
destinyXfate 2:0e2ef1edf01b 357 * PNG_LIBPNG_VER_STRING, omitting any leading zero: */
destinyXfate 2:0e2ef1edf01b 358
destinyXfate 2:0e2ef1edf01b 359 #define PNG_LIBPNG_VER_BUILD 0
destinyXfate 2:0e2ef1edf01b 360
destinyXfate 2:0e2ef1edf01b 361 /* Release Status */
destinyXfate 2:0e2ef1edf01b 362 #define PNG_LIBPNG_BUILD_ALPHA 1
destinyXfate 2:0e2ef1edf01b 363 #define PNG_LIBPNG_BUILD_BETA 2
destinyXfate 2:0e2ef1edf01b 364 #define PNG_LIBPNG_BUILD_RC 3
destinyXfate 2:0e2ef1edf01b 365 #define PNG_LIBPNG_BUILD_STABLE 4
destinyXfate 2:0e2ef1edf01b 366 #define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7
destinyXfate 2:0e2ef1edf01b 367
destinyXfate 2:0e2ef1edf01b 368 /* Release-Specific Flags */
destinyXfate 2:0e2ef1edf01b 369 #define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with
destinyXfate 2:0e2ef1edf01b 370 PNG_LIBPNG_BUILD_STABLE only */
destinyXfate 2:0e2ef1edf01b 371 #define PNG_LIBPNG_BUILD_PRIVATE 16 /* Cannot be OR'ed with
destinyXfate 2:0e2ef1edf01b 372 PNG_LIBPNG_BUILD_SPECIAL */
destinyXfate 2:0e2ef1edf01b 373 #define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
destinyXfate 2:0e2ef1edf01b 374 PNG_LIBPNG_BUILD_PRIVATE */
destinyXfate 2:0e2ef1edf01b 375
destinyXfate 2:0e2ef1edf01b 376 #define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE
destinyXfate 2:0e2ef1edf01b 377
destinyXfate 2:0e2ef1edf01b 378 /* Careful here. At one time, Guy wanted to use 082, but that would be octal.
destinyXfate 2:0e2ef1edf01b 379 * We must not include leading zeros.
destinyXfate 2:0e2ef1edf01b 380 * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
destinyXfate 2:0e2ef1edf01b 381 * version 1.0.0 was mis-numbered 100 instead of 10000). From
destinyXfate 2:0e2ef1edf01b 382 * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */
destinyXfate 2:0e2ef1edf01b 383 #define PNG_LIBPNG_VER 10215 /* 1.2.15 */
destinyXfate 2:0e2ef1edf01b 384
destinyXfate 2:0e2ef1edf01b 385 #ifndef PNG_VERSION_INFO_ONLY
destinyXfate 2:0e2ef1edf01b 386 /* include the compression library's header */
destinyXfate 2:0e2ef1edf01b 387 #include "zlib.h"
destinyXfate 2:0e2ef1edf01b 388 #endif
destinyXfate 2:0e2ef1edf01b 389
destinyXfate 2:0e2ef1edf01b 390 /* include all user configurable info, including optional assembler routines */
destinyXfate 2:0e2ef1edf01b 391 #include "pngconf.h"
destinyXfate 2:0e2ef1edf01b 392
destinyXfate 2:0e2ef1edf01b 393 /*
destinyXfate 2:0e2ef1edf01b 394 * Added at libpng-1.2.8 */
destinyXfate 2:0e2ef1edf01b 395 /* Ref MSDN: Private as priority over Special
destinyXfate 2:0e2ef1edf01b 396 * VS_FF_PRIVATEBUILD File *was not* built using standard release
destinyXfate 2:0e2ef1edf01b 397 * procedures. If this value is given, the StringFileInfo block must
destinyXfate 2:0e2ef1edf01b 398 * contain a PrivateBuild string.
destinyXfate 2:0e2ef1edf01b 399 *
destinyXfate 2:0e2ef1edf01b 400 * VS_FF_SPECIALBUILD File *was* built by the original company using
destinyXfate 2:0e2ef1edf01b 401 * standard release procedures but is a variation of the standard
destinyXfate 2:0e2ef1edf01b 402 * file of the same version number. If this value is given, the
destinyXfate 2:0e2ef1edf01b 403 * StringFileInfo block must contain a SpecialBuild string.
destinyXfate 2:0e2ef1edf01b 404 */
destinyXfate 2:0e2ef1edf01b 405
destinyXfate 2:0e2ef1edf01b 406 #if defined(PNG_USER_PRIVATEBUILD)
destinyXfate 2:0e2ef1edf01b 407 # define PNG_LIBPNG_BUILD_TYPE \
destinyXfate 2:0e2ef1edf01b 408 (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE)
destinyXfate 2:0e2ef1edf01b 409 #else
destinyXfate 2:0e2ef1edf01b 410 # if defined(PNG_LIBPNG_SPECIALBUILD)
destinyXfate 2:0e2ef1edf01b 411 # define PNG_LIBPNG_BUILD_TYPE \
destinyXfate 2:0e2ef1edf01b 412 (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL)
destinyXfate 2:0e2ef1edf01b 413 # else
destinyXfate 2:0e2ef1edf01b 414 # define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE)
destinyXfate 2:0e2ef1edf01b 415 # endif
destinyXfate 2:0e2ef1edf01b 416 #endif
destinyXfate 2:0e2ef1edf01b 417
destinyXfate 2:0e2ef1edf01b 418 #ifndef PNG_VERSION_INFO_ONLY
destinyXfate 2:0e2ef1edf01b 419
destinyXfate 2:0e2ef1edf01b 420 /* Inhibit C++ name-mangling for libpng functions but not for system calls. */
destinyXfate 2:0e2ef1edf01b 421 #ifdef __cplusplus
destinyXfate 2:0e2ef1edf01b 422 extern "C" {
destinyXfate 2:0e2ef1edf01b 423 #endif /* __cplusplus */
destinyXfate 2:0e2ef1edf01b 424
destinyXfate 2:0e2ef1edf01b 425 /* This file is arranged in several sections. The first section contains
destinyXfate 2:0e2ef1edf01b 426 * structure and type definitions. The second section contains the external
destinyXfate 2:0e2ef1edf01b 427 * library functions, while the third has the internal library functions,
destinyXfate 2:0e2ef1edf01b 428 * which applications aren't expected to use directly.
destinyXfate 2:0e2ef1edf01b 429 */
destinyXfate 2:0e2ef1edf01b 430
destinyXfate 2:0e2ef1edf01b 431 #ifndef PNG_NO_TYPECAST_NULL
destinyXfate 2:0e2ef1edf01b 432 #define int_p_NULL (int *)NULL
destinyXfate 2:0e2ef1edf01b 433 #define png_bytep_NULL (png_bytep)NULL
destinyXfate 2:0e2ef1edf01b 434 #define png_bytepp_NULL (png_bytepp)NULL
destinyXfate 2:0e2ef1edf01b 435 #define png_doublep_NULL (png_doublep)NULL
destinyXfate 2:0e2ef1edf01b 436 #define png_error_ptr_NULL (png_error_ptr)NULL
destinyXfate 2:0e2ef1edf01b 437 #define png_flush_ptr_NULL (png_flush_ptr)NULL
destinyXfate 2:0e2ef1edf01b 438 #define png_free_ptr_NULL (png_free_ptr)NULL
destinyXfate 2:0e2ef1edf01b 439 #define png_infopp_NULL (png_infopp)NULL
destinyXfate 2:0e2ef1edf01b 440 #define png_malloc_ptr_NULL (png_malloc_ptr)NULL
destinyXfate 2:0e2ef1edf01b 441 #define png_read_status_ptr_NULL (png_read_status_ptr)NULL
destinyXfate 2:0e2ef1edf01b 442 #define png_rw_ptr_NULL (png_rw_ptr)NULL
destinyXfate 2:0e2ef1edf01b 443 #define png_structp_NULL (png_structp)NULL
destinyXfate 2:0e2ef1edf01b 444 #define png_uint_16p_NULL (png_uint_16p)NULL
destinyXfate 2:0e2ef1edf01b 445 #define png_voidp_NULL (png_voidp)NULL
destinyXfate 2:0e2ef1edf01b 446 #define png_write_status_ptr_NULL (png_write_status_ptr)NULL
destinyXfate 2:0e2ef1edf01b 447 #else
destinyXfate 2:0e2ef1edf01b 448 #define int_p_NULL NULL
destinyXfate 2:0e2ef1edf01b 449 #define png_bytep_NULL NULL
destinyXfate 2:0e2ef1edf01b 450 #define png_bytepp_NULL NULL
destinyXfate 2:0e2ef1edf01b 451 #define png_doublep_NULL NULL
destinyXfate 2:0e2ef1edf01b 452 #define png_error_ptr_NULL NULL
destinyXfate 2:0e2ef1edf01b 453 #define png_flush_ptr_NULL NULL
destinyXfate 2:0e2ef1edf01b 454 #define png_free_ptr_NULL NULL
destinyXfate 2:0e2ef1edf01b 455 #define png_infopp_NULL NULL
destinyXfate 2:0e2ef1edf01b 456 #define png_malloc_ptr_NULL NULL
destinyXfate 2:0e2ef1edf01b 457 #define png_read_status_ptr_NULL NULL
destinyXfate 2:0e2ef1edf01b 458 #define png_rw_ptr_NULL NULL
destinyXfate 2:0e2ef1edf01b 459 #define png_structp_NULL NULL
destinyXfate 2:0e2ef1edf01b 460 #define png_uint_16p_NULL NULL
destinyXfate 2:0e2ef1edf01b 461 #define png_voidp_NULL NULL
destinyXfate 2:0e2ef1edf01b 462 #define png_write_status_ptr_NULL NULL
destinyXfate 2:0e2ef1edf01b 463 #endif
destinyXfate 2:0e2ef1edf01b 464
destinyXfate 2:0e2ef1edf01b 465 /* variables declared in png.c - only it needs to define PNG_NO_EXTERN */
destinyXfate 2:0e2ef1edf01b 466 #if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
destinyXfate 2:0e2ef1edf01b 467 /* Version information for C files, stored in png.c. This had better match
destinyXfate 2:0e2ef1edf01b 468 * the version above.
destinyXfate 2:0e2ef1edf01b 469 */
destinyXfate 2:0e2ef1edf01b 470 #ifdef PNG_USE_GLOBAL_ARRAYS
destinyXfate 2:0e2ef1edf01b 471 PNG_EXPORT_VAR (const char) png_libpng_ver[18];
destinyXfate 2:0e2ef1edf01b 472 /* need room for 99.99.99beta99z */
destinyXfate 2:0e2ef1edf01b 473 #else
destinyXfate 2:0e2ef1edf01b 474 #define png_libpng_ver png_get_header_ver(NULL)
destinyXfate 2:0e2ef1edf01b 475 #endif
destinyXfate 2:0e2ef1edf01b 476
destinyXfate 2:0e2ef1edf01b 477 #ifdef PNG_USE_GLOBAL_ARRAYS
destinyXfate 2:0e2ef1edf01b 478 /* This was removed in version 1.0.5c */
destinyXfate 2:0e2ef1edf01b 479 /* Structures to facilitate easy interlacing. See png.c for more details */
destinyXfate 2:0e2ef1edf01b 480 PNG_EXPORT_VAR (const int FARDATA) png_pass_start[7];
destinyXfate 2:0e2ef1edf01b 481 PNG_EXPORT_VAR (const int FARDATA) png_pass_inc[7];
destinyXfate 2:0e2ef1edf01b 482 PNG_EXPORT_VAR (const int FARDATA) png_pass_ystart[7];
destinyXfate 2:0e2ef1edf01b 483 PNG_EXPORT_VAR (const int FARDATA) png_pass_yinc[7];
destinyXfate 2:0e2ef1edf01b 484 PNG_EXPORT_VAR (const int FARDATA) png_pass_mask[7];
destinyXfate 2:0e2ef1edf01b 485 PNG_EXPORT_VAR (const int FARDATA) png_pass_dsp_mask[7];
destinyXfate 2:0e2ef1edf01b 486 #ifdef PNG_USE_PNGGCCRD
destinyXfate 2:0e2ef1edf01b 487 PNG_EXPORT_VAR (const int FARDATA) png_pass_width[7];
destinyXfate 2:0e2ef1edf01b 488 #endif
destinyXfate 2:0e2ef1edf01b 489 /* This isn't currently used. If you need it, see png.c for more details.
destinyXfate 2:0e2ef1edf01b 490 PNG_EXPORT_VAR (const int FARDATA) png_pass_height[7];
destinyXfate 2:0e2ef1edf01b 491 */
destinyXfate 2:0e2ef1edf01b 492 #endif
destinyXfate 2:0e2ef1edf01b 493
destinyXfate 2:0e2ef1edf01b 494 #endif /* PNG_NO_EXTERN */
destinyXfate 2:0e2ef1edf01b 495
destinyXfate 2:0e2ef1edf01b 496 /* Three color definitions. The order of the red, green, and blue, (and the
destinyXfate 2:0e2ef1edf01b 497 * exact size) is not important, although the size of the fields need to
destinyXfate 2:0e2ef1edf01b 498 * be png_byte or png_uint_16 (as defined below).
destinyXfate 2:0e2ef1edf01b 499 */
destinyXfate 2:0e2ef1edf01b 500 typedef struct png_color_struct
destinyXfate 2:0e2ef1edf01b 501 {
destinyXfate 2:0e2ef1edf01b 502 png_byte red;
destinyXfate 2:0e2ef1edf01b 503 png_byte green;
destinyXfate 2:0e2ef1edf01b 504 png_byte blue;
destinyXfate 2:0e2ef1edf01b 505 } png_color;
destinyXfate 2:0e2ef1edf01b 506 typedef png_color FAR * png_colorp;
destinyXfate 2:0e2ef1edf01b 507 typedef png_color FAR * FAR * png_colorpp;
destinyXfate 2:0e2ef1edf01b 508
destinyXfate 2:0e2ef1edf01b 509 typedef struct png_color_16_struct
destinyXfate 2:0e2ef1edf01b 510 {
destinyXfate 2:0e2ef1edf01b 511 png_byte index; /* used for palette files */
destinyXfate 2:0e2ef1edf01b 512 png_uint_16 red; /* for use in red green blue files */
destinyXfate 2:0e2ef1edf01b 513 png_uint_16 green;
destinyXfate 2:0e2ef1edf01b 514 png_uint_16 blue;
destinyXfate 2:0e2ef1edf01b 515 png_uint_16 gray; /* for use in grayscale files */
destinyXfate 2:0e2ef1edf01b 516 } png_color_16;
destinyXfate 2:0e2ef1edf01b 517 typedef png_color_16 FAR * png_color_16p;
destinyXfate 2:0e2ef1edf01b 518 typedef png_color_16 FAR * FAR * png_color_16pp;
destinyXfate 2:0e2ef1edf01b 519
destinyXfate 2:0e2ef1edf01b 520 typedef struct png_color_8_struct
destinyXfate 2:0e2ef1edf01b 521 {
destinyXfate 2:0e2ef1edf01b 522 png_byte red; /* for use in red green blue files */
destinyXfate 2:0e2ef1edf01b 523 png_byte green;
destinyXfate 2:0e2ef1edf01b 524 png_byte blue;
destinyXfate 2:0e2ef1edf01b 525 png_byte gray; /* for use in grayscale files */
destinyXfate 2:0e2ef1edf01b 526 png_byte alpha; /* for alpha channel files */
destinyXfate 2:0e2ef1edf01b 527 } png_color_8;
destinyXfate 2:0e2ef1edf01b 528 typedef png_color_8 FAR * png_color_8p;
destinyXfate 2:0e2ef1edf01b 529 typedef png_color_8 FAR * FAR * png_color_8pp;
destinyXfate 2:0e2ef1edf01b 530
destinyXfate 2:0e2ef1edf01b 531 /*
destinyXfate 2:0e2ef1edf01b 532 * The following two structures are used for the in-core representation
destinyXfate 2:0e2ef1edf01b 533 * of sPLT chunks.
destinyXfate 2:0e2ef1edf01b 534 */
destinyXfate 2:0e2ef1edf01b 535 typedef struct png_sPLT_entry_struct
destinyXfate 2:0e2ef1edf01b 536 {
destinyXfate 2:0e2ef1edf01b 537 png_uint_16 red;
destinyXfate 2:0e2ef1edf01b 538 png_uint_16 green;
destinyXfate 2:0e2ef1edf01b 539 png_uint_16 blue;
destinyXfate 2:0e2ef1edf01b 540 png_uint_16 alpha;
destinyXfate 2:0e2ef1edf01b 541 png_uint_16 frequency;
destinyXfate 2:0e2ef1edf01b 542 } png_sPLT_entry;
destinyXfate 2:0e2ef1edf01b 543 typedef png_sPLT_entry FAR * png_sPLT_entryp;
destinyXfate 2:0e2ef1edf01b 544 typedef png_sPLT_entry FAR * FAR * png_sPLT_entrypp;
destinyXfate 2:0e2ef1edf01b 545
destinyXfate 2:0e2ef1edf01b 546 /* When the depth of the sPLT palette is 8 bits, the color and alpha samples
destinyXfate 2:0e2ef1edf01b 547 * occupy the LSB of their respective members, and the MSB of each member
destinyXfate 2:0e2ef1edf01b 548 * is zero-filled. The frequency member always occupies the full 16 bits.
destinyXfate 2:0e2ef1edf01b 549 */
destinyXfate 2:0e2ef1edf01b 550
destinyXfate 2:0e2ef1edf01b 551 typedef struct png_sPLT_struct
destinyXfate 2:0e2ef1edf01b 552 {
destinyXfate 2:0e2ef1edf01b 553 png_charp name; /* palette name */
destinyXfate 2:0e2ef1edf01b 554 png_byte depth; /* depth of palette samples */
destinyXfate 2:0e2ef1edf01b 555 png_sPLT_entryp entries; /* palette entries */
destinyXfate 2:0e2ef1edf01b 556 png_int_32 nentries; /* number of palette entries */
destinyXfate 2:0e2ef1edf01b 557 } png_sPLT_t;
destinyXfate 2:0e2ef1edf01b 558 typedef png_sPLT_t FAR * png_sPLT_tp;
destinyXfate 2:0e2ef1edf01b 559 typedef png_sPLT_t FAR * FAR * png_sPLT_tpp;
destinyXfate 2:0e2ef1edf01b 560
destinyXfate 2:0e2ef1edf01b 561 #ifdef PNG_TEXT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 562 /* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file,
destinyXfate 2:0e2ef1edf01b 563 * and whether that contents is compressed or not. The "key" field
destinyXfate 2:0e2ef1edf01b 564 * points to a regular zero-terminated C string. The "text", "lang", and
destinyXfate 2:0e2ef1edf01b 565 * "lang_key" fields can be regular C strings, empty strings, or NULL pointers.
destinyXfate 2:0e2ef1edf01b 566 * However, the * structure returned by png_get_text() will always contain
destinyXfate 2:0e2ef1edf01b 567 * regular zero-terminated C strings (possibly empty), never NULL pointers,
destinyXfate 2:0e2ef1edf01b 568 * so they can be safely used in printf() and other string-handling functions.
destinyXfate 2:0e2ef1edf01b 569 */
destinyXfate 2:0e2ef1edf01b 570 typedef struct png_text_struct
destinyXfate 2:0e2ef1edf01b 571 {
destinyXfate 2:0e2ef1edf01b 572 int compression; /* compression value:
destinyXfate 2:0e2ef1edf01b 573 -1: tEXt, none
destinyXfate 2:0e2ef1edf01b 574 0: zTXt, deflate
destinyXfate 2:0e2ef1edf01b 575 1: iTXt, none
destinyXfate 2:0e2ef1edf01b 576 2: iTXt, deflate */
destinyXfate 2:0e2ef1edf01b 577 png_charp key; /* keyword, 1-79 character description of "text" */
destinyXfate 2:0e2ef1edf01b 578 png_charp text; /* comment, may be an empty string (ie "")
destinyXfate 2:0e2ef1edf01b 579 or a NULL pointer */
destinyXfate 2:0e2ef1edf01b 580 png_size_t text_length; /* length of the text string */
destinyXfate 2:0e2ef1edf01b 581 #ifdef PNG_iTXt_SUPPORTED
destinyXfate 2:0e2ef1edf01b 582 png_size_t itxt_length; /* length of the itxt string */
destinyXfate 2:0e2ef1edf01b 583 png_charp lang; /* language code, 0-79 characters
destinyXfate 2:0e2ef1edf01b 584 or a NULL pointer */
destinyXfate 2:0e2ef1edf01b 585 png_charp lang_key; /* keyword translated UTF-8 string, 0 or more
destinyXfate 2:0e2ef1edf01b 586 chars or a NULL pointer */
destinyXfate 2:0e2ef1edf01b 587 #endif
destinyXfate 2:0e2ef1edf01b 588 } png_text;
destinyXfate 2:0e2ef1edf01b 589 typedef png_text FAR * png_textp;
destinyXfate 2:0e2ef1edf01b 590 typedef png_text FAR * FAR * png_textpp;
destinyXfate 2:0e2ef1edf01b 591 #endif
destinyXfate 2:0e2ef1edf01b 592
destinyXfate 2:0e2ef1edf01b 593 /* Supported compression types for text in PNG files (tEXt, and zTXt).
destinyXfate 2:0e2ef1edf01b 594 * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. */
destinyXfate 2:0e2ef1edf01b 595 #define PNG_TEXT_COMPRESSION_NONE_WR -3
destinyXfate 2:0e2ef1edf01b 596 #define PNG_TEXT_COMPRESSION_zTXt_WR -2
destinyXfate 2:0e2ef1edf01b 597 #define PNG_TEXT_COMPRESSION_NONE -1
destinyXfate 2:0e2ef1edf01b 598 #define PNG_TEXT_COMPRESSION_zTXt 0
destinyXfate 2:0e2ef1edf01b 599 #define PNG_ITXT_COMPRESSION_NONE 1
destinyXfate 2:0e2ef1edf01b 600 #define PNG_ITXT_COMPRESSION_zTXt 2
destinyXfate 2:0e2ef1edf01b 601 #define PNG_TEXT_COMPRESSION_LAST 3 /* Not a valid value */
destinyXfate 2:0e2ef1edf01b 602
destinyXfate 2:0e2ef1edf01b 603 /* png_time is a way to hold the time in an machine independent way.
destinyXfate 2:0e2ef1edf01b 604 * Two conversions are provided, both from time_t and struct tm. There
destinyXfate 2:0e2ef1edf01b 605 * is no portable way to convert to either of these structures, as far
destinyXfate 2:0e2ef1edf01b 606 * as I know. If you know of a portable way, send it to me. As a side
destinyXfate 2:0e2ef1edf01b 607 * note - PNG has always been Year 2000 compliant!
destinyXfate 2:0e2ef1edf01b 608 */
destinyXfate 2:0e2ef1edf01b 609 typedef struct png_time_struct
destinyXfate 2:0e2ef1edf01b 610 {
destinyXfate 2:0e2ef1edf01b 611 png_uint_16 year; /* full year, as in, 1995 */
destinyXfate 2:0e2ef1edf01b 612 png_byte month; /* month of year, 1 - 12 */
destinyXfate 2:0e2ef1edf01b 613 png_byte day; /* day of month, 1 - 31 */
destinyXfate 2:0e2ef1edf01b 614 png_byte hour; /* hour of day, 0 - 23 */
destinyXfate 2:0e2ef1edf01b 615 png_byte minute; /* minute of hour, 0 - 59 */
destinyXfate 2:0e2ef1edf01b 616 png_byte second; /* second of minute, 0 - 60 (for leap seconds) */
destinyXfate 2:0e2ef1edf01b 617 } png_time;
destinyXfate 2:0e2ef1edf01b 618 typedef png_time FAR * png_timep;
destinyXfate 2:0e2ef1edf01b 619 typedef png_time FAR * FAR * png_timepp;
destinyXfate 2:0e2ef1edf01b 620
destinyXfate 2:0e2ef1edf01b 621 #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 622 /* png_unknown_chunk is a structure to hold queued chunks for which there is
destinyXfate 2:0e2ef1edf01b 623 * no specific support. The idea is that we can use this to queue
destinyXfate 2:0e2ef1edf01b 624 * up private chunks for output even though the library doesn't actually
destinyXfate 2:0e2ef1edf01b 625 * know about their semantics.
destinyXfate 2:0e2ef1edf01b 626 */
destinyXfate 2:0e2ef1edf01b 627 typedef struct png_unknown_chunk_t
destinyXfate 2:0e2ef1edf01b 628 {
destinyXfate 2:0e2ef1edf01b 629 png_byte name[5];
destinyXfate 2:0e2ef1edf01b 630 png_byte *data;
destinyXfate 2:0e2ef1edf01b 631 png_size_t size;
destinyXfate 2:0e2ef1edf01b 632
destinyXfate 2:0e2ef1edf01b 633 /* libpng-using applications should NOT directly modify this byte. */
destinyXfate 2:0e2ef1edf01b 634 png_byte location; /* mode of operation at read time */
destinyXfate 2:0e2ef1edf01b 635 }
destinyXfate 2:0e2ef1edf01b 636 png_unknown_chunk;
destinyXfate 2:0e2ef1edf01b 637 typedef png_unknown_chunk FAR * png_unknown_chunkp;
destinyXfate 2:0e2ef1edf01b 638 typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp;
destinyXfate 2:0e2ef1edf01b 639 #endif
destinyXfate 2:0e2ef1edf01b 640
destinyXfate 2:0e2ef1edf01b 641 /* png_info is a structure that holds the information in a PNG file so
destinyXfate 2:0e2ef1edf01b 642 * that the application can find out the characteristics of the image.
destinyXfate 2:0e2ef1edf01b 643 * If you are reading the file, this structure will tell you what is
destinyXfate 2:0e2ef1edf01b 644 * in the PNG file. If you are writing the file, fill in the information
destinyXfate 2:0e2ef1edf01b 645 * you want to put into the PNG file, then call png_write_info().
destinyXfate 2:0e2ef1edf01b 646 * The names chosen should be very close to the PNG specification, so
destinyXfate 2:0e2ef1edf01b 647 * consult that document for information about the meaning of each field.
destinyXfate 2:0e2ef1edf01b 648 *
destinyXfate 2:0e2ef1edf01b 649 * With libpng < 0.95, it was only possible to directly set and read the
destinyXfate 2:0e2ef1edf01b 650 * the values in the png_info_struct, which meant that the contents and
destinyXfate 2:0e2ef1edf01b 651 * order of the values had to remain fixed. With libpng 0.95 and later,
destinyXfate 2:0e2ef1edf01b 652 * however, there are now functions that abstract the contents of
destinyXfate 2:0e2ef1edf01b 653 * png_info_struct from the application, so this makes it easier to use
destinyXfate 2:0e2ef1edf01b 654 * libpng with dynamic libraries, and even makes it possible to use
destinyXfate 2:0e2ef1edf01b 655 * libraries that don't have all of the libpng ancillary chunk-handing
destinyXfate 2:0e2ef1edf01b 656 * functionality.
destinyXfate 2:0e2ef1edf01b 657 *
destinyXfate 2:0e2ef1edf01b 658 * In any case, the order of the parameters in png_info_struct should NOT
destinyXfate 2:0e2ef1edf01b 659 * be changed for as long as possible to keep compatibility with applications
destinyXfate 2:0e2ef1edf01b 660 * that use the old direct-access method with png_info_struct.
destinyXfate 2:0e2ef1edf01b 661 *
destinyXfate 2:0e2ef1edf01b 662 * The following members may have allocated storage attached that should be
destinyXfate 2:0e2ef1edf01b 663 * cleaned up before the structure is discarded: palette, trans, text,
destinyXfate 2:0e2ef1edf01b 664 * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile,
destinyXfate 2:0e2ef1edf01b 665 * splt_palettes, scal_unit, row_pointers, and unknowns. By default, these
destinyXfate 2:0e2ef1edf01b 666 * are automatically freed when the info structure is deallocated, if they were
destinyXfate 2:0e2ef1edf01b 667 * allocated internally by libpng. This behavior can be changed by means
destinyXfate 2:0e2ef1edf01b 668 * of the png_data_freer() function.
destinyXfate 2:0e2ef1edf01b 669 *
destinyXfate 2:0e2ef1edf01b 670 * More allocation details: all the chunk-reading functions that
destinyXfate 2:0e2ef1edf01b 671 * change these members go through the corresponding png_set_*
destinyXfate 2:0e2ef1edf01b 672 * functions. A function to clear these members is available: see
destinyXfate 2:0e2ef1edf01b 673 * png_free_data(). The png_set_* functions do not depend on being
destinyXfate 2:0e2ef1edf01b 674 * able to point info structure members to any of the storage they are
destinyXfate 2:0e2ef1edf01b 675 * passed (they make their own copies), EXCEPT that the png_set_text
destinyXfate 2:0e2ef1edf01b 676 * functions use the same storage passed to them in the text_ptr or
destinyXfate 2:0e2ef1edf01b 677 * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns
destinyXfate 2:0e2ef1edf01b 678 * functions do not make their own copies.
destinyXfate 2:0e2ef1edf01b 679 */
destinyXfate 2:0e2ef1edf01b 680 typedef struct png_info_struct
destinyXfate 2:0e2ef1edf01b 681 {
destinyXfate 2:0e2ef1edf01b 682 /* the following are necessary for every PNG file */
destinyXfate 2:0e2ef1edf01b 683 png_uint_32 width; /* width of image in pixels (from IHDR) */
destinyXfate 2:0e2ef1edf01b 684 png_uint_32 height; /* height of image in pixels (from IHDR) */
destinyXfate 2:0e2ef1edf01b 685 png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */
destinyXfate 2:0e2ef1edf01b 686 png_uint_32 rowbytes; /* bytes needed to hold an untransformed row */
destinyXfate 2:0e2ef1edf01b 687 png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */
destinyXfate 2:0e2ef1edf01b 688 png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */
destinyXfate 2:0e2ef1edf01b 689 png_uint_16 num_trans; /* number of transparent palette color (tRNS) */
destinyXfate 2:0e2ef1edf01b 690 png_byte bit_depth; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */
destinyXfate 2:0e2ef1edf01b 691 png_byte color_type; /* see PNG_COLOR_TYPE_ below (from IHDR) */
destinyXfate 2:0e2ef1edf01b 692 /* The following three should have been named *_method not *_type */
destinyXfate 2:0e2ef1edf01b 693 png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */
destinyXfate 2:0e2ef1edf01b 694 png_byte filter_type; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */
destinyXfate 2:0e2ef1edf01b 695 png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
destinyXfate 2:0e2ef1edf01b 696
destinyXfate 2:0e2ef1edf01b 697 /* The following is informational only on read, and not used on writes. */
destinyXfate 2:0e2ef1edf01b 698 png_byte channels; /* number of data channels per pixel (1, 2, 3, 4) */
destinyXfate 2:0e2ef1edf01b 699 png_byte pixel_depth; /* number of bits per pixel */
destinyXfate 2:0e2ef1edf01b 700 png_byte spare_byte; /* to align the data, and for future use */
destinyXfate 2:0e2ef1edf01b 701 png_byte signature[8]; /* magic bytes read by libpng from start of file */
destinyXfate 2:0e2ef1edf01b 702
destinyXfate 2:0e2ef1edf01b 703 /* The rest of the data is optional. If you are reading, check the
destinyXfate 2:0e2ef1edf01b 704 * valid field to see if the information in these are valid. If you
destinyXfate 2:0e2ef1edf01b 705 * are writing, set the valid field to those chunks you want written,
destinyXfate 2:0e2ef1edf01b 706 * and initialize the appropriate fields below.
destinyXfate 2:0e2ef1edf01b 707 */
destinyXfate 2:0e2ef1edf01b 708
destinyXfate 2:0e2ef1edf01b 709 #if defined(PNG_gAMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 710 /* The gAMA chunk describes the gamma characteristics of the system
destinyXfate 2:0e2ef1edf01b 711 * on which the image was created, normally in the range [1.0, 2.5].
destinyXfate 2:0e2ef1edf01b 712 * Data is valid if (valid & PNG_INFO_gAMA) is non-zero.
destinyXfate 2:0e2ef1edf01b 713 */
destinyXfate 2:0e2ef1edf01b 714 float gamma; /* gamma value of image, if (valid & PNG_INFO_gAMA) */
destinyXfate 2:0e2ef1edf01b 715 #endif
destinyXfate 2:0e2ef1edf01b 716
destinyXfate 2:0e2ef1edf01b 717 #if defined(PNG_sRGB_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 718 /* GR-P, 0.96a */
destinyXfate 2:0e2ef1edf01b 719 /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */
destinyXfate 2:0e2ef1edf01b 720 png_byte srgb_intent; /* sRGB rendering intent [0, 1, 2, or 3] */
destinyXfate 2:0e2ef1edf01b 721 #endif
destinyXfate 2:0e2ef1edf01b 722
destinyXfate 2:0e2ef1edf01b 723 #if defined(PNG_TEXT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 724 /* The tEXt, and zTXt chunks contain human-readable textual data in
destinyXfate 2:0e2ef1edf01b 725 * uncompressed, compressed, and optionally compressed forms, respectively.
destinyXfate 2:0e2ef1edf01b 726 * The data in "text" is an array of pointers to uncompressed,
destinyXfate 2:0e2ef1edf01b 727 * null-terminated C strings. Each chunk has a keyword that describes the
destinyXfate 2:0e2ef1edf01b 728 * textual data contained in that chunk. Keywords are not required to be
destinyXfate 2:0e2ef1edf01b 729 * unique, and the text string may be empty. Any number of text chunks may
destinyXfate 2:0e2ef1edf01b 730 * be in an image.
destinyXfate 2:0e2ef1edf01b 731 */
destinyXfate 2:0e2ef1edf01b 732 int num_text; /* number of comments read/to write */
destinyXfate 2:0e2ef1edf01b 733 int max_text; /* current size of text array */
destinyXfate 2:0e2ef1edf01b 734 png_textp text; /* array of comments read/to write */
destinyXfate 2:0e2ef1edf01b 735 #endif /* PNG_TEXT_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 736
destinyXfate 2:0e2ef1edf01b 737 #if defined(PNG_tIME_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 738 /* The tIME chunk holds the last time the displayed image data was
destinyXfate 2:0e2ef1edf01b 739 * modified. See the png_time struct for the contents of this struct.
destinyXfate 2:0e2ef1edf01b 740 */
destinyXfate 2:0e2ef1edf01b 741 png_time mod_time;
destinyXfate 2:0e2ef1edf01b 742 #endif
destinyXfate 2:0e2ef1edf01b 743
destinyXfate 2:0e2ef1edf01b 744 #if defined(PNG_sBIT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 745 /* The sBIT chunk specifies the number of significant high-order bits
destinyXfate 2:0e2ef1edf01b 746 * in the pixel data. Values are in the range [1, bit_depth], and are
destinyXfate 2:0e2ef1edf01b 747 * only specified for the channels in the pixel data. The contents of
destinyXfate 2:0e2ef1edf01b 748 * the low-order bits is not specified. Data is valid if
destinyXfate 2:0e2ef1edf01b 749 * (valid & PNG_INFO_sBIT) is non-zero.
destinyXfate 2:0e2ef1edf01b 750 */
destinyXfate 2:0e2ef1edf01b 751 png_color_8 sig_bit; /* significant bits in color channels */
destinyXfate 2:0e2ef1edf01b 752 #endif
destinyXfate 2:0e2ef1edf01b 753
destinyXfate 2:0e2ef1edf01b 754 #if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \
destinyXfate 2:0e2ef1edf01b 755 defined(PNG_READ_BACKGROUND_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 756 /* The tRNS chunk supplies transparency data for paletted images and
destinyXfate 2:0e2ef1edf01b 757 * other image types that don't need a full alpha channel. There are
destinyXfate 2:0e2ef1edf01b 758 * "num_trans" transparency values for a paletted image, stored in the
destinyXfate 2:0e2ef1edf01b 759 * same order as the palette colors, starting from index 0. Values
destinyXfate 2:0e2ef1edf01b 760 * for the data are in the range [0, 255], ranging from fully transparent
destinyXfate 2:0e2ef1edf01b 761 * to fully opaque, respectively. For non-paletted images, there is a
destinyXfate 2:0e2ef1edf01b 762 * single color specified that should be treated as fully transparent.
destinyXfate 2:0e2ef1edf01b 763 * Data is valid if (valid & PNG_INFO_tRNS) is non-zero.
destinyXfate 2:0e2ef1edf01b 764 */
destinyXfate 2:0e2ef1edf01b 765 png_bytep trans; /* transparent values for paletted image */
destinyXfate 2:0e2ef1edf01b 766 png_color_16 trans_values; /* transparent color for non-palette image */
destinyXfate 2:0e2ef1edf01b 767 #endif
destinyXfate 2:0e2ef1edf01b 768
destinyXfate 2:0e2ef1edf01b 769 #if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 770 /* The bKGD chunk gives the suggested image background color if the
destinyXfate 2:0e2ef1edf01b 771 * display program does not have its own background color and the image
destinyXfate 2:0e2ef1edf01b 772 * is needs to composited onto a background before display. The colors
destinyXfate 2:0e2ef1edf01b 773 * in "background" are normally in the same color space/depth as the
destinyXfate 2:0e2ef1edf01b 774 * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero.
destinyXfate 2:0e2ef1edf01b 775 */
destinyXfate 2:0e2ef1edf01b 776 png_color_16 background;
destinyXfate 2:0e2ef1edf01b 777 #endif
destinyXfate 2:0e2ef1edf01b 778
destinyXfate 2:0e2ef1edf01b 779 #if defined(PNG_oFFs_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 780 /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards
destinyXfate 2:0e2ef1edf01b 781 * and downwards from the top-left corner of the display, page, or other
destinyXfate 2:0e2ef1edf01b 782 * application-specific co-ordinate space. See the PNG_OFFSET_ defines
destinyXfate 2:0e2ef1edf01b 783 * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero.
destinyXfate 2:0e2ef1edf01b 784 */
destinyXfate 2:0e2ef1edf01b 785 png_int_32 x_offset; /* x offset on page */
destinyXfate 2:0e2ef1edf01b 786 png_int_32 y_offset; /* y offset on page */
destinyXfate 2:0e2ef1edf01b 787 png_byte offset_unit_type; /* offset units type */
destinyXfate 2:0e2ef1edf01b 788 #endif
destinyXfate 2:0e2ef1edf01b 789
destinyXfate 2:0e2ef1edf01b 790 #if defined(PNG_pHYs_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 791 /* The pHYs chunk gives the physical pixel density of the image for
destinyXfate 2:0e2ef1edf01b 792 * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_
destinyXfate 2:0e2ef1edf01b 793 * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero.
destinyXfate 2:0e2ef1edf01b 794 */
destinyXfate 2:0e2ef1edf01b 795 png_uint_32 x_pixels_per_unit; /* horizontal pixel density */
destinyXfate 2:0e2ef1edf01b 796 png_uint_32 y_pixels_per_unit; /* vertical pixel density */
destinyXfate 2:0e2ef1edf01b 797 png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */
destinyXfate 2:0e2ef1edf01b 798 #endif
destinyXfate 2:0e2ef1edf01b 799
destinyXfate 2:0e2ef1edf01b 800 #if defined(PNG_hIST_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 801 /* The hIST chunk contains the relative frequency or importance of the
destinyXfate 2:0e2ef1edf01b 802 * various palette entries, so that a viewer can intelligently select a
destinyXfate 2:0e2ef1edf01b 803 * reduced-color palette, if required. Data is an array of "num_palette"
destinyXfate 2:0e2ef1edf01b 804 * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST)
destinyXfate 2:0e2ef1edf01b 805 * is non-zero.
destinyXfate 2:0e2ef1edf01b 806 */
destinyXfate 2:0e2ef1edf01b 807 png_uint_16p hist;
destinyXfate 2:0e2ef1edf01b 808 #endif
destinyXfate 2:0e2ef1edf01b 809
destinyXfate 2:0e2ef1edf01b 810 #ifdef PNG_cHRM_SUPPORTED
destinyXfate 2:0e2ef1edf01b 811 /* The cHRM chunk describes the CIE color characteristics of the monitor
destinyXfate 2:0e2ef1edf01b 812 * on which the PNG was created. This data allows the viewer to do gamut
destinyXfate 2:0e2ef1edf01b 813 * mapping of the input image to ensure that the viewer sees the same
destinyXfate 2:0e2ef1edf01b 814 * colors in the image as the creator. Values are in the range
destinyXfate 2:0e2ef1edf01b 815 * [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero.
destinyXfate 2:0e2ef1edf01b 816 */
destinyXfate 2:0e2ef1edf01b 817 #ifdef PNG_FLOATING_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 818 float x_white;
destinyXfate 2:0e2ef1edf01b 819 float y_white;
destinyXfate 2:0e2ef1edf01b 820 float x_red;
destinyXfate 2:0e2ef1edf01b 821 float y_red;
destinyXfate 2:0e2ef1edf01b 822 float x_green;
destinyXfate 2:0e2ef1edf01b 823 float y_green;
destinyXfate 2:0e2ef1edf01b 824 float x_blue;
destinyXfate 2:0e2ef1edf01b 825 float y_blue;
destinyXfate 2:0e2ef1edf01b 826 #endif
destinyXfate 2:0e2ef1edf01b 827 #endif
destinyXfate 2:0e2ef1edf01b 828
destinyXfate 2:0e2ef1edf01b 829 #if defined(PNG_pCAL_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 830 /* The pCAL chunk describes a transformation between the stored pixel
destinyXfate 2:0e2ef1edf01b 831 * values and original physical data values used to create the image.
destinyXfate 2:0e2ef1edf01b 832 * The integer range [0, 2^bit_depth - 1] maps to the floating-point
destinyXfate 2:0e2ef1edf01b 833 * range given by [pcal_X0, pcal_X1], and are further transformed by a
destinyXfate 2:0e2ef1edf01b 834 * (possibly non-linear) transformation function given by "pcal_type"
destinyXfate 2:0e2ef1edf01b 835 * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_
destinyXfate 2:0e2ef1edf01b 836 * defines below, and the PNG-Group's PNG extensions document for a
destinyXfate 2:0e2ef1edf01b 837 * complete description of the transformations and how they should be
destinyXfate 2:0e2ef1edf01b 838 * implemented, and for a description of the ASCII parameter strings.
destinyXfate 2:0e2ef1edf01b 839 * Data values are valid if (valid & PNG_INFO_pCAL) non-zero.
destinyXfate 2:0e2ef1edf01b 840 */
destinyXfate 2:0e2ef1edf01b 841 png_charp pcal_purpose; /* pCAL chunk description string */
destinyXfate 2:0e2ef1edf01b 842 png_int_32 pcal_X0; /* minimum value */
destinyXfate 2:0e2ef1edf01b 843 png_int_32 pcal_X1; /* maximum value */
destinyXfate 2:0e2ef1edf01b 844 png_charp pcal_units; /* Latin-1 string giving physical units */
destinyXfate 2:0e2ef1edf01b 845 png_charpp pcal_params; /* ASCII strings containing parameter values */
destinyXfate 2:0e2ef1edf01b 846 png_byte pcal_type; /* equation type (see PNG_EQUATION_ below) */
destinyXfate 2:0e2ef1edf01b 847 png_byte pcal_nparams; /* number of parameters given in pcal_params */
destinyXfate 2:0e2ef1edf01b 848 #endif
destinyXfate 2:0e2ef1edf01b 849
destinyXfate 2:0e2ef1edf01b 850 /* New members added in libpng-1.0.6 */
destinyXfate 2:0e2ef1edf01b 851 #ifdef PNG_FREE_ME_SUPPORTED
destinyXfate 2:0e2ef1edf01b 852 png_uint_32 free_me; /* flags items libpng is responsible for freeing */
destinyXfate 2:0e2ef1edf01b 853 #endif
destinyXfate 2:0e2ef1edf01b 854
destinyXfate 2:0e2ef1edf01b 855 #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 856 /* storage for unknown chunks that the library doesn't recognize. */
destinyXfate 2:0e2ef1edf01b 857 png_unknown_chunkp unknown_chunks;
destinyXfate 2:0e2ef1edf01b 858 png_size_t unknown_chunks_num;
destinyXfate 2:0e2ef1edf01b 859 #endif
destinyXfate 2:0e2ef1edf01b 860
destinyXfate 2:0e2ef1edf01b 861 #if defined(PNG_iCCP_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 862 /* iCCP chunk data. */
destinyXfate 2:0e2ef1edf01b 863 png_charp iccp_name; /* profile name */
destinyXfate 2:0e2ef1edf01b 864 png_charp iccp_profile; /* International Color Consortium profile data */
destinyXfate 2:0e2ef1edf01b 865 /* Note to maintainer: should be png_bytep */
destinyXfate 2:0e2ef1edf01b 866 png_uint_32 iccp_proflen; /* ICC profile data length */
destinyXfate 2:0e2ef1edf01b 867 png_byte iccp_compression; /* Always zero */
destinyXfate 2:0e2ef1edf01b 868 #endif
destinyXfate 2:0e2ef1edf01b 869
destinyXfate 2:0e2ef1edf01b 870 #if defined(PNG_sPLT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 871 /* data on sPLT chunks (there may be more than one). */
destinyXfate 2:0e2ef1edf01b 872 png_sPLT_tp splt_palettes;
destinyXfate 2:0e2ef1edf01b 873 png_uint_32 splt_palettes_num;
destinyXfate 2:0e2ef1edf01b 874 #endif
destinyXfate 2:0e2ef1edf01b 875
destinyXfate 2:0e2ef1edf01b 876 #if defined(PNG_sCAL_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 877 /* The sCAL chunk describes the actual physical dimensions of the
destinyXfate 2:0e2ef1edf01b 878 * subject matter of the graphic. The chunk contains a unit specification
destinyXfate 2:0e2ef1edf01b 879 * a byte value, and two ASCII strings representing floating-point
destinyXfate 2:0e2ef1edf01b 880 * values. The values are width and height corresponsing to one pixel
destinyXfate 2:0e2ef1edf01b 881 * in the image. This external representation is converted to double
destinyXfate 2:0e2ef1edf01b 882 * here. Data values are valid if (valid & PNG_INFO_sCAL) is non-zero.
destinyXfate 2:0e2ef1edf01b 883 */
destinyXfate 2:0e2ef1edf01b 884 png_byte scal_unit; /* unit of physical scale */
destinyXfate 2:0e2ef1edf01b 885 #ifdef PNG_FLOATING_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 886 double scal_pixel_width; /* width of one pixel */
destinyXfate 2:0e2ef1edf01b 887 double scal_pixel_height; /* height of one pixel */
destinyXfate 2:0e2ef1edf01b 888 #endif
destinyXfate 2:0e2ef1edf01b 889 #ifdef PNG_FIXED_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 890 png_charp scal_s_width; /* string containing height */
destinyXfate 2:0e2ef1edf01b 891 png_charp scal_s_height; /* string containing width */
destinyXfate 2:0e2ef1edf01b 892 #endif
destinyXfate 2:0e2ef1edf01b 893 #endif
destinyXfate 2:0e2ef1edf01b 894
destinyXfate 2:0e2ef1edf01b 895 #if defined(PNG_INFO_IMAGE_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 896 /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) non-zero */
destinyXfate 2:0e2ef1edf01b 897 /* Data valid if (valid & PNG_INFO_IDAT) non-zero */
destinyXfate 2:0e2ef1edf01b 898 png_bytepp row_pointers; /* the image bits */
destinyXfate 2:0e2ef1edf01b 899 #endif
destinyXfate 2:0e2ef1edf01b 900
destinyXfate 2:0e2ef1edf01b 901 #if defined(PNG_FIXED_POINT_SUPPORTED) && defined(PNG_gAMA_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 902 png_fixed_point int_gamma; /* gamma of image, if (valid & PNG_INFO_gAMA) */
destinyXfate 2:0e2ef1edf01b 903 #endif
destinyXfate 2:0e2ef1edf01b 904
destinyXfate 2:0e2ef1edf01b 905 #if defined(PNG_cHRM_SUPPORTED) && defined(PNG_FIXED_POINT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 906 png_fixed_point int_x_white;
destinyXfate 2:0e2ef1edf01b 907 png_fixed_point int_y_white;
destinyXfate 2:0e2ef1edf01b 908 png_fixed_point int_x_red;
destinyXfate 2:0e2ef1edf01b 909 png_fixed_point int_y_red;
destinyXfate 2:0e2ef1edf01b 910 png_fixed_point int_x_green;
destinyXfate 2:0e2ef1edf01b 911 png_fixed_point int_y_green;
destinyXfate 2:0e2ef1edf01b 912 png_fixed_point int_x_blue;
destinyXfate 2:0e2ef1edf01b 913 png_fixed_point int_y_blue;
destinyXfate 2:0e2ef1edf01b 914 #endif
destinyXfate 2:0e2ef1edf01b 915
destinyXfate 2:0e2ef1edf01b 916 } png_info;
destinyXfate 2:0e2ef1edf01b 917
destinyXfate 2:0e2ef1edf01b 918 typedef png_info FAR * png_infop;
destinyXfate 2:0e2ef1edf01b 919 typedef png_info FAR * FAR * png_infopp;
destinyXfate 2:0e2ef1edf01b 920
destinyXfate 2:0e2ef1edf01b 921 /* Maximum positive integer used in PNG is (2^31)-1 */
destinyXfate 2:0e2ef1edf01b 922 #define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL)
destinyXfate 2:0e2ef1edf01b 923 #define PNG_UINT_32_MAX ((png_uint_32)(-1))
destinyXfate 2:0e2ef1edf01b 924 #define PNG_SIZE_MAX ((png_size_t)(-1))
destinyXfate 2:0e2ef1edf01b 925 #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
destinyXfate 2:0e2ef1edf01b 926 /* PNG_MAX_UINT is deprecated; use PNG_UINT_31_MAX instead. */
destinyXfate 2:0e2ef1edf01b 927 #define PNG_MAX_UINT PNG_UINT_31_MAX
destinyXfate 2:0e2ef1edf01b 928 #endif
destinyXfate 2:0e2ef1edf01b 929
destinyXfate 2:0e2ef1edf01b 930 /* These describe the color_type field in png_info. */
destinyXfate 2:0e2ef1edf01b 931 /* color type masks */
destinyXfate 2:0e2ef1edf01b 932 #define PNG_COLOR_MASK_PALETTE 1
destinyXfate 2:0e2ef1edf01b 933 #define PNG_COLOR_MASK_COLOR 2
destinyXfate 2:0e2ef1edf01b 934 #define PNG_COLOR_MASK_ALPHA 4
destinyXfate 2:0e2ef1edf01b 935
destinyXfate 2:0e2ef1edf01b 936 /* color types. Note that not all combinations are legal */
destinyXfate 2:0e2ef1edf01b 937 #define PNG_COLOR_TYPE_GRAY 0
destinyXfate 2:0e2ef1edf01b 938 #define PNG_COLOR_TYPE_PALETTE (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_PALETTE)
destinyXfate 2:0e2ef1edf01b 939 #define PNG_COLOR_TYPE_RGB (PNG_COLOR_MASK_COLOR)
destinyXfate 2:0e2ef1edf01b 940 #define PNG_COLOR_TYPE_RGB_ALPHA (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA)
destinyXfate 2:0e2ef1edf01b 941 #define PNG_COLOR_TYPE_GRAY_ALPHA (PNG_COLOR_MASK_ALPHA)
destinyXfate 2:0e2ef1edf01b 942 /* aliases */
destinyXfate 2:0e2ef1edf01b 943 #define PNG_COLOR_TYPE_RGBA PNG_COLOR_TYPE_RGB_ALPHA
destinyXfate 2:0e2ef1edf01b 944 #define PNG_COLOR_TYPE_GA PNG_COLOR_TYPE_GRAY_ALPHA
destinyXfate 2:0e2ef1edf01b 945
destinyXfate 2:0e2ef1edf01b 946 /* This is for compression type. PNG 1.0-1.2 only define the single type. */
destinyXfate 2:0e2ef1edf01b 947 #define PNG_COMPRESSION_TYPE_BASE 0 /* Deflate method 8, 32K window */
destinyXfate 2:0e2ef1edf01b 948 #define PNG_COMPRESSION_TYPE_DEFAULT PNG_COMPRESSION_TYPE_BASE
destinyXfate 2:0e2ef1edf01b 949
destinyXfate 2:0e2ef1edf01b 950 /* This is for filter type. PNG 1.0-1.2 only define the single type. */
destinyXfate 2:0e2ef1edf01b 951 #define PNG_FILTER_TYPE_BASE 0 /* Single row per-byte filtering */
destinyXfate 2:0e2ef1edf01b 952 #define PNG_INTRAPIXEL_DIFFERENCING 64 /* Used only in MNG datastreams */
destinyXfate 2:0e2ef1edf01b 953 #define PNG_FILTER_TYPE_DEFAULT PNG_FILTER_TYPE_BASE
destinyXfate 2:0e2ef1edf01b 954
destinyXfate 2:0e2ef1edf01b 955 /* These are for the interlacing type. These values should NOT be changed. */
destinyXfate 2:0e2ef1edf01b 956 #define PNG_INTERLACE_NONE 0 /* Non-interlaced image */
destinyXfate 2:0e2ef1edf01b 957 #define PNG_INTERLACE_ADAM7 1 /* Adam7 interlacing */
destinyXfate 2:0e2ef1edf01b 958 #define PNG_INTERLACE_LAST 2 /* Not a valid value */
destinyXfate 2:0e2ef1edf01b 959
destinyXfate 2:0e2ef1edf01b 960 /* These are for the oFFs chunk. These values should NOT be changed. */
destinyXfate 2:0e2ef1edf01b 961 #define PNG_OFFSET_PIXEL 0 /* Offset in pixels */
destinyXfate 2:0e2ef1edf01b 962 #define PNG_OFFSET_MICROMETER 1 /* Offset in micrometers (1/10^6 meter) */
destinyXfate 2:0e2ef1edf01b 963 #define PNG_OFFSET_LAST 2 /* Not a valid value */
destinyXfate 2:0e2ef1edf01b 964
destinyXfate 2:0e2ef1edf01b 965 /* These are for the pCAL chunk. These values should NOT be changed. */
destinyXfate 2:0e2ef1edf01b 966 #define PNG_EQUATION_LINEAR 0 /* Linear transformation */
destinyXfate 2:0e2ef1edf01b 967 #define PNG_EQUATION_BASE_E 1 /* Exponential base e transform */
destinyXfate 2:0e2ef1edf01b 968 #define PNG_EQUATION_ARBITRARY 2 /* Arbitrary base exponential transform */
destinyXfate 2:0e2ef1edf01b 969 #define PNG_EQUATION_HYPERBOLIC 3 /* Hyperbolic sine transformation */
destinyXfate 2:0e2ef1edf01b 970 #define PNG_EQUATION_LAST 4 /* Not a valid value */
destinyXfate 2:0e2ef1edf01b 971
destinyXfate 2:0e2ef1edf01b 972 /* These are for the sCAL chunk. These values should NOT be changed. */
destinyXfate 2:0e2ef1edf01b 973 #define PNG_SCALE_UNKNOWN 0 /* unknown unit (image scale) */
destinyXfate 2:0e2ef1edf01b 974 #define PNG_SCALE_METER 1 /* meters per pixel */
destinyXfate 2:0e2ef1edf01b 975 #define PNG_SCALE_RADIAN 2 /* radians per pixel */
destinyXfate 2:0e2ef1edf01b 976 #define PNG_SCALE_LAST 3 /* Not a valid value */
destinyXfate 2:0e2ef1edf01b 977
destinyXfate 2:0e2ef1edf01b 978 /* These are for the pHYs chunk. These values should NOT be changed. */
destinyXfate 2:0e2ef1edf01b 979 #define PNG_RESOLUTION_UNKNOWN 0 /* pixels/unknown unit (aspect ratio) */
destinyXfate 2:0e2ef1edf01b 980 #define PNG_RESOLUTION_METER 1 /* pixels/meter */
destinyXfate 2:0e2ef1edf01b 981 #define PNG_RESOLUTION_LAST 2 /* Not a valid value */
destinyXfate 2:0e2ef1edf01b 982
destinyXfate 2:0e2ef1edf01b 983 /* These are for the sRGB chunk. These values should NOT be changed. */
destinyXfate 2:0e2ef1edf01b 984 #define PNG_sRGB_INTENT_PERCEPTUAL 0
destinyXfate 2:0e2ef1edf01b 985 #define PNG_sRGB_INTENT_RELATIVE 1
destinyXfate 2:0e2ef1edf01b 986 #define PNG_sRGB_INTENT_SATURATION 2
destinyXfate 2:0e2ef1edf01b 987 #define PNG_sRGB_INTENT_ABSOLUTE 3
destinyXfate 2:0e2ef1edf01b 988 #define PNG_sRGB_INTENT_LAST 4 /* Not a valid value */
destinyXfate 2:0e2ef1edf01b 989
destinyXfate 2:0e2ef1edf01b 990 /* This is for text chunks */
destinyXfate 2:0e2ef1edf01b 991 #define PNG_KEYWORD_MAX_LENGTH 79
destinyXfate 2:0e2ef1edf01b 992
destinyXfate 2:0e2ef1edf01b 993 /* Maximum number of entries in PLTE/sPLT/tRNS arrays */
destinyXfate 2:0e2ef1edf01b 994 #define PNG_MAX_PALETTE_LENGTH 256
destinyXfate 2:0e2ef1edf01b 995
destinyXfate 2:0e2ef1edf01b 996 /* These determine if an ancillary chunk's data has been successfully read
destinyXfate 2:0e2ef1edf01b 997 * from the PNG header, or if the application has filled in the corresponding
destinyXfate 2:0e2ef1edf01b 998 * data in the info_struct to be written into the output file. The values
destinyXfate 2:0e2ef1edf01b 999 * of the PNG_INFO_<chunk> defines should NOT be changed.
destinyXfate 2:0e2ef1edf01b 1000 */
destinyXfate 2:0e2ef1edf01b 1001 #define PNG_INFO_gAMA 0x0001
destinyXfate 2:0e2ef1edf01b 1002 #define PNG_INFO_sBIT 0x0002
destinyXfate 2:0e2ef1edf01b 1003 #define PNG_INFO_cHRM 0x0004
destinyXfate 2:0e2ef1edf01b 1004 #define PNG_INFO_PLTE 0x0008
destinyXfate 2:0e2ef1edf01b 1005 #define PNG_INFO_tRNS 0x0010
destinyXfate 2:0e2ef1edf01b 1006 #define PNG_INFO_bKGD 0x0020
destinyXfate 2:0e2ef1edf01b 1007 #define PNG_INFO_hIST 0x0040
destinyXfate 2:0e2ef1edf01b 1008 #define PNG_INFO_pHYs 0x0080
destinyXfate 2:0e2ef1edf01b 1009 #define PNG_INFO_oFFs 0x0100
destinyXfate 2:0e2ef1edf01b 1010 #define PNG_INFO_tIME 0x0200
destinyXfate 2:0e2ef1edf01b 1011 #define PNG_INFO_pCAL 0x0400
destinyXfate 2:0e2ef1edf01b 1012 #define PNG_INFO_sRGB 0x0800 /* GR-P, 0.96a */
destinyXfate 2:0e2ef1edf01b 1013 #define PNG_INFO_iCCP 0x1000 /* ESR, 1.0.6 */
destinyXfate 2:0e2ef1edf01b 1014 #define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */
destinyXfate 2:0e2ef1edf01b 1015 #define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */
destinyXfate 2:0e2ef1edf01b 1016 #define PNG_INFO_IDAT 0x8000L /* ESR, 1.0.6 */
destinyXfate 2:0e2ef1edf01b 1017
destinyXfate 2:0e2ef1edf01b 1018 /* This is used for the transformation routines, as some of them
destinyXfate 2:0e2ef1edf01b 1019 * change these values for the row. It also should enable using
destinyXfate 2:0e2ef1edf01b 1020 * the routines for other purposes.
destinyXfate 2:0e2ef1edf01b 1021 */
destinyXfate 2:0e2ef1edf01b 1022 typedef struct png_row_info_struct
destinyXfate 2:0e2ef1edf01b 1023 {
destinyXfate 2:0e2ef1edf01b 1024 png_uint_32 width; /* width of row */
destinyXfate 2:0e2ef1edf01b 1025 png_uint_32 rowbytes; /* number of bytes in row */
destinyXfate 2:0e2ef1edf01b 1026 png_byte color_type; /* color type of row */
destinyXfate 2:0e2ef1edf01b 1027 png_byte bit_depth; /* bit depth of row */
destinyXfate 2:0e2ef1edf01b 1028 png_byte channels; /* number of channels (1, 2, 3, or 4) */
destinyXfate 2:0e2ef1edf01b 1029 png_byte pixel_depth; /* bits per pixel (depth * channels) */
destinyXfate 2:0e2ef1edf01b 1030 } png_row_info;
destinyXfate 2:0e2ef1edf01b 1031
destinyXfate 2:0e2ef1edf01b 1032 typedef png_row_info FAR * png_row_infop;
destinyXfate 2:0e2ef1edf01b 1033 typedef png_row_info FAR * FAR * png_row_infopp;
destinyXfate 2:0e2ef1edf01b 1034
destinyXfate 2:0e2ef1edf01b 1035 /* These are the function types for the I/O functions and for the functions
destinyXfate 2:0e2ef1edf01b 1036 * that allow the user to override the default I/O functions with his or her
destinyXfate 2:0e2ef1edf01b 1037 * own. The png_error_ptr type should match that of user-supplied warning
destinyXfate 2:0e2ef1edf01b 1038 * and error functions, while the png_rw_ptr type should match that of the
destinyXfate 2:0e2ef1edf01b 1039 * user read/write data functions.
destinyXfate 2:0e2ef1edf01b 1040 */
destinyXfate 2:0e2ef1edf01b 1041 typedef struct png_struct_def png_struct;
destinyXfate 2:0e2ef1edf01b 1042 typedef png_struct FAR * png_structp;
destinyXfate 2:0e2ef1edf01b 1043
destinyXfate 2:0e2ef1edf01b 1044 typedef void (PNGAPI *png_error_ptr) PNGARG((png_structp, png_const_charp));
destinyXfate 2:0e2ef1edf01b 1045 typedef void (PNGAPI *png_rw_ptr) PNGARG((png_structp, png_bytep, png_size_t));
destinyXfate 2:0e2ef1edf01b 1046 typedef void (PNGAPI *png_flush_ptr) PNGARG((png_structp));
destinyXfate 2:0e2ef1edf01b 1047 typedef void (PNGAPI *png_read_status_ptr) PNGARG((png_structp, png_uint_32,
destinyXfate 2:0e2ef1edf01b 1048 int));
destinyXfate 2:0e2ef1edf01b 1049 typedef void (PNGAPI *png_write_status_ptr) PNGARG((png_structp, png_uint_32,
destinyXfate 2:0e2ef1edf01b 1050 int));
destinyXfate 2:0e2ef1edf01b 1051
destinyXfate 2:0e2ef1edf01b 1052 #ifdef PNG_PROGRESSIVE_READ_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1053 typedef void (PNGAPI *png_progressive_info_ptr) PNGARG((png_structp, png_infop));
destinyXfate 2:0e2ef1edf01b 1054 typedef void (PNGAPI *png_progressive_end_ptr) PNGARG((png_structp, png_infop));
destinyXfate 2:0e2ef1edf01b 1055 typedef void (PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep,
destinyXfate 2:0e2ef1edf01b 1056 png_uint_32, int));
destinyXfate 2:0e2ef1edf01b 1057 #endif
destinyXfate 2:0e2ef1edf01b 1058
destinyXfate 2:0e2ef1edf01b 1059 #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
destinyXfate 2:0e2ef1edf01b 1060 defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
destinyXfate 2:0e2ef1edf01b 1061 defined(PNG_LEGACY_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1062 typedef void (PNGAPI *png_user_transform_ptr) PNGARG((png_structp,
destinyXfate 2:0e2ef1edf01b 1063 png_row_infop, png_bytep));
destinyXfate 2:0e2ef1edf01b 1064 #endif
destinyXfate 2:0e2ef1edf01b 1065
destinyXfate 2:0e2ef1edf01b 1066 #if defined(PNG_USER_CHUNKS_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1067 typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, png_unknown_chunkp));
destinyXfate 2:0e2ef1edf01b 1068 #endif
destinyXfate 2:0e2ef1edf01b 1069 #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1070 typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp));
destinyXfate 2:0e2ef1edf01b 1071 #endif
destinyXfate 2:0e2ef1edf01b 1072
destinyXfate 2:0e2ef1edf01b 1073 /* Transform masks for the high-level interface */
destinyXfate 2:0e2ef1edf01b 1074 #define PNG_TRANSFORM_IDENTITY 0x0000 /* read and write */
destinyXfate 2:0e2ef1edf01b 1075 #define PNG_TRANSFORM_STRIP_16 0x0001 /* read only */
destinyXfate 2:0e2ef1edf01b 1076 #define PNG_TRANSFORM_STRIP_ALPHA 0x0002 /* read only */
destinyXfate 2:0e2ef1edf01b 1077 #define PNG_TRANSFORM_PACKING 0x0004 /* read and write */
destinyXfate 2:0e2ef1edf01b 1078 #define PNG_TRANSFORM_PACKSWAP 0x0008 /* read and write */
destinyXfate 2:0e2ef1edf01b 1079 #define PNG_TRANSFORM_EXPAND 0x0010 /* read only */
destinyXfate 2:0e2ef1edf01b 1080 #define PNG_TRANSFORM_INVERT_MONO 0x0020 /* read and write */
destinyXfate 2:0e2ef1edf01b 1081 #define PNG_TRANSFORM_SHIFT 0x0040 /* read and write */
destinyXfate 2:0e2ef1edf01b 1082 #define PNG_TRANSFORM_BGR 0x0080 /* read and write */
destinyXfate 2:0e2ef1edf01b 1083 #define PNG_TRANSFORM_SWAP_ALPHA 0x0100 /* read and write */
destinyXfate 2:0e2ef1edf01b 1084 #define PNG_TRANSFORM_SWAP_ENDIAN 0x0200 /* read and write */
destinyXfate 2:0e2ef1edf01b 1085 #define PNG_TRANSFORM_INVERT_ALPHA 0x0400 /* read and write */
destinyXfate 2:0e2ef1edf01b 1086 #define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* WRITE only */
destinyXfate 2:0e2ef1edf01b 1087
destinyXfate 2:0e2ef1edf01b 1088 /* Flags for MNG supported features */
destinyXfate 2:0e2ef1edf01b 1089 #define PNG_FLAG_MNG_EMPTY_PLTE 0x01
destinyXfate 2:0e2ef1edf01b 1090 #define PNG_FLAG_MNG_FILTER_64 0x04
destinyXfate 2:0e2ef1edf01b 1091 #define PNG_ALL_MNG_FEATURES 0x05
destinyXfate 2:0e2ef1edf01b 1092
destinyXfate 2:0e2ef1edf01b 1093 typedef png_voidp (*png_malloc_ptr) PNGARG((png_structp, png_size_t));
destinyXfate 2:0e2ef1edf01b 1094 typedef void (*png_free_ptr) PNGARG((png_structp, png_voidp));
destinyXfate 2:0e2ef1edf01b 1095
destinyXfate 2:0e2ef1edf01b 1096 /* The structure that holds the information to read and write PNG files.
destinyXfate 2:0e2ef1edf01b 1097 * The only people who need to care about what is inside of this are the
destinyXfate 2:0e2ef1edf01b 1098 * people who will be modifying the library for their own special needs.
destinyXfate 2:0e2ef1edf01b 1099 * It should NOT be accessed directly by an application, except to store
destinyXfate 2:0e2ef1edf01b 1100 * the jmp_buf.
destinyXfate 2:0e2ef1edf01b 1101 */
destinyXfate 2:0e2ef1edf01b 1102
destinyXfate 2:0e2ef1edf01b 1103 struct png_struct_def
destinyXfate 2:0e2ef1edf01b 1104 {
destinyXfate 2:0e2ef1edf01b 1105 #ifdef PNG_SETJMP_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1106 jmp_buf jmpbuf; /* used in png_error */
destinyXfate 2:0e2ef1edf01b 1107 #endif
destinyXfate 2:0e2ef1edf01b 1108 png_error_ptr error_fn; /* function for printing errors and aborting */
destinyXfate 2:0e2ef1edf01b 1109 png_error_ptr warning_fn; /* function for printing warnings */
destinyXfate 2:0e2ef1edf01b 1110 png_voidp error_ptr; /* user supplied struct for error functions */
destinyXfate 2:0e2ef1edf01b 1111 png_rw_ptr write_data_fn; /* function for writing output data */
destinyXfate 2:0e2ef1edf01b 1112 png_rw_ptr read_data_fn; /* function for reading input data */
destinyXfate 2:0e2ef1edf01b 1113 png_voidp io_ptr; /* ptr to application struct for I/O functions */
destinyXfate 2:0e2ef1edf01b 1114
destinyXfate 2:0e2ef1edf01b 1115 #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1116 png_user_transform_ptr read_user_transform_fn; /* user read transform */
destinyXfate 2:0e2ef1edf01b 1117 #endif
destinyXfate 2:0e2ef1edf01b 1118
destinyXfate 2:0e2ef1edf01b 1119 #if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1120 png_user_transform_ptr write_user_transform_fn; /* user write transform */
destinyXfate 2:0e2ef1edf01b 1121 #endif
destinyXfate 2:0e2ef1edf01b 1122
destinyXfate 2:0e2ef1edf01b 1123 /* These were added in libpng-1.0.2 */
destinyXfate 2:0e2ef1edf01b 1124 #if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1125 #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
destinyXfate 2:0e2ef1edf01b 1126 defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1127 png_voidp user_transform_ptr; /* user supplied struct for user transform */
destinyXfate 2:0e2ef1edf01b 1128 png_byte user_transform_depth; /* bit depth of user transformed pixels */
destinyXfate 2:0e2ef1edf01b 1129 png_byte user_transform_channels; /* channels in user transformed pixels */
destinyXfate 2:0e2ef1edf01b 1130 #endif
destinyXfate 2:0e2ef1edf01b 1131 #endif
destinyXfate 2:0e2ef1edf01b 1132
destinyXfate 2:0e2ef1edf01b 1133 png_uint_32 mode; /* tells us where we are in the PNG file */
destinyXfate 2:0e2ef1edf01b 1134 png_uint_32 flags; /* flags indicating various things to libpng */
destinyXfate 2:0e2ef1edf01b 1135 png_uint_32 transformations; /* which transformations to perform */
destinyXfate 2:0e2ef1edf01b 1136
destinyXfate 2:0e2ef1edf01b 1137 z_stream zstream; /* pointer to decompression structure (below) */
destinyXfate 2:0e2ef1edf01b 1138 png_bytep zbuf; /* buffer for zlib */
destinyXfate 2:0e2ef1edf01b 1139 png_size_t zbuf_size; /* size of zbuf */
destinyXfate 2:0e2ef1edf01b 1140 int zlib_level; /* holds zlib compression level */
destinyXfate 2:0e2ef1edf01b 1141 int zlib_method; /* holds zlib compression method */
destinyXfate 2:0e2ef1edf01b 1142 int zlib_window_bits; /* holds zlib compression window bits */
destinyXfate 2:0e2ef1edf01b 1143 int zlib_mem_level; /* holds zlib compression memory level */
destinyXfate 2:0e2ef1edf01b 1144 int zlib_strategy; /* holds zlib compression strategy */
destinyXfate 2:0e2ef1edf01b 1145
destinyXfate 2:0e2ef1edf01b 1146 png_uint_32 width; /* width of image in pixels */
destinyXfate 2:0e2ef1edf01b 1147 png_uint_32 height; /* height of image in pixels */
destinyXfate 2:0e2ef1edf01b 1148 png_uint_32 num_rows; /* number of rows in current pass */
destinyXfate 2:0e2ef1edf01b 1149 png_uint_32 usr_width; /* width of row at start of write */
destinyXfate 2:0e2ef1edf01b 1150 png_uint_32 rowbytes; /* size of row in bytes */
destinyXfate 2:0e2ef1edf01b 1151 png_uint_32 irowbytes; /* size of current interlaced row in bytes */
destinyXfate 2:0e2ef1edf01b 1152 png_uint_32 iwidth; /* width of current interlaced row in pixels */
destinyXfate 2:0e2ef1edf01b 1153 png_uint_32 row_number; /* current row in interlace pass */
destinyXfate 2:0e2ef1edf01b 1154 png_bytep prev_row; /* buffer to save previous (unfiltered) row */
destinyXfate 2:0e2ef1edf01b 1155 png_bytep row_buf; /* buffer to save current (unfiltered) row */
destinyXfate 2:0e2ef1edf01b 1156 png_bytep sub_row; /* buffer to save "sub" row when filtering */
destinyXfate 2:0e2ef1edf01b 1157 png_bytep up_row; /* buffer to save "up" row when filtering */
destinyXfate 2:0e2ef1edf01b 1158 png_bytep avg_row; /* buffer to save "avg" row when filtering */
destinyXfate 2:0e2ef1edf01b 1159 png_bytep paeth_row; /* buffer to save "Paeth" row when filtering */
destinyXfate 2:0e2ef1edf01b 1160 png_row_info row_info; /* used for transformation routines */
destinyXfate 2:0e2ef1edf01b 1161
destinyXfate 2:0e2ef1edf01b 1162 png_uint_32 idat_size; /* current IDAT size for read */
destinyXfate 2:0e2ef1edf01b 1163 png_uint_32 crc; /* current chunk CRC value */
destinyXfate 2:0e2ef1edf01b 1164 png_colorp palette; /* palette from the input file */
destinyXfate 2:0e2ef1edf01b 1165 png_uint_16 num_palette; /* number of color entries in palette */
destinyXfate 2:0e2ef1edf01b 1166 png_uint_16 num_trans; /* number of transparency values */
destinyXfate 2:0e2ef1edf01b 1167 png_byte chunk_name[5]; /* null-terminated name of current chunk */
destinyXfate 2:0e2ef1edf01b 1168 png_byte compression; /* file compression type (always 0) */
destinyXfate 2:0e2ef1edf01b 1169 png_byte filter; /* file filter type (always 0) */
destinyXfate 2:0e2ef1edf01b 1170 png_byte interlaced; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
destinyXfate 2:0e2ef1edf01b 1171 png_byte pass; /* current interlace pass (0 - 6) */
destinyXfate 2:0e2ef1edf01b 1172 png_byte do_filter; /* row filter flags (see PNG_FILTER_ below ) */
destinyXfate 2:0e2ef1edf01b 1173 png_byte color_type; /* color type of file */
destinyXfate 2:0e2ef1edf01b 1174 png_byte bit_depth; /* bit depth of file */
destinyXfate 2:0e2ef1edf01b 1175 png_byte usr_bit_depth; /* bit depth of users row */
destinyXfate 2:0e2ef1edf01b 1176 png_byte pixel_depth; /* number of bits per pixel */
destinyXfate 2:0e2ef1edf01b 1177 png_byte channels; /* number of channels in file */
destinyXfate 2:0e2ef1edf01b 1178 png_byte usr_channels; /* channels at start of write */
destinyXfate 2:0e2ef1edf01b 1179 png_byte sig_bytes; /* magic bytes read/written from start of file */
destinyXfate 2:0e2ef1edf01b 1180
destinyXfate 2:0e2ef1edf01b 1181 #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1182 #ifdef PNG_LEGACY_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1183 png_byte filler; /* filler byte for pixel expansion */
destinyXfate 2:0e2ef1edf01b 1184 #else
destinyXfate 2:0e2ef1edf01b 1185 png_uint_16 filler; /* filler bytes for pixel expansion */
destinyXfate 2:0e2ef1edf01b 1186 #endif
destinyXfate 2:0e2ef1edf01b 1187 #endif
destinyXfate 2:0e2ef1edf01b 1188
destinyXfate 2:0e2ef1edf01b 1189 #if defined(PNG_bKGD_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1190 png_byte background_gamma_type;
destinyXfate 2:0e2ef1edf01b 1191 # ifdef PNG_FLOATING_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1192 float background_gamma;
destinyXfate 2:0e2ef1edf01b 1193 # endif
destinyXfate 2:0e2ef1edf01b 1194 png_color_16 background; /* background color in screen gamma space */
destinyXfate 2:0e2ef1edf01b 1195 #if defined(PNG_READ_GAMMA_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1196 png_color_16 background_1; /* background normalized to gamma 1.0 */
destinyXfate 2:0e2ef1edf01b 1197 #endif
destinyXfate 2:0e2ef1edf01b 1198 #endif /* PNG_bKGD_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 1199
destinyXfate 2:0e2ef1edf01b 1200 #if defined(PNG_WRITE_FLUSH_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1201 png_flush_ptr output_flush_fn;/* Function for flushing output */
destinyXfate 2:0e2ef1edf01b 1202 png_uint_32 flush_dist; /* how many rows apart to flush, 0 - no flush */
destinyXfate 2:0e2ef1edf01b 1203 png_uint_32 flush_rows; /* number of rows written since last flush */
destinyXfate 2:0e2ef1edf01b 1204 #endif
destinyXfate 2:0e2ef1edf01b 1205
destinyXfate 2:0e2ef1edf01b 1206 #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1207 int gamma_shift; /* number of "insignificant" bits 16-bit gamma */
destinyXfate 2:0e2ef1edf01b 1208 #ifdef PNG_FLOATING_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1209 float gamma; /* file gamma value */
destinyXfate 2:0e2ef1edf01b 1210 float screen_gamma; /* screen gamma value (display_exponent) */
destinyXfate 2:0e2ef1edf01b 1211 #endif
destinyXfate 2:0e2ef1edf01b 1212 #endif
destinyXfate 2:0e2ef1edf01b 1213
destinyXfate 2:0e2ef1edf01b 1214 #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1215 png_bytep gamma_table; /* gamma table for 8-bit depth files */
destinyXfate 2:0e2ef1edf01b 1216 png_bytep gamma_from_1; /* converts from 1.0 to screen */
destinyXfate 2:0e2ef1edf01b 1217 png_bytep gamma_to_1; /* converts from file to 1.0 */
destinyXfate 2:0e2ef1edf01b 1218 png_uint_16pp gamma_16_table; /* gamma table for 16-bit depth files */
destinyXfate 2:0e2ef1edf01b 1219 png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */
destinyXfate 2:0e2ef1edf01b 1220 png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */
destinyXfate 2:0e2ef1edf01b 1221 #endif
destinyXfate 2:0e2ef1edf01b 1222
destinyXfate 2:0e2ef1edf01b 1223 #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1224 png_color_8 sig_bit; /* significant bits in each available channel */
destinyXfate 2:0e2ef1edf01b 1225 #endif
destinyXfate 2:0e2ef1edf01b 1226
destinyXfate 2:0e2ef1edf01b 1227 #if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1228 png_color_8 shift; /* shift for significant bit tranformation */
destinyXfate 2:0e2ef1edf01b 1229 #endif
destinyXfate 2:0e2ef1edf01b 1230
destinyXfate 2:0e2ef1edf01b 1231 #if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \
destinyXfate 2:0e2ef1edf01b 1232 || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1233 png_bytep trans; /* transparency values for paletted files */
destinyXfate 2:0e2ef1edf01b 1234 png_color_16 trans_values; /* transparency values for non-paletted files */
destinyXfate 2:0e2ef1edf01b 1235 #endif
destinyXfate 2:0e2ef1edf01b 1236
destinyXfate 2:0e2ef1edf01b 1237 png_read_status_ptr read_row_fn; /* called after each row is decoded */
destinyXfate 2:0e2ef1edf01b 1238 png_write_status_ptr write_row_fn; /* called after each row is encoded */
destinyXfate 2:0e2ef1edf01b 1239 #ifdef PNG_PROGRESSIVE_READ_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1240 png_progressive_info_ptr info_fn; /* called after header data fully read */
destinyXfate 2:0e2ef1edf01b 1241 png_progressive_row_ptr row_fn; /* called after each prog. row is decoded */
destinyXfate 2:0e2ef1edf01b 1242 png_progressive_end_ptr end_fn; /* called after image is complete */
destinyXfate 2:0e2ef1edf01b 1243 png_bytep save_buffer_ptr; /* current location in save_buffer */
destinyXfate 2:0e2ef1edf01b 1244 png_bytep save_buffer; /* buffer for previously read data */
destinyXfate 2:0e2ef1edf01b 1245 png_bytep current_buffer_ptr; /* current location in current_buffer */
destinyXfate 2:0e2ef1edf01b 1246 png_bytep current_buffer; /* buffer for recently used data */
destinyXfate 2:0e2ef1edf01b 1247 png_uint_32 push_length; /* size of current input chunk */
destinyXfate 2:0e2ef1edf01b 1248 png_uint_32 skip_length; /* bytes to skip in input data */
destinyXfate 2:0e2ef1edf01b 1249 png_size_t save_buffer_size; /* amount of data now in save_buffer */
destinyXfate 2:0e2ef1edf01b 1250 png_size_t save_buffer_max; /* total size of save_buffer */
destinyXfate 2:0e2ef1edf01b 1251 png_size_t buffer_size; /* total amount of available input data */
destinyXfate 2:0e2ef1edf01b 1252 png_size_t current_buffer_size; /* amount of data now in current_buffer */
destinyXfate 2:0e2ef1edf01b 1253 int process_mode; /* what push library is currently doing */
destinyXfate 2:0e2ef1edf01b 1254 int cur_palette; /* current push library palette index */
destinyXfate 2:0e2ef1edf01b 1255
destinyXfate 2:0e2ef1edf01b 1256 # if defined(PNG_TEXT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1257 png_size_t current_text_size; /* current size of text input data */
destinyXfate 2:0e2ef1edf01b 1258 png_size_t current_text_left; /* how much text left to read in input */
destinyXfate 2:0e2ef1edf01b 1259 png_charp current_text; /* current text chunk buffer */
destinyXfate 2:0e2ef1edf01b 1260 png_charp current_text_ptr; /* current location in current_text */
destinyXfate 2:0e2ef1edf01b 1261 # endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 1262
destinyXfate 2:0e2ef1edf01b 1263 #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 1264
destinyXfate 2:0e2ef1edf01b 1265 #if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
destinyXfate 2:0e2ef1edf01b 1266 /* for the Borland special 64K segment handler */
destinyXfate 2:0e2ef1edf01b 1267 png_bytepp offset_table_ptr;
destinyXfate 2:0e2ef1edf01b 1268 png_bytep offset_table;
destinyXfate 2:0e2ef1edf01b 1269 png_uint_16 offset_table_number;
destinyXfate 2:0e2ef1edf01b 1270 png_uint_16 offset_table_count;
destinyXfate 2:0e2ef1edf01b 1271 png_uint_16 offset_table_count_free;
destinyXfate 2:0e2ef1edf01b 1272 #endif
destinyXfate 2:0e2ef1edf01b 1273
destinyXfate 2:0e2ef1edf01b 1274 #if defined(PNG_READ_DITHER_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1275 png_bytep palette_lookup; /* lookup table for dithering */
destinyXfate 2:0e2ef1edf01b 1276 png_bytep dither_index; /* index translation for palette files */
destinyXfate 2:0e2ef1edf01b 1277 #endif
destinyXfate 2:0e2ef1edf01b 1278
destinyXfate 2:0e2ef1edf01b 1279 #if defined(PNG_READ_DITHER_SUPPORTED) || defined(PNG_hIST_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1280 png_uint_16p hist; /* histogram */
destinyXfate 2:0e2ef1edf01b 1281 #endif
destinyXfate 2:0e2ef1edf01b 1282
destinyXfate 2:0e2ef1edf01b 1283 #if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1284 png_byte heuristic_method; /* heuristic for row filter selection */
destinyXfate 2:0e2ef1edf01b 1285 png_byte num_prev_filters; /* number of weights for previous rows */
destinyXfate 2:0e2ef1edf01b 1286 png_bytep prev_filters; /* filter type(s) of previous row(s) */
destinyXfate 2:0e2ef1edf01b 1287 png_uint_16p filter_weights; /* weight(s) for previous line(s) */
destinyXfate 2:0e2ef1edf01b 1288 png_uint_16p inv_filter_weights; /* 1/weight(s) for previous line(s) */
destinyXfate 2:0e2ef1edf01b 1289 png_uint_16p filter_costs; /* relative filter calculation cost */
destinyXfate 2:0e2ef1edf01b 1290 png_uint_16p inv_filter_costs; /* 1/relative filter calculation cost */
destinyXfate 2:0e2ef1edf01b 1291 #endif
destinyXfate 2:0e2ef1edf01b 1292
destinyXfate 2:0e2ef1edf01b 1293 #if defined(PNG_TIME_RFC1123_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1294 png_charp time_buffer; /* String to hold RFC 1123 time text */
destinyXfate 2:0e2ef1edf01b 1295 #endif
destinyXfate 2:0e2ef1edf01b 1296
destinyXfate 2:0e2ef1edf01b 1297 /* New members added in libpng-1.0.6 */
destinyXfate 2:0e2ef1edf01b 1298
destinyXfate 2:0e2ef1edf01b 1299 #ifdef PNG_FREE_ME_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1300 png_uint_32 free_me; /* flags items libpng is responsible for freeing */
destinyXfate 2:0e2ef1edf01b 1301 #endif
destinyXfate 2:0e2ef1edf01b 1302
destinyXfate 2:0e2ef1edf01b 1303 #if defined(PNG_USER_CHUNKS_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1304 png_voidp user_chunk_ptr;
destinyXfate 2:0e2ef1edf01b 1305 png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */
destinyXfate 2:0e2ef1edf01b 1306 #endif
destinyXfate 2:0e2ef1edf01b 1307
destinyXfate 2:0e2ef1edf01b 1308 #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1309 int num_chunk_list;
destinyXfate 2:0e2ef1edf01b 1310 png_bytep chunk_list;
destinyXfate 2:0e2ef1edf01b 1311 #endif
destinyXfate 2:0e2ef1edf01b 1312
destinyXfate 2:0e2ef1edf01b 1313 /* New members added in libpng-1.0.3 */
destinyXfate 2:0e2ef1edf01b 1314 #if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1315 png_byte rgb_to_gray_status;
destinyXfate 2:0e2ef1edf01b 1316 /* These were changed from png_byte in libpng-1.0.6 */
destinyXfate 2:0e2ef1edf01b 1317 png_uint_16 rgb_to_gray_red_coeff;
destinyXfate 2:0e2ef1edf01b 1318 png_uint_16 rgb_to_gray_green_coeff;
destinyXfate 2:0e2ef1edf01b 1319 png_uint_16 rgb_to_gray_blue_coeff;
destinyXfate 2:0e2ef1edf01b 1320 #endif
destinyXfate 2:0e2ef1edf01b 1321
destinyXfate 2:0e2ef1edf01b 1322 /* New member added in libpng-1.0.4 (renamed in 1.0.9) */
destinyXfate 2:0e2ef1edf01b 1323 #if defined(PNG_MNG_FEATURES_SUPPORTED) || \
destinyXfate 2:0e2ef1edf01b 1324 defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
destinyXfate 2:0e2ef1edf01b 1325 defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1326 /* changed from png_byte to png_uint_32 at version 1.2.0 */
destinyXfate 2:0e2ef1edf01b 1327 #ifdef PNG_1_0_X
destinyXfate 2:0e2ef1edf01b 1328 png_byte mng_features_permitted;
destinyXfate 2:0e2ef1edf01b 1329 #else
destinyXfate 2:0e2ef1edf01b 1330 png_uint_32 mng_features_permitted;
destinyXfate 2:0e2ef1edf01b 1331 #endif /* PNG_1_0_X */
destinyXfate 2:0e2ef1edf01b 1332 #endif
destinyXfate 2:0e2ef1edf01b 1333
destinyXfate 2:0e2ef1edf01b 1334 /* New member added in libpng-1.0.7 */
destinyXfate 2:0e2ef1edf01b 1335 #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1336 png_fixed_point int_gamma;
destinyXfate 2:0e2ef1edf01b 1337 #endif
destinyXfate 2:0e2ef1edf01b 1338
destinyXfate 2:0e2ef1edf01b 1339 /* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */
destinyXfate 2:0e2ef1edf01b 1340 #if defined(PNG_MNG_FEATURES_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1341 png_byte filter_type;
destinyXfate 2:0e2ef1edf01b 1342 #endif
destinyXfate 2:0e2ef1edf01b 1343
destinyXfate 2:0e2ef1edf01b 1344 #if defined(PNG_1_0_X) || (defined(PNG_DEBUG) && defined(PNG_USE_PNGGCCRD))
destinyXfate 2:0e2ef1edf01b 1345 /* New member added in libpng-1.0.10, ifdef'ed out in 1.2.0 */
destinyXfate 2:0e2ef1edf01b 1346 png_uint_32 row_buf_size;
destinyXfate 2:0e2ef1edf01b 1347 #endif
destinyXfate 2:0e2ef1edf01b 1348
destinyXfate 2:0e2ef1edf01b 1349 /* New members added in libpng-1.2.0 */
destinyXfate 2:0e2ef1edf01b 1350 #if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1351 # if !defined(PNG_1_0_X)
destinyXfate 2:0e2ef1edf01b 1352 # if defined(PNG_MMX_CODE_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1353 png_byte mmx_bitdepth_threshold;
destinyXfate 2:0e2ef1edf01b 1354 png_uint_32 mmx_rowbytes_threshold;
destinyXfate 2:0e2ef1edf01b 1355 # endif
destinyXfate 2:0e2ef1edf01b 1356 png_uint_32 asm_flags;
destinyXfate 2:0e2ef1edf01b 1357 # endif
destinyXfate 2:0e2ef1edf01b 1358 #endif
destinyXfate 2:0e2ef1edf01b 1359
destinyXfate 2:0e2ef1edf01b 1360 /* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */
destinyXfate 2:0e2ef1edf01b 1361 #ifdef PNG_USER_MEM_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1362 png_voidp mem_ptr; /* user supplied struct for mem functions */
destinyXfate 2:0e2ef1edf01b 1363 png_malloc_ptr malloc_fn; /* function for allocating memory */
destinyXfate 2:0e2ef1edf01b 1364 png_free_ptr free_fn; /* function for freeing memory */
destinyXfate 2:0e2ef1edf01b 1365 #endif
destinyXfate 2:0e2ef1edf01b 1366
destinyXfate 2:0e2ef1edf01b 1367 /* New member added in libpng-1.0.13 and 1.2.0 */
destinyXfate 2:0e2ef1edf01b 1368 png_bytep big_row_buf; /* buffer to save current (unfiltered) row */
destinyXfate 2:0e2ef1edf01b 1369
destinyXfate 2:0e2ef1edf01b 1370 #if defined(PNG_READ_DITHER_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1371 /* The following three members were added at version 1.0.14 and 1.2.4 */
destinyXfate 2:0e2ef1edf01b 1372 png_bytep dither_sort; /* working sort array */
destinyXfate 2:0e2ef1edf01b 1373 png_bytep index_to_palette; /* where the original index currently is */
destinyXfate 2:0e2ef1edf01b 1374 /* in the palette */
destinyXfate 2:0e2ef1edf01b 1375 png_bytep palette_to_index; /* which original index points to this */
destinyXfate 2:0e2ef1edf01b 1376 /* palette color */
destinyXfate 2:0e2ef1edf01b 1377 #endif
destinyXfate 2:0e2ef1edf01b 1378
destinyXfate 2:0e2ef1edf01b 1379 /* New members added in libpng-1.0.16 and 1.2.6 */
destinyXfate 2:0e2ef1edf01b 1380 png_byte compression_type;
destinyXfate 2:0e2ef1edf01b 1381
destinyXfate 2:0e2ef1edf01b 1382 #ifdef PNG_SET_USER_LIMITS_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1383 png_uint_32 user_width_max;
destinyXfate 2:0e2ef1edf01b 1384 png_uint_32 user_height_max;
destinyXfate 2:0e2ef1edf01b 1385 #endif
destinyXfate 2:0e2ef1edf01b 1386
destinyXfate 2:0e2ef1edf01b 1387 };
destinyXfate 2:0e2ef1edf01b 1388
destinyXfate 2:0e2ef1edf01b 1389
destinyXfate 2:0e2ef1edf01b 1390 /* This triggers a compiler error in png.c, if png.c and png.h
destinyXfate 2:0e2ef1edf01b 1391 * do not agree upon the version number.
destinyXfate 2:0e2ef1edf01b 1392 */
destinyXfate 2:0e2ef1edf01b 1393 typedef png_structp version_1_2_15;
destinyXfate 2:0e2ef1edf01b 1394
destinyXfate 2:0e2ef1edf01b 1395 typedef png_struct FAR * FAR * png_structpp;
destinyXfate 2:0e2ef1edf01b 1396
destinyXfate 2:0e2ef1edf01b 1397 /* Here are the function definitions most commonly used. This is not
destinyXfate 2:0e2ef1edf01b 1398 * the place to find out how to use libpng. See libpng.txt for the
destinyXfate 2:0e2ef1edf01b 1399 * full explanation, see example.c for the summary. This just provides
destinyXfate 2:0e2ef1edf01b 1400 * a simple one line description of the use of each function.
destinyXfate 2:0e2ef1edf01b 1401 */
destinyXfate 2:0e2ef1edf01b 1402
destinyXfate 2:0e2ef1edf01b 1403 /* Returns the version number of the library */
destinyXfate 2:0e2ef1edf01b 1404 extern PNG_EXPORT(png_uint_32,png_access_version_number) PNGARG((void));
destinyXfate 2:0e2ef1edf01b 1405
destinyXfate 2:0e2ef1edf01b 1406 /* Tell lib we have already handled the first <num_bytes> magic bytes.
destinyXfate 2:0e2ef1edf01b 1407 * Handling more than 8 bytes from the beginning of the file is an error.
destinyXfate 2:0e2ef1edf01b 1408 */
destinyXfate 2:0e2ef1edf01b 1409 extern PNG_EXPORT(void,png_set_sig_bytes) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1410 int num_bytes));
destinyXfate 2:0e2ef1edf01b 1411
destinyXfate 2:0e2ef1edf01b 1412 /* Check sig[start] through sig[start + num_to_check - 1] to see if it's a
destinyXfate 2:0e2ef1edf01b 1413 * PNG file. Returns zero if the supplied bytes match the 8-byte PNG
destinyXfate 2:0e2ef1edf01b 1414 * signature, and non-zero otherwise. Having num_to_check == 0 or
destinyXfate 2:0e2ef1edf01b 1415 * start > 7 will always fail (ie return non-zero).
destinyXfate 2:0e2ef1edf01b 1416 */
destinyXfate 2:0e2ef1edf01b 1417 extern PNG_EXPORT(int,png_sig_cmp) PNGARG((png_bytep sig, png_size_t start,
destinyXfate 2:0e2ef1edf01b 1418 png_size_t num_to_check));
destinyXfate 2:0e2ef1edf01b 1419
destinyXfate 2:0e2ef1edf01b 1420 /* Simple signature checking function. This is the same as calling
destinyXfate 2:0e2ef1edf01b 1421 * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n).
destinyXfate 2:0e2ef1edf01b 1422 */
destinyXfate 2:0e2ef1edf01b 1423 extern PNG_EXPORT(int,png_check_sig) PNGARG((png_bytep sig, int num));
destinyXfate 2:0e2ef1edf01b 1424
destinyXfate 2:0e2ef1edf01b 1425 /* Allocate and initialize png_ptr struct for reading, and any other memory. */
destinyXfate 2:0e2ef1edf01b 1426 extern PNG_EXPORT(png_structp,png_create_read_struct)
destinyXfate 2:0e2ef1edf01b 1427 PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
destinyXfate 2:0e2ef1edf01b 1428 png_error_ptr error_fn, png_error_ptr warn_fn));
destinyXfate 2:0e2ef1edf01b 1429
destinyXfate 2:0e2ef1edf01b 1430 /* Allocate and initialize png_ptr struct for writing, and any other memory */
destinyXfate 2:0e2ef1edf01b 1431 extern PNG_EXPORT(png_structp,png_create_write_struct)
destinyXfate 2:0e2ef1edf01b 1432 PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
destinyXfate 2:0e2ef1edf01b 1433 png_error_ptr error_fn, png_error_ptr warn_fn));
destinyXfate 2:0e2ef1edf01b 1434
destinyXfate 2:0e2ef1edf01b 1435 #ifdef PNG_WRITE_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1436 extern PNG_EXPORT(png_uint_32,png_get_compression_buffer_size)
destinyXfate 2:0e2ef1edf01b 1437 PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1438 #endif
destinyXfate 2:0e2ef1edf01b 1439
destinyXfate 2:0e2ef1edf01b 1440 #ifdef PNG_WRITE_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1441 extern PNG_EXPORT(void,png_set_compression_buffer_size)
destinyXfate 2:0e2ef1edf01b 1442 PNGARG((png_structp png_ptr, png_uint_32 size));
destinyXfate 2:0e2ef1edf01b 1443 #endif
destinyXfate 2:0e2ef1edf01b 1444
destinyXfate 2:0e2ef1edf01b 1445 /* Reset the compression stream */
destinyXfate 2:0e2ef1edf01b 1446 extern PNG_EXPORT(int,png_reset_zstream) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1447
destinyXfate 2:0e2ef1edf01b 1448 /* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */
destinyXfate 2:0e2ef1edf01b 1449 #ifdef PNG_USER_MEM_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1450 extern PNG_EXPORT(png_structp,png_create_read_struct_2)
destinyXfate 2:0e2ef1edf01b 1451 PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
destinyXfate 2:0e2ef1edf01b 1452 png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
destinyXfate 2:0e2ef1edf01b 1453 png_malloc_ptr malloc_fn, png_free_ptr free_fn));
destinyXfate 2:0e2ef1edf01b 1454 extern PNG_EXPORT(png_structp,png_create_write_struct_2)
destinyXfate 2:0e2ef1edf01b 1455 PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
destinyXfate 2:0e2ef1edf01b 1456 png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
destinyXfate 2:0e2ef1edf01b 1457 png_malloc_ptr malloc_fn, png_free_ptr free_fn));
destinyXfate 2:0e2ef1edf01b 1458 #endif
destinyXfate 2:0e2ef1edf01b 1459
destinyXfate 2:0e2ef1edf01b 1460 /* Write a PNG chunk - size, type, (optional) data, CRC. */
destinyXfate 2:0e2ef1edf01b 1461 extern PNG_EXPORT(void,png_write_chunk) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1462 png_bytep chunk_name, png_bytep data, png_size_t length));
destinyXfate 2:0e2ef1edf01b 1463
destinyXfate 2:0e2ef1edf01b 1464 /* Write the start of a PNG chunk - length and chunk name. */
destinyXfate 2:0e2ef1edf01b 1465 extern PNG_EXPORT(void,png_write_chunk_start) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1466 png_bytep chunk_name, png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 1467
destinyXfate 2:0e2ef1edf01b 1468 /* Write the data of a PNG chunk started with png_write_chunk_start(). */
destinyXfate 2:0e2ef1edf01b 1469 extern PNG_EXPORT(void,png_write_chunk_data) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1470 png_bytep data, png_size_t length));
destinyXfate 2:0e2ef1edf01b 1471
destinyXfate 2:0e2ef1edf01b 1472 /* Finish a chunk started with png_write_chunk_start() (includes CRC). */
destinyXfate 2:0e2ef1edf01b 1473 extern PNG_EXPORT(void,png_write_chunk_end) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1474
destinyXfate 2:0e2ef1edf01b 1475 /* Allocate and initialize the info structure */
destinyXfate 2:0e2ef1edf01b 1476 extern PNG_EXPORT(png_infop,png_create_info_struct)
destinyXfate 2:0e2ef1edf01b 1477 PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1478
destinyXfate 2:0e2ef1edf01b 1479 #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
destinyXfate 2:0e2ef1edf01b 1480 /* Initialize the info structure (old interface - DEPRECATED) */
destinyXfate 2:0e2ef1edf01b 1481 extern PNG_EXPORT(void,png_info_init) PNGARG((png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 1482 #undef png_info_init
destinyXfate 2:0e2ef1edf01b 1483 #define png_info_init(info_ptr) png_info_init_3(&info_ptr,\
destinyXfate 2:0e2ef1edf01b 1484 png_sizeof(png_info));
destinyXfate 2:0e2ef1edf01b 1485 #endif
destinyXfate 2:0e2ef1edf01b 1486
destinyXfate 2:0e2ef1edf01b 1487 extern PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr,
destinyXfate 2:0e2ef1edf01b 1488 png_size_t png_info_struct_size));
destinyXfate 2:0e2ef1edf01b 1489
destinyXfate 2:0e2ef1edf01b 1490 /* Writes all the PNG information before the image. */
destinyXfate 2:0e2ef1edf01b 1491 extern PNG_EXPORT(void,png_write_info_before_PLTE) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1492 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 1493 extern PNG_EXPORT(void,png_write_info) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1494 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 1495
destinyXfate 2:0e2ef1edf01b 1496 #ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1497 /* read the information before the actual image data. */
destinyXfate 2:0e2ef1edf01b 1498 extern PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1499 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 1500 #endif
destinyXfate 2:0e2ef1edf01b 1501
destinyXfate 2:0e2ef1edf01b 1502 #if defined(PNG_TIME_RFC1123_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1503 extern PNG_EXPORT(png_charp,png_convert_to_rfc1123)
destinyXfate 2:0e2ef1edf01b 1504 PNGARG((png_structp png_ptr, png_timep ptime));
destinyXfate 2:0e2ef1edf01b 1505 #endif
destinyXfate 2:0e2ef1edf01b 1506
destinyXfate 2:0e2ef1edf01b 1507 #if !defined(_WIN32_WCE)
destinyXfate 2:0e2ef1edf01b 1508 /* "time.h" functions are not supported on WindowsCE */
destinyXfate 2:0e2ef1edf01b 1509 #if defined(PNG_WRITE_tIME_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1510 /* convert from a struct tm to png_time */
destinyXfate 2:0e2ef1edf01b 1511 extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime,
destinyXfate 2:0e2ef1edf01b 1512 struct tm FAR * ttime));
destinyXfate 2:0e2ef1edf01b 1513
destinyXfate 2:0e2ef1edf01b 1514 /* convert from time_t to png_time. Uses gmtime() */
destinyXfate 2:0e2ef1edf01b 1515 extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime,
destinyXfate 2:0e2ef1edf01b 1516 time_t ttime));
destinyXfate 2:0e2ef1edf01b 1517 #endif /* PNG_WRITE_tIME_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 1518 #endif /* _WIN32_WCE */
destinyXfate 2:0e2ef1edf01b 1519
destinyXfate 2:0e2ef1edf01b 1520 #if defined(PNG_READ_EXPAND_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1521 /* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */
destinyXfate 2:0e2ef1edf01b 1522 extern PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1523 #if !defined(PNG_1_0_X)
destinyXfate 2:0e2ef1edf01b 1524 extern PNG_EXPORT(void,png_set_expand_gray_1_2_4_to_8) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 1525 png_ptr));
destinyXfate 2:0e2ef1edf01b 1526 #endif
destinyXfate 2:0e2ef1edf01b 1527 extern PNG_EXPORT(void,png_set_palette_to_rgb) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1528 extern PNG_EXPORT(void,png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1529 #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
destinyXfate 2:0e2ef1edf01b 1530 /* Deprecated */
destinyXfate 2:0e2ef1edf01b 1531 extern PNG_EXPORT(void,png_set_gray_1_2_4_to_8) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1532 #endif
destinyXfate 2:0e2ef1edf01b 1533 #endif
destinyXfate 2:0e2ef1edf01b 1534
destinyXfate 2:0e2ef1edf01b 1535 #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1536 /* Use blue, green, red order for pixels. */
destinyXfate 2:0e2ef1edf01b 1537 extern PNG_EXPORT(void,png_set_bgr) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1538 #endif
destinyXfate 2:0e2ef1edf01b 1539
destinyXfate 2:0e2ef1edf01b 1540 #if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1541 /* Expand the grayscale to 24-bit RGB if necessary. */
destinyXfate 2:0e2ef1edf01b 1542 extern PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1543 #endif
destinyXfate 2:0e2ef1edf01b 1544
destinyXfate 2:0e2ef1edf01b 1545 #if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1546 /* Reduce RGB to grayscale. */
destinyXfate 2:0e2ef1edf01b 1547 #ifdef PNG_FLOATING_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1548 extern PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1549 int error_action, double red, double green ));
destinyXfate 2:0e2ef1edf01b 1550 #endif
destinyXfate 2:0e2ef1edf01b 1551 extern PNG_EXPORT(void,png_set_rgb_to_gray_fixed) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1552 int error_action, png_fixed_point red, png_fixed_point green ));
destinyXfate 2:0e2ef1edf01b 1553 extern PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 1554 png_ptr));
destinyXfate 2:0e2ef1edf01b 1555 #endif
destinyXfate 2:0e2ef1edf01b 1556
destinyXfate 2:0e2ef1edf01b 1557 extern PNG_EXPORT(void,png_build_grayscale_palette) PNGARG((int bit_depth,
destinyXfate 2:0e2ef1edf01b 1558 png_colorp palette));
destinyXfate 2:0e2ef1edf01b 1559
destinyXfate 2:0e2ef1edf01b 1560 #if defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1561 extern PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1562 #endif
destinyXfate 2:0e2ef1edf01b 1563
destinyXfate 2:0e2ef1edf01b 1564 #if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \
destinyXfate 2:0e2ef1edf01b 1565 defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1566 extern PNG_EXPORT(void,png_set_swap_alpha) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1567 #endif
destinyXfate 2:0e2ef1edf01b 1568
destinyXfate 2:0e2ef1edf01b 1569 #if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \
destinyXfate 2:0e2ef1edf01b 1570 defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1571 extern PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1572 #endif
destinyXfate 2:0e2ef1edf01b 1573
destinyXfate 2:0e2ef1edf01b 1574 #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1575 /* Add a filler byte to 8-bit Gray or 24-bit RGB images. */
destinyXfate 2:0e2ef1edf01b 1576 extern PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1577 png_uint_32 filler, int flags));
destinyXfate 2:0e2ef1edf01b 1578 /* The values of the PNG_FILLER_ defines should NOT be changed */
destinyXfate 2:0e2ef1edf01b 1579 #define PNG_FILLER_BEFORE 0
destinyXfate 2:0e2ef1edf01b 1580 #define PNG_FILLER_AFTER 1
destinyXfate 2:0e2ef1edf01b 1581 /* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */
destinyXfate 2:0e2ef1edf01b 1582 #if !defined(PNG_1_0_X)
destinyXfate 2:0e2ef1edf01b 1583 extern PNG_EXPORT(void,png_set_add_alpha) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1584 png_uint_32 filler, int flags));
destinyXfate 2:0e2ef1edf01b 1585 #endif
destinyXfate 2:0e2ef1edf01b 1586 #endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 1587
destinyXfate 2:0e2ef1edf01b 1588 #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1589 /* Swap bytes in 16-bit depth files. */
destinyXfate 2:0e2ef1edf01b 1590 extern PNG_EXPORT(void,png_set_swap) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1591 #endif
destinyXfate 2:0e2ef1edf01b 1592
destinyXfate 2:0e2ef1edf01b 1593 #if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1594 /* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */
destinyXfate 2:0e2ef1edf01b 1595 extern PNG_EXPORT(void,png_set_packing) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1596 #endif
destinyXfate 2:0e2ef1edf01b 1597
destinyXfate 2:0e2ef1edf01b 1598 #if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1599 /* Swap packing order of pixels in bytes. */
destinyXfate 2:0e2ef1edf01b 1600 extern PNG_EXPORT(void,png_set_packswap) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1601 #endif
destinyXfate 2:0e2ef1edf01b 1602
destinyXfate 2:0e2ef1edf01b 1603 #if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1604 /* Converts files to legal bit depths. */
destinyXfate 2:0e2ef1edf01b 1605 extern PNG_EXPORT(void,png_set_shift) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1606 png_color_8p true_bits));
destinyXfate 2:0e2ef1edf01b 1607 #endif
destinyXfate 2:0e2ef1edf01b 1608
destinyXfate 2:0e2ef1edf01b 1609 #if defined(PNG_READ_INTERLACING_SUPPORTED) || \
destinyXfate 2:0e2ef1edf01b 1610 defined(PNG_WRITE_INTERLACING_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1611 /* Have the code handle the interlacing. Returns the number of passes. */
destinyXfate 2:0e2ef1edf01b 1612 extern PNG_EXPORT(int,png_set_interlace_handling) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1613 #endif
destinyXfate 2:0e2ef1edf01b 1614
destinyXfate 2:0e2ef1edf01b 1615 #if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1616 /* Invert monochrome files */
destinyXfate 2:0e2ef1edf01b 1617 extern PNG_EXPORT(void,png_set_invert_mono) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1618 #endif
destinyXfate 2:0e2ef1edf01b 1619
destinyXfate 2:0e2ef1edf01b 1620 #if defined(PNG_READ_BACKGROUND_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1621 /* Handle alpha and tRNS by replacing with a background color. */
destinyXfate 2:0e2ef1edf01b 1622 #ifdef PNG_FLOATING_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1623 extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1624 png_color_16p background_color, int background_gamma_code,
destinyXfate 2:0e2ef1edf01b 1625 int need_expand, double background_gamma));
destinyXfate 2:0e2ef1edf01b 1626 #endif
destinyXfate 2:0e2ef1edf01b 1627 #define PNG_BACKGROUND_GAMMA_UNKNOWN 0
destinyXfate 2:0e2ef1edf01b 1628 #define PNG_BACKGROUND_GAMMA_SCREEN 1
destinyXfate 2:0e2ef1edf01b 1629 #define PNG_BACKGROUND_GAMMA_FILE 2
destinyXfate 2:0e2ef1edf01b 1630 #define PNG_BACKGROUND_GAMMA_UNIQUE 3
destinyXfate 2:0e2ef1edf01b 1631 #endif
destinyXfate 2:0e2ef1edf01b 1632
destinyXfate 2:0e2ef1edf01b 1633 #if defined(PNG_READ_16_TO_8_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1634 /* strip the second byte of information from a 16-bit depth file. */
destinyXfate 2:0e2ef1edf01b 1635 extern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1636 #endif
destinyXfate 2:0e2ef1edf01b 1637
destinyXfate 2:0e2ef1edf01b 1638 #if defined(PNG_READ_DITHER_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1639 /* Turn on dithering, and reduce the palette to the number of colors available. */
destinyXfate 2:0e2ef1edf01b 1640 extern PNG_EXPORT(void,png_set_dither) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1641 png_colorp palette, int num_palette, int maximum_colors,
destinyXfate 2:0e2ef1edf01b 1642 png_uint_16p histogram, int full_dither));
destinyXfate 2:0e2ef1edf01b 1643 #endif
destinyXfate 2:0e2ef1edf01b 1644
destinyXfate 2:0e2ef1edf01b 1645 #if defined(PNG_READ_GAMMA_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1646 /* Handle gamma correction. Screen_gamma=(display_exponent) */
destinyXfate 2:0e2ef1edf01b 1647 #ifdef PNG_FLOATING_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1648 extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1649 double screen_gamma, double default_file_gamma));
destinyXfate 2:0e2ef1edf01b 1650 #endif
destinyXfate 2:0e2ef1edf01b 1651 #endif
destinyXfate 2:0e2ef1edf01b 1652
destinyXfate 2:0e2ef1edf01b 1653 #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
destinyXfate 2:0e2ef1edf01b 1654 #if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
destinyXfate 2:0e2ef1edf01b 1655 defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1656 /* Permit or disallow empty PLTE (0: not permitted, 1: permitted) */
destinyXfate 2:0e2ef1edf01b 1657 /* Deprecated and will be removed. Use png_permit_mng_features() instead. */
destinyXfate 2:0e2ef1edf01b 1658 extern PNG_EXPORT(void,png_permit_empty_plte) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1659 int empty_plte_permitted));
destinyXfate 2:0e2ef1edf01b 1660 #endif
destinyXfate 2:0e2ef1edf01b 1661 #endif
destinyXfate 2:0e2ef1edf01b 1662
destinyXfate 2:0e2ef1edf01b 1663 #if defined(PNG_WRITE_FLUSH_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1664 /* Set how many lines between output flushes - 0 for no flushing */
destinyXfate 2:0e2ef1edf01b 1665 extern PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows));
destinyXfate 2:0e2ef1edf01b 1666 /* Flush the current PNG output buffer */
destinyXfate 2:0e2ef1edf01b 1667 extern PNG_EXPORT(void,png_write_flush) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1668 #endif
destinyXfate 2:0e2ef1edf01b 1669
destinyXfate 2:0e2ef1edf01b 1670 /* optional update palette with requested transformations */
destinyXfate 2:0e2ef1edf01b 1671 extern PNG_EXPORT(void,png_start_read_image) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1672
destinyXfate 2:0e2ef1edf01b 1673 /* optional call to update the users info structure */
destinyXfate 2:0e2ef1edf01b 1674 extern PNG_EXPORT(void,png_read_update_info) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1675 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 1676
destinyXfate 2:0e2ef1edf01b 1677 #ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1678 /* read one or more rows of image data. */
destinyXfate 2:0e2ef1edf01b 1679 extern PNG_EXPORT(void,png_read_rows) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1680 png_bytepp row, png_bytepp display_row, png_uint_32 num_rows));
destinyXfate 2:0e2ef1edf01b 1681 #endif
destinyXfate 2:0e2ef1edf01b 1682
destinyXfate 2:0e2ef1edf01b 1683 #ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1684 /* read a row of data. */
destinyXfate 2:0e2ef1edf01b 1685 extern PNG_EXPORT(void,png_read_row) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1686 png_bytep row,
destinyXfate 2:0e2ef1edf01b 1687 png_bytep display_row));
destinyXfate 2:0e2ef1edf01b 1688 #endif
destinyXfate 2:0e2ef1edf01b 1689
destinyXfate 2:0e2ef1edf01b 1690 #ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1691 /* read the whole image into memory at once. */
destinyXfate 2:0e2ef1edf01b 1692 extern PNG_EXPORT(void,png_read_image) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1693 png_bytepp image));
destinyXfate 2:0e2ef1edf01b 1694 #endif
destinyXfate 2:0e2ef1edf01b 1695
destinyXfate 2:0e2ef1edf01b 1696 /* write a row of image data */
destinyXfate 2:0e2ef1edf01b 1697 extern PNG_EXPORT(void,png_write_row) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1698 png_bytep row));
destinyXfate 2:0e2ef1edf01b 1699
destinyXfate 2:0e2ef1edf01b 1700 /* write a few rows of image data */
destinyXfate 2:0e2ef1edf01b 1701 extern PNG_EXPORT(void,png_write_rows) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1702 png_bytepp row, png_uint_32 num_rows));
destinyXfate 2:0e2ef1edf01b 1703
destinyXfate 2:0e2ef1edf01b 1704 /* write the image data */
destinyXfate 2:0e2ef1edf01b 1705 extern PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1706 png_bytepp image));
destinyXfate 2:0e2ef1edf01b 1707
destinyXfate 2:0e2ef1edf01b 1708 /* writes the end of the PNG file. */
destinyXfate 2:0e2ef1edf01b 1709 extern PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1710 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 1711
destinyXfate 2:0e2ef1edf01b 1712 #ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1713 /* read the end of the PNG file. */
destinyXfate 2:0e2ef1edf01b 1714 extern PNG_EXPORT(void,png_read_end) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1715 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 1716 #endif
destinyXfate 2:0e2ef1edf01b 1717
destinyXfate 2:0e2ef1edf01b 1718 /* free any memory associated with the png_info_struct */
destinyXfate 2:0e2ef1edf01b 1719 extern PNG_EXPORT(void,png_destroy_info_struct) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1720 png_infopp info_ptr_ptr));
destinyXfate 2:0e2ef1edf01b 1721
destinyXfate 2:0e2ef1edf01b 1722 /* free any memory associated with the png_struct and the png_info_structs */
destinyXfate 2:0e2ef1edf01b 1723 extern PNG_EXPORT(void,png_destroy_read_struct) PNGARG((png_structpp
destinyXfate 2:0e2ef1edf01b 1724 png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr));
destinyXfate 2:0e2ef1edf01b 1725
destinyXfate 2:0e2ef1edf01b 1726 /* free all memory used by the read (old method - NOT DLL EXPORTED) */
destinyXfate 2:0e2ef1edf01b 1727 extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 1728 png_infop end_info_ptr));
destinyXfate 2:0e2ef1edf01b 1729
destinyXfate 2:0e2ef1edf01b 1730 /* free any memory associated with the png_struct and the png_info_structs */
destinyXfate 2:0e2ef1edf01b 1731 extern PNG_EXPORT(void,png_destroy_write_struct)
destinyXfate 2:0e2ef1edf01b 1732 PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr));
destinyXfate 2:0e2ef1edf01b 1733
destinyXfate 2:0e2ef1edf01b 1734 /* free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */
destinyXfate 2:0e2ef1edf01b 1735 extern void png_write_destroy PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1736
destinyXfate 2:0e2ef1edf01b 1737 /* set the libpng method of handling chunk CRC errors */
destinyXfate 2:0e2ef1edf01b 1738 extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1739 int crit_action, int ancil_action));
destinyXfate 2:0e2ef1edf01b 1740
destinyXfate 2:0e2ef1edf01b 1741 /* Values for png_set_crc_action() to say how to handle CRC errors in
destinyXfate 2:0e2ef1edf01b 1742 * ancillary and critical chunks, and whether to use the data contained
destinyXfate 2:0e2ef1edf01b 1743 * therein. Note that it is impossible to "discard" data in a critical
destinyXfate 2:0e2ef1edf01b 1744 * chunk. For versions prior to 0.90, the action was always error/quit,
destinyXfate 2:0e2ef1edf01b 1745 * whereas in version 0.90 and later, the action for CRC errors in ancillary
destinyXfate 2:0e2ef1edf01b 1746 * chunks is warn/discard. These values should NOT be changed.
destinyXfate 2:0e2ef1edf01b 1747 *
destinyXfate 2:0e2ef1edf01b 1748 * value action:critical action:ancillary
destinyXfate 2:0e2ef1edf01b 1749 */
destinyXfate 2:0e2ef1edf01b 1750 #define PNG_CRC_DEFAULT 0 /* error/quit warn/discard data */
destinyXfate 2:0e2ef1edf01b 1751 #define PNG_CRC_ERROR_QUIT 1 /* error/quit error/quit */
destinyXfate 2:0e2ef1edf01b 1752 #define PNG_CRC_WARN_DISCARD 2 /* (INVALID) warn/discard data */
destinyXfate 2:0e2ef1edf01b 1753 #define PNG_CRC_WARN_USE 3 /* warn/use data warn/use data */
destinyXfate 2:0e2ef1edf01b 1754 #define PNG_CRC_QUIET_USE 4 /* quiet/use data quiet/use data */
destinyXfate 2:0e2ef1edf01b 1755 #define PNG_CRC_NO_CHANGE 5 /* use current value use current value */
destinyXfate 2:0e2ef1edf01b 1756
destinyXfate 2:0e2ef1edf01b 1757 /* These functions give the user control over the scan-line filtering in
destinyXfate 2:0e2ef1edf01b 1758 * libpng and the compression methods used by zlib. These functions are
destinyXfate 2:0e2ef1edf01b 1759 * mainly useful for testing, as the defaults should work with most users.
destinyXfate 2:0e2ef1edf01b 1760 * Those users who are tight on memory or want faster performance at the
destinyXfate 2:0e2ef1edf01b 1761 * expense of compression can modify them. See the compression library
destinyXfate 2:0e2ef1edf01b 1762 * header file (zlib.h) for an explination of the compression functions.
destinyXfate 2:0e2ef1edf01b 1763 */
destinyXfate 2:0e2ef1edf01b 1764
destinyXfate 2:0e2ef1edf01b 1765 /* set the filtering method(s) used by libpng. Currently, the only valid
destinyXfate 2:0e2ef1edf01b 1766 * value for "method" is 0.
destinyXfate 2:0e2ef1edf01b 1767 */
destinyXfate 2:0e2ef1edf01b 1768 extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method,
destinyXfate 2:0e2ef1edf01b 1769 int filters));
destinyXfate 2:0e2ef1edf01b 1770
destinyXfate 2:0e2ef1edf01b 1771 /* Flags for png_set_filter() to say which filters to use. The flags
destinyXfate 2:0e2ef1edf01b 1772 * are chosen so that they don't conflict with real filter types
destinyXfate 2:0e2ef1edf01b 1773 * below, in case they are supplied instead of the #defined constants.
destinyXfate 2:0e2ef1edf01b 1774 * These values should NOT be changed.
destinyXfate 2:0e2ef1edf01b 1775 */
destinyXfate 2:0e2ef1edf01b 1776 #define PNG_NO_FILTERS 0x00
destinyXfate 2:0e2ef1edf01b 1777 #define PNG_FILTER_NONE 0x08
destinyXfate 2:0e2ef1edf01b 1778 #define PNG_FILTER_SUB 0x10
destinyXfate 2:0e2ef1edf01b 1779 #define PNG_FILTER_UP 0x20
destinyXfate 2:0e2ef1edf01b 1780 #define PNG_FILTER_AVG 0x40
destinyXfate 2:0e2ef1edf01b 1781 #define PNG_FILTER_PAETH 0x80
destinyXfate 2:0e2ef1edf01b 1782 #define PNG_ALL_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | \
destinyXfate 2:0e2ef1edf01b 1783 PNG_FILTER_AVG | PNG_FILTER_PAETH)
destinyXfate 2:0e2ef1edf01b 1784
destinyXfate 2:0e2ef1edf01b 1785 /* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now.
destinyXfate 2:0e2ef1edf01b 1786 * These defines should NOT be changed.
destinyXfate 2:0e2ef1edf01b 1787 */
destinyXfate 2:0e2ef1edf01b 1788 #define PNG_FILTER_VALUE_NONE 0
destinyXfate 2:0e2ef1edf01b 1789 #define PNG_FILTER_VALUE_SUB 1
destinyXfate 2:0e2ef1edf01b 1790 #define PNG_FILTER_VALUE_UP 2
destinyXfate 2:0e2ef1edf01b 1791 #define PNG_FILTER_VALUE_AVG 3
destinyXfate 2:0e2ef1edf01b 1792 #define PNG_FILTER_VALUE_PAETH 4
destinyXfate 2:0e2ef1edf01b 1793 #define PNG_FILTER_VALUE_LAST 5
destinyXfate 2:0e2ef1edf01b 1794
destinyXfate 2:0e2ef1edf01b 1795 #if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) /* EXPERIMENTAL */
destinyXfate 2:0e2ef1edf01b 1796 /* The "heuristic_method" is given by one of the PNG_FILTER_HEURISTIC_
destinyXfate 2:0e2ef1edf01b 1797 * defines, either the default (minimum-sum-of-absolute-differences), or
destinyXfate 2:0e2ef1edf01b 1798 * the experimental method (weighted-minimum-sum-of-absolute-differences).
destinyXfate 2:0e2ef1edf01b 1799 *
destinyXfate 2:0e2ef1edf01b 1800 * Weights are factors >= 1.0, indicating how important it is to keep the
destinyXfate 2:0e2ef1edf01b 1801 * filter type consistent between rows. Larger numbers mean the current
destinyXfate 2:0e2ef1edf01b 1802 * filter is that many times as likely to be the same as the "num_weights"
destinyXfate 2:0e2ef1edf01b 1803 * previous filters. This is cumulative for each previous row with a weight.
destinyXfate 2:0e2ef1edf01b 1804 * There needs to be "num_weights" values in "filter_weights", or it can be
destinyXfate 2:0e2ef1edf01b 1805 * NULL if the weights aren't being specified. Weights have no influence on
destinyXfate 2:0e2ef1edf01b 1806 * the selection of the first row filter. Well chosen weights can (in theory)
destinyXfate 2:0e2ef1edf01b 1807 * improve the compression for a given image.
destinyXfate 2:0e2ef1edf01b 1808 *
destinyXfate 2:0e2ef1edf01b 1809 * Costs are factors >= 1.0 indicating the relative decoding costs of a
destinyXfate 2:0e2ef1edf01b 1810 * filter type. Higher costs indicate more decoding expense, and are
destinyXfate 2:0e2ef1edf01b 1811 * therefore less likely to be selected over a filter with lower computational
destinyXfate 2:0e2ef1edf01b 1812 * costs. There needs to be a value in "filter_costs" for each valid filter
destinyXfate 2:0e2ef1edf01b 1813 * type (given by PNG_FILTER_VALUE_LAST), or it can be NULL if you aren't
destinyXfate 2:0e2ef1edf01b 1814 * setting the costs. Costs try to improve the speed of decompression without
destinyXfate 2:0e2ef1edf01b 1815 * unduly increasing the compressed image size.
destinyXfate 2:0e2ef1edf01b 1816 *
destinyXfate 2:0e2ef1edf01b 1817 * A negative weight or cost indicates the default value is to be used, and
destinyXfate 2:0e2ef1edf01b 1818 * values in the range [0.0, 1.0) indicate the value is to remain unchanged.
destinyXfate 2:0e2ef1edf01b 1819 * The default values for both weights and costs are currently 1.0, but may
destinyXfate 2:0e2ef1edf01b 1820 * change if good general weighting/cost heuristics can be found. If both
destinyXfate 2:0e2ef1edf01b 1821 * the weights and costs are set to 1.0, this degenerates the WEIGHTED method
destinyXfate 2:0e2ef1edf01b 1822 * to the UNWEIGHTED method, but with added encoding time/computation.
destinyXfate 2:0e2ef1edf01b 1823 */
destinyXfate 2:0e2ef1edf01b 1824 #ifdef PNG_FLOATING_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1825 extern PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1826 int heuristic_method, int num_weights, png_doublep filter_weights,
destinyXfate 2:0e2ef1edf01b 1827 png_doublep filter_costs));
destinyXfate 2:0e2ef1edf01b 1828 #endif
destinyXfate 2:0e2ef1edf01b 1829 #endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 1830
destinyXfate 2:0e2ef1edf01b 1831 /* Heuristic used for row filter selection. These defines should NOT be
destinyXfate 2:0e2ef1edf01b 1832 * changed.
destinyXfate 2:0e2ef1edf01b 1833 */
destinyXfate 2:0e2ef1edf01b 1834 #define PNG_FILTER_HEURISTIC_DEFAULT 0 /* Currently "UNWEIGHTED" */
destinyXfate 2:0e2ef1edf01b 1835 #define PNG_FILTER_HEURISTIC_UNWEIGHTED 1 /* Used by libpng < 0.95 */
destinyXfate 2:0e2ef1edf01b 1836 #define PNG_FILTER_HEURISTIC_WEIGHTED 2 /* Experimental feature */
destinyXfate 2:0e2ef1edf01b 1837 #define PNG_FILTER_HEURISTIC_LAST 3 /* Not a valid value */
destinyXfate 2:0e2ef1edf01b 1838
destinyXfate 2:0e2ef1edf01b 1839 /* Set the library compression level. Currently, valid values range from
destinyXfate 2:0e2ef1edf01b 1840 * 0 - 9, corresponding directly to the zlib compression levels 0 - 9
destinyXfate 2:0e2ef1edf01b 1841 * (0 - no compression, 9 - "maximal" compression). Note that tests have
destinyXfate 2:0e2ef1edf01b 1842 * shown that zlib compression levels 3-6 usually perform as well as level 9
destinyXfate 2:0e2ef1edf01b 1843 * for PNG images, and do considerably fewer caclulations. In the future,
destinyXfate 2:0e2ef1edf01b 1844 * these values may not correspond directly to the zlib compression levels.
destinyXfate 2:0e2ef1edf01b 1845 */
destinyXfate 2:0e2ef1edf01b 1846 extern PNG_EXPORT(void,png_set_compression_level) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1847 int level));
destinyXfate 2:0e2ef1edf01b 1848
destinyXfate 2:0e2ef1edf01b 1849 extern PNG_EXPORT(void,png_set_compression_mem_level)
destinyXfate 2:0e2ef1edf01b 1850 PNGARG((png_structp png_ptr, int mem_level));
destinyXfate 2:0e2ef1edf01b 1851
destinyXfate 2:0e2ef1edf01b 1852 extern PNG_EXPORT(void,png_set_compression_strategy)
destinyXfate 2:0e2ef1edf01b 1853 PNGARG((png_structp png_ptr, int strategy));
destinyXfate 2:0e2ef1edf01b 1854
destinyXfate 2:0e2ef1edf01b 1855 extern PNG_EXPORT(void,png_set_compression_window_bits)
destinyXfate 2:0e2ef1edf01b 1856 PNGARG((png_structp png_ptr, int window_bits));
destinyXfate 2:0e2ef1edf01b 1857
destinyXfate 2:0e2ef1edf01b 1858 extern PNG_EXPORT(void,png_set_compression_method) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1859 int method));
destinyXfate 2:0e2ef1edf01b 1860
destinyXfate 2:0e2ef1edf01b 1861 /* These next functions are called for input/output, memory, and error
destinyXfate 2:0e2ef1edf01b 1862 * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c,
destinyXfate 2:0e2ef1edf01b 1863 * and call standard C I/O routines such as fread(), fwrite(), and
destinyXfate 2:0e2ef1edf01b 1864 * fprintf(). These functions can be made to use other I/O routines
destinyXfate 2:0e2ef1edf01b 1865 * at run time for those applications that need to handle I/O in a
destinyXfate 2:0e2ef1edf01b 1866 * different manner by calling png_set_???_fn(). See libpng.txt for
destinyXfate 2:0e2ef1edf01b 1867 * more information.
destinyXfate 2:0e2ef1edf01b 1868 */
destinyXfate 2:0e2ef1edf01b 1869
destinyXfate 2:0e2ef1edf01b 1870 #if !defined(PNG_NO_STDIO)
destinyXfate 2:0e2ef1edf01b 1871 /* Initialize the input/output for the PNG file to the default functions. */
destinyXfate 2:0e2ef1edf01b 1872 extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, png_FILE_p fp));
destinyXfate 2:0e2ef1edf01b 1873 #endif
destinyXfate 2:0e2ef1edf01b 1874
destinyXfate 2:0e2ef1edf01b 1875 /* Replace the (error and abort), and warning functions with user
destinyXfate 2:0e2ef1edf01b 1876 * supplied functions. If no messages are to be printed you must still
destinyXfate 2:0e2ef1edf01b 1877 * write and use replacement functions. The replacement error_fn should
destinyXfate 2:0e2ef1edf01b 1878 * still do a longjmp to the last setjmp location if you are using this
destinyXfate 2:0e2ef1edf01b 1879 * method of error handling. If error_fn or warning_fn is NULL, the
destinyXfate 2:0e2ef1edf01b 1880 * default function will be used.
destinyXfate 2:0e2ef1edf01b 1881 */
destinyXfate 2:0e2ef1edf01b 1882
destinyXfate 2:0e2ef1edf01b 1883 extern PNG_EXPORT(void,png_set_error_fn) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1884 png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn));
destinyXfate 2:0e2ef1edf01b 1885
destinyXfate 2:0e2ef1edf01b 1886 /* Return the user pointer associated with the error functions */
destinyXfate 2:0e2ef1edf01b 1887 extern PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1888
destinyXfate 2:0e2ef1edf01b 1889 /* Replace the default data output functions with a user supplied one(s).
destinyXfate 2:0e2ef1edf01b 1890 * If buffered output is not used, then output_flush_fn can be set to NULL.
destinyXfate 2:0e2ef1edf01b 1891 * If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time
destinyXfate 2:0e2ef1edf01b 1892 * output_flush_fn will be ignored (and thus can be NULL).
destinyXfate 2:0e2ef1edf01b 1893 */
destinyXfate 2:0e2ef1edf01b 1894 extern PNG_EXPORT(void,png_set_write_fn) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1895 png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn));
destinyXfate 2:0e2ef1edf01b 1896
destinyXfate 2:0e2ef1edf01b 1897 /* Replace the default data input function with a user supplied one. */
destinyXfate 2:0e2ef1edf01b 1898 extern PNG_EXPORT(void,png_set_read_fn) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1899 png_voidp io_ptr, png_rw_ptr read_data_fn));
destinyXfate 2:0e2ef1edf01b 1900
destinyXfate 2:0e2ef1edf01b 1901 /* Return the user pointer associated with the I/O functions */
destinyXfate 2:0e2ef1edf01b 1902 extern PNG_EXPORT(png_voidp,png_get_io_ptr) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1903
destinyXfate 2:0e2ef1edf01b 1904 extern PNG_EXPORT(void,png_set_read_status_fn) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1905 png_read_status_ptr read_row_fn));
destinyXfate 2:0e2ef1edf01b 1906
destinyXfate 2:0e2ef1edf01b 1907 extern PNG_EXPORT(void,png_set_write_status_fn) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1908 png_write_status_ptr write_row_fn));
destinyXfate 2:0e2ef1edf01b 1909
destinyXfate 2:0e2ef1edf01b 1910 #ifdef PNG_USER_MEM_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1911 /* Replace the default memory allocation functions with user supplied one(s). */
destinyXfate 2:0e2ef1edf01b 1912 extern PNG_EXPORT(void,png_set_mem_fn) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1913 png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn));
destinyXfate 2:0e2ef1edf01b 1914 /* Return the user pointer associated with the memory functions */
destinyXfate 2:0e2ef1edf01b 1915 extern PNG_EXPORT(png_voidp,png_get_mem_ptr) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1916 #endif
destinyXfate 2:0e2ef1edf01b 1917
destinyXfate 2:0e2ef1edf01b 1918 #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
destinyXfate 2:0e2ef1edf01b 1919 defined(PNG_LEGACY_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1920 extern PNG_EXPORT(void,png_set_read_user_transform_fn) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 1921 png_ptr, png_user_transform_ptr read_user_transform_fn));
destinyXfate 2:0e2ef1edf01b 1922 #endif
destinyXfate 2:0e2ef1edf01b 1923
destinyXfate 2:0e2ef1edf01b 1924 #if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
destinyXfate 2:0e2ef1edf01b 1925 defined(PNG_LEGACY_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1926 extern PNG_EXPORT(void,png_set_write_user_transform_fn) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 1927 png_ptr, png_user_transform_ptr write_user_transform_fn));
destinyXfate 2:0e2ef1edf01b 1928 #endif
destinyXfate 2:0e2ef1edf01b 1929
destinyXfate 2:0e2ef1edf01b 1930 #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
destinyXfate 2:0e2ef1edf01b 1931 defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
destinyXfate 2:0e2ef1edf01b 1932 defined(PNG_LEGACY_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 1933 extern PNG_EXPORT(void,png_set_user_transform_info) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 1934 png_ptr, png_voidp user_transform_ptr, int user_transform_depth,
destinyXfate 2:0e2ef1edf01b 1935 int user_transform_channels));
destinyXfate 2:0e2ef1edf01b 1936 /* Return the user pointer associated with the user transform functions */
destinyXfate 2:0e2ef1edf01b 1937 extern PNG_EXPORT(png_voidp,png_get_user_transform_ptr)
destinyXfate 2:0e2ef1edf01b 1938 PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1939 #endif
destinyXfate 2:0e2ef1edf01b 1940
destinyXfate 2:0e2ef1edf01b 1941 #ifdef PNG_USER_CHUNKS_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1942 extern PNG_EXPORT(void,png_set_read_user_chunk_fn) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1943 png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn));
destinyXfate 2:0e2ef1edf01b 1944 extern PNG_EXPORT(png_voidp,png_get_user_chunk_ptr) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 1945 png_ptr));
destinyXfate 2:0e2ef1edf01b 1946 #endif
destinyXfate 2:0e2ef1edf01b 1947
destinyXfate 2:0e2ef1edf01b 1948 #ifdef PNG_PROGRESSIVE_READ_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1949 /* Sets the function callbacks for the push reader, and a pointer to a
destinyXfate 2:0e2ef1edf01b 1950 * user-defined structure available to the callback functions.
destinyXfate 2:0e2ef1edf01b 1951 */
destinyXfate 2:0e2ef1edf01b 1952 extern PNG_EXPORT(void,png_set_progressive_read_fn) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1953 png_voidp progressive_ptr,
destinyXfate 2:0e2ef1edf01b 1954 png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,
destinyXfate 2:0e2ef1edf01b 1955 png_progressive_end_ptr end_fn));
destinyXfate 2:0e2ef1edf01b 1956
destinyXfate 2:0e2ef1edf01b 1957 /* returns the user pointer associated with the push read functions */
destinyXfate 2:0e2ef1edf01b 1958 extern PNG_EXPORT(png_voidp,png_get_progressive_ptr)
destinyXfate 2:0e2ef1edf01b 1959 PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 1960
destinyXfate 2:0e2ef1edf01b 1961 /* function to be called when data becomes available */
destinyXfate 2:0e2ef1edf01b 1962 extern PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1963 png_infop info_ptr, png_bytep buffer, png_size_t buffer_size));
destinyXfate 2:0e2ef1edf01b 1964
destinyXfate 2:0e2ef1edf01b 1965 /* function that combines rows. Not very much different than the
destinyXfate 2:0e2ef1edf01b 1966 * png_combine_row() call. Is this even used?????
destinyXfate 2:0e2ef1edf01b 1967 */
destinyXfate 2:0e2ef1edf01b 1968 extern PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1969 png_bytep old_row, png_bytep new_row));
destinyXfate 2:0e2ef1edf01b 1970 #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 1971
destinyXfate 2:0e2ef1edf01b 1972 extern PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1973 png_uint_32 size));
destinyXfate 2:0e2ef1edf01b 1974
destinyXfate 2:0e2ef1edf01b 1975 #if defined(PNG_1_0_X)
destinyXfate 2:0e2ef1edf01b 1976 # define png_malloc_warn png_malloc
destinyXfate 2:0e2ef1edf01b 1977 #else
destinyXfate 2:0e2ef1edf01b 1978 /* Added at libpng version 1.2.4 */
destinyXfate 2:0e2ef1edf01b 1979 extern PNG_EXPORT(png_voidp,png_malloc_warn) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1980 png_uint_32 size));
destinyXfate 2:0e2ef1edf01b 1981 #endif
destinyXfate 2:0e2ef1edf01b 1982
destinyXfate 2:0e2ef1edf01b 1983 /* frees a pointer allocated by png_malloc() */
destinyXfate 2:0e2ef1edf01b 1984 extern PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr));
destinyXfate 2:0e2ef1edf01b 1985
destinyXfate 2:0e2ef1edf01b 1986 #if defined(PNG_1_0_X)
destinyXfate 2:0e2ef1edf01b 1987 /* Function to allocate memory for zlib. */
destinyXfate 2:0e2ef1edf01b 1988 extern PNG_EXPORT(voidpf,png_zalloc) PNGARG((voidpf png_ptr, uInt items,
destinyXfate 2:0e2ef1edf01b 1989 uInt size));
destinyXfate 2:0e2ef1edf01b 1990
destinyXfate 2:0e2ef1edf01b 1991 /* Function to free memory for zlib */
destinyXfate 2:0e2ef1edf01b 1992 extern PNG_EXPORT(void,png_zfree) PNGARG((voidpf png_ptr, voidpf ptr));
destinyXfate 2:0e2ef1edf01b 1993 #endif
destinyXfate 2:0e2ef1edf01b 1994
destinyXfate 2:0e2ef1edf01b 1995 /* Free data that was allocated internally */
destinyXfate 2:0e2ef1edf01b 1996 extern PNG_EXPORT(void,png_free_data) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 1997 png_infop info_ptr, png_uint_32 free_me, int num));
destinyXfate 2:0e2ef1edf01b 1998 #ifdef PNG_FREE_ME_SUPPORTED
destinyXfate 2:0e2ef1edf01b 1999 /* Reassign responsibility for freeing existing data, whether allocated
destinyXfate 2:0e2ef1edf01b 2000 * by libpng or by the application */
destinyXfate 2:0e2ef1edf01b 2001 extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2002 png_infop info_ptr, int freer, png_uint_32 mask));
destinyXfate 2:0e2ef1edf01b 2003 #endif
destinyXfate 2:0e2ef1edf01b 2004 /* assignments for png_data_freer */
destinyXfate 2:0e2ef1edf01b 2005 #define PNG_DESTROY_WILL_FREE_DATA 1
destinyXfate 2:0e2ef1edf01b 2006 #define PNG_SET_WILL_FREE_DATA 1
destinyXfate 2:0e2ef1edf01b 2007 #define PNG_USER_WILL_FREE_DATA 2
destinyXfate 2:0e2ef1edf01b 2008 /* Flags for png_ptr->free_me and info_ptr->free_me */
destinyXfate 2:0e2ef1edf01b 2009 #define PNG_FREE_HIST 0x0008
destinyXfate 2:0e2ef1edf01b 2010 #define PNG_FREE_ICCP 0x0010
destinyXfate 2:0e2ef1edf01b 2011 #define PNG_FREE_SPLT 0x0020
destinyXfate 2:0e2ef1edf01b 2012 #define PNG_FREE_ROWS 0x0040
destinyXfate 2:0e2ef1edf01b 2013 #define PNG_FREE_PCAL 0x0080
destinyXfate 2:0e2ef1edf01b 2014 #define PNG_FREE_SCAL 0x0100
destinyXfate 2:0e2ef1edf01b 2015 #define PNG_FREE_UNKN 0x0200
destinyXfate 2:0e2ef1edf01b 2016 #define PNG_FREE_LIST 0x0400
destinyXfate 2:0e2ef1edf01b 2017 #define PNG_FREE_PLTE 0x1000
destinyXfate 2:0e2ef1edf01b 2018 #define PNG_FREE_TRNS 0x2000
destinyXfate 2:0e2ef1edf01b 2019 #define PNG_FREE_TEXT 0x4000
destinyXfate 2:0e2ef1edf01b 2020 #define PNG_FREE_ALL 0x7fff
destinyXfate 2:0e2ef1edf01b 2021 #define PNG_FREE_MUL 0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */
destinyXfate 2:0e2ef1edf01b 2022
destinyXfate 2:0e2ef1edf01b 2023 #ifdef PNG_USER_MEM_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2024 extern PNG_EXPORT(png_voidp,png_malloc_default) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2025 png_uint_32 size));
destinyXfate 2:0e2ef1edf01b 2026 extern PNG_EXPORT(void,png_free_default) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2027 png_voidp ptr));
destinyXfate 2:0e2ef1edf01b 2028 #endif
destinyXfate 2:0e2ef1edf01b 2029
destinyXfate 2:0e2ef1edf01b 2030 extern PNG_EXPORT(png_voidp,png_memcpy_check) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2031 png_voidp s1, png_voidp s2, png_uint_32 size));
destinyXfate 2:0e2ef1edf01b 2032
destinyXfate 2:0e2ef1edf01b 2033 extern PNG_EXPORT(png_voidp,png_memset_check) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2034 png_voidp s1, int value, png_uint_32 size));
destinyXfate 2:0e2ef1edf01b 2035
destinyXfate 2:0e2ef1edf01b 2036 #if defined(USE_FAR_KEYWORD) /* memory model conversion function */
destinyXfate 2:0e2ef1edf01b 2037 extern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr,
destinyXfate 2:0e2ef1edf01b 2038 int check));
destinyXfate 2:0e2ef1edf01b 2039 #endif /* USE_FAR_KEYWORD */
destinyXfate 2:0e2ef1edf01b 2040
destinyXfate 2:0e2ef1edf01b 2041 /* Fatal error in PNG image of libpng - can't continue */
destinyXfate 2:0e2ef1edf01b 2042 extern PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2043 png_const_charp error_message));
destinyXfate 2:0e2ef1edf01b 2044
destinyXfate 2:0e2ef1edf01b 2045 /* The same, but the chunk name is prepended to the error string. */
destinyXfate 2:0e2ef1edf01b 2046 extern PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2047 png_const_charp error_message));
destinyXfate 2:0e2ef1edf01b 2048
destinyXfate 2:0e2ef1edf01b 2049 /* Non-fatal error in libpng. Can continue, but may have a problem. */
destinyXfate 2:0e2ef1edf01b 2050 extern PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2051 png_const_charp warning_message));
destinyXfate 2:0e2ef1edf01b 2052
destinyXfate 2:0e2ef1edf01b 2053 /* Non-fatal error in libpng, chunk name is prepended to message. */
destinyXfate 2:0e2ef1edf01b 2054 extern PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2055 png_const_charp warning_message));
destinyXfate 2:0e2ef1edf01b 2056
destinyXfate 2:0e2ef1edf01b 2057 /* The png_set_<chunk> functions are for storing values in the png_info_struct.
destinyXfate 2:0e2ef1edf01b 2058 * Similarly, the png_get_<chunk> calls are used to read values from the
destinyXfate 2:0e2ef1edf01b 2059 * png_info_struct, either storing the parameters in the passed variables, or
destinyXfate 2:0e2ef1edf01b 2060 * setting pointers into the png_info_struct where the data is stored. The
destinyXfate 2:0e2ef1edf01b 2061 * png_get_<chunk> functions return a non-zero value if the data was available
destinyXfate 2:0e2ef1edf01b 2062 * in info_ptr, or return zero and do not change any of the parameters if the
destinyXfate 2:0e2ef1edf01b 2063 * data was not available.
destinyXfate 2:0e2ef1edf01b 2064 *
destinyXfate 2:0e2ef1edf01b 2065 * These functions should be used instead of directly accessing png_info
destinyXfate 2:0e2ef1edf01b 2066 * to avoid problems with future changes in the size and internal layout of
destinyXfate 2:0e2ef1edf01b 2067 * png_info_struct.
destinyXfate 2:0e2ef1edf01b 2068 */
destinyXfate 2:0e2ef1edf01b 2069 /* Returns "flag" if chunk data is valid in info_ptr. */
destinyXfate 2:0e2ef1edf01b 2070 extern PNG_EXPORT(png_uint_32,png_get_valid) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2071 png_infop info_ptr, png_uint_32 flag));
destinyXfate 2:0e2ef1edf01b 2072
destinyXfate 2:0e2ef1edf01b 2073 /* Returns number of bytes needed to hold a transformed row. */
destinyXfate 2:0e2ef1edf01b 2074 extern PNG_EXPORT(png_uint_32,png_get_rowbytes) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2075 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2076
destinyXfate 2:0e2ef1edf01b 2077 #if defined(PNG_INFO_IMAGE_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2078 /* Returns row_pointers, which is an array of pointers to scanlines that was
destinyXfate 2:0e2ef1edf01b 2079 returned from png_read_png(). */
destinyXfate 2:0e2ef1edf01b 2080 extern PNG_EXPORT(png_bytepp,png_get_rows) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2081 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2082 /* Set row_pointers, which is an array of pointers to scanlines for use
destinyXfate 2:0e2ef1edf01b 2083 by png_write_png(). */
destinyXfate 2:0e2ef1edf01b 2084 extern PNG_EXPORT(void,png_set_rows) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2085 png_infop info_ptr, png_bytepp row_pointers));
destinyXfate 2:0e2ef1edf01b 2086 #endif
destinyXfate 2:0e2ef1edf01b 2087
destinyXfate 2:0e2ef1edf01b 2088 /* Returns number of color channels in image. */
destinyXfate 2:0e2ef1edf01b 2089 extern PNG_EXPORT(png_byte,png_get_channels) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2090 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2091
destinyXfate 2:0e2ef1edf01b 2092 #ifdef PNG_EASY_ACCESS_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2093 /* Returns image width in pixels. */
destinyXfate 2:0e2ef1edf01b 2094 extern PNG_EXPORT(png_uint_32, png_get_image_width) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2095 png_ptr, png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2096
destinyXfate 2:0e2ef1edf01b 2097 /* Returns image height in pixels. */
destinyXfate 2:0e2ef1edf01b 2098 extern PNG_EXPORT(png_uint_32, png_get_image_height) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2099 png_ptr, png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2100
destinyXfate 2:0e2ef1edf01b 2101 /* Returns image bit_depth. */
destinyXfate 2:0e2ef1edf01b 2102 extern PNG_EXPORT(png_byte, png_get_bit_depth) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2103 png_ptr, png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2104
destinyXfate 2:0e2ef1edf01b 2105 /* Returns image color_type. */
destinyXfate 2:0e2ef1edf01b 2106 extern PNG_EXPORT(png_byte, png_get_color_type) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2107 png_ptr, png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2108
destinyXfate 2:0e2ef1edf01b 2109 /* Returns image filter_type. */
destinyXfate 2:0e2ef1edf01b 2110 extern PNG_EXPORT(png_byte, png_get_filter_type) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2111 png_ptr, png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2112
destinyXfate 2:0e2ef1edf01b 2113 /* Returns image interlace_type. */
destinyXfate 2:0e2ef1edf01b 2114 extern PNG_EXPORT(png_byte, png_get_interlace_type) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2115 png_ptr, png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2116
destinyXfate 2:0e2ef1edf01b 2117 /* Returns image compression_type. */
destinyXfate 2:0e2ef1edf01b 2118 extern PNG_EXPORT(png_byte, png_get_compression_type) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2119 png_ptr, png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2120
destinyXfate 2:0e2ef1edf01b 2121 /* Returns image resolution in pixels per meter, from pHYs chunk data. */
destinyXfate 2:0e2ef1edf01b 2122 extern PNG_EXPORT(png_uint_32, png_get_pixels_per_meter) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2123 png_ptr, png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2124 extern PNG_EXPORT(png_uint_32, png_get_x_pixels_per_meter) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2125 png_ptr, png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2126 extern PNG_EXPORT(png_uint_32, png_get_y_pixels_per_meter) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2127 png_ptr, png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2128
destinyXfate 2:0e2ef1edf01b 2129 /* Returns pixel aspect ratio, computed from pHYs chunk data. */
destinyXfate 2:0e2ef1edf01b 2130 #ifdef PNG_FLOATING_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2131 extern PNG_EXPORT(float, png_get_pixel_aspect_ratio) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2132 png_ptr, png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2133 #endif
destinyXfate 2:0e2ef1edf01b 2134
destinyXfate 2:0e2ef1edf01b 2135 /* Returns image x, y offset in pixels or microns, from oFFs chunk data. */
destinyXfate 2:0e2ef1edf01b 2136 extern PNG_EXPORT(png_int_32, png_get_x_offset_pixels) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2137 png_ptr, png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2138 extern PNG_EXPORT(png_int_32, png_get_y_offset_pixels) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2139 png_ptr, png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2140 extern PNG_EXPORT(png_int_32, png_get_x_offset_microns) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2141 png_ptr, png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2142 extern PNG_EXPORT(png_int_32, png_get_y_offset_microns) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2143 png_ptr, png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2144
destinyXfate 2:0e2ef1edf01b 2145 #endif /* PNG_EASY_ACCESS_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 2146
destinyXfate 2:0e2ef1edf01b 2147 /* Returns pointer to signature string read from PNG header */
destinyXfate 2:0e2ef1edf01b 2148 extern PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2149 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2150
destinyXfate 2:0e2ef1edf01b 2151 #if defined(PNG_bKGD_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2152 extern PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2153 png_infop info_ptr, png_color_16p *background));
destinyXfate 2:0e2ef1edf01b 2154 #endif
destinyXfate 2:0e2ef1edf01b 2155
destinyXfate 2:0e2ef1edf01b 2156 #if defined(PNG_bKGD_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2157 extern PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2158 png_infop info_ptr, png_color_16p background));
destinyXfate 2:0e2ef1edf01b 2159 #endif
destinyXfate 2:0e2ef1edf01b 2160
destinyXfate 2:0e2ef1edf01b 2161 #if defined(PNG_cHRM_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2162 #ifdef PNG_FLOATING_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2163 extern PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2164 png_infop info_ptr, double *white_x, double *white_y, double *red_x,
destinyXfate 2:0e2ef1edf01b 2165 double *red_y, double *green_x, double *green_y, double *blue_x,
destinyXfate 2:0e2ef1edf01b 2166 double *blue_y));
destinyXfate 2:0e2ef1edf01b 2167 #endif
destinyXfate 2:0e2ef1edf01b 2168 #ifdef PNG_FIXED_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2169 extern PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2170 png_infop info_ptr, png_fixed_point *int_white_x, png_fixed_point
destinyXfate 2:0e2ef1edf01b 2171 *int_white_y, png_fixed_point *int_red_x, png_fixed_point *int_red_y,
destinyXfate 2:0e2ef1edf01b 2172 png_fixed_point *int_green_x, png_fixed_point *int_green_y, png_fixed_point
destinyXfate 2:0e2ef1edf01b 2173 *int_blue_x, png_fixed_point *int_blue_y));
destinyXfate 2:0e2ef1edf01b 2174 #endif
destinyXfate 2:0e2ef1edf01b 2175 #endif
destinyXfate 2:0e2ef1edf01b 2176
destinyXfate 2:0e2ef1edf01b 2177 #if defined(PNG_cHRM_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2178 #ifdef PNG_FLOATING_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2179 extern PNG_EXPORT(void,png_set_cHRM) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2180 png_infop info_ptr, double white_x, double white_y, double red_x,
destinyXfate 2:0e2ef1edf01b 2181 double red_y, double green_x, double green_y, double blue_x, double blue_y));
destinyXfate 2:0e2ef1edf01b 2182 #endif
destinyXfate 2:0e2ef1edf01b 2183 #ifdef PNG_FIXED_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2184 extern PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2185 png_infop info_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y,
destinyXfate 2:0e2ef1edf01b 2186 png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
destinyXfate 2:0e2ef1edf01b 2187 int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
destinyXfate 2:0e2ef1edf01b 2188 png_fixed_point int_blue_y));
destinyXfate 2:0e2ef1edf01b 2189 #endif
destinyXfate 2:0e2ef1edf01b 2190 #endif
destinyXfate 2:0e2ef1edf01b 2191
destinyXfate 2:0e2ef1edf01b 2192 #if defined(PNG_gAMA_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2193 #ifdef PNG_FLOATING_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2194 extern PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2195 png_infop info_ptr, double *file_gamma));
destinyXfate 2:0e2ef1edf01b 2196 #endif
destinyXfate 2:0e2ef1edf01b 2197 extern PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2198 png_infop info_ptr, png_fixed_point *int_file_gamma));
destinyXfate 2:0e2ef1edf01b 2199 #endif
destinyXfate 2:0e2ef1edf01b 2200
destinyXfate 2:0e2ef1edf01b 2201 #if defined(PNG_gAMA_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2202 #ifdef PNG_FLOATING_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2203 extern PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2204 png_infop info_ptr, double file_gamma));
destinyXfate 2:0e2ef1edf01b 2205 #endif
destinyXfate 2:0e2ef1edf01b 2206 extern PNG_EXPORT(void,png_set_gAMA_fixed) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2207 png_infop info_ptr, png_fixed_point int_file_gamma));
destinyXfate 2:0e2ef1edf01b 2208 #endif
destinyXfate 2:0e2ef1edf01b 2209
destinyXfate 2:0e2ef1edf01b 2210 #if defined(PNG_hIST_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2211 extern PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2212 png_infop info_ptr, png_uint_16p *hist));
destinyXfate 2:0e2ef1edf01b 2213 #endif
destinyXfate 2:0e2ef1edf01b 2214
destinyXfate 2:0e2ef1edf01b 2215 #if defined(PNG_hIST_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2216 extern PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2217 png_infop info_ptr, png_uint_16p hist));
destinyXfate 2:0e2ef1edf01b 2218 #endif
destinyXfate 2:0e2ef1edf01b 2219
destinyXfate 2:0e2ef1edf01b 2220 extern PNG_EXPORT(png_uint_32,png_get_IHDR) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2221 png_infop info_ptr, png_uint_32 *width, png_uint_32 *height,
destinyXfate 2:0e2ef1edf01b 2222 int *bit_depth, int *color_type, int *interlace_method,
destinyXfate 2:0e2ef1edf01b 2223 int *compression_method, int *filter_method));
destinyXfate 2:0e2ef1edf01b 2224
destinyXfate 2:0e2ef1edf01b 2225 extern PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2226 png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth,
destinyXfate 2:0e2ef1edf01b 2227 int color_type, int interlace_method, int compression_method,
destinyXfate 2:0e2ef1edf01b 2228 int filter_method));
destinyXfate 2:0e2ef1edf01b 2229
destinyXfate 2:0e2ef1edf01b 2230 #if defined(PNG_oFFs_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2231 extern PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2232 png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y,
destinyXfate 2:0e2ef1edf01b 2233 int *unit_type));
destinyXfate 2:0e2ef1edf01b 2234 #endif
destinyXfate 2:0e2ef1edf01b 2235
destinyXfate 2:0e2ef1edf01b 2236 #if defined(PNG_oFFs_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2237 extern PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2238 png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y,
destinyXfate 2:0e2ef1edf01b 2239 int unit_type));
destinyXfate 2:0e2ef1edf01b 2240 #endif
destinyXfate 2:0e2ef1edf01b 2241
destinyXfate 2:0e2ef1edf01b 2242 #if defined(PNG_pCAL_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2243 extern PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2244 png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1,
destinyXfate 2:0e2ef1edf01b 2245 int *type, int *nparams, png_charp *units, png_charpp *params));
destinyXfate 2:0e2ef1edf01b 2246 #endif
destinyXfate 2:0e2ef1edf01b 2247
destinyXfate 2:0e2ef1edf01b 2248 #if defined(PNG_pCAL_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2249 extern PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2250 png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1,
destinyXfate 2:0e2ef1edf01b 2251 int type, int nparams, png_charp units, png_charpp params));
destinyXfate 2:0e2ef1edf01b 2252 #endif
destinyXfate 2:0e2ef1edf01b 2253
destinyXfate 2:0e2ef1edf01b 2254 #if defined(PNG_pHYs_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2255 extern PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2256 png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
destinyXfate 2:0e2ef1edf01b 2257 #endif
destinyXfate 2:0e2ef1edf01b 2258
destinyXfate 2:0e2ef1edf01b 2259 #if defined(PNG_pHYs_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2260 extern PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2261 png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type));
destinyXfate 2:0e2ef1edf01b 2262 #endif
destinyXfate 2:0e2ef1edf01b 2263
destinyXfate 2:0e2ef1edf01b 2264 extern PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2265 png_infop info_ptr, png_colorp *palette, int *num_palette));
destinyXfate 2:0e2ef1edf01b 2266
destinyXfate 2:0e2ef1edf01b 2267 extern PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2268 png_infop info_ptr, png_colorp palette, int num_palette));
destinyXfate 2:0e2ef1edf01b 2269
destinyXfate 2:0e2ef1edf01b 2270 #if defined(PNG_sBIT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2271 extern PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2272 png_infop info_ptr, png_color_8p *sig_bit));
destinyXfate 2:0e2ef1edf01b 2273 #endif
destinyXfate 2:0e2ef1edf01b 2274
destinyXfate 2:0e2ef1edf01b 2275 #if defined(PNG_sBIT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2276 extern PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2277 png_infop info_ptr, png_color_8p sig_bit));
destinyXfate 2:0e2ef1edf01b 2278 #endif
destinyXfate 2:0e2ef1edf01b 2279
destinyXfate 2:0e2ef1edf01b 2280 #if defined(PNG_sRGB_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2281 extern PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2282 png_infop info_ptr, int *intent));
destinyXfate 2:0e2ef1edf01b 2283 #endif
destinyXfate 2:0e2ef1edf01b 2284
destinyXfate 2:0e2ef1edf01b 2285 #if defined(PNG_sRGB_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2286 extern PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2287 png_infop info_ptr, int intent));
destinyXfate 2:0e2ef1edf01b 2288 extern PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2289 png_infop info_ptr, int intent));
destinyXfate 2:0e2ef1edf01b 2290 #endif
destinyXfate 2:0e2ef1edf01b 2291
destinyXfate 2:0e2ef1edf01b 2292 #if defined(PNG_iCCP_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2293 extern PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2294 png_infop info_ptr, png_charpp name, int *compression_type,
destinyXfate 2:0e2ef1edf01b 2295 png_charpp profile, png_uint_32 *proflen));
destinyXfate 2:0e2ef1edf01b 2296 /* Note to maintainer: profile should be png_bytepp */
destinyXfate 2:0e2ef1edf01b 2297 #endif
destinyXfate 2:0e2ef1edf01b 2298
destinyXfate 2:0e2ef1edf01b 2299 #if defined(PNG_iCCP_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2300 extern PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2301 png_infop info_ptr, png_charp name, int compression_type,
destinyXfate 2:0e2ef1edf01b 2302 png_charp profile, png_uint_32 proflen));
destinyXfate 2:0e2ef1edf01b 2303 /* Note to maintainer: profile should be png_bytep */
destinyXfate 2:0e2ef1edf01b 2304 #endif
destinyXfate 2:0e2ef1edf01b 2305
destinyXfate 2:0e2ef1edf01b 2306 #if defined(PNG_sPLT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2307 extern PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2308 png_infop info_ptr, png_sPLT_tpp entries));
destinyXfate 2:0e2ef1edf01b 2309 #endif
destinyXfate 2:0e2ef1edf01b 2310
destinyXfate 2:0e2ef1edf01b 2311 #if defined(PNG_sPLT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2312 extern PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2313 png_infop info_ptr, png_sPLT_tp entries, int nentries));
destinyXfate 2:0e2ef1edf01b 2314 #endif
destinyXfate 2:0e2ef1edf01b 2315
destinyXfate 2:0e2ef1edf01b 2316 #if defined(PNG_TEXT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2317 /* png_get_text also returns the number of text chunks in *num_text */
destinyXfate 2:0e2ef1edf01b 2318 extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2319 png_infop info_ptr, png_textp *text_ptr, int *num_text));
destinyXfate 2:0e2ef1edf01b 2320 #endif
destinyXfate 2:0e2ef1edf01b 2321
destinyXfate 2:0e2ef1edf01b 2322 /*
destinyXfate 2:0e2ef1edf01b 2323 * Note while png_set_text() will accept a structure whose text,
destinyXfate 2:0e2ef1edf01b 2324 * language, and translated keywords are NULL pointers, the structure
destinyXfate 2:0e2ef1edf01b 2325 * returned by png_get_text will always contain regular
destinyXfate 2:0e2ef1edf01b 2326 * zero-terminated C strings. They might be empty strings but
destinyXfate 2:0e2ef1edf01b 2327 * they will never be NULL pointers.
destinyXfate 2:0e2ef1edf01b 2328 */
destinyXfate 2:0e2ef1edf01b 2329
destinyXfate 2:0e2ef1edf01b 2330 #if defined(PNG_TEXT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2331 extern PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2332 png_infop info_ptr, png_textp text_ptr, int num_text));
destinyXfate 2:0e2ef1edf01b 2333 #endif
destinyXfate 2:0e2ef1edf01b 2334
destinyXfate 2:0e2ef1edf01b 2335 #if defined(PNG_tIME_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2336 extern PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2337 png_infop info_ptr, png_timep *mod_time));
destinyXfate 2:0e2ef1edf01b 2338 #endif
destinyXfate 2:0e2ef1edf01b 2339
destinyXfate 2:0e2ef1edf01b 2340 #if defined(PNG_tIME_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2341 extern PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2342 png_infop info_ptr, png_timep mod_time));
destinyXfate 2:0e2ef1edf01b 2343 #endif
destinyXfate 2:0e2ef1edf01b 2344
destinyXfate 2:0e2ef1edf01b 2345 #if defined(PNG_tRNS_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2346 extern PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2347 png_infop info_ptr, png_bytep *trans, int *num_trans,
destinyXfate 2:0e2ef1edf01b 2348 png_color_16p *trans_values));
destinyXfate 2:0e2ef1edf01b 2349 #endif
destinyXfate 2:0e2ef1edf01b 2350
destinyXfate 2:0e2ef1edf01b 2351 #if defined(PNG_tRNS_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2352 extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2353 png_infop info_ptr, png_bytep trans, int num_trans,
destinyXfate 2:0e2ef1edf01b 2354 png_color_16p trans_values));
destinyXfate 2:0e2ef1edf01b 2355 #endif
destinyXfate 2:0e2ef1edf01b 2356
destinyXfate 2:0e2ef1edf01b 2357 #if defined(PNG_tRNS_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2358 #endif
destinyXfate 2:0e2ef1edf01b 2359
destinyXfate 2:0e2ef1edf01b 2360 #if defined(PNG_sCAL_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2361 #ifdef PNG_FLOATING_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2362 extern PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2363 png_infop info_ptr, int *unit, double *width, double *height));
destinyXfate 2:0e2ef1edf01b 2364 #else
destinyXfate 2:0e2ef1edf01b 2365 #ifdef PNG_FIXED_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2366 extern PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2367 png_infop info_ptr, int *unit, png_charpp swidth, png_charpp sheight));
destinyXfate 2:0e2ef1edf01b 2368 #endif
destinyXfate 2:0e2ef1edf01b 2369 #endif
destinyXfate 2:0e2ef1edf01b 2370 #endif /* PNG_sCAL_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 2371
destinyXfate 2:0e2ef1edf01b 2372 #if defined(PNG_sCAL_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2373 #ifdef PNG_FLOATING_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2374 extern PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2375 png_infop info_ptr, int unit, double width, double height));
destinyXfate 2:0e2ef1edf01b 2376 #else
destinyXfate 2:0e2ef1edf01b 2377 #ifdef PNG_FIXED_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2378 extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2379 png_infop info_ptr, int unit, png_charp swidth, png_charp sheight));
destinyXfate 2:0e2ef1edf01b 2380 #endif
destinyXfate 2:0e2ef1edf01b 2381 #endif
destinyXfate 2:0e2ef1edf01b 2382 #endif /* PNG_sCAL_SUPPORTED || PNG_WRITE_sCAL_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 2383
destinyXfate 2:0e2ef1edf01b 2384 #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2385 /* provide a list of chunks and how they are to be handled, if the built-in
destinyXfate 2:0e2ef1edf01b 2386 handling or default unknown chunk handling is not desired. Any chunks not
destinyXfate 2:0e2ef1edf01b 2387 listed will be handled in the default manner. The IHDR and IEND chunks
destinyXfate 2:0e2ef1edf01b 2388 must not be listed.
destinyXfate 2:0e2ef1edf01b 2389 keep = 0: follow default behavour
destinyXfate 2:0e2ef1edf01b 2390 = 1: do not keep
destinyXfate 2:0e2ef1edf01b 2391 = 2: keep only if safe-to-copy
destinyXfate 2:0e2ef1edf01b 2392 = 3: keep even if unsafe-to-copy
destinyXfate 2:0e2ef1edf01b 2393 */
destinyXfate 2:0e2ef1edf01b 2394 extern PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2395 png_ptr, int keep, png_bytep chunk_list, int num_chunks));
destinyXfate 2:0e2ef1edf01b 2396 extern PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2397 png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns));
destinyXfate 2:0e2ef1edf01b 2398 extern PNG_EXPORT(void, png_set_unknown_chunk_location)
destinyXfate 2:0e2ef1edf01b 2399 PNGARG((png_structp png_ptr, png_infop info_ptr, int chunk, int location));
destinyXfate 2:0e2ef1edf01b 2400 extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2401 png_ptr, png_infop info_ptr, png_unknown_chunkpp entries));
destinyXfate 2:0e2ef1edf01b 2402 #endif
destinyXfate 2:0e2ef1edf01b 2403 #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2404 PNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep
destinyXfate 2:0e2ef1edf01b 2405 chunk_name));
destinyXfate 2:0e2ef1edf01b 2406 #endif
destinyXfate 2:0e2ef1edf01b 2407
destinyXfate 2:0e2ef1edf01b 2408 /* Png_free_data() will turn off the "valid" flag for anything it frees.
destinyXfate 2:0e2ef1edf01b 2409 If you need to turn it off for a chunk that your application has freed,
destinyXfate 2:0e2ef1edf01b 2410 you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK); */
destinyXfate 2:0e2ef1edf01b 2411 extern PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2412 png_infop info_ptr, int mask));
destinyXfate 2:0e2ef1edf01b 2413
destinyXfate 2:0e2ef1edf01b 2414 #if defined(PNG_INFO_IMAGE_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2415 /* The "params" pointer is currently not used and is for future expansion. */
destinyXfate 2:0e2ef1edf01b 2416 extern PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2417 png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 2418 int transforms,
destinyXfate 2:0e2ef1edf01b 2419 png_voidp params));
destinyXfate 2:0e2ef1edf01b 2420 extern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2421 png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 2422 int transforms,
destinyXfate 2:0e2ef1edf01b 2423 png_voidp params));
destinyXfate 2:0e2ef1edf01b 2424 #endif
destinyXfate 2:0e2ef1edf01b 2425
destinyXfate 2:0e2ef1edf01b 2426 /* Define PNG_DEBUG at compile time for debugging information. Higher
destinyXfate 2:0e2ef1edf01b 2427 * numbers for PNG_DEBUG mean more debugging information. This has
destinyXfate 2:0e2ef1edf01b 2428 * only been added since version 0.95 so it is not implemented throughout
destinyXfate 2:0e2ef1edf01b 2429 * libpng yet, but more support will be added as needed.
destinyXfate 2:0e2ef1edf01b 2430 */
destinyXfate 2:0e2ef1edf01b 2431 #ifdef PNG_DEBUG
destinyXfate 2:0e2ef1edf01b 2432 #if (PNG_DEBUG > 0)
destinyXfate 2:0e2ef1edf01b 2433 #if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER)
destinyXfate 2:0e2ef1edf01b 2434 #include <crtdbg.h>
destinyXfate 2:0e2ef1edf01b 2435 #if (PNG_DEBUG > 1)
destinyXfate 2:0e2ef1edf01b 2436 #define png_debug(l,m) _RPT0(_CRT_WARN,m)
destinyXfate 2:0e2ef1edf01b 2437 #define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m,p1)
destinyXfate 2:0e2ef1edf01b 2438 #define png_debug2(l,m,p1,p2) _RPT2(_CRT_WARN,m,p1,p2)
destinyXfate 2:0e2ef1edf01b 2439 #endif
destinyXfate 2:0e2ef1edf01b 2440 #else /* PNG_DEBUG_FILE || !_MSC_VER */
destinyXfate 2:0e2ef1edf01b 2441 #ifndef PNG_DEBUG_FILE
destinyXfate 2:0e2ef1edf01b 2442 #define PNG_DEBUG_FILE stderr
destinyXfate 2:0e2ef1edf01b 2443 #endif /* PNG_DEBUG_FILE */
destinyXfate 2:0e2ef1edf01b 2444 #if (PNG_DEBUG > 1)
destinyXfate 2:0e2ef1edf01b 2445 #define png_debug(l,m) \
destinyXfate 2:0e2ef1edf01b 2446 { \
destinyXfate 2:0e2ef1edf01b 2447 int num_tabs=l; \
destinyXfate 2:0e2ef1edf01b 2448 fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \
destinyXfate 2:0e2ef1edf01b 2449 (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \
destinyXfate 2:0e2ef1edf01b 2450 }
destinyXfate 2:0e2ef1edf01b 2451 #define png_debug1(l,m,p1) \
destinyXfate 2:0e2ef1edf01b 2452 { \
destinyXfate 2:0e2ef1edf01b 2453 int num_tabs=l; \
destinyXfate 2:0e2ef1edf01b 2454 fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \
destinyXfate 2:0e2ef1edf01b 2455 (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \
destinyXfate 2:0e2ef1edf01b 2456 }
destinyXfate 2:0e2ef1edf01b 2457 #define png_debug2(l,m,p1,p2) \
destinyXfate 2:0e2ef1edf01b 2458 { \
destinyXfate 2:0e2ef1edf01b 2459 int num_tabs=l; \
destinyXfate 2:0e2ef1edf01b 2460 fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \
destinyXfate 2:0e2ef1edf01b 2461 (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \
destinyXfate 2:0e2ef1edf01b 2462 }
destinyXfate 2:0e2ef1edf01b 2463 #endif /* (PNG_DEBUG > 1) */
destinyXfate 2:0e2ef1edf01b 2464 #endif /* _MSC_VER */
destinyXfate 2:0e2ef1edf01b 2465 #endif /* (PNG_DEBUG > 0) */
destinyXfate 2:0e2ef1edf01b 2466 #endif /* PNG_DEBUG */
destinyXfate 2:0e2ef1edf01b 2467 #ifndef png_debug
destinyXfate 2:0e2ef1edf01b 2468 #define png_debug(l, m)
destinyXfate 2:0e2ef1edf01b 2469 #endif
destinyXfate 2:0e2ef1edf01b 2470 #ifndef png_debug1
destinyXfate 2:0e2ef1edf01b 2471 #define png_debug1(l, m, p1)
destinyXfate 2:0e2ef1edf01b 2472 #endif
destinyXfate 2:0e2ef1edf01b 2473 #ifndef png_debug2
destinyXfate 2:0e2ef1edf01b 2474 #define png_debug2(l, m, p1, p2)
destinyXfate 2:0e2ef1edf01b 2475 #endif
destinyXfate 2:0e2ef1edf01b 2476
destinyXfate 2:0e2ef1edf01b 2477 #if 0
destinyXfate 2:0e2ef1edf01b 2478 extern PNG_EXPORT(png_bytep,png_sig_bytes) PNGARG((void));
destinyXfate 2:0e2ef1edf01b 2479 #endif
destinyXfate 2:0e2ef1edf01b 2480
destinyXfate 2:0e2ef1edf01b 2481 extern PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 2482 extern PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 2483 extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 2484 extern PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 2485
destinyXfate 2:0e2ef1edf01b 2486 #ifdef PNG_MNG_FEATURES_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2487 extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2488 png_ptr, png_uint_32 mng_features_permitted));
destinyXfate 2:0e2ef1edf01b 2489 #endif
destinyXfate 2:0e2ef1edf01b 2490
destinyXfate 2:0e2ef1edf01b 2491 /* For use in png_set_keep_unknown, added to version 1.2.6 */
destinyXfate 2:0e2ef1edf01b 2492 #define PNG_HANDLE_CHUNK_AS_DEFAULT 0
destinyXfate 2:0e2ef1edf01b 2493 #define PNG_HANDLE_CHUNK_NEVER 1
destinyXfate 2:0e2ef1edf01b 2494 #define PNG_HANDLE_CHUNK_IF_SAFE 2
destinyXfate 2:0e2ef1edf01b 2495 #define PNG_HANDLE_CHUNK_ALWAYS 3
destinyXfate 2:0e2ef1edf01b 2496
destinyXfate 2:0e2ef1edf01b 2497 /* Added to version 1.2.0 */
destinyXfate 2:0e2ef1edf01b 2498 #if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2499 #if defined(PNG_MMX_CODE_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2500 #define PNG_ASM_FLAG_MMX_SUPPORT_COMPILED 0x01 /* not user-settable */
destinyXfate 2:0e2ef1edf01b 2501 #define PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU 0x02 /* not user-settable */
destinyXfate 2:0e2ef1edf01b 2502 #define PNG_ASM_FLAG_MMX_READ_COMBINE_ROW 0x04
destinyXfate 2:0e2ef1edf01b 2503 #define PNG_ASM_FLAG_MMX_READ_INTERLACE 0x08
destinyXfate 2:0e2ef1edf01b 2504 #define PNG_ASM_FLAG_MMX_READ_FILTER_SUB 0x10
destinyXfate 2:0e2ef1edf01b 2505 #define PNG_ASM_FLAG_MMX_READ_FILTER_UP 0x20
destinyXfate 2:0e2ef1edf01b 2506 #define PNG_ASM_FLAG_MMX_READ_FILTER_AVG 0x40
destinyXfate 2:0e2ef1edf01b 2507 #define PNG_ASM_FLAG_MMX_READ_FILTER_PAETH 0x80
destinyXfate 2:0e2ef1edf01b 2508 #define PNG_ASM_FLAGS_INITIALIZED 0x80000000 /* not user-settable */
destinyXfate 2:0e2ef1edf01b 2509
destinyXfate 2:0e2ef1edf01b 2510 #define PNG_MMX_READ_FLAGS ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \
destinyXfate 2:0e2ef1edf01b 2511 | PNG_ASM_FLAG_MMX_READ_INTERLACE \
destinyXfate 2:0e2ef1edf01b 2512 | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \
destinyXfate 2:0e2ef1edf01b 2513 | PNG_ASM_FLAG_MMX_READ_FILTER_UP \
destinyXfate 2:0e2ef1edf01b 2514 | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \
destinyXfate 2:0e2ef1edf01b 2515 | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH )
destinyXfate 2:0e2ef1edf01b 2516 #define PNG_MMX_WRITE_FLAGS ( 0 )
destinyXfate 2:0e2ef1edf01b 2517
destinyXfate 2:0e2ef1edf01b 2518 #define PNG_MMX_FLAGS ( PNG_ASM_FLAG_MMX_SUPPORT_COMPILED \
destinyXfate 2:0e2ef1edf01b 2519 | PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU \
destinyXfate 2:0e2ef1edf01b 2520 | PNG_MMX_READ_FLAGS \
destinyXfate 2:0e2ef1edf01b 2521 | PNG_MMX_WRITE_FLAGS )
destinyXfate 2:0e2ef1edf01b 2522
destinyXfate 2:0e2ef1edf01b 2523 #define PNG_SELECT_READ 1
destinyXfate 2:0e2ef1edf01b 2524 #define PNG_SELECT_WRITE 2
destinyXfate 2:0e2ef1edf01b 2525 #endif /* PNG_MMX_CODE_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 2526
destinyXfate 2:0e2ef1edf01b 2527 #if !defined(PNG_1_0_X)
destinyXfate 2:0e2ef1edf01b 2528 /* pngget.c */
destinyXfate 2:0e2ef1edf01b 2529 extern PNG_EXPORT(png_uint_32,png_get_mmx_flagmask)
destinyXfate 2:0e2ef1edf01b 2530 PNGARG((int flag_select, int *compilerID));
destinyXfate 2:0e2ef1edf01b 2531
destinyXfate 2:0e2ef1edf01b 2532 /* pngget.c */
destinyXfate 2:0e2ef1edf01b 2533 extern PNG_EXPORT(png_uint_32,png_get_asm_flagmask)
destinyXfate 2:0e2ef1edf01b 2534 PNGARG((int flag_select));
destinyXfate 2:0e2ef1edf01b 2535
destinyXfate 2:0e2ef1edf01b 2536 /* pngget.c */
destinyXfate 2:0e2ef1edf01b 2537 extern PNG_EXPORT(png_uint_32,png_get_asm_flags)
destinyXfate 2:0e2ef1edf01b 2538 PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 2539
destinyXfate 2:0e2ef1edf01b 2540 /* pngget.c */
destinyXfate 2:0e2ef1edf01b 2541 extern PNG_EXPORT(png_byte,png_get_mmx_bitdepth_threshold)
destinyXfate 2:0e2ef1edf01b 2542 PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 2543
destinyXfate 2:0e2ef1edf01b 2544 /* pngget.c */
destinyXfate 2:0e2ef1edf01b 2545 extern PNG_EXPORT(png_uint_32,png_get_mmx_rowbytes_threshold)
destinyXfate 2:0e2ef1edf01b 2546 PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 2547
destinyXfate 2:0e2ef1edf01b 2548 /* pngset.c */
destinyXfate 2:0e2ef1edf01b 2549 extern PNG_EXPORT(void,png_set_asm_flags)
destinyXfate 2:0e2ef1edf01b 2550 PNGARG((png_structp png_ptr, png_uint_32 asm_flags));
destinyXfate 2:0e2ef1edf01b 2551
destinyXfate 2:0e2ef1edf01b 2552 /* pngset.c */
destinyXfate 2:0e2ef1edf01b 2553 extern PNG_EXPORT(void,png_set_mmx_thresholds)
destinyXfate 2:0e2ef1edf01b 2554 PNGARG((png_structp png_ptr, png_byte mmx_bitdepth_threshold,
destinyXfate 2:0e2ef1edf01b 2555 png_uint_32 mmx_rowbytes_threshold));
destinyXfate 2:0e2ef1edf01b 2556
destinyXfate 2:0e2ef1edf01b 2557 #endif /* PNG_1_0_X */
destinyXfate 2:0e2ef1edf01b 2558
destinyXfate 2:0e2ef1edf01b 2559 #if !defined(PNG_1_0_X)
destinyXfate 2:0e2ef1edf01b 2560 /* png.c, pnggccrd.c, or pngvcrd.c */
destinyXfate 2:0e2ef1edf01b 2561 extern PNG_EXPORT(int,png_mmx_support) PNGARG((void));
destinyXfate 2:0e2ef1edf01b 2562 #endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 2563
destinyXfate 2:0e2ef1edf01b 2564 /* Strip the prepended error numbers ("#nnn ") from error and warning
destinyXfate 2:0e2ef1edf01b 2565 * messages before passing them to the error or warning handler. */
destinyXfate 2:0e2ef1edf01b 2566 #ifdef PNG_ERROR_NUMBERS_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2567 extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2568 png_ptr, png_uint_32 strip_mode));
destinyXfate 2:0e2ef1edf01b 2569 #endif
destinyXfate 2:0e2ef1edf01b 2570
destinyXfate 2:0e2ef1edf01b 2571 #endif /* PNG_1_0_X */
destinyXfate 2:0e2ef1edf01b 2572
destinyXfate 2:0e2ef1edf01b 2573 /* Added at libpng-1.2.6 */
destinyXfate 2:0e2ef1edf01b 2574 #ifdef PNG_SET_USER_LIMITS_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2575 extern PNG_EXPORT(void,png_set_user_limits) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2576 png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max));
destinyXfate 2:0e2ef1edf01b 2577 extern PNG_EXPORT(png_uint_32,png_get_user_width_max) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2578 png_ptr));
destinyXfate 2:0e2ef1edf01b 2579 extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp
destinyXfate 2:0e2ef1edf01b 2580 png_ptr));
destinyXfate 2:0e2ef1edf01b 2581 #endif
destinyXfate 2:0e2ef1edf01b 2582
destinyXfate 2:0e2ef1edf01b 2583 /* Maintainer: Put new public prototypes here ^, in libpng.3, and project defs */
destinyXfate 2:0e2ef1edf01b 2584
destinyXfate 2:0e2ef1edf01b 2585 #ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2586 /* With these routines we avoid an integer divide, which will be slower on
destinyXfate 2:0e2ef1edf01b 2587 * most machines. However, it does take more operations than the corresponding
destinyXfate 2:0e2ef1edf01b 2588 * divide method, so it may be slower on a few RISC systems. There are two
destinyXfate 2:0e2ef1edf01b 2589 * shifts (by 8 or 16 bits) and an addition, versus a single integer divide.
destinyXfate 2:0e2ef1edf01b 2590 *
destinyXfate 2:0e2ef1edf01b 2591 * Note that the rounding factors are NOT supposed to be the same! 128 and
destinyXfate 2:0e2ef1edf01b 2592 * 32768 are correct for the NODIV code; 127 and 32767 are correct for the
destinyXfate 2:0e2ef1edf01b 2593 * standard method.
destinyXfate 2:0e2ef1edf01b 2594 *
destinyXfate 2:0e2ef1edf01b 2595 * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ]
destinyXfate 2:0e2ef1edf01b 2596 */
destinyXfate 2:0e2ef1edf01b 2597
destinyXfate 2:0e2ef1edf01b 2598 /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */
destinyXfate 2:0e2ef1edf01b 2599
destinyXfate 2:0e2ef1edf01b 2600 # define png_composite(composite, fg, alpha, bg) \
destinyXfate 2:0e2ef1edf01b 2601 { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) * (png_uint_16)(alpha) \
destinyXfate 2:0e2ef1edf01b 2602 + (png_uint_16)(bg)*(png_uint_16)(255 - \
destinyXfate 2:0e2ef1edf01b 2603 (png_uint_16)(alpha)) + (png_uint_16)128); \
destinyXfate 2:0e2ef1edf01b 2604 (composite) = (png_byte)((temp + (temp >> 8)) >> 8); }
destinyXfate 2:0e2ef1edf01b 2605
destinyXfate 2:0e2ef1edf01b 2606 # define png_composite_16(composite, fg, alpha, bg) \
destinyXfate 2:0e2ef1edf01b 2607 { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) * (png_uint_32)(alpha) \
destinyXfate 2:0e2ef1edf01b 2608 + (png_uint_32)(bg)*(png_uint_32)(65535L - \
destinyXfate 2:0e2ef1edf01b 2609 (png_uint_32)(alpha)) + (png_uint_32)32768L); \
destinyXfate 2:0e2ef1edf01b 2610 (composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); }
destinyXfate 2:0e2ef1edf01b 2611
destinyXfate 2:0e2ef1edf01b 2612 #else /* standard method using integer division */
destinyXfate 2:0e2ef1edf01b 2613
destinyXfate 2:0e2ef1edf01b 2614 # define png_composite(composite, fg, alpha, bg) \
destinyXfate 2:0e2ef1edf01b 2615 (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) + \
destinyXfate 2:0e2ef1edf01b 2616 (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \
destinyXfate 2:0e2ef1edf01b 2617 (png_uint_16)127) / 255)
destinyXfate 2:0e2ef1edf01b 2618
destinyXfate 2:0e2ef1edf01b 2619 # define png_composite_16(composite, fg, alpha, bg) \
destinyXfate 2:0e2ef1edf01b 2620 (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \
destinyXfate 2:0e2ef1edf01b 2621 (png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) + \
destinyXfate 2:0e2ef1edf01b 2622 (png_uint_32)32767) / (png_uint_32)65535L)
destinyXfate 2:0e2ef1edf01b 2623
destinyXfate 2:0e2ef1edf01b 2624 #endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 2625
destinyXfate 2:0e2ef1edf01b 2626 /* Inline macros to do direct reads of bytes from the input buffer. These
destinyXfate 2:0e2ef1edf01b 2627 * require that you are using an architecture that uses PNG byte ordering
destinyXfate 2:0e2ef1edf01b 2628 * (MSB first) and supports unaligned data storage. I think that PowerPC
destinyXfate 2:0e2ef1edf01b 2629 * in big-endian mode and 680x0 are the only ones that will support this.
destinyXfate 2:0e2ef1edf01b 2630 * The x86 line of processors definitely do not. The png_get_int_32()
destinyXfate 2:0e2ef1edf01b 2631 * routine also assumes we are using two's complement format for negative
destinyXfate 2:0e2ef1edf01b 2632 * values, which is almost certainly true.
destinyXfate 2:0e2ef1edf01b 2633 */
destinyXfate 2:0e2ef1edf01b 2634 #if defined(PNG_READ_BIG_ENDIAN_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2635 # define png_get_uint_32(buf) ( *((png_uint_32p) (buf)))
destinyXfate 2:0e2ef1edf01b 2636 # define png_get_uint_16(buf) ( *((png_uint_16p) (buf)))
destinyXfate 2:0e2ef1edf01b 2637 # define png_get_int_32(buf) ( *((png_int_32p) (buf)))
destinyXfate 2:0e2ef1edf01b 2638 #else
destinyXfate 2:0e2ef1edf01b 2639 extern PNG_EXPORT(png_uint_32,png_get_uint_32) PNGARG((png_bytep buf));
destinyXfate 2:0e2ef1edf01b 2640 extern PNG_EXPORT(png_uint_16,png_get_uint_16) PNGARG((png_bytep buf));
destinyXfate 2:0e2ef1edf01b 2641 extern PNG_EXPORT(png_int_32,png_get_int_32) PNGARG((png_bytep buf));
destinyXfate 2:0e2ef1edf01b 2642 #endif /* !PNG_READ_BIG_ENDIAN_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 2643 extern PNG_EXPORT(png_uint_32,png_get_uint_31)
destinyXfate 2:0e2ef1edf01b 2644 PNGARG((png_structp png_ptr, png_bytep buf));
destinyXfate 2:0e2ef1edf01b 2645 /* No png_get_int_16 -- may be added if there's a real need for it. */
destinyXfate 2:0e2ef1edf01b 2646
destinyXfate 2:0e2ef1edf01b 2647 /* Place a 32-bit number into a buffer in PNG byte order (big-endian).
destinyXfate 2:0e2ef1edf01b 2648 */
destinyXfate 2:0e2ef1edf01b 2649 extern PNG_EXPORT(void,png_save_uint_32)
destinyXfate 2:0e2ef1edf01b 2650 PNGARG((png_bytep buf, png_uint_32 i));
destinyXfate 2:0e2ef1edf01b 2651 extern PNG_EXPORT(void,png_save_int_32)
destinyXfate 2:0e2ef1edf01b 2652 PNGARG((png_bytep buf, png_int_32 i));
destinyXfate 2:0e2ef1edf01b 2653
destinyXfate 2:0e2ef1edf01b 2654 /* Place a 16-bit number into a buffer in PNG byte order.
destinyXfate 2:0e2ef1edf01b 2655 * The parameter is declared unsigned int, not png_uint_16,
destinyXfate 2:0e2ef1edf01b 2656 * just to avoid potential problems on pre-ANSI C compilers.
destinyXfate 2:0e2ef1edf01b 2657 */
destinyXfate 2:0e2ef1edf01b 2658 extern PNG_EXPORT(void,png_save_uint_16)
destinyXfate 2:0e2ef1edf01b 2659 PNGARG((png_bytep buf, unsigned int i));
destinyXfate 2:0e2ef1edf01b 2660 /* No png_save_int_16 -- may be added if there's a real need for it. */
destinyXfate 2:0e2ef1edf01b 2661
destinyXfate 2:0e2ef1edf01b 2662 /* ************************************************************************* */
destinyXfate 2:0e2ef1edf01b 2663
destinyXfate 2:0e2ef1edf01b 2664 /* These next functions are used internally in the code. They generally
destinyXfate 2:0e2ef1edf01b 2665 * shouldn't be used unless you are writing code to add or replace some
destinyXfate 2:0e2ef1edf01b 2666 * functionality in libpng. More information about most functions can
destinyXfate 2:0e2ef1edf01b 2667 * be found in the files where the functions are located.
destinyXfate 2:0e2ef1edf01b 2668 */
destinyXfate 2:0e2ef1edf01b 2669
destinyXfate 2:0e2ef1edf01b 2670 #if defined(PNG_INTERNAL)
destinyXfate 2:0e2ef1edf01b 2671
destinyXfate 2:0e2ef1edf01b 2672 /* Various modes of operation. Note that after an init, mode is set to
destinyXfate 2:0e2ef1edf01b 2673 * zero automatically when the structure is created.
destinyXfate 2:0e2ef1edf01b 2674 */
destinyXfate 2:0e2ef1edf01b 2675 #define PNG_HAVE_IHDR 0x01
destinyXfate 2:0e2ef1edf01b 2676 #define PNG_HAVE_PLTE 0x02
destinyXfate 2:0e2ef1edf01b 2677 #define PNG_HAVE_IDAT 0x04
destinyXfate 2:0e2ef1edf01b 2678 #define PNG_AFTER_IDAT 0x08 /* Have complete zlib datastream */
destinyXfate 2:0e2ef1edf01b 2679 #define PNG_HAVE_IEND 0x10
destinyXfate 2:0e2ef1edf01b 2680 #define PNG_HAVE_gAMA 0x20
destinyXfate 2:0e2ef1edf01b 2681 #define PNG_HAVE_cHRM 0x40
destinyXfate 2:0e2ef1edf01b 2682 #define PNG_HAVE_sRGB 0x80
destinyXfate 2:0e2ef1edf01b 2683 #define PNG_HAVE_CHUNK_HEADER 0x100
destinyXfate 2:0e2ef1edf01b 2684 #define PNG_WROTE_tIME 0x200
destinyXfate 2:0e2ef1edf01b 2685 #define PNG_WROTE_INFO_BEFORE_PLTE 0x400
destinyXfate 2:0e2ef1edf01b 2686 #define PNG_BACKGROUND_IS_GRAY 0x800
destinyXfate 2:0e2ef1edf01b 2687 #define PNG_HAVE_PNG_SIGNATURE 0x1000
destinyXfate 2:0e2ef1edf01b 2688 #define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */
destinyXfate 2:0e2ef1edf01b 2689
destinyXfate 2:0e2ef1edf01b 2690 /* flags for the transformations the PNG library does on the image data */
destinyXfate 2:0e2ef1edf01b 2691 #define PNG_BGR 0x0001
destinyXfate 2:0e2ef1edf01b 2692 #define PNG_INTERLACE 0x0002
destinyXfate 2:0e2ef1edf01b 2693 #define PNG_PACK 0x0004
destinyXfate 2:0e2ef1edf01b 2694 #define PNG_SHIFT 0x0008
destinyXfate 2:0e2ef1edf01b 2695 #define PNG_SWAP_BYTES 0x0010
destinyXfate 2:0e2ef1edf01b 2696 #define PNG_INVERT_MONO 0x0020
destinyXfate 2:0e2ef1edf01b 2697 #define PNG_DITHER 0x0040
destinyXfate 2:0e2ef1edf01b 2698 #define PNG_BACKGROUND 0x0080
destinyXfate 2:0e2ef1edf01b 2699 #define PNG_BACKGROUND_EXPAND 0x0100
destinyXfate 2:0e2ef1edf01b 2700 /* 0x0200 unused */
destinyXfate 2:0e2ef1edf01b 2701 #define PNG_16_TO_8 0x0400
destinyXfate 2:0e2ef1edf01b 2702 #define PNG_RGBA 0x0800
destinyXfate 2:0e2ef1edf01b 2703 #define PNG_EXPAND 0x1000
destinyXfate 2:0e2ef1edf01b 2704 #define PNG_GAMMA 0x2000
destinyXfate 2:0e2ef1edf01b 2705 #define PNG_GRAY_TO_RGB 0x4000
destinyXfate 2:0e2ef1edf01b 2706 #define PNG_FILLER 0x8000L
destinyXfate 2:0e2ef1edf01b 2707 #define PNG_PACKSWAP 0x10000L
destinyXfate 2:0e2ef1edf01b 2708 #define PNG_SWAP_ALPHA 0x20000L
destinyXfate 2:0e2ef1edf01b 2709 #define PNG_STRIP_ALPHA 0x40000L
destinyXfate 2:0e2ef1edf01b 2710 #define PNG_INVERT_ALPHA 0x80000L
destinyXfate 2:0e2ef1edf01b 2711 #define PNG_USER_TRANSFORM 0x100000L
destinyXfate 2:0e2ef1edf01b 2712 #define PNG_RGB_TO_GRAY_ERR 0x200000L
destinyXfate 2:0e2ef1edf01b 2713 #define PNG_RGB_TO_GRAY_WARN 0x400000L
destinyXfate 2:0e2ef1edf01b 2714 #define PNG_RGB_TO_GRAY 0x600000L /* two bits, RGB_TO_GRAY_ERR|WARN */
destinyXfate 2:0e2ef1edf01b 2715 /* 0x800000L Unused */
destinyXfate 2:0e2ef1edf01b 2716 #define PNG_ADD_ALPHA 0x1000000L /* Added to libpng-1.2.7 */
destinyXfate 2:0e2ef1edf01b 2717 #define PNG_EXPAND_tRNS 0x2000000L /* Added to libpng-1.2.9 */
destinyXfate 2:0e2ef1edf01b 2718 /* 0x4000000L unused */
destinyXfate 2:0e2ef1edf01b 2719 /* 0x8000000L unused */
destinyXfate 2:0e2ef1edf01b 2720 /* 0x10000000L unused */
destinyXfate 2:0e2ef1edf01b 2721 /* 0x20000000L unused */
destinyXfate 2:0e2ef1edf01b 2722 /* 0x40000000L unused */
destinyXfate 2:0e2ef1edf01b 2723
destinyXfate 2:0e2ef1edf01b 2724 /* flags for png_create_struct */
destinyXfate 2:0e2ef1edf01b 2725 #define PNG_STRUCT_PNG 0x0001
destinyXfate 2:0e2ef1edf01b 2726 #define PNG_STRUCT_INFO 0x0002
destinyXfate 2:0e2ef1edf01b 2727
destinyXfate 2:0e2ef1edf01b 2728 /* Scaling factor for filter heuristic weighting calculations */
destinyXfate 2:0e2ef1edf01b 2729 #define PNG_WEIGHT_SHIFT 8
destinyXfate 2:0e2ef1edf01b 2730 #define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT))
destinyXfate 2:0e2ef1edf01b 2731 #define PNG_COST_SHIFT 3
destinyXfate 2:0e2ef1edf01b 2732 #define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT))
destinyXfate 2:0e2ef1edf01b 2733
destinyXfate 2:0e2ef1edf01b 2734 /* flags for the png_ptr->flags rather than declaring a byte for each one */
destinyXfate 2:0e2ef1edf01b 2735 #define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001
destinyXfate 2:0e2ef1edf01b 2736 #define PNG_FLAG_ZLIB_CUSTOM_LEVEL 0x0002
destinyXfate 2:0e2ef1edf01b 2737 #define PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL 0x0004
destinyXfate 2:0e2ef1edf01b 2738 #define PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS 0x0008
destinyXfate 2:0e2ef1edf01b 2739 #define PNG_FLAG_ZLIB_CUSTOM_METHOD 0x0010
destinyXfate 2:0e2ef1edf01b 2740 #define PNG_FLAG_ZLIB_FINISHED 0x0020
destinyXfate 2:0e2ef1edf01b 2741 #define PNG_FLAG_ROW_INIT 0x0040
destinyXfate 2:0e2ef1edf01b 2742 #define PNG_FLAG_FILLER_AFTER 0x0080
destinyXfate 2:0e2ef1edf01b 2743 #define PNG_FLAG_CRC_ANCILLARY_USE 0x0100
destinyXfate 2:0e2ef1edf01b 2744 #define PNG_FLAG_CRC_ANCILLARY_NOWARN 0x0200
destinyXfate 2:0e2ef1edf01b 2745 #define PNG_FLAG_CRC_CRITICAL_USE 0x0400
destinyXfate 2:0e2ef1edf01b 2746 #define PNG_FLAG_CRC_CRITICAL_IGNORE 0x0800
destinyXfate 2:0e2ef1edf01b 2747 #define PNG_FLAG_FREE_PLTE 0x1000
destinyXfate 2:0e2ef1edf01b 2748 #define PNG_FLAG_FREE_TRNS 0x2000
destinyXfate 2:0e2ef1edf01b 2749 #define PNG_FLAG_FREE_HIST 0x4000
destinyXfate 2:0e2ef1edf01b 2750 #define PNG_FLAG_KEEP_UNKNOWN_CHUNKS 0x8000L
destinyXfate 2:0e2ef1edf01b 2751 #define PNG_FLAG_KEEP_UNSAFE_CHUNKS 0x10000L
destinyXfate 2:0e2ef1edf01b 2752 #define PNG_FLAG_LIBRARY_MISMATCH 0x20000L
destinyXfate 2:0e2ef1edf01b 2753 #define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000L
destinyXfate 2:0e2ef1edf01b 2754 #define PNG_FLAG_STRIP_ERROR_TEXT 0x80000L
destinyXfate 2:0e2ef1edf01b 2755 #define PNG_FLAG_MALLOC_NULL_MEM_OK 0x100000L
destinyXfate 2:0e2ef1edf01b 2756 #define PNG_FLAG_ADD_ALPHA 0x200000L /* Added to libpng-1.2.8 */
destinyXfate 2:0e2ef1edf01b 2757 #define PNG_FLAG_STRIP_ALPHA 0x400000L /* Added to libpng-1.2.8 */
destinyXfate 2:0e2ef1edf01b 2758 /* 0x800000L unused */
destinyXfate 2:0e2ef1edf01b 2759 /* 0x1000000L unused */
destinyXfate 2:0e2ef1edf01b 2760 /* 0x2000000L unused */
destinyXfate 2:0e2ef1edf01b 2761 /* 0x4000000L unused */
destinyXfate 2:0e2ef1edf01b 2762 /* 0x8000000L unused */
destinyXfate 2:0e2ef1edf01b 2763 /* 0x10000000L unused */
destinyXfate 2:0e2ef1edf01b 2764 /* 0x20000000L unused */
destinyXfate 2:0e2ef1edf01b 2765 /* 0x40000000L unused */
destinyXfate 2:0e2ef1edf01b 2766
destinyXfate 2:0e2ef1edf01b 2767 #define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \
destinyXfate 2:0e2ef1edf01b 2768 PNG_FLAG_CRC_ANCILLARY_NOWARN)
destinyXfate 2:0e2ef1edf01b 2769
destinyXfate 2:0e2ef1edf01b 2770 #define PNG_FLAG_CRC_CRITICAL_MASK (PNG_FLAG_CRC_CRITICAL_USE | \
destinyXfate 2:0e2ef1edf01b 2771 PNG_FLAG_CRC_CRITICAL_IGNORE)
destinyXfate 2:0e2ef1edf01b 2772
destinyXfate 2:0e2ef1edf01b 2773 #define PNG_FLAG_CRC_MASK (PNG_FLAG_CRC_ANCILLARY_MASK | \
destinyXfate 2:0e2ef1edf01b 2774 PNG_FLAG_CRC_CRITICAL_MASK)
destinyXfate 2:0e2ef1edf01b 2775
destinyXfate 2:0e2ef1edf01b 2776 /* save typing and make code easier to understand */
destinyXfate 2:0e2ef1edf01b 2777
destinyXfate 2:0e2ef1edf01b 2778 #define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \
destinyXfate 2:0e2ef1edf01b 2779 abs((int)((c1).green) - (int)((c2).green)) + \
destinyXfate 2:0e2ef1edf01b 2780 abs((int)((c1).blue) - (int)((c2).blue)))
destinyXfate 2:0e2ef1edf01b 2781
destinyXfate 2:0e2ef1edf01b 2782 /* Added to libpng-1.2.6 JB */
destinyXfate 2:0e2ef1edf01b 2783 #define PNG_ROWBYTES(pixel_bits, width) \
destinyXfate 2:0e2ef1edf01b 2784 ((pixel_bits) >= 8 ? \
destinyXfate 2:0e2ef1edf01b 2785 ((width) * (((png_uint_32)(pixel_bits)) >> 3)) : \
destinyXfate 2:0e2ef1edf01b 2786 (( ((width) * ((png_uint_32)(pixel_bits))) + 7) >> 3) )
destinyXfate 2:0e2ef1edf01b 2787
destinyXfate 2:0e2ef1edf01b 2788 /* PNG_OUT_OF_RANGE returns true if value is outside the range
destinyXfate 2:0e2ef1edf01b 2789 ideal-delta..ideal+delta. Each argument is evaluated twice.
destinyXfate 2:0e2ef1edf01b 2790 "ideal" and "delta" should be constants, normally simple
destinyXfate 2:0e2ef1edf01b 2791 integers, "value" a variable. Added to libpng-1.2.6 JB */
destinyXfate 2:0e2ef1edf01b 2792 #define PNG_OUT_OF_RANGE(value, ideal, delta) \
destinyXfate 2:0e2ef1edf01b 2793 ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )
destinyXfate 2:0e2ef1edf01b 2794
destinyXfate 2:0e2ef1edf01b 2795 /* variables declared in png.c - only it needs to define PNG_NO_EXTERN */
destinyXfate 2:0e2ef1edf01b 2796 #if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
destinyXfate 2:0e2ef1edf01b 2797 /* place to hold the signature string for a PNG file. */
destinyXfate 2:0e2ef1edf01b 2798 #ifdef PNG_USE_GLOBAL_ARRAYS
destinyXfate 2:0e2ef1edf01b 2799 PNG_EXPORT_VAR (const png_byte FARDATA) png_sig[8];
destinyXfate 2:0e2ef1edf01b 2800 #else
destinyXfate 2:0e2ef1edf01b 2801 #if 0
destinyXfate 2:0e2ef1edf01b 2802 #define png_sig png_sig_bytes(NULL)
destinyXfate 2:0e2ef1edf01b 2803 #endif
destinyXfate 2:0e2ef1edf01b 2804 #endif
destinyXfate 2:0e2ef1edf01b 2805 #endif /* PNG_NO_EXTERN */
destinyXfate 2:0e2ef1edf01b 2806
destinyXfate 2:0e2ef1edf01b 2807 /* Constant strings for known chunk types. If you need to add a chunk,
destinyXfate 2:0e2ef1edf01b 2808 * define the name here, and add an invocation of the macro in png.c and
destinyXfate 2:0e2ef1edf01b 2809 * wherever it's needed.
destinyXfate 2:0e2ef1edf01b 2810 */
destinyXfate 2:0e2ef1edf01b 2811 #define PNG_IHDR const png_byte png_IHDR[5] = { 73, 72, 68, 82, '\0'}
destinyXfate 2:0e2ef1edf01b 2812 #define PNG_IDAT const png_byte png_IDAT[5] = { 73, 68, 65, 84, '\0'}
destinyXfate 2:0e2ef1edf01b 2813 #define PNG_IEND const png_byte png_IEND[5] = { 73, 69, 78, 68, '\0'}
destinyXfate 2:0e2ef1edf01b 2814 #define PNG_PLTE const png_byte png_PLTE[5] = { 80, 76, 84, 69, '\0'}
destinyXfate 2:0e2ef1edf01b 2815 #define PNG_bKGD const png_byte png_bKGD[5] = { 98, 75, 71, 68, '\0'}
destinyXfate 2:0e2ef1edf01b 2816 #define PNG_cHRM const png_byte png_cHRM[5] = { 99, 72, 82, 77, '\0'}
destinyXfate 2:0e2ef1edf01b 2817 #define PNG_gAMA const png_byte png_gAMA[5] = {103, 65, 77, 65, '\0'}
destinyXfate 2:0e2ef1edf01b 2818 #define PNG_hIST const png_byte png_hIST[5] = {104, 73, 83, 84, '\0'}
destinyXfate 2:0e2ef1edf01b 2819 #define PNG_iCCP const png_byte png_iCCP[5] = {105, 67, 67, 80, '\0'}
destinyXfate 2:0e2ef1edf01b 2820 #define PNG_iTXt const png_byte png_iTXt[5] = {105, 84, 88, 116, '\0'}
destinyXfate 2:0e2ef1edf01b 2821 #define PNG_oFFs const png_byte png_oFFs[5] = {111, 70, 70, 115, '\0'}
destinyXfate 2:0e2ef1edf01b 2822 #define PNG_pCAL const png_byte png_pCAL[5] = {112, 67, 65, 76, '\0'}
destinyXfate 2:0e2ef1edf01b 2823 #define PNG_sCAL const png_byte png_sCAL[5] = {115, 67, 65, 76, '\0'}
destinyXfate 2:0e2ef1edf01b 2824 #define PNG_pHYs const png_byte png_pHYs[5] = {112, 72, 89, 115, '\0'}
destinyXfate 2:0e2ef1edf01b 2825 #define PNG_sBIT const png_byte png_sBIT[5] = {115, 66, 73, 84, '\0'}
destinyXfate 2:0e2ef1edf01b 2826 #define PNG_sPLT const png_byte png_sPLT[5] = {115, 80, 76, 84, '\0'}
destinyXfate 2:0e2ef1edf01b 2827 #define PNG_sRGB const png_byte png_sRGB[5] = {115, 82, 71, 66, '\0'}
destinyXfate 2:0e2ef1edf01b 2828 #define PNG_tEXt const png_byte png_tEXt[5] = {116, 69, 88, 116, '\0'}
destinyXfate 2:0e2ef1edf01b 2829 #define PNG_tIME const png_byte png_tIME[5] = {116, 73, 77, 69, '\0'}
destinyXfate 2:0e2ef1edf01b 2830 #define PNG_tRNS const png_byte png_tRNS[5] = {116, 82, 78, 83, '\0'}
destinyXfate 2:0e2ef1edf01b 2831 #define PNG_zTXt const png_byte png_zTXt[5] = {122, 84, 88, 116, '\0'}
destinyXfate 2:0e2ef1edf01b 2832
destinyXfate 2:0e2ef1edf01b 2833 #ifdef PNG_USE_GLOBAL_ARRAYS
destinyXfate 2:0e2ef1edf01b 2834 PNG_EXPORT_VAR (const png_byte FARDATA) png_IHDR[5];
destinyXfate 2:0e2ef1edf01b 2835 PNG_EXPORT_VAR (const png_byte FARDATA) png_IDAT[5];
destinyXfate 2:0e2ef1edf01b 2836 PNG_EXPORT_VAR (const png_byte FARDATA) png_IEND[5];
destinyXfate 2:0e2ef1edf01b 2837 PNG_EXPORT_VAR (const png_byte FARDATA) png_PLTE[5];
destinyXfate 2:0e2ef1edf01b 2838 PNG_EXPORT_VAR (const png_byte FARDATA) png_bKGD[5];
destinyXfate 2:0e2ef1edf01b 2839 PNG_EXPORT_VAR (const png_byte FARDATA) png_cHRM[5];
destinyXfate 2:0e2ef1edf01b 2840 PNG_EXPORT_VAR (const png_byte FARDATA) png_gAMA[5];
destinyXfate 2:0e2ef1edf01b 2841 PNG_EXPORT_VAR (const png_byte FARDATA) png_hIST[5];
destinyXfate 2:0e2ef1edf01b 2842 PNG_EXPORT_VAR (const png_byte FARDATA) png_iCCP[5];
destinyXfate 2:0e2ef1edf01b 2843 PNG_EXPORT_VAR (const png_byte FARDATA) png_iTXt[5];
destinyXfate 2:0e2ef1edf01b 2844 PNG_EXPORT_VAR (const png_byte FARDATA) png_oFFs[5];
destinyXfate 2:0e2ef1edf01b 2845 PNG_EXPORT_VAR (const png_byte FARDATA) png_pCAL[5];
destinyXfate 2:0e2ef1edf01b 2846 PNG_EXPORT_VAR (const png_byte FARDATA) png_sCAL[5];
destinyXfate 2:0e2ef1edf01b 2847 PNG_EXPORT_VAR (const png_byte FARDATA) png_pHYs[5];
destinyXfate 2:0e2ef1edf01b 2848 PNG_EXPORT_VAR (const png_byte FARDATA) png_sBIT[5];
destinyXfate 2:0e2ef1edf01b 2849 PNG_EXPORT_VAR (const png_byte FARDATA) png_sPLT[5];
destinyXfate 2:0e2ef1edf01b 2850 PNG_EXPORT_VAR (const png_byte FARDATA) png_sRGB[5];
destinyXfate 2:0e2ef1edf01b 2851 PNG_EXPORT_VAR (const png_byte FARDATA) png_tEXt[5];
destinyXfate 2:0e2ef1edf01b 2852 PNG_EXPORT_VAR (const png_byte FARDATA) png_tIME[5];
destinyXfate 2:0e2ef1edf01b 2853 PNG_EXPORT_VAR (const png_byte FARDATA) png_tRNS[5];
destinyXfate 2:0e2ef1edf01b 2854 PNG_EXPORT_VAR (const png_byte FARDATA) png_zTXt[5];
destinyXfate 2:0e2ef1edf01b 2855 #endif /* PNG_USE_GLOBAL_ARRAYS */
destinyXfate 2:0e2ef1edf01b 2856
destinyXfate 2:0e2ef1edf01b 2857 #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
destinyXfate 2:0e2ef1edf01b 2858 /* Initialize png_ptr struct for reading, and allocate any other memory.
destinyXfate 2:0e2ef1edf01b 2859 * (old interface - DEPRECATED - use png_create_read_struct instead).
destinyXfate 2:0e2ef1edf01b 2860 */
destinyXfate 2:0e2ef1edf01b 2861 extern PNG_EXPORT(void,png_read_init) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 2862 #undef png_read_init
destinyXfate 2:0e2ef1edf01b 2863 #define png_read_init(png_ptr) png_read_init_3(&png_ptr, \
destinyXfate 2:0e2ef1edf01b 2864 PNG_LIBPNG_VER_STRING, png_sizeof(png_struct));
destinyXfate 2:0e2ef1edf01b 2865 #endif
destinyXfate 2:0e2ef1edf01b 2866
destinyXfate 2:0e2ef1edf01b 2867 extern PNG_EXPORT(void,png_read_init_3) PNGARG((png_structpp ptr_ptr,
destinyXfate 2:0e2ef1edf01b 2868 png_const_charp user_png_ver, png_size_t png_struct_size));
destinyXfate 2:0e2ef1edf01b 2869 #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
destinyXfate 2:0e2ef1edf01b 2870 extern PNG_EXPORT(void,png_read_init_2) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2871 png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t
destinyXfate 2:0e2ef1edf01b 2872 png_info_size));
destinyXfate 2:0e2ef1edf01b 2873 #endif
destinyXfate 2:0e2ef1edf01b 2874
destinyXfate 2:0e2ef1edf01b 2875 #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
destinyXfate 2:0e2ef1edf01b 2876 /* Initialize png_ptr struct for writing, and allocate any other memory.
destinyXfate 2:0e2ef1edf01b 2877 * (old interface - DEPRECATED - use png_create_write_struct instead).
destinyXfate 2:0e2ef1edf01b 2878 */
destinyXfate 2:0e2ef1edf01b 2879 extern PNG_EXPORT(void,png_write_init) PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 2880 #undef png_write_init
destinyXfate 2:0e2ef1edf01b 2881 #define png_write_init(png_ptr) png_write_init_3(&png_ptr, \
destinyXfate 2:0e2ef1edf01b 2882 PNG_LIBPNG_VER_STRING, png_sizeof(png_struct));
destinyXfate 2:0e2ef1edf01b 2883 #endif
destinyXfate 2:0e2ef1edf01b 2884
destinyXfate 2:0e2ef1edf01b 2885 extern PNG_EXPORT(void,png_write_init_3) PNGARG((png_structpp ptr_ptr,
destinyXfate 2:0e2ef1edf01b 2886 png_const_charp user_png_ver, png_size_t png_struct_size));
destinyXfate 2:0e2ef1edf01b 2887 extern PNG_EXPORT(void,png_write_init_2) PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2888 png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t
destinyXfate 2:0e2ef1edf01b 2889 png_info_size));
destinyXfate 2:0e2ef1edf01b 2890
destinyXfate 2:0e2ef1edf01b 2891 /* Allocate memory for an internal libpng struct */
destinyXfate 2:0e2ef1edf01b 2892 PNG_EXTERN png_voidp png_create_struct PNGARG((int type));
destinyXfate 2:0e2ef1edf01b 2893
destinyXfate 2:0e2ef1edf01b 2894 /* Free memory from internal libpng struct */
destinyXfate 2:0e2ef1edf01b 2895 PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr));
destinyXfate 2:0e2ef1edf01b 2896
destinyXfate 2:0e2ef1edf01b 2897 PNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr
destinyXfate 2:0e2ef1edf01b 2898 malloc_fn, png_voidp mem_ptr));
destinyXfate 2:0e2ef1edf01b 2899 PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr,
destinyXfate 2:0e2ef1edf01b 2900 png_free_ptr free_fn, png_voidp mem_ptr));
destinyXfate 2:0e2ef1edf01b 2901
destinyXfate 2:0e2ef1edf01b 2902 /* Free any memory that info_ptr points to and reset struct. */
destinyXfate 2:0e2ef1edf01b 2903 PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2904 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 2905
destinyXfate 2:0e2ef1edf01b 2906 #ifndef PNG_1_0_X
destinyXfate 2:0e2ef1edf01b 2907 /* Function to allocate memory for zlib. */
destinyXfate 2:0e2ef1edf01b 2908 PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, uInt size));
destinyXfate 2:0e2ef1edf01b 2909
destinyXfate 2:0e2ef1edf01b 2910 /* Function to free memory for zlib */
destinyXfate 2:0e2ef1edf01b 2911 PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr));
destinyXfate 2:0e2ef1edf01b 2912
destinyXfate 2:0e2ef1edf01b 2913 #ifdef PNG_SIZE_T
destinyXfate 2:0e2ef1edf01b 2914 /* Function to convert a sizeof an item to png_sizeof item */
destinyXfate 2:0e2ef1edf01b 2915 PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size));
destinyXfate 2:0e2ef1edf01b 2916 #endif
destinyXfate 2:0e2ef1edf01b 2917
destinyXfate 2:0e2ef1edf01b 2918 /* Next four functions are used internally as callbacks. PNGAPI is required
destinyXfate 2:0e2ef1edf01b 2919 * but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3. */
destinyXfate 2:0e2ef1edf01b 2920
destinyXfate 2:0e2ef1edf01b 2921 PNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2922 png_bytep data, png_size_t length));
destinyXfate 2:0e2ef1edf01b 2923
destinyXfate 2:0e2ef1edf01b 2924 #ifdef PNG_PROGRESSIVE_READ_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2925 PNG_EXTERN void PNGAPI png_push_fill_buffer PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2926 png_bytep buffer, png_size_t length));
destinyXfate 2:0e2ef1edf01b 2927 #endif
destinyXfate 2:0e2ef1edf01b 2928
destinyXfate 2:0e2ef1edf01b 2929 PNG_EXTERN void PNGAPI png_default_write_data PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2930 png_bytep data, png_size_t length));
destinyXfate 2:0e2ef1edf01b 2931
destinyXfate 2:0e2ef1edf01b 2932 #if defined(PNG_WRITE_FLUSH_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2933 #if !defined(PNG_NO_STDIO)
destinyXfate 2:0e2ef1edf01b 2934 PNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 2935 #endif
destinyXfate 2:0e2ef1edf01b 2936 #endif
destinyXfate 2:0e2ef1edf01b 2937 #else /* PNG_1_0_X */
destinyXfate 2:0e2ef1edf01b 2938 #ifdef PNG_PROGRESSIVE_READ_SUPPORTED
destinyXfate 2:0e2ef1edf01b 2939 PNG_EXTERN void png_push_fill_buffer PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2940 png_bytep buffer, png_size_t length));
destinyXfate 2:0e2ef1edf01b 2941 #endif
destinyXfate 2:0e2ef1edf01b 2942 #endif /* PNG_1_0_X */
destinyXfate 2:0e2ef1edf01b 2943
destinyXfate 2:0e2ef1edf01b 2944 /* Reset the CRC variable */
destinyXfate 2:0e2ef1edf01b 2945 PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 2946
destinyXfate 2:0e2ef1edf01b 2947 /* Write the "data" buffer to whatever output you are using. */
destinyXfate 2:0e2ef1edf01b 2948 PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data,
destinyXfate 2:0e2ef1edf01b 2949 png_size_t length));
destinyXfate 2:0e2ef1edf01b 2950
destinyXfate 2:0e2ef1edf01b 2951 /* Read data from whatever input you are using into the "data" buffer */
destinyXfate 2:0e2ef1edf01b 2952 PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data,
destinyXfate 2:0e2ef1edf01b 2953 png_size_t length));
destinyXfate 2:0e2ef1edf01b 2954
destinyXfate 2:0e2ef1edf01b 2955 /* Read bytes into buf, and update png_ptr->crc */
destinyXfate 2:0e2ef1edf01b 2956 PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf,
destinyXfate 2:0e2ef1edf01b 2957 png_size_t length));
destinyXfate 2:0e2ef1edf01b 2958
destinyXfate 2:0e2ef1edf01b 2959 /* Decompress data in a chunk that uses compression */
destinyXfate 2:0e2ef1edf01b 2960 #if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \
destinyXfate 2:0e2ef1edf01b 2961 defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2962 PNG_EXTERN png_charp png_decompress_chunk PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 2963 int comp_type, png_charp chunkdata, png_size_t chunklength,
destinyXfate 2:0e2ef1edf01b 2964 png_size_t prefix_length, png_size_t *data_length));
destinyXfate 2:0e2ef1edf01b 2965 #endif
destinyXfate 2:0e2ef1edf01b 2966
destinyXfate 2:0e2ef1edf01b 2967 /* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */
destinyXfate 2:0e2ef1edf01b 2968 PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip));
destinyXfate 2:0e2ef1edf01b 2969
destinyXfate 2:0e2ef1edf01b 2970 /* Read the CRC from the file and compare it to the libpng calculated CRC */
destinyXfate 2:0e2ef1edf01b 2971 PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 2972
destinyXfate 2:0e2ef1edf01b 2973 /* Calculate the CRC over a section of data. Note that we are only
destinyXfate 2:0e2ef1edf01b 2974 * passing a maximum of 64K on systems that have this as a memory limit,
destinyXfate 2:0e2ef1edf01b 2975 * since this is the maximum buffer size we can specify.
destinyXfate 2:0e2ef1edf01b 2976 */
destinyXfate 2:0e2ef1edf01b 2977 PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr,
destinyXfate 2:0e2ef1edf01b 2978 png_size_t length));
destinyXfate 2:0e2ef1edf01b 2979
destinyXfate 2:0e2ef1edf01b 2980 #if defined(PNG_WRITE_FLUSH_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 2981 PNG_EXTERN void png_flush PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 2982 #endif
destinyXfate 2:0e2ef1edf01b 2983
destinyXfate 2:0e2ef1edf01b 2984 /* simple function to write the signature */
destinyXfate 2:0e2ef1edf01b 2985 PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 2986
destinyXfate 2:0e2ef1edf01b 2987 /* write various chunks */
destinyXfate 2:0e2ef1edf01b 2988
destinyXfate 2:0e2ef1edf01b 2989 /* Write the IHDR chunk, and update the png_struct with the necessary
destinyXfate 2:0e2ef1edf01b 2990 * information.
destinyXfate 2:0e2ef1edf01b 2991 */
destinyXfate 2:0e2ef1edf01b 2992 PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width,
destinyXfate 2:0e2ef1edf01b 2993 png_uint_32 height,
destinyXfate 2:0e2ef1edf01b 2994 int bit_depth, int color_type, int compression_method, int filter_method,
destinyXfate 2:0e2ef1edf01b 2995 int interlace_method));
destinyXfate 2:0e2ef1edf01b 2996
destinyXfate 2:0e2ef1edf01b 2997 PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette,
destinyXfate 2:0e2ef1edf01b 2998 png_uint_32 num_pal));
destinyXfate 2:0e2ef1edf01b 2999
destinyXfate 2:0e2ef1edf01b 3000 PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data,
destinyXfate 2:0e2ef1edf01b 3001 png_size_t length));
destinyXfate 2:0e2ef1edf01b 3002
destinyXfate 2:0e2ef1edf01b 3003 PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 3004
destinyXfate 2:0e2ef1edf01b 3005 #if defined(PNG_WRITE_gAMA_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3006 #ifdef PNG_FLOATING_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 3007 PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma));
destinyXfate 2:0e2ef1edf01b 3008 #endif
destinyXfate 2:0e2ef1edf01b 3009 #ifdef PNG_FIXED_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 3010 PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, png_fixed_point
destinyXfate 2:0e2ef1edf01b 3011 file_gamma));
destinyXfate 2:0e2ef1edf01b 3012 #endif
destinyXfate 2:0e2ef1edf01b 3013 #endif
destinyXfate 2:0e2ef1edf01b 3014
destinyXfate 2:0e2ef1edf01b 3015 #if defined(PNG_WRITE_sBIT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3016 PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit,
destinyXfate 2:0e2ef1edf01b 3017 int color_type));
destinyXfate 2:0e2ef1edf01b 3018 #endif
destinyXfate 2:0e2ef1edf01b 3019
destinyXfate 2:0e2ef1edf01b 3020 #if defined(PNG_WRITE_cHRM_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3021 #ifdef PNG_FLOATING_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 3022 PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3023 double white_x, double white_y,
destinyXfate 2:0e2ef1edf01b 3024 double red_x, double red_y, double green_x, double green_y,
destinyXfate 2:0e2ef1edf01b 3025 double blue_x, double blue_y));
destinyXfate 2:0e2ef1edf01b 3026 #endif
destinyXfate 2:0e2ef1edf01b 3027 #ifdef PNG_FIXED_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 3028 PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3029 png_fixed_point int_white_x, png_fixed_point int_white_y,
destinyXfate 2:0e2ef1edf01b 3030 png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
destinyXfate 2:0e2ef1edf01b 3031 int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
destinyXfate 2:0e2ef1edf01b 3032 png_fixed_point int_blue_y));
destinyXfate 2:0e2ef1edf01b 3033 #endif
destinyXfate 2:0e2ef1edf01b 3034 #endif
destinyXfate 2:0e2ef1edf01b 3035
destinyXfate 2:0e2ef1edf01b 3036 #if defined(PNG_WRITE_sRGB_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3037 PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3038 int intent));
destinyXfate 2:0e2ef1edf01b 3039 #endif
destinyXfate 2:0e2ef1edf01b 3040
destinyXfate 2:0e2ef1edf01b 3041 #if defined(PNG_WRITE_iCCP_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3042 PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3043 png_charp name, int compression_type,
destinyXfate 2:0e2ef1edf01b 3044 png_charp profile, int proflen));
destinyXfate 2:0e2ef1edf01b 3045 /* Note to maintainer: profile should be png_bytep */
destinyXfate 2:0e2ef1edf01b 3046 #endif
destinyXfate 2:0e2ef1edf01b 3047
destinyXfate 2:0e2ef1edf01b 3048 #if defined(PNG_WRITE_sPLT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3049 PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3050 png_sPLT_tp palette));
destinyXfate 2:0e2ef1edf01b 3051 #endif
destinyXfate 2:0e2ef1edf01b 3052
destinyXfate 2:0e2ef1edf01b 3053 #if defined(PNG_WRITE_tRNS_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3054 PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans,
destinyXfate 2:0e2ef1edf01b 3055 png_color_16p values, int number, int color_type));
destinyXfate 2:0e2ef1edf01b 3056 #endif
destinyXfate 2:0e2ef1edf01b 3057
destinyXfate 2:0e2ef1edf01b 3058 #if defined(PNG_WRITE_bKGD_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3059 PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3060 png_color_16p values, int color_type));
destinyXfate 2:0e2ef1edf01b 3061 #endif
destinyXfate 2:0e2ef1edf01b 3062
destinyXfate 2:0e2ef1edf01b 3063 #if defined(PNG_WRITE_hIST_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3064 PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist,
destinyXfate 2:0e2ef1edf01b 3065 int num_hist));
destinyXfate 2:0e2ef1edf01b 3066 #endif
destinyXfate 2:0e2ef1edf01b 3067
destinyXfate 2:0e2ef1edf01b 3068 #if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \
destinyXfate 2:0e2ef1edf01b 3069 defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3070 PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3071 png_charp key, png_charpp new_key));
destinyXfate 2:0e2ef1edf01b 3072 #endif
destinyXfate 2:0e2ef1edf01b 3073
destinyXfate 2:0e2ef1edf01b 3074 #if defined(PNG_WRITE_tEXt_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3075 PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key,
destinyXfate 2:0e2ef1edf01b 3076 png_charp text, png_size_t text_len));
destinyXfate 2:0e2ef1edf01b 3077 #endif
destinyXfate 2:0e2ef1edf01b 3078
destinyXfate 2:0e2ef1edf01b 3079 #if defined(PNG_WRITE_zTXt_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3080 PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key,
destinyXfate 2:0e2ef1edf01b 3081 png_charp text, png_size_t text_len, int compression));
destinyXfate 2:0e2ef1edf01b 3082 #endif
destinyXfate 2:0e2ef1edf01b 3083
destinyXfate 2:0e2ef1edf01b 3084 #if defined(PNG_WRITE_iTXt_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3085 PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3086 int compression, png_charp key, png_charp lang, png_charp lang_key,
destinyXfate 2:0e2ef1edf01b 3087 png_charp text));
destinyXfate 2:0e2ef1edf01b 3088 #endif
destinyXfate 2:0e2ef1edf01b 3089
destinyXfate 2:0e2ef1edf01b 3090 #if defined(PNG_TEXT_SUPPORTED) /* Added at version 1.0.14 and 1.2.4 */
destinyXfate 2:0e2ef1edf01b 3091 PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3092 png_infop info_ptr, png_textp text_ptr, int num_text));
destinyXfate 2:0e2ef1edf01b 3093 #endif
destinyXfate 2:0e2ef1edf01b 3094
destinyXfate 2:0e2ef1edf01b 3095 #if defined(PNG_WRITE_oFFs_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3096 PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3097 png_int_32 x_offset, png_int_32 y_offset, int unit_type));
destinyXfate 2:0e2ef1edf01b 3098 #endif
destinyXfate 2:0e2ef1edf01b 3099
destinyXfate 2:0e2ef1edf01b 3100 #if defined(PNG_WRITE_pCAL_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3101 PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose,
destinyXfate 2:0e2ef1edf01b 3102 png_int_32 X0, png_int_32 X1, int type, int nparams,
destinyXfate 2:0e2ef1edf01b 3103 png_charp units, png_charpp params));
destinyXfate 2:0e2ef1edf01b 3104 #endif
destinyXfate 2:0e2ef1edf01b 3105
destinyXfate 2:0e2ef1edf01b 3106 #if defined(PNG_WRITE_pHYs_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3107 PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3108 png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit,
destinyXfate 2:0e2ef1edf01b 3109 int unit_type));
destinyXfate 2:0e2ef1edf01b 3110 #endif
destinyXfate 2:0e2ef1edf01b 3111
destinyXfate 2:0e2ef1edf01b 3112 #if defined(PNG_WRITE_tIME_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3113 PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3114 png_timep mod_time));
destinyXfate 2:0e2ef1edf01b 3115 #endif
destinyXfate 2:0e2ef1edf01b 3116
destinyXfate 2:0e2ef1edf01b 3117 #if defined(PNG_WRITE_sCAL_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3118 #if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)
destinyXfate 2:0e2ef1edf01b 3119 PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3120 int unit, double width, double height));
destinyXfate 2:0e2ef1edf01b 3121 #else
destinyXfate 2:0e2ef1edf01b 3122 #ifdef PNG_FIXED_POINT_SUPPORTED
destinyXfate 2:0e2ef1edf01b 3123 PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3124 int unit, png_charp width, png_charp height));
destinyXfate 2:0e2ef1edf01b 3125 #endif
destinyXfate 2:0e2ef1edf01b 3126 #endif
destinyXfate 2:0e2ef1edf01b 3127 #endif
destinyXfate 2:0e2ef1edf01b 3128
destinyXfate 2:0e2ef1edf01b 3129 /* Called when finished processing a row of data */
destinyXfate 2:0e2ef1edf01b 3130 PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 3131
destinyXfate 2:0e2ef1edf01b 3132 /* Internal use only. Called before first row of data */
destinyXfate 2:0e2ef1edf01b 3133 PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 3134
destinyXfate 2:0e2ef1edf01b 3135 #if defined(PNG_READ_GAMMA_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3136 PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 3137 #endif
destinyXfate 2:0e2ef1edf01b 3138
destinyXfate 2:0e2ef1edf01b 3139 /* combine a row of data, dealing with alpha, etc. if requested */
destinyXfate 2:0e2ef1edf01b 3140 PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row,
destinyXfate 2:0e2ef1edf01b 3141 int mask));
destinyXfate 2:0e2ef1edf01b 3142
destinyXfate 2:0e2ef1edf01b 3143 #if defined(PNG_READ_INTERLACING_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3144 /* expand an interlaced row */
destinyXfate 2:0e2ef1edf01b 3145 /* OLD pre-1.0.9 interface:
destinyXfate 2:0e2ef1edf01b 3146 PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info,
destinyXfate 2:0e2ef1edf01b 3147 png_bytep row, int pass, png_uint_32 transformations));
destinyXfate 2:0e2ef1edf01b 3148 */
destinyXfate 2:0e2ef1edf01b 3149 PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 3150 #endif
destinyXfate 2:0e2ef1edf01b 3151
destinyXfate 2:0e2ef1edf01b 3152 /* GRR TO DO (2.0 or whenever): simplify other internal calling interfaces */
destinyXfate 2:0e2ef1edf01b 3153
destinyXfate 2:0e2ef1edf01b 3154 #if defined(PNG_WRITE_INTERLACING_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3155 /* grab pixels out of a row for an interlaced pass */
destinyXfate 2:0e2ef1edf01b 3156 PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info,
destinyXfate 2:0e2ef1edf01b 3157 png_bytep row, int pass));
destinyXfate 2:0e2ef1edf01b 3158 #endif
destinyXfate 2:0e2ef1edf01b 3159
destinyXfate 2:0e2ef1edf01b 3160 /* unfilter a row */
destinyXfate 2:0e2ef1edf01b 3161 PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3162 png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter));
destinyXfate 2:0e2ef1edf01b 3163
destinyXfate 2:0e2ef1edf01b 3164 /* Choose the best filter to use and filter the row data */
destinyXfate 2:0e2ef1edf01b 3165 PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3166 png_row_infop row_info));
destinyXfate 2:0e2ef1edf01b 3167
destinyXfate 2:0e2ef1edf01b 3168 /* Write out the filtered row. */
destinyXfate 2:0e2ef1edf01b 3169 PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3170 png_bytep filtered_row));
destinyXfate 2:0e2ef1edf01b 3171 /* finish a row while reading, dealing with interlacing passes, etc. */
destinyXfate 2:0e2ef1edf01b 3172 PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 3173
destinyXfate 2:0e2ef1edf01b 3174 /* initialize the row buffers, etc. */
destinyXfate 2:0e2ef1edf01b 3175 PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 3176 /* optional call to update the users info structure */
destinyXfate 2:0e2ef1edf01b 3177 PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3178 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 3179
destinyXfate 2:0e2ef1edf01b 3180 /* these are the functions that do the transformations */
destinyXfate 2:0e2ef1edf01b 3181 #if defined(PNG_READ_FILLER_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3182 PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info,
destinyXfate 2:0e2ef1edf01b 3183 png_bytep row, png_uint_32 filler, png_uint_32 flags));
destinyXfate 2:0e2ef1edf01b 3184 #endif
destinyXfate 2:0e2ef1edf01b 3185
destinyXfate 2:0e2ef1edf01b 3186 #if defined(PNG_READ_SWAP_ALPHA_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3187 PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info,
destinyXfate 2:0e2ef1edf01b 3188 png_bytep row));
destinyXfate 2:0e2ef1edf01b 3189 #endif
destinyXfate 2:0e2ef1edf01b 3190
destinyXfate 2:0e2ef1edf01b 3191 #if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3192 PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info,
destinyXfate 2:0e2ef1edf01b 3193 png_bytep row));
destinyXfate 2:0e2ef1edf01b 3194 #endif
destinyXfate 2:0e2ef1edf01b 3195
destinyXfate 2:0e2ef1edf01b 3196 #if defined(PNG_READ_INVERT_ALPHA_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3197 PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info,
destinyXfate 2:0e2ef1edf01b 3198 png_bytep row));
destinyXfate 2:0e2ef1edf01b 3199 #endif
destinyXfate 2:0e2ef1edf01b 3200
destinyXfate 2:0e2ef1edf01b 3201 #if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3202 PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info,
destinyXfate 2:0e2ef1edf01b 3203 png_bytep row));
destinyXfate 2:0e2ef1edf01b 3204 #endif
destinyXfate 2:0e2ef1edf01b 3205
destinyXfate 2:0e2ef1edf01b 3206 #if defined(PNG_WRITE_FILLER_SUPPORTED) || \
destinyXfate 2:0e2ef1edf01b 3207 defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3208 PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info,
destinyXfate 2:0e2ef1edf01b 3209 png_bytep row, png_uint_32 flags));
destinyXfate 2:0e2ef1edf01b 3210 #endif
destinyXfate 2:0e2ef1edf01b 3211
destinyXfate 2:0e2ef1edf01b 3212 #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3213 PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row));
destinyXfate 2:0e2ef1edf01b 3214 #endif
destinyXfate 2:0e2ef1edf01b 3215
destinyXfate 2:0e2ef1edf01b 3216 #if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3217 PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row));
destinyXfate 2:0e2ef1edf01b 3218 #endif
destinyXfate 2:0e2ef1edf01b 3219
destinyXfate 2:0e2ef1edf01b 3220 #if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3221 PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop
destinyXfate 2:0e2ef1edf01b 3222 row_info, png_bytep row));
destinyXfate 2:0e2ef1edf01b 3223 #endif
destinyXfate 2:0e2ef1edf01b 3224
destinyXfate 2:0e2ef1edf01b 3225 #if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3226 PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info,
destinyXfate 2:0e2ef1edf01b 3227 png_bytep row));
destinyXfate 2:0e2ef1edf01b 3228 #endif
destinyXfate 2:0e2ef1edf01b 3229
destinyXfate 2:0e2ef1edf01b 3230 #if defined(PNG_READ_PACK_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3231 PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, png_bytep row));
destinyXfate 2:0e2ef1edf01b 3232 #endif
destinyXfate 2:0e2ef1edf01b 3233
destinyXfate 2:0e2ef1edf01b 3234 #if defined(PNG_READ_SHIFT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3235 PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row,
destinyXfate 2:0e2ef1edf01b 3236 png_color_8p sig_bits));
destinyXfate 2:0e2ef1edf01b 3237 #endif
destinyXfate 2:0e2ef1edf01b 3238
destinyXfate 2:0e2ef1edf01b 3239 #if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3240 PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, png_bytep row));
destinyXfate 2:0e2ef1edf01b 3241 #endif
destinyXfate 2:0e2ef1edf01b 3242
destinyXfate 2:0e2ef1edf01b 3243 #if defined(PNG_READ_16_TO_8_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3244 PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, png_bytep row));
destinyXfate 2:0e2ef1edf01b 3245 #endif
destinyXfate 2:0e2ef1edf01b 3246
destinyXfate 2:0e2ef1edf01b 3247 #if defined(PNG_READ_DITHER_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3248 PNG_EXTERN void png_do_dither PNGARG((png_row_infop row_info,
destinyXfate 2:0e2ef1edf01b 3249 png_bytep row, png_bytep palette_lookup, png_bytep dither_lookup));
destinyXfate 2:0e2ef1edf01b 3250
destinyXfate 2:0e2ef1edf01b 3251 # if defined(PNG_CORRECT_PALETTE_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3252 PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3253 png_colorp palette, int num_palette));
destinyXfate 2:0e2ef1edf01b 3254 # endif
destinyXfate 2:0e2ef1edf01b 3255 #endif
destinyXfate 2:0e2ef1edf01b 3256
destinyXfate 2:0e2ef1edf01b 3257 #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3258 PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, png_bytep row));
destinyXfate 2:0e2ef1edf01b 3259 #endif
destinyXfate 2:0e2ef1edf01b 3260
destinyXfate 2:0e2ef1edf01b 3261 #if defined(PNG_WRITE_PACK_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3262 PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info,
destinyXfate 2:0e2ef1edf01b 3263 png_bytep row, png_uint_32 bit_depth));
destinyXfate 2:0e2ef1edf01b 3264 #endif
destinyXfate 2:0e2ef1edf01b 3265
destinyXfate 2:0e2ef1edf01b 3266 #if defined(PNG_WRITE_SHIFT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3267 PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row,
destinyXfate 2:0e2ef1edf01b 3268 png_color_8p bit_depth));
destinyXfate 2:0e2ef1edf01b 3269 #endif
destinyXfate 2:0e2ef1edf01b 3270
destinyXfate 2:0e2ef1edf01b 3271 #if defined(PNG_READ_BACKGROUND_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3272 #if defined(PNG_READ_GAMMA_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3273 PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
destinyXfate 2:0e2ef1edf01b 3274 png_color_16p trans_values, png_color_16p background,
destinyXfate 2:0e2ef1edf01b 3275 png_color_16p background_1,
destinyXfate 2:0e2ef1edf01b 3276 png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1,
destinyXfate 2:0e2ef1edf01b 3277 png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1,
destinyXfate 2:0e2ef1edf01b 3278 png_uint_16pp gamma_16_to_1, int gamma_shift));
destinyXfate 2:0e2ef1edf01b 3279 #else
destinyXfate 2:0e2ef1edf01b 3280 PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
destinyXfate 2:0e2ef1edf01b 3281 png_color_16p trans_values, png_color_16p background));
destinyXfate 2:0e2ef1edf01b 3282 #endif
destinyXfate 2:0e2ef1edf01b 3283 #endif
destinyXfate 2:0e2ef1edf01b 3284
destinyXfate 2:0e2ef1edf01b 3285 #if defined(PNG_READ_GAMMA_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3286 PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row,
destinyXfate 2:0e2ef1edf01b 3287 png_bytep gamma_table, png_uint_16pp gamma_16_table,
destinyXfate 2:0e2ef1edf01b 3288 int gamma_shift));
destinyXfate 2:0e2ef1edf01b 3289 #endif
destinyXfate 2:0e2ef1edf01b 3290
destinyXfate 2:0e2ef1edf01b 3291 #if defined(PNG_READ_EXPAND_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3292 PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info,
destinyXfate 2:0e2ef1edf01b 3293 png_bytep row, png_colorp palette, png_bytep trans, int num_trans));
destinyXfate 2:0e2ef1edf01b 3294 PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info,
destinyXfate 2:0e2ef1edf01b 3295 png_bytep row, png_color_16p trans_value));
destinyXfate 2:0e2ef1edf01b 3296 #endif
destinyXfate 2:0e2ef1edf01b 3297
destinyXfate 2:0e2ef1edf01b 3298 /* The following decodes the appropriate chunks, and does error correction,
destinyXfate 2:0e2ef1edf01b 3299 * then calls the appropriate callback for the chunk if it is valid.
destinyXfate 2:0e2ef1edf01b 3300 */
destinyXfate 2:0e2ef1edf01b 3301
destinyXfate 2:0e2ef1edf01b 3302 /* decode the IHDR chunk */
destinyXfate 2:0e2ef1edf01b 3303 PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3304 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3305 PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3306 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3307 PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3308 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3309
destinyXfate 2:0e2ef1edf01b 3310 #if defined(PNG_READ_bKGD_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3311 PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3312 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3313 #endif
destinyXfate 2:0e2ef1edf01b 3314
destinyXfate 2:0e2ef1edf01b 3315 #if defined(PNG_READ_cHRM_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3316 PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3317 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3318 #endif
destinyXfate 2:0e2ef1edf01b 3319
destinyXfate 2:0e2ef1edf01b 3320 #if defined(PNG_READ_gAMA_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3321 PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3322 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3323 #endif
destinyXfate 2:0e2ef1edf01b 3324
destinyXfate 2:0e2ef1edf01b 3325 #if defined(PNG_READ_hIST_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3326 PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3327 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3328 #endif
destinyXfate 2:0e2ef1edf01b 3329
destinyXfate 2:0e2ef1edf01b 3330 #if defined(PNG_READ_iCCP_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3331 extern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3332 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3333 #endif /* PNG_READ_iCCP_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 3334
destinyXfate 2:0e2ef1edf01b 3335 #if defined(PNG_READ_iTXt_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3336 PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3337 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3338 #endif
destinyXfate 2:0e2ef1edf01b 3339
destinyXfate 2:0e2ef1edf01b 3340 #if defined(PNG_READ_oFFs_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3341 PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3342 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3343 #endif
destinyXfate 2:0e2ef1edf01b 3344
destinyXfate 2:0e2ef1edf01b 3345 #if defined(PNG_READ_pCAL_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3346 PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3347 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3348 #endif
destinyXfate 2:0e2ef1edf01b 3349
destinyXfate 2:0e2ef1edf01b 3350 #if defined(PNG_READ_pHYs_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3351 PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3352 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3353 #endif
destinyXfate 2:0e2ef1edf01b 3354
destinyXfate 2:0e2ef1edf01b 3355 #if defined(PNG_READ_sBIT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3356 PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3357 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3358 #endif
destinyXfate 2:0e2ef1edf01b 3359
destinyXfate 2:0e2ef1edf01b 3360 #if defined(PNG_READ_sCAL_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3361 PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3362 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3363 #endif
destinyXfate 2:0e2ef1edf01b 3364
destinyXfate 2:0e2ef1edf01b 3365 #if defined(PNG_READ_sPLT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3366 extern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3367 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3368 #endif /* PNG_READ_sPLT_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 3369
destinyXfate 2:0e2ef1edf01b 3370 #if defined(PNG_READ_sRGB_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3371 PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3372 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3373 #endif
destinyXfate 2:0e2ef1edf01b 3374
destinyXfate 2:0e2ef1edf01b 3375 #if defined(PNG_READ_tEXt_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3376 PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3377 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3378 #endif
destinyXfate 2:0e2ef1edf01b 3379
destinyXfate 2:0e2ef1edf01b 3380 #if defined(PNG_READ_tIME_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3381 PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3382 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3383 #endif
destinyXfate 2:0e2ef1edf01b 3384
destinyXfate 2:0e2ef1edf01b 3385 #if defined(PNG_READ_tRNS_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3386 PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3387 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3388 #endif
destinyXfate 2:0e2ef1edf01b 3389
destinyXfate 2:0e2ef1edf01b 3390 #if defined(PNG_READ_zTXt_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3391 PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
destinyXfate 2:0e2ef1edf01b 3392 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3393 #endif
destinyXfate 2:0e2ef1edf01b 3394
destinyXfate 2:0e2ef1edf01b 3395 PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3396 png_infop info_ptr, png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3397
destinyXfate 2:0e2ef1edf01b 3398 PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3399 png_bytep chunk_name));
destinyXfate 2:0e2ef1edf01b 3400
destinyXfate 2:0e2ef1edf01b 3401 /* handle the transformations for reading and writing */
destinyXfate 2:0e2ef1edf01b 3402 PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 3403 PNG_EXTERN void png_do_write_transformations PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 3404
destinyXfate 2:0e2ef1edf01b 3405 PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 3406
destinyXfate 2:0e2ef1edf01b 3407 #ifdef PNG_PROGRESSIVE_READ_SUPPORTED
destinyXfate 2:0e2ef1edf01b 3408 PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3409 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 3410 PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3411 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 3412 PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 3413 PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3414 png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3415 PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 3416 PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 3417 PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3418 png_bytep buffer, png_size_t buffer_length));
destinyXfate 2:0e2ef1edf01b 3419 PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 3420 PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3421 png_bytep buffer, png_size_t buffer_length));
destinyXfate 2:0e2ef1edf01b 3422 PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 3423 PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3424 png_infop info_ptr, png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3425 PNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3426 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 3427 PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3428 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 3429 PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row));
destinyXfate 2:0e2ef1edf01b 3430 PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3431 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 3432 PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3433 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 3434 PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 3435 #if defined(PNG_READ_tEXt_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3436 PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3437 png_infop info_ptr, png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3438 PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3439 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 3440 #endif
destinyXfate 2:0e2ef1edf01b 3441 #if defined(PNG_READ_zTXt_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3442 PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3443 png_infop info_ptr, png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3444 PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3445 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 3446 #endif
destinyXfate 2:0e2ef1edf01b 3447 #if defined(PNG_READ_iTXt_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3448 PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3449 png_infop info_ptr, png_uint_32 length));
destinyXfate 2:0e2ef1edf01b 3450 PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3451 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 3452 #endif
destinyXfate 2:0e2ef1edf01b 3453
destinyXfate 2:0e2ef1edf01b 3454 #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 3455
destinyXfate 2:0e2ef1edf01b 3456 #ifdef PNG_MNG_FEATURES_SUPPORTED
destinyXfate 2:0e2ef1edf01b 3457 PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info,
destinyXfate 2:0e2ef1edf01b 3458 png_bytep row));
destinyXfate 2:0e2ef1edf01b 3459 PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info,
destinyXfate 2:0e2ef1edf01b 3460 png_bytep row));
destinyXfate 2:0e2ef1edf01b 3461 #endif
destinyXfate 2:0e2ef1edf01b 3462
destinyXfate 2:0e2ef1edf01b 3463 #if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3464 #if defined(PNG_MMX_CODE_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3465 /* png.c */ /* PRIVATE */
destinyXfate 2:0e2ef1edf01b 3466 PNG_EXTERN void png_init_mmx_flags PNGARG((png_structp png_ptr));
destinyXfate 2:0e2ef1edf01b 3467 #endif
destinyXfate 2:0e2ef1edf01b 3468 #endif
destinyXfate 2:0e2ef1edf01b 3469
destinyXfate 2:0e2ef1edf01b 3470 #if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3471 PNG_EXTERN png_uint_32 png_get_pixels_per_inch PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3472 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 3473
destinyXfate 2:0e2ef1edf01b 3474 PNG_EXTERN png_uint_32 png_get_x_pixels_per_inch PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3475 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 3476
destinyXfate 2:0e2ef1edf01b 3477 PNG_EXTERN png_uint_32 png_get_y_pixels_per_inch PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3478 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 3479
destinyXfate 2:0e2ef1edf01b 3480 PNG_EXTERN float png_get_x_offset_inches PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3481 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 3482
destinyXfate 2:0e2ef1edf01b 3483 PNG_EXTERN float png_get_y_offset_inches PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3484 png_infop info_ptr));
destinyXfate 2:0e2ef1edf01b 3485
destinyXfate 2:0e2ef1edf01b 3486 #if defined(PNG_pHYs_SUPPORTED)
destinyXfate 2:0e2ef1edf01b 3487 PNG_EXTERN png_uint_32 png_get_pHYs_dpi PNGARG((png_structp png_ptr,
destinyXfate 2:0e2ef1edf01b 3488 png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
destinyXfate 2:0e2ef1edf01b 3489 #endif /* PNG_pHYs_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 3490 #endif /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */
destinyXfate 2:0e2ef1edf01b 3491
destinyXfate 2:0e2ef1edf01b 3492 /* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
destinyXfate 2:0e2ef1edf01b 3493
destinyXfate 2:0e2ef1edf01b 3494 #endif /* PNG_INTERNAL */
destinyXfate 2:0e2ef1edf01b 3495
destinyXfate 2:0e2ef1edf01b 3496 #ifdef __cplusplus
destinyXfate 2:0e2ef1edf01b 3497 }
destinyXfate 2:0e2ef1edf01b 3498 #endif
destinyXfate 2:0e2ef1edf01b 3499
destinyXfate 2:0e2ef1edf01b 3500 #endif /* PNG_VERSION_INFO_ONLY */
destinyXfate 2:0e2ef1edf01b 3501 /* do not put anything past this line */
destinyXfate 2:0e2ef1edf01b 3502 #endif /* PNG_H */
destinyXfate 2:0e2ef1edf01b 3503