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