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