OLD | NEW |
1 | 1 |
2 /* pnginfo.h - header file for PNG reference library | 2 /* pnginfo.h - header file for PNG reference library |
3 * | 3 * |
4 * Copyright (c) 1998-2013 Glenn Randers-Pehrson | 4 * Copyright (c) 1998-2013 Glenn Randers-Pehrson |
5 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) | 5 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) |
6 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) | 6 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) |
7 * | 7 * |
8 * Last changed in libpng 1.6.1 [March 28, 2013] | 8 * Last changed in libpng 1.6.1 [March 28, 2013] |
9 * | 9 * |
10 * This code is released under the libpng license. | 10 * This code is released under the libpng license. |
11 * For conditions of distribution and use, see the disclaimer | 11 * For conditions of distribution and use, see the disclaimer |
12 * and license in png.h | 12 * and license in png.h |
13 */ | 13 */ |
14 | 14 |
15 /* png_info is a structure that holds the information in a PNG file so | 15 /* png_info is a structure that holds the information in a PNG file so |
16 * that the application can find out the characteristics of the image. | 16 * that the application can find out the characteristics of the image. |
17 * If you are reading the file, this structure will tell you what is | 17 * If you are reading the file, this structure will tell you what is |
18 * in the PNG file. If you are writing the file, fill in the information | 18 * in the PNG file. If you are writing the file, fill in the information |
19 * you want to put into the PNG file, using png_set_*() functions, then | 19 * you want to put into the PNG file, using png_set_*() functions, then |
20 * call png_write_info(). | 20 * call png_write_info(). |
21 * | 21 * |
22 * The names chosen should be very close to the PNG specification, so | 22 * The names chosen should be very close to the PNG specification, so |
23 * consult that document for information about the meaning of each field. | 23 * consult that document for information about the meaning of each field. |
24 * | 24 * |
25 * With libpng < 0.95, it was only possible to directly set and read the | 25 * With libpng < 0.95, it was only possible to directly set and read the |
26 * the values in the png_info_struct, which meant that the contents and | 26 * the values in the png_info_struct, which meant that the contents and |
27 * order of the values had to remain fixed. With libpng 0.95 and later, | 27 * order of the values had to remain fixed. With libpng 0.95 and later, |
28 * however, there are now functions that abstract the contents of | 28 * however, there are now functions that abstract the contents of |
29 * png_info_struct from the application, so this makes it easier to use | 29 * png_info_struct from the application, so this makes it easier to use |
30 * libpng with dynamic libraries, and even makes it possible to use | 30 * libpng with dynamic libraries, and even makes it possible to use |
31 * libraries that don't have all of the libpng ancillary chunk-handing | 31 * libraries that don't have all of the libpng ancillary chunk-handing |
32 * functionality. In libpng-1.5.0 this was moved into a separate private | 32 * functionality. In libpng-1.5.0 this was moved into a separate private |
33 * file that is not visible to applications. | 33 * file that is not visible to applications. |
34 * | 34 * |
35 * The following members may have allocated storage attached that should be | 35 * The following members may have allocated storage attached that should be |
36 * cleaned up before the structure is discarded: palette, trans, text, | 36 * cleaned up before the structure is discarded: palette, trans, text, |
37 * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile, | 37 * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile, |
38 * splt_palettes, scal_unit, row_pointers, and unknowns. By default, these | 38 * splt_palettes, scal_unit, row_pointers, and unknowns. By default, these |
39 * are automatically freed when the info structure is deallocated, if they were | 39 * are automatically freed when the info structure is deallocated, if they were |
40 * allocated internally by libpng. This behavior can be changed by means | 40 * allocated internally by libpng. This behavior can be changed by means |
41 * of the png_data_freer() function. | 41 * of the png_data_freer() function. |
42 * | 42 * |
43 * More allocation details: all the chunk-reading functions that | 43 * More allocation details: all the chunk-reading functions that |
44 * change these members go through the corresponding png_set_* | 44 * change these members go through the corresponding png_set_* |
45 * functions. A function to clear these members is available: see | 45 * functions. A function to clear these members is available: see |
46 * png_free_data(). The png_set_* functions do not depend on being | 46 * png_free_data(). The png_set_* functions do not depend on being |
47 * able to point info structure members to any of the storage they are | 47 * able to point info structure members to any of the storage they are |
48 * passed (they make their own copies), EXCEPT that the png_set_text | 48 * passed (they make their own copies), EXCEPT that the png_set_text |
49 * functions use the same storage passed to them in the text_ptr or | 49 * functions use the same storage passed to them in the text_ptr or |
50 * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns | 50 * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns |
51 * functions do not make their own copies. | 51 * functions do not make their own copies. |
52 */ | 52 */ |
53 #ifndef PNGINFO_H | 53 #ifndef PNGINFO_H |
54 #define PNGINFO_H | 54 #define PNGINFO_H |
55 | 55 |
56 struct png_info_def | 56 struct png_info_def { |
57 { | 57 /* The following are necessary for every PNG file */ |
58 /* The following are necessary for every PNG file */ | 58 png_uint_32 width; /* width of image in pixels (from IHDR) */ |
59 png_uint_32 width; /* width of image in pixels (from IHDR) */ | 59 png_uint_32 height; /* height of image in pixels (from IHDR) */ |
60 png_uint_32 height; /* height of image in pixels (from IHDR) */ | 60 png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */ |
61 png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */ | 61 png_size_t rowbytes; /* bytes needed to hold an untransformed row */ |
62 png_size_t rowbytes; /* bytes needed to hold an untransformed row */ | 62 png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */ |
63 png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */ | 63 png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */ |
64 png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */ | 64 png_uint_16 num_trans; /* number of transparent palette color (tRNS) */ |
65 png_uint_16 num_trans; /* number of transparent palette color (tRNS) */ | 65 png_byte bit_depth; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */ |
66 png_byte bit_depth; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */ | 66 png_byte color_type; /* see PNG_COLOR_TYPE_ below (from IHDR) */ |
67 png_byte color_type; /* see PNG_COLOR_TYPE_ below (from IHDR) */ | 67 /* The following three should have been named *_method not *_type */ |
68 /* The following three should have been named *_method not *_type */ | 68 png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */ |
69 png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */ | 69 png_byte filter_type; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */ |
70 png_byte filter_type; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */ | 70 png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ |
71 png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ | 71 |
72 | 72 /* The following are set by png_set_IHDR, called from the application on |
73 /* The following are set by png_set_IHDR, called from the application on | 73 * write, but the are never actually used by the write code. |
74 * write, but the are never actually used by the write code. | 74 */ |
75 */ | 75 png_byte channels; /* number of data channels per pixel (1, 2, 3, 4) */ |
76 png_byte channels; /* number of data channels per pixel (1, 2, 3, 4) */ | 76 png_byte pixel_depth; /* number of bits per pixel */ |
77 png_byte pixel_depth; /* number of bits per pixel */ | 77 png_byte spare_byte; /* to align the data, and for future use */ |
78 png_byte spare_byte; /* to align the data, and for future use */ | |
79 | 78 |
80 #ifdef PNG_READ_SUPPORTED | 79 #ifdef PNG_READ_SUPPORTED |
81 /* This is never set during write */ | 80 /* This is never set during write */ |
82 png_byte signature[8]; /* magic bytes read by libpng from start of file */ | 81 png_byte signature[8]; /* magic bytes read by libpng from start of file */ |
83 #endif | 82 #endif |
84 | 83 |
85 /* The rest of the data is optional. If you are reading, check the | 84 /* The rest of the data is optional. If you are reading, check the |
86 * valid field to see if the information in these are valid. If you | 85 * valid field to see if the information in these are valid. If you |
87 * are writing, set the valid field to those chunks you want written, | 86 * are writing, set the valid field to those chunks you want written, |
88 * and initialize the appropriate fields below. | 87 * and initialize the appropriate fields below. |
89 */ | 88 */ |
90 | 89 |
91 #if defined(PNG_COLORSPACE_SUPPORTED) || defined(PNG_GAMMA_SUPPORTED) | 90 #if defined(PNG_COLORSPACE_SUPPORTED) || defined(PNG_GAMMA_SUPPORTED) |
92 /* png_colorspace only contains 'flags' if neither GAMMA or COLORSPACE are | 91 /* png_colorspace only contains 'flags' if neither GAMMA or COLORSPACE are |
93 * defined. When COLORSPACE is switched on all the colorspace-defining | 92 * defined. When COLORSPACE is switched on all the colorspace-defining |
94 * chunks should be enabled, when GAMMA is switched on all the gamma-defining | 93 * chunks should be enabled, when GAMMA is switched on all the gamma-defining |
95 * chunks should be enabled. If this is not done it becomes possible to read | 94 * chunks should be enabled. If this is not done it becomes possible to read |
96 * inconsistent PNG files and assign a probably incorrect interpretation to | 95 * inconsistent PNG files and assign a probably incorrect interpretation to |
97 * the information. (In other words, by carefully choosing which chunks to | 96 * the information. (In other words, by carefully choosing which chunks to |
98 * recognize the system configuration can select an interpretation for PNG | 97 * recognize the system configuration can select an interpretation for PNG |
99 * files containing ambiguous data and this will result in inconsistent | 98 * files containing ambiguous data and this will result in inconsistent |
100 * behavior between different libpng builds!) | 99 * behavior between different libpng builds!) |
101 */ | 100 */ |
102 png_colorspace colorspace; | 101 png_colorspace colorspace; |
103 #endif | 102 #endif |
104 | 103 |
105 #ifdef PNG_iCCP_SUPPORTED | 104 #ifdef PNG_iCCP_SUPPORTED |
106 /* iCCP chunk data. */ | 105 /* iCCP chunk data. */ |
107 png_charp iccp_name; /* profile name */ | 106 png_charp iccp_name; /* profile name */ |
108 png_bytep iccp_profile; /* International Color Consortium profile data */ | 107 png_bytep iccp_profile; /* International Color Consortium profile data */ |
109 png_uint_32 iccp_proflen; /* ICC profile data length */ | 108 png_uint_32 iccp_proflen; /* ICC profile data length */ |
110 #endif | 109 #endif |
111 | 110 |
112 #ifdef PNG_TEXT_SUPPORTED | 111 #ifdef PNG_TEXT_SUPPORTED |
113 /* The tEXt, and zTXt chunks contain human-readable textual data in | 112 /* The tEXt, and zTXt chunks contain human-readable textual data in |
114 * uncompressed, compressed, and optionally compressed forms, respectively. | 113 * uncompressed, compressed, and optionally compressed forms, respectively. |
115 * The data in "text" is an array of pointers to uncompressed, | 114 * The data in "text" is an array of pointers to uncompressed, |
116 * null-terminated C strings. Each chunk has a keyword that describes the | 115 * null-terminated C strings. Each chunk has a keyword that describes the |
117 * textual data contained in that chunk. Keywords are not required to be | 116 * textual data contained in that chunk. Keywords are not required to be |
118 * unique, and the text string may be empty. Any number of text chunks may | 117 * unique, and the text string may be empty. Any number of text chunks may |
119 * be in an image. | 118 * be in an image. |
120 */ | 119 */ |
121 int num_text; /* number of comments read or comments to write */ | 120 int num_text; /* number of comments read or comments to write */ |
122 int max_text; /* current size of text array */ | 121 int max_text; /* current size of text array */ |
123 png_textp text; /* array of comments read or comments to write */ | 122 png_textp text; /* array of comments read or comments to write */ |
124 #endif /* PNG_TEXT_SUPPORTED */ | 123 #endif /* PNG_TEXT_SUPPORTED */ |
125 | 124 |
126 #ifdef PNG_tIME_SUPPORTED | 125 #ifdef PNG_tIME_SUPPORTED |
127 /* The tIME chunk holds the last time the displayed image data was | 126 /* The tIME chunk holds the last time the displayed image data was |
128 * modified. See the png_time struct for the contents of this struct. | 127 * modified. See the png_time struct for the contents of this struct. |
129 */ | 128 */ |
130 png_time mod_time; | 129 png_time mod_time; |
131 #endif | 130 #endif |
132 | 131 |
133 #ifdef PNG_sBIT_SUPPORTED | 132 #ifdef PNG_sBIT_SUPPORTED |
134 /* The sBIT chunk specifies the number of significant high-order bits | 133 /* The sBIT chunk specifies the number of significant high-order bits |
135 * in the pixel data. Values are in the range [1, bit_depth], and are | 134 * in the pixel data. Values are in the range [1, bit_depth], and are |
136 * only specified for the channels in the pixel data. The contents of | 135 * only specified for the channels in the pixel data. The contents of |
137 * the low-order bits is not specified. Data is valid if | 136 * the low-order bits is not specified. Data is valid if |
138 * (valid & PNG_INFO_sBIT) is non-zero. | 137 * (valid & PNG_INFO_sBIT) is non-zero. |
139 */ | 138 */ |
140 png_color_8 sig_bit; /* significant bits in color channels */ | 139 png_color_8 sig_bit; /* significant bits in color channels */ |
141 #endif | 140 #endif |
142 | 141 |
143 #if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \ | 142 #if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \ |
144 defined(PNG_READ_BACKGROUND_SUPPORTED) | 143 defined(PNG_READ_BACKGROUND_SUPPORTED) |
145 /* The tRNS chunk supplies transparency data for paletted images and | 144 /* The tRNS chunk supplies transparency data for paletted images and |
146 * other image types that don't need a full alpha channel. There are | 145 * other image types that don't need a full alpha channel. There are |
147 * "num_trans" transparency values for a paletted image, stored in the | 146 * "num_trans" transparency values for a paletted image, stored in the |
148 * same order as the palette colors, starting from index 0. Values | 147 * same order as the palette colors, starting from index 0. Values |
149 * for the data are in the range [0, 255], ranging from fully transparent | 148 * for the data are in the range [0, 255], ranging from fully transparent |
150 * to fully opaque, respectively. For non-paletted images, there is a | 149 * to fully opaque, respectively. For non-paletted images, there is a |
151 * single color specified that should be treated as fully transparent. | 150 * single color specified that should be treated as fully transparent. |
152 * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. | 151 * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. |
153 */ | 152 */ |
154 png_bytep trans_alpha; /* alpha values for paletted image */ | 153 png_bytep trans_alpha; /* alpha values for paletted image */ |
155 png_color_16 trans_color; /* transparent color for non-palette image */ | 154 png_color_16 trans_color; /* transparent color for non-palette image */ |
156 #endif | 155 #endif |
157 | 156 |
158 #if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) | 157 #if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) |
159 /* The bKGD chunk gives the suggested image background color if the | 158 /* The bKGD chunk gives the suggested image background color if the |
160 * display program does not have its own background color and the image | 159 * display program does not have its own background color and the image |
161 * is needs to composited onto a background before display. The colors | 160 * is needs to composited onto a background before display. The colors |
162 * in "background" are normally in the same color space/depth as the | 161 * in "background" are normally in the same color space/depth as the |
163 * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero. | 162 * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero. |
164 */ | 163 */ |
165 png_color_16 background; | 164 png_color_16 background; |
166 #endif | 165 #endif |
167 | 166 |
168 #ifdef PNG_oFFs_SUPPORTED | 167 #ifdef PNG_oFFs_SUPPORTED |
169 /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards | 168 /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards |
170 * and downwards from the top-left corner of the display, page, or other | 169 * and downwards from the top-left corner of the display, page, or other |
171 * application-specific co-ordinate space. See the PNG_OFFSET_ defines | 170 * application-specific co-ordinate space. See the PNG_OFFSET_ defines |
172 * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero. | 171 * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero. |
173 */ | 172 */ |
174 png_int_32 x_offset; /* x offset on page */ | 173 png_int_32 x_offset; /* x offset on page */ |
175 png_int_32 y_offset; /* y offset on page */ | 174 png_int_32 y_offset; /* y offset on page */ |
176 png_byte offset_unit_type; /* offset units type */ | 175 png_byte offset_unit_type; /* offset units type */ |
177 #endif | 176 #endif |
178 | 177 |
179 #ifdef PNG_pHYs_SUPPORTED | 178 #ifdef PNG_pHYs_SUPPORTED |
180 /* The pHYs chunk gives the physical pixel density of the image for | 179 /* The pHYs chunk gives the physical pixel density of the image for |
181 * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_ | 180 * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_ |
182 * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. | 181 * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. |
183 */ | 182 */ |
184 png_uint_32 x_pixels_per_unit; /* horizontal pixel density */ | 183 png_uint_32 x_pixels_per_unit; /* horizontal pixel density */ |
185 png_uint_32 y_pixels_per_unit; /* vertical pixel density */ | 184 png_uint_32 y_pixels_per_unit; /* vertical pixel density */ |
186 png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */ | 185 png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */ |
187 #endif | 186 #endif |
188 | 187 |
189 #ifdef PNG_hIST_SUPPORTED | 188 #ifdef PNG_hIST_SUPPORTED |
190 /* The hIST chunk contains the relative frequency or importance of the | 189 /* The hIST chunk contains the relative frequency or importance of the |
191 * various palette entries, so that a viewer can intelligently select a | 190 * various palette entries, so that a viewer can intelligently select a |
192 * reduced-color palette, if required. Data is an array of "num_palette" | 191 * reduced-color palette, if required. Data is an array of "num_palette" |
193 * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST) | 192 * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST) |
194 * is non-zero. | 193 * is non-zero. |
195 */ | 194 */ |
196 png_uint_16p hist; | 195 png_uint_16p hist; |
197 #endif | 196 #endif |
198 | 197 |
199 #ifdef PNG_pCAL_SUPPORTED | 198 #ifdef PNG_pCAL_SUPPORTED |
200 /* The pCAL chunk describes a transformation between the stored pixel | 199 /* The pCAL chunk describes a transformation between the stored pixel |
201 * values and original physical data values used to create the image. | 200 * values and original physical data values used to create the image. |
202 * The integer range [0, 2^bit_depth - 1] maps to the floating-point | 201 * The integer range [0, 2^bit_depth - 1] maps to the floating-point |
203 * range given by [pcal_X0, pcal_X1], and are further transformed by a | 202 * range given by [pcal_X0, pcal_X1], and are further transformed by a |
204 * (possibly non-linear) transformation function given by "pcal_type" | 203 * (possibly non-linear) transformation function given by "pcal_type" |
205 * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_ | 204 * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_ |
206 * defines below, and the PNG-Group's PNG extensions document for a | 205 * defines below, and the PNG-Group's PNG extensions document for a |
207 * complete description of the transformations and how they should be | 206 * complete description of the transformations and how they should be |
208 * implemented, and for a description of the ASCII parameter strings. | 207 * implemented, and for a description of the ASCII parameter strings. |
209 * Data values are valid if (valid & PNG_INFO_pCAL) non-zero. | 208 * Data values are valid if (valid & PNG_INFO_pCAL) non-zero. |
210 */ | 209 */ |
211 png_charp pcal_purpose; /* pCAL chunk description string */ | 210 png_charp pcal_purpose; /* pCAL chunk description string */ |
212 png_int_32 pcal_X0; /* minimum value */ | 211 png_int_32 pcal_X0; /* minimum value */ |
213 png_int_32 pcal_X1; /* maximum value */ | 212 png_int_32 pcal_X1; /* maximum value */ |
214 png_charp pcal_units; /* Latin-1 string giving physical units */ | 213 png_charp pcal_units; /* Latin-1 string giving physical units */ |
215 png_charpp pcal_params; /* ASCII strings containing parameter values */ | 214 png_charpp pcal_params; /* ASCII strings containing parameter values */ |
216 png_byte pcal_type; /* equation type (see PNG_EQUATION_ below) */ | 215 png_byte pcal_type; /* equation type (see PNG_EQUATION_ below) */ |
217 png_byte pcal_nparams; /* number of parameters given in pcal_params */ | 216 png_byte pcal_nparams; /* number of parameters given in pcal_params */ |
218 #endif | 217 #endif |
219 | 218 |
220 /* New members added in libpng-1.0.6 */ | 219 /* New members added in libpng-1.0.6 */ |
221 png_uint_32 free_me; /* flags items libpng is responsible for freeing */ | 220 png_uint_32 free_me; /* flags items libpng is responsible for freeing */ |
222 | 221 |
223 #ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED | 222 #ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED |
224 /* Storage for unknown chunks that the library doesn't recognize. */ | 223 /* Storage for unknown chunks that the library doesn't recognize. */ |
225 png_unknown_chunkp unknown_chunks; | 224 png_unknown_chunkp unknown_chunks; |
226 | 225 |
227 /* The type of this field is limited by the type of | 226 /* The type of this field is limited by the type of |
228 * png_struct::user_chunk_cache_max, else overflow can occur. | 227 * png_struct::user_chunk_cache_max, else overflow can occur. |
229 */ | 228 */ |
230 int unknown_chunks_num; | 229 int unknown_chunks_num; |
231 #endif | 230 #endif |
232 | 231 |
233 #ifdef PNG_sPLT_SUPPORTED | 232 #ifdef PNG_sPLT_SUPPORTED |
234 /* Data on sPLT chunks (there may be more than one). */ | 233 /* Data on sPLT chunks (there may be more than one). */ |
235 png_sPLT_tp splt_palettes; | 234 png_sPLT_tp splt_palettes; |
236 int splt_palettes_num; /* Match type returned by png_get API */ | 235 int splt_palettes_num; /* Match type returned by png_get API */ |
237 #endif | 236 #endif |
238 | 237 |
239 #ifdef PNG_sCAL_SUPPORTED | 238 #ifdef PNG_sCAL_SUPPORTED |
240 /* The sCAL chunk describes the actual physical dimensions of the | 239 /* The sCAL chunk describes the actual physical dimensions of the |
241 * subject matter of the graphic. The chunk contains a unit specification | 240 * subject matter of the graphic. The chunk contains a unit specification |
242 * a byte value, and two ASCII strings representing floating-point | 241 * a byte value, and two ASCII strings representing floating-point |
243 * values. The values are width and height corresponsing to one pixel | 242 * values. The values are width and height corresponsing to one pixel |
244 * in the image. Data values are valid if (valid & PNG_INFO_sCAL) is | 243 * in the image. Data values are valid if (valid & PNG_INFO_sCAL) is |
245 * non-zero. | 244 * non-zero. |
246 */ | 245 */ |
247 png_byte scal_unit; /* unit of physical scale */ | 246 png_byte scal_unit; /* unit of physical scale */ |
248 png_charp scal_s_width; /* string containing height */ | 247 png_charp scal_s_width; /* string containing height */ |
249 png_charp scal_s_height; /* string containing width */ | 248 png_charp scal_s_height; /* string containing width */ |
250 #endif | 249 #endif |
251 | 250 |
252 #ifdef PNG_INFO_IMAGE_SUPPORTED | 251 #ifdef PNG_INFO_IMAGE_SUPPORTED |
253 /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) | 252 /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) |
254 non-zero */ | 253 non-zero */ |
255 /* Data valid if (valid & PNG_INFO_IDAT) non-zero */ | 254 /* Data valid if (valid & PNG_INFO_IDAT) non-zero */ |
256 png_bytepp row_pointers; /* the image bits */ | 255 png_bytepp row_pointers; /* the image bits */ |
257 #endif | 256 #endif |
258 | |
259 }; | 257 }; |
260 #endif /* PNGINFO_H */ | 258 #endif /* PNGINFO_H */ |
OLD | NEW |