13965825b97a5809454f5810f7e603cbd02daa036scroggo
23965825b97a5809454f5810f7e603cbd02daa036scroggo/* pnginfo.h - header file for PNG reference library
33965825b97a5809454f5810f7e603cbd02daa036scroggo *
43965825b97a5809454f5810f7e603cbd02daa036scroggo * Last changed in libpng 1.6.1 [March 28, 2013]
53965825b97a5809454f5810f7e603cbd02daa036scroggo * Copyright (c) 1998-2002,2004,2006-2013 Glenn Randers-Pehrson
63965825b97a5809454f5810f7e603cbd02daa036scroggo * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
73965825b97a5809454f5810f7e603cbd02daa036scroggo * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
83965825b97a5809454f5810f7e603cbd02daa036scroggo *
93965825b97a5809454f5810f7e603cbd02daa036scroggo * This code is released under the libpng license.
103965825b97a5809454f5810f7e603cbd02daa036scroggo * For conditions of distribution and use, see the disclaimer
113965825b97a5809454f5810f7e603cbd02daa036scroggo * and license in png.h
123965825b97a5809454f5810f7e603cbd02daa036scroggo */
133965825b97a5809454f5810f7e603cbd02daa036scroggo
143965825b97a5809454f5810f7e603cbd02daa036scroggo /* png_info is a structure that holds the information in a PNG file so
153965825b97a5809454f5810f7e603cbd02daa036scroggo * that the application can find out the characteristics of the image.
163965825b97a5809454f5810f7e603cbd02daa036scroggo * If you are reading the file, this structure will tell you what is
173965825b97a5809454f5810f7e603cbd02daa036scroggo * in the PNG file.  If you are writing the file, fill in the information
183965825b97a5809454f5810f7e603cbd02daa036scroggo * you want to put into the PNG file, using png_set_*() functions, then
193965825b97a5809454f5810f7e603cbd02daa036scroggo * call png_write_info().
203965825b97a5809454f5810f7e603cbd02daa036scroggo *
213965825b97a5809454f5810f7e603cbd02daa036scroggo * The names chosen should be very close to the PNG specification, so
223965825b97a5809454f5810f7e603cbd02daa036scroggo * consult that document for information about the meaning of each field.
233965825b97a5809454f5810f7e603cbd02daa036scroggo *
243965825b97a5809454f5810f7e603cbd02daa036scroggo * With libpng < 0.95, it was only possible to directly set and read the
253965825b97a5809454f5810f7e603cbd02daa036scroggo * the values in the png_info_struct, which meant that the contents and
263965825b97a5809454f5810f7e603cbd02daa036scroggo * order of the values had to remain fixed.  With libpng 0.95 and later,
273965825b97a5809454f5810f7e603cbd02daa036scroggo * however, there are now functions that abstract the contents of
283965825b97a5809454f5810f7e603cbd02daa036scroggo * png_info_struct from the application, so this makes it easier to use
293965825b97a5809454f5810f7e603cbd02daa036scroggo * libpng with dynamic libraries, and even makes it possible to use
303965825b97a5809454f5810f7e603cbd02daa036scroggo * libraries that don't have all of the libpng ancillary chunk-handing
313965825b97a5809454f5810f7e603cbd02daa036scroggo * functionality.  In libpng-1.5.0 this was moved into a separate private
323965825b97a5809454f5810f7e603cbd02daa036scroggo * file that is not visible to applications.
333965825b97a5809454f5810f7e603cbd02daa036scroggo *
343965825b97a5809454f5810f7e603cbd02daa036scroggo * The following members may have allocated storage attached that should be
353965825b97a5809454f5810f7e603cbd02daa036scroggo * cleaned up before the structure is discarded: palette, trans, text,
363965825b97a5809454f5810f7e603cbd02daa036scroggo * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile,
373965825b97a5809454f5810f7e603cbd02daa036scroggo * splt_palettes, scal_unit, row_pointers, and unknowns.   By default, these
383965825b97a5809454f5810f7e603cbd02daa036scroggo * are automatically freed when the info structure is deallocated, if they were
393965825b97a5809454f5810f7e603cbd02daa036scroggo * allocated internally by libpng.  This behavior can be changed by means
403965825b97a5809454f5810f7e603cbd02daa036scroggo * of the png_data_freer() function.
413965825b97a5809454f5810f7e603cbd02daa036scroggo *
423965825b97a5809454f5810f7e603cbd02daa036scroggo * More allocation details: all the chunk-reading functions that
433965825b97a5809454f5810f7e603cbd02daa036scroggo * change these members go through the corresponding png_set_*
443965825b97a5809454f5810f7e603cbd02daa036scroggo * functions.  A function to clear these members is available: see
453965825b97a5809454f5810f7e603cbd02daa036scroggo * png_free_data().  The png_set_* functions do not depend on being
463965825b97a5809454f5810f7e603cbd02daa036scroggo * able to point info structure members to any of the storage they are
473965825b97a5809454f5810f7e603cbd02daa036scroggo * passed (they make their own copies), EXCEPT that the png_set_text
483965825b97a5809454f5810f7e603cbd02daa036scroggo * functions use the same storage passed to them in the text_ptr or
493965825b97a5809454f5810f7e603cbd02daa036scroggo * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns
503965825b97a5809454f5810f7e603cbd02daa036scroggo * functions do not make their own copies.
513965825b97a5809454f5810f7e603cbd02daa036scroggo */
523965825b97a5809454f5810f7e603cbd02daa036scroggo#ifndef PNGINFO_H
533965825b97a5809454f5810f7e603cbd02daa036scroggo#define PNGINFO_H
543965825b97a5809454f5810f7e603cbd02daa036scroggo
553965825b97a5809454f5810f7e603cbd02daa036scroggostruct png_info_def
563965825b97a5809454f5810f7e603cbd02daa036scroggo{
573965825b97a5809454f5810f7e603cbd02daa036scroggo   /* The following are necessary for every PNG file */
583965825b97a5809454f5810f7e603cbd02daa036scroggo   png_uint_32 width;  /* width of image in pixels (from IHDR) */
593965825b97a5809454f5810f7e603cbd02daa036scroggo   png_uint_32 height; /* height of image in pixels (from IHDR) */
603965825b97a5809454f5810f7e603cbd02daa036scroggo   png_uint_32 valid;  /* valid chunk data (see PNG_INFO_ below) */
613965825b97a5809454f5810f7e603cbd02daa036scroggo   png_size_t rowbytes; /* bytes needed to hold an untransformed row */
623965825b97a5809454f5810f7e603cbd02daa036scroggo   png_colorp palette;      /* array of color values (valid & PNG_INFO_PLTE) */
633965825b97a5809454f5810f7e603cbd02daa036scroggo   png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */
643965825b97a5809454f5810f7e603cbd02daa036scroggo   png_uint_16 num_trans;   /* number of transparent palette color (tRNS) */
653965825b97a5809454f5810f7e603cbd02daa036scroggo   png_byte bit_depth;      /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */
663965825b97a5809454f5810f7e603cbd02daa036scroggo   png_byte color_type;     /* see PNG_COLOR_TYPE_ below (from IHDR) */
673965825b97a5809454f5810f7e603cbd02daa036scroggo   /* The following three should have been named *_method not *_type */
683965825b97a5809454f5810f7e603cbd02daa036scroggo   png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */
693965825b97a5809454f5810f7e603cbd02daa036scroggo   png_byte filter_type;    /* must be PNG_FILTER_TYPE_BASE (from IHDR) */
703965825b97a5809454f5810f7e603cbd02daa036scroggo   png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
713965825b97a5809454f5810f7e603cbd02daa036scroggo
723965825b97a5809454f5810f7e603cbd02daa036scroggo   /* The following are set by png_set_IHDR, called from the application on
733965825b97a5809454f5810f7e603cbd02daa036scroggo    * write, but the are never actually used by the write code.
743965825b97a5809454f5810f7e603cbd02daa036scroggo    */
753965825b97a5809454f5810f7e603cbd02daa036scroggo   png_byte channels;       /* number of data channels per pixel (1, 2, 3, 4) */
763965825b97a5809454f5810f7e603cbd02daa036scroggo   png_byte pixel_depth;    /* number of bits per pixel */
773965825b97a5809454f5810f7e603cbd02daa036scroggo   png_byte spare_byte;     /* to align the data, and for future use */
783965825b97a5809454f5810f7e603cbd02daa036scroggo
793965825b97a5809454f5810f7e603cbd02daa036scroggo#ifdef PNG_READ_SUPPORTED
803965825b97a5809454f5810f7e603cbd02daa036scroggo   /* This is never set during write */
813965825b97a5809454f5810f7e603cbd02daa036scroggo   png_byte signature[8];   /* magic bytes read by libpng from start of file */
823965825b97a5809454f5810f7e603cbd02daa036scroggo#endif
833965825b97a5809454f5810f7e603cbd02daa036scroggo
843965825b97a5809454f5810f7e603cbd02daa036scroggo   /* The rest of the data is optional.  If you are reading, check the
853965825b97a5809454f5810f7e603cbd02daa036scroggo    * valid field to see if the information in these are valid.  If you
863965825b97a5809454f5810f7e603cbd02daa036scroggo    * are writing, set the valid field to those chunks you want written,
873965825b97a5809454f5810f7e603cbd02daa036scroggo    * and initialize the appropriate fields below.
883965825b97a5809454f5810f7e603cbd02daa036scroggo    */
893965825b97a5809454f5810f7e603cbd02daa036scroggo
903965825b97a5809454f5810f7e603cbd02daa036scroggo#if defined(PNG_COLORSPACE_SUPPORTED) || defined(PNG_GAMMA_SUPPORTED)
913965825b97a5809454f5810f7e603cbd02daa036scroggo   /* png_colorspace only contains 'flags' if neither GAMMA or COLORSPACE are
923965825b97a5809454f5810f7e603cbd02daa036scroggo    * defined.  When COLORSPACE is switched on all the colorspace-defining
933965825b97a5809454f5810f7e603cbd02daa036scroggo    * chunks should be enabled, when GAMMA is switched on all the gamma-defining
943965825b97a5809454f5810f7e603cbd02daa036scroggo    * chunks should be enabled.  If this is not done it becomes possible to read
953965825b97a5809454f5810f7e603cbd02daa036scroggo    * inconsistent PNG files and assign a probably incorrect interpretation to
963965825b97a5809454f5810f7e603cbd02daa036scroggo    * the information.  (In other words, by carefully choosing which chunks to
973965825b97a5809454f5810f7e603cbd02daa036scroggo    * recognize the system configuration can select an interpretation for PNG
983965825b97a5809454f5810f7e603cbd02daa036scroggo    * files containing ambiguous data and this will result in inconsistent
993965825b97a5809454f5810f7e603cbd02daa036scroggo    * behavior between different libpng builds!)
1003965825b97a5809454f5810f7e603cbd02daa036scroggo    */
1013965825b97a5809454f5810f7e603cbd02daa036scroggo   png_colorspace colorspace;
1023965825b97a5809454f5810f7e603cbd02daa036scroggo#endif
1033965825b97a5809454f5810f7e603cbd02daa036scroggo
1043965825b97a5809454f5810f7e603cbd02daa036scroggo#ifdef PNG_iCCP_SUPPORTED
1053965825b97a5809454f5810f7e603cbd02daa036scroggo   /* iCCP chunk data. */
1063965825b97a5809454f5810f7e603cbd02daa036scroggo   png_charp iccp_name;     /* profile name */
1073965825b97a5809454f5810f7e603cbd02daa036scroggo   png_bytep iccp_profile;  /* International Color Consortium profile data */
1083965825b97a5809454f5810f7e603cbd02daa036scroggo   png_uint_32 iccp_proflen;  /* ICC profile data length */
1093965825b97a5809454f5810f7e603cbd02daa036scroggo#endif
1103965825b97a5809454f5810f7e603cbd02daa036scroggo
1113965825b97a5809454f5810f7e603cbd02daa036scroggo#ifdef PNG_TEXT_SUPPORTED
1123965825b97a5809454f5810f7e603cbd02daa036scroggo   /* The tEXt, and zTXt chunks contain human-readable textual data in
1133965825b97a5809454f5810f7e603cbd02daa036scroggo    * uncompressed, compressed, and optionally compressed forms, respectively.
1143965825b97a5809454f5810f7e603cbd02daa036scroggo    * The data in "text" is an array of pointers to uncompressed,
1153965825b97a5809454f5810f7e603cbd02daa036scroggo    * null-terminated C strings. Each chunk has a keyword that describes the
1163965825b97a5809454f5810f7e603cbd02daa036scroggo    * textual data contained in that chunk.  Keywords are not required to be
1173965825b97a5809454f5810f7e603cbd02daa036scroggo    * unique, and the text string may be empty.  Any number of text chunks may
1183965825b97a5809454f5810f7e603cbd02daa036scroggo    * be in an image.
1193965825b97a5809454f5810f7e603cbd02daa036scroggo    */
1203965825b97a5809454f5810f7e603cbd02daa036scroggo   int num_text; /* number of comments read or comments to write */
1213965825b97a5809454f5810f7e603cbd02daa036scroggo   int max_text; /* current size of text array */
1223965825b97a5809454f5810f7e603cbd02daa036scroggo   png_textp text; /* array of comments read or comments to write */
1233965825b97a5809454f5810f7e603cbd02daa036scroggo#endif /* TEXT */
1243965825b97a5809454f5810f7e603cbd02daa036scroggo
1253965825b97a5809454f5810f7e603cbd02daa036scroggo#ifdef PNG_tIME_SUPPORTED
1263965825b97a5809454f5810f7e603cbd02daa036scroggo   /* The tIME chunk holds the last time the displayed image data was
1273965825b97a5809454f5810f7e603cbd02daa036scroggo    * modified.  See the png_time struct for the contents of this struct.
1283965825b97a5809454f5810f7e603cbd02daa036scroggo    */
1293965825b97a5809454f5810f7e603cbd02daa036scroggo   png_time mod_time;
1303965825b97a5809454f5810f7e603cbd02daa036scroggo#endif
1313965825b97a5809454f5810f7e603cbd02daa036scroggo
1323965825b97a5809454f5810f7e603cbd02daa036scroggo#ifdef PNG_sBIT_SUPPORTED
1333965825b97a5809454f5810f7e603cbd02daa036scroggo   /* The sBIT chunk specifies the number of significant high-order bits
1343965825b97a5809454f5810f7e603cbd02daa036scroggo    * in the pixel data.  Values are in the range [1, bit_depth], and are
1353965825b97a5809454f5810f7e603cbd02daa036scroggo    * only specified for the channels in the pixel data.  The contents of
1363965825b97a5809454f5810f7e603cbd02daa036scroggo    * the low-order bits is not specified.  Data is valid if
1373965825b97a5809454f5810f7e603cbd02daa036scroggo    * (valid & PNG_INFO_sBIT) is non-zero.
1383965825b97a5809454f5810f7e603cbd02daa036scroggo    */
1393965825b97a5809454f5810f7e603cbd02daa036scroggo   png_color_8 sig_bit; /* significant bits in color channels */
1403965825b97a5809454f5810f7e603cbd02daa036scroggo#endif
1413965825b97a5809454f5810f7e603cbd02daa036scroggo
1423965825b97a5809454f5810f7e603cbd02daa036scroggo#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \
1433965825b97a5809454f5810f7e603cbd02daa036scroggodefined(PNG_READ_BACKGROUND_SUPPORTED)
1443965825b97a5809454f5810f7e603cbd02daa036scroggo   /* The tRNS chunk supplies transparency data for paletted images and
1453965825b97a5809454f5810f7e603cbd02daa036scroggo    * other image types that don't need a full alpha channel.  There are
1463965825b97a5809454f5810f7e603cbd02daa036scroggo    * "num_trans" transparency values for a paletted image, stored in the
1473965825b97a5809454f5810f7e603cbd02daa036scroggo    * same order as the palette colors, starting from index 0.  Values
1483965825b97a5809454f5810f7e603cbd02daa036scroggo    * for the data are in the range [0, 255], ranging from fully transparent
1493965825b97a5809454f5810f7e603cbd02daa036scroggo    * to fully opaque, respectively.  For non-paletted images, there is a
1503965825b97a5809454f5810f7e603cbd02daa036scroggo    * single color specified that should be treated as fully transparent.
1513965825b97a5809454f5810f7e603cbd02daa036scroggo    * Data is valid if (valid & PNG_INFO_tRNS) is non-zero.
1523965825b97a5809454f5810f7e603cbd02daa036scroggo    */
1533965825b97a5809454f5810f7e603cbd02daa036scroggo   png_bytep trans_alpha;    /* alpha values for paletted image */
1543965825b97a5809454f5810f7e603cbd02daa036scroggo   png_color_16 trans_color; /* transparent color for non-palette image */
1553965825b97a5809454f5810f7e603cbd02daa036scroggo#endif
1563965825b97a5809454f5810f7e603cbd02daa036scroggo
1573965825b97a5809454f5810f7e603cbd02daa036scroggo#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
1583965825b97a5809454f5810f7e603cbd02daa036scroggo   /* The bKGD chunk gives the suggested image background color if the
1593965825b97a5809454f5810f7e603cbd02daa036scroggo    * display program does not have its own background color and the image
1603965825b97a5809454f5810f7e603cbd02daa036scroggo    * is needs to composited onto a background before display.  The colors
1613965825b97a5809454f5810f7e603cbd02daa036scroggo    * in "background" are normally in the same color space/depth as the
1623965825b97a5809454f5810f7e603cbd02daa036scroggo    * pixel data.  Data is valid if (valid & PNG_INFO_bKGD) is non-zero.
1633965825b97a5809454f5810f7e603cbd02daa036scroggo    */
1643965825b97a5809454f5810f7e603cbd02daa036scroggo   png_color_16 background;
1653965825b97a5809454f5810f7e603cbd02daa036scroggo#endif
1663965825b97a5809454f5810f7e603cbd02daa036scroggo
1673965825b97a5809454f5810f7e603cbd02daa036scroggo#ifdef PNG_oFFs_SUPPORTED
1683965825b97a5809454f5810f7e603cbd02daa036scroggo   /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards
1693965825b97a5809454f5810f7e603cbd02daa036scroggo    * and downwards from the top-left corner of the display, page, or other
1703965825b97a5809454f5810f7e603cbd02daa036scroggo    * application-specific co-ordinate space.  See the PNG_OFFSET_ defines
1713965825b97a5809454f5810f7e603cbd02daa036scroggo    * below for the unit types.  Valid if (valid & PNG_INFO_oFFs) non-zero.
1723965825b97a5809454f5810f7e603cbd02daa036scroggo    */
1733965825b97a5809454f5810f7e603cbd02daa036scroggo   png_int_32 x_offset; /* x offset on page */
1743965825b97a5809454f5810f7e603cbd02daa036scroggo   png_int_32 y_offset; /* y offset on page */
1753965825b97a5809454f5810f7e603cbd02daa036scroggo   png_byte offset_unit_type; /* offset units type */
1763965825b97a5809454f5810f7e603cbd02daa036scroggo#endif
1773965825b97a5809454f5810f7e603cbd02daa036scroggo
1783965825b97a5809454f5810f7e603cbd02daa036scroggo#ifdef PNG_pHYs_SUPPORTED
1793965825b97a5809454f5810f7e603cbd02daa036scroggo   /* The pHYs chunk gives the physical pixel density of the image for
1803965825b97a5809454f5810f7e603cbd02daa036scroggo    * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_
1813965825b97a5809454f5810f7e603cbd02daa036scroggo    * defines below).  Data is valid if (valid & PNG_INFO_pHYs) is non-zero.
1823965825b97a5809454f5810f7e603cbd02daa036scroggo    */
1833965825b97a5809454f5810f7e603cbd02daa036scroggo   png_uint_32 x_pixels_per_unit; /* horizontal pixel density */
1843965825b97a5809454f5810f7e603cbd02daa036scroggo   png_uint_32 y_pixels_per_unit; /* vertical pixel density */
1853965825b97a5809454f5810f7e603cbd02daa036scroggo   png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */
1863965825b97a5809454f5810f7e603cbd02daa036scroggo#endif
1873965825b97a5809454f5810f7e603cbd02daa036scroggo
1883965825b97a5809454f5810f7e603cbd02daa036scroggo#ifdef PNG_hIST_SUPPORTED
1893965825b97a5809454f5810f7e603cbd02daa036scroggo   /* The hIST chunk contains the relative frequency or importance of the
1903965825b97a5809454f5810f7e603cbd02daa036scroggo    * various palette entries, so that a viewer can intelligently select a
1913965825b97a5809454f5810f7e603cbd02daa036scroggo    * reduced-color palette, if required.  Data is an array of "num_palette"
1923965825b97a5809454f5810f7e603cbd02daa036scroggo    * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST)
1933965825b97a5809454f5810f7e603cbd02daa036scroggo    * is non-zero.
1943965825b97a5809454f5810f7e603cbd02daa036scroggo    */
1953965825b97a5809454f5810f7e603cbd02daa036scroggo   png_uint_16p hist;
1963965825b97a5809454f5810f7e603cbd02daa036scroggo#endif
1973965825b97a5809454f5810f7e603cbd02daa036scroggo
1983965825b97a5809454f5810f7e603cbd02daa036scroggo#ifdef PNG_pCAL_SUPPORTED
1993965825b97a5809454f5810f7e603cbd02daa036scroggo   /* The pCAL chunk describes a transformation between the stored pixel
2003965825b97a5809454f5810f7e603cbd02daa036scroggo    * values and original physical data values used to create the image.
2013965825b97a5809454f5810f7e603cbd02daa036scroggo    * The integer range [0, 2^bit_depth - 1] maps to the floating-point
2023965825b97a5809454f5810f7e603cbd02daa036scroggo    * range given by [pcal_X0, pcal_X1], and are further transformed by a
2033965825b97a5809454f5810f7e603cbd02daa036scroggo    * (possibly non-linear) transformation function given by "pcal_type"
2043965825b97a5809454f5810f7e603cbd02daa036scroggo    * and "pcal_params" into "pcal_units".  Please see the PNG_EQUATION_
2053965825b97a5809454f5810f7e603cbd02daa036scroggo    * defines below, and the PNG-Group's PNG extensions document for a
2063965825b97a5809454f5810f7e603cbd02daa036scroggo    * complete description of the transformations and how they should be
2073965825b97a5809454f5810f7e603cbd02daa036scroggo    * implemented, and for a description of the ASCII parameter strings.
2083965825b97a5809454f5810f7e603cbd02daa036scroggo    * Data values are valid if (valid & PNG_INFO_pCAL) non-zero.
2093965825b97a5809454f5810f7e603cbd02daa036scroggo    */
2103965825b97a5809454f5810f7e603cbd02daa036scroggo   png_charp pcal_purpose;  /* pCAL chunk description string */
2113965825b97a5809454f5810f7e603cbd02daa036scroggo   png_int_32 pcal_X0;      /* minimum value */
2123965825b97a5809454f5810f7e603cbd02daa036scroggo   png_int_32 pcal_X1;      /* maximum value */
2133965825b97a5809454f5810f7e603cbd02daa036scroggo   png_charp pcal_units;    /* Latin-1 string giving physical units */
2143965825b97a5809454f5810f7e603cbd02daa036scroggo   png_charpp pcal_params;  /* ASCII strings containing parameter values */
2153965825b97a5809454f5810f7e603cbd02daa036scroggo   png_byte pcal_type;      /* equation type (see PNG_EQUATION_ below) */
2163965825b97a5809454f5810f7e603cbd02daa036scroggo   png_byte pcal_nparams;   /* number of parameters given in pcal_params */
2173965825b97a5809454f5810f7e603cbd02daa036scroggo#endif
2183965825b97a5809454f5810f7e603cbd02daa036scroggo
2193965825b97a5809454f5810f7e603cbd02daa036scroggo/* New members added in libpng-1.0.6 */
2203965825b97a5809454f5810f7e603cbd02daa036scroggo   png_uint_32 free_me;     /* flags items libpng is responsible for freeing */
2213965825b97a5809454f5810f7e603cbd02daa036scroggo
2223965825b97a5809454f5810f7e603cbd02daa036scroggo#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
2233965825b97a5809454f5810f7e603cbd02daa036scroggo   /* Storage for unknown chunks that the library doesn't recognize. */
2243965825b97a5809454f5810f7e603cbd02daa036scroggo   png_unknown_chunkp unknown_chunks;
2253965825b97a5809454f5810f7e603cbd02daa036scroggo
2263965825b97a5809454f5810f7e603cbd02daa036scroggo   /* The type of this field is limited by the type of
2273965825b97a5809454f5810f7e603cbd02daa036scroggo    * png_struct::user_chunk_cache_max, else overflow can occur.
2283965825b97a5809454f5810f7e603cbd02daa036scroggo    */
2293965825b97a5809454f5810f7e603cbd02daa036scroggo   int                unknown_chunks_num;
2303965825b97a5809454f5810f7e603cbd02daa036scroggo#endif
2313965825b97a5809454f5810f7e603cbd02daa036scroggo
2323965825b97a5809454f5810f7e603cbd02daa036scroggo#ifdef PNG_sPLT_SUPPORTED
2333965825b97a5809454f5810f7e603cbd02daa036scroggo   /* Data on sPLT chunks (there may be more than one). */
2343965825b97a5809454f5810f7e603cbd02daa036scroggo   png_sPLT_tp splt_palettes;
2353965825b97a5809454f5810f7e603cbd02daa036scroggo   int         splt_palettes_num; /* Match type returned by png_get API */
2363965825b97a5809454f5810f7e603cbd02daa036scroggo#endif
2373965825b97a5809454f5810f7e603cbd02daa036scroggo
2383965825b97a5809454f5810f7e603cbd02daa036scroggo#ifdef PNG_sCAL_SUPPORTED
2393965825b97a5809454f5810f7e603cbd02daa036scroggo   /* The sCAL chunk describes the actual physical dimensions of the
2403965825b97a5809454f5810f7e603cbd02daa036scroggo    * subject matter of the graphic.  The chunk contains a unit specification
2413965825b97a5809454f5810f7e603cbd02daa036scroggo    * a byte value, and two ASCII strings representing floating-point
2423965825b97a5809454f5810f7e603cbd02daa036scroggo    * values.  The values are width and height corresponsing to one pixel
2433965825b97a5809454f5810f7e603cbd02daa036scroggo    * in the image.  Data values are valid if (valid & PNG_INFO_sCAL) is
2443965825b97a5809454f5810f7e603cbd02daa036scroggo    * non-zero.
2453965825b97a5809454f5810f7e603cbd02daa036scroggo    */
2463965825b97a5809454f5810f7e603cbd02daa036scroggo   png_byte scal_unit;         /* unit of physical scale */
2473965825b97a5809454f5810f7e603cbd02daa036scroggo   png_charp scal_s_width;     /* string containing height */
2483965825b97a5809454f5810f7e603cbd02daa036scroggo   png_charp scal_s_height;    /* string containing width */
2493965825b97a5809454f5810f7e603cbd02daa036scroggo#endif
2503965825b97a5809454f5810f7e603cbd02daa036scroggo
2513965825b97a5809454f5810f7e603cbd02daa036scroggo#ifdef PNG_INFO_IMAGE_SUPPORTED
2523965825b97a5809454f5810f7e603cbd02daa036scroggo   /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS)
2533965825b97a5809454f5810f7e603cbd02daa036scroggo      non-zero */
2543965825b97a5809454f5810f7e603cbd02daa036scroggo   /* Data valid if (valid & PNG_INFO_IDAT) non-zero */
2553965825b97a5809454f5810f7e603cbd02daa036scroggo   png_bytepp row_pointers;        /* the image bits */
2563965825b97a5809454f5810f7e603cbd02daa036scroggo#endif
2573965825b97a5809454f5810f7e603cbd02daa036scroggo
2583965825b97a5809454f5810f7e603cbd02daa036scroggo};
2593965825b97a5809454f5810f7e603cbd02daa036scroggo#endif /* PNGINFO_H */
260