summaryrefslogtreecommitdiff
path: root/plugins/AdvaImg/src/LibPNG/libpng.3
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/AdvaImg/src/LibPNG/libpng.3')
-rw-r--r--plugins/AdvaImg/src/LibPNG/libpng.3778
1 files changed, 366 insertions, 412 deletions
diff --git a/plugins/AdvaImg/src/LibPNG/libpng.3 b/plugins/AdvaImg/src/LibPNG/libpng.3
index c521f75e38..cbca088175 100644
--- a/plugins/AdvaImg/src/LibPNG/libpng.3
+++ b/plugins/AdvaImg/src/LibPNG/libpng.3
@@ -1,6 +1,6 @@
-.TH LIBPNG 3 "March 26, 2015"
+.TH LIBPNG 3 "March 16, 2017"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.6.17
+libpng \- Portable Network Graphics (PNG) Reference Library 1.6.29
.SH SYNOPSIS
\fB
#include <png.h>\fP
@@ -119,6 +119,8 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.6.17
\fBpng_byte png_get_libpng_ver (png_const_structp \fIpng_ptr\fP\fB);\fP
+\fBint png_get_palette_max(png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
+
\fBpng_voidp png_get_mem_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP
\fBpng_uint_32 png_get_oFFs (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*offset_x\fP\fB, png_uint_32 \fP\fI*offset_y\fP\fB, int \fI*unit_type\fP\fB);\fP
@@ -227,6 +229,8 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.6.17
\fBint png_image_write_to_file (png_imagep \fP\fIimage\fP\fB, const char \fP\fI*file\fP\fB, int \fP\fIconvert_to_8bit\fP\fB, const void \fP\fI*buffer\fP\fB, png_int_32 \fP\fIrow_stride\fP\fB, void \fI*colormap\fP\fB);\fP
+\fBint png_image_write_to_memory (png_imagep \fP\fIimage\fP\fB, void \fP\fI*memory\fP\fB, png_alloc_size_t * PNG_RESTRICT \fP\fImemory_bytes\fP\fB, int \fP\fIconvert_to_8_bit\fP\fB, const void \fP\fI*buffer\fP\fB, png_int_32 \fP\fIrow_stride\fP\fB, const void \fI*colormap)\fP\fB);\fP
+
\fBint png_image_write_to_stdio (png_imagep \fP\fIimage\fP\fB, FILE \fP\fI*file\fP\fB, int \fP\fIconvert_to_8_bit\fP\fB, const void \fP\fI*buffer\fP\fB, png_int_32 \fP\fIrow_stride\fP\fB, void \fI*colormap)\fP\fB);\fP
\fBvoid png_info_init_3 (png_infopp \fP\fIinfo_ptr\fP\fB, png_size_t \fIpng_info_struct_size\fP\fB);\fP
@@ -369,6 +373,8 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.6.17
\fBvoid png_set_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIoffset_x\fP\fB, png_uint_32 \fP\fIoffset_y\fP\fB, int \fIunit_type\fP\fB);\fP
+\fBint png_set_option(png_structrp \fP\fIpng_ptr\fP\fB, int \fP\fIoption\fP\fB, int \fIonoff\fP\fB);\fP
+
\fBvoid png_set_packing (png_structp \fIpng_ptr\fP\fB);\fP
\fBvoid png_set_packswap (png_structp \fIpng_ptr\fP\fB);\fP
@@ -504,10 +510,10 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
.SH LIBPNG.TXT
libpng-manual.txt - A description on how to use and modify libpng
- libpng version 1.6.17 - March 26, 2015
+ libpng version 1.6.29 - March 16, 2017
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
- Copyright (c) 1998-2015 Glenn Randers-Pehrson
+ Copyright (c) 1998-2016 Glenn Randers-Pehrson
This document is released under the libpng license.
For conditions of distribution and use, see the disclaimer
@@ -515,9 +521,9 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
- libpng versions 0.97, January 1998, through 1.6.17 - March 26, 2015
+ libpng versions 0.97, January 1998, through 1.6.29 - March 16, 2017
Updated and distributed by Glenn Randers-Pehrson
- Copyright (c) 1998-2015 Glenn Randers-Pehrson
+ Copyright (c) 1998-2016 Glenn Randers-Pehrson
libpng 1.0 beta 6 - version 0.96 - May 28, 1997
Updated and distributed by Andreas Dilger
@@ -574,15 +580,16 @@ a W3C Recommendation and as an ISO Standard (ISO/IEC 15948:2004 (E)) at
The W3C and ISO documents have identical technical content.
The PNG-1.2 specification is available at
-<http://www.libpng.org/pub/png/documents/>. It is technically equivalent
+<http://png-mng.sourceforge.net/pub/png/spec/1.2/>.
+It is technically equivalent
to the PNG specification (second edition) but has some additional material.
-The PNG-1.0 specification is available
-as RFC 2083 <http://www.libpng.org/pub/png/documents/> and as a
-W3C Recommendation <http://www.w3.org/TR/REC.png.html>.
+The PNG-1.0 specification is available as RFC 2083
+<http://png-mng.sourceforge.net/pub/png/spec/1.0/> and as a
+W3C Recommendation <http://www.w3.org/TR/REC-png-961001>.
Some additional chunks are described in the special-purpose public chunks
-documents at <http://www.libpng.org/pub/png/documents/>.
+documents at <http://www.libpng.org/pub/png/spec/register/>
Other information
about PNG, and the latest version of libpng, can be found at the PNG home
@@ -604,7 +611,7 @@ majority of the needs of its users.
Libpng uses zlib for its compression and decompression of PNG files.
Further information about zlib, and the latest version of zlib, can
-be found at the zlib home page, <http://www.info-zip.org/pub/infozip/zlib/>.
+be found at the zlib home page, <http://zlib.net/>.
The zlib compression utility is a general purpose utility that is
useful for more than PNG files, and can be used without libpng.
See the documentation delivered with zlib for more details.
@@ -970,8 +977,9 @@ the default, use
The values for png_set_crc_action() say how libpng is to handle CRC errors in
ancillary and critical chunks, and whether to use the data contained
-therein. Note that it is impossible to "discard" data in a critical
-chunk.
+therein. Starting with libpng-1.6.26, this also governs how an ADLER32 error
+is handled while reading the IDAT chunk. Note that it is impossible to
+"discard" data in a critical chunk.
Choices for (int) crit_action are
PNG_CRC_DEFAULT 0 error/quit
@@ -988,6 +996,9 @@ Choices for (int) ancil_action are
PNG_CRC_QUIET_USE 4 quiet/use data
PNG_CRC_NO_CHANGE 5 use the current value
+When the setting for crit_action is PNG_CRC_QUIET_USE, the CRC and ADLER32
+checksums are not only ignored, but they are not evaluated.
+
.SS Setting up callback code
You can set up a callback function to handle any unknown chunks in the
@@ -1062,7 +1073,7 @@ non-interlaced case the row that was just handled is simply one less than the
passed in row number, and pass will always be 0. For the interlaced case the
same applies unless the row value is 0, in which case the row just handled was
the last one from one of the preceding passes. Because interlacing may skip a
-pass you cannot be sure that the preceding pass is just 'pass\-1', if you really
+pass you cannot be sure that the preceding pass is just 'pass\-1'; if you really
need to know what the last pass is record (row,pass) from the callback and use
the last recorded value each time.
@@ -1153,6 +1164,7 @@ callback function:
The PNG specification allows the width and height of an image to be as
large as 2^(31\-1 (0x7fffffff), or about 2.147 billion rows and columns.
+For safety, libpng imposes a default limit of 1 million rows and columns.
Larger images will be rejected immediately with a png_error() call. If
you wish to change these limits, you can use
@@ -1173,8 +1185,11 @@ If you need to retrieve the limits that are being applied, use
height_max = png_get_user_height_max(png_ptr);
The PNG specification sets no limit on the number of ancillary chunks
-allowed in a PNG datastream. You can impose a limit on the total number
-of sPLT, tEXt, iTXt, zTXt, and unknown chunks that will be stored, with
+allowed in a PNG datastream. By default, libpng imposes a limit of
+a total of 1000 sPLT, tEXt, iTXt, zTXt, and unknown chunks to be stored.
+If you have set up both info_ptr and end_info_ptr, the limit applies
+separately to each. You can change the limit on the total number of such
+chunks that will be stored, with
png_set_chunk_cache_max(png_ptr, user_chunk_cache_max);
@@ -1182,8 +1197,9 @@ where 0x7fffffffL means unlimited. You can retrieve this limit with
chunk_cache_max = png_get_chunk_cache_max(png_ptr);
-You can also set a limit on the amount of memory that a compressed chunk
-other than IDAT can occupy, with
+Libpng imposes a limit of 8 Megabytes (8,000,000 bytes) on the amount of
+memory that a compressed chunk other than IDAT can occupy, when decompressed.
+You can change this limit with
png_set_chunk_malloc_max(png_ptr, user_chunk_malloc_max);
@@ -2183,15 +2199,16 @@ described below.
Data will be decoded into the supplied row buffers packed into bytes
unless the library has been told to transform it into another format.
For example, 4 bit/pixel paletted or grayscale data will be returned
-2 pixels/byte with the leftmost pixel in the high-order bits of the
-byte, unless png_set_packing() is called. 8-bit RGB data will be stored
+2 pixels/byte with the leftmost pixel in the high-order bits of the byte,
+unless png_set_packing() is called. 8-bit RGB data will be stored
in RGB RGB RGB format unless png_set_filler() or png_set_add_alpha()
is called to insert filler bytes, either before or after each RGB triplet.
+
16-bit RGB data will be returned RRGGBB RRGGBB, with the most significant
byte of the color value first, unless png_set_scale_16() is called to
transform it to regular RGB RGB triplets, or png_set_filler() or
-png_set_add alpha() is called to insert filler bytes, either before or
-after each RRGGBB triplet. Similarly, 8-bit or 16-bit grayscale data can
+png_set_add alpha() is called to insert two filler bytes, either before
+or after each RRGGBB triplet. Similarly, 8-bit or 16-bit grayscale data can
be modified with png_set_filler(), png_set_add_alpha(), png_set_strip_16(),
or png_set_scale_16().
@@ -2348,12 +2365,13 @@ into 4 or 8 bytes for windowing systems that need them in this format:
if (color_type == PNG_COLOR_TYPE_RGB)
png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE);
-where "filler" is the 8 or 16-bit number to fill with, and the location is
-either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether
-you want the filler before the RGB or after. This transformation
-does not affect images that already have full alpha channels. To add an
-opaque alpha channel, use filler=0xff or 0xffff and PNG_FILLER_AFTER which
-will generate RGBA pixels.
+where "filler" is the 8-bit or 16-bit number to fill with, and the location
+is either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether
+you want the filler before the RGB or after. When filling an 8-bit pixel,
+the least significant 8 bits of the number are used, if a 16-bit number is
+supplied. This transformation does not affect images that already have full
+alpha channels. To add an opaque alpha channel, use filler=0xffff and
+PNG_FILLER_AFTER which will generate RGBA pixels.
Note that png_set_filler() does not change the color type. If you want
to do that, you can add a true alpha channel with
@@ -2363,7 +2381,7 @@ to do that, you can add a true alpha channel with
png_set_add_alpha(png_ptr, filler, PNG_FILLER_AFTER);
where "filler" contains the alpha value to assign to each pixel.
-This function was added in libpng-1.2.7.
+The png_set_add_alpha() function was added in libpng-1.2.7.
If you are reading an image with an alpha channel, and you need the
data as ARGB instead of the normal PNG format RGBA:
@@ -2421,9 +2439,9 @@ data for sBIT, regardless of the error_action setting.
The default values come from the PNG file cHRM chunk if present; otherwise, the
defaults correspond to the ITU-R recommendation 709, and also the sRGB color
space, as recommended in the Charles Poynton's Colour FAQ,
-<http://www.poynton.com/>, in section 9:
+Copyright (c) 2006-11-28 Charles Poynton, in section 9:
- <http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC9>
+<http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC9>
Y = 0.2126 * R + 0.7152 * G + 0.0722 * B
@@ -2726,7 +2744,8 @@ is exactly the same. If you are planning on displaying the image
after each pass, the "rectangle" effect is generally considered the
better looking one.
-If you only want the "sparkle" effect, just call png_read_rows() as
+If you only want the "sparkle" effect, just call png_read_row() or
+png_read_rows() as
normal, with the third parameter NULL. Make sure you make pass over
the image number_of_passes times, and you don't change the data in the
rows between calls. You can change the locations of the data, just
@@ -2735,6 +2754,8 @@ pass, and assumes the data from previous passes is still valid.
png_read_rows(png_ptr, row_pointers, NULL,
number_of_rows);
+ or
+ png_read_row(png_ptr, row_pointers, NULL);
If you only want the first effect (the rectangles), do the same as
before except pass the row buffer in the third parameter, and leave
@@ -2742,6 +2763,8 @@ the second parameter NULL.
png_read_rows(png_ptr, NULL, row_pointers,
number_of_rows);
+ or
+ png_read_row(png_ptr, NULL, row_pointers);
If you don't want libpng to handle the interlacing details, just call
png_read_rows() PNG_INTERLACE_ADAM7_PASSES times to read in all the images.
@@ -3338,7 +3361,7 @@ filter types.
PNG_FILTER_UP | PNG_FILTER_VALUE_UP |
PNG_FILTER_AVG | PNG_FILTER_VALUE_AVG |
PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH|
- PNG_ALL_FILTERS);
+ PNG_ALL_FILTERS | PNG_FAST_FILTERS);
If an application wants to start and stop using particular filters during
compression, it should start out with all of the filters (to ensure that
@@ -3456,6 +3479,7 @@ width, height, bit_depth, and color_type must be the same in each call.
(array of png_color)
num_palette - number of entries in the palette
+
png_set_gAMA(png_ptr, info_ptr, file_gamma);
png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma);
@@ -4220,21 +4244,26 @@ as a wide variety of APIs to manipulate ancilliary information.
To read a PNG file using the simplified API:
- 1) Declare a 'png_image' structure (see below) on the
- stack and memset() it to all zero.
+ 1) Declare a 'png_image' structure (see below) on the stack, set the
+ version field to PNG_IMAGE_VERSION and the 'opaque' pointer to NULL
+ (this is REQUIRED, your program may crash if you don't do it.)
2) Call the appropriate png_image_begin_read... function.
- 3) Set the png_image 'format' member to the required
- format and allocate a buffer for the image.
+ 3) Set the png_image 'format' member to the required sample format.
+
+ 4) Allocate a buffer for the image and, if required, the color-map.
- 4) Call png_image_finish_read to read the image into
- your buffer.
+ 5) Call png_image_finish_read to read the image and, if required, the
+ color-map into your buffers.
There are no restrictions on the format of the PNG input itself; all valid
color types, bit depths, and interlace methods are acceptable, and the
input image is transformed as necessary to the requested in-memory format
-during the png_image_finish_read() step.
+during the png_image_finish_read() step. The only caveat is that if you
+request a color-mapped image from a PNG that is full-color or makes
+complex use of an alpha channel the transformation is extremely lossy and the
+result may look terrible.
To write a PNG file using the simplified API:
@@ -4243,34 +4272,35 @@ To write a PNG file using the simplified API:
2) Initialize the members of the structure that describe the
image, setting the 'format' member to the format of the
- image in memory.
+ image samples.
3) Call the appropriate png_image_write... function with a
- pointer to the image to write the PNG data.
+ pointer to the image and, if necessary, the color-map to write
+ the PNG data.
png_image is a structure that describes the in-memory format of an image
-when it is being read or define the in-memory format of an image that you
+when it is being read or defines the in-memory format of an image that you
need to write. The "png_image" structure contains the following members:
+ png_controlp opaque Initialize to NULL, free with png_image_free
png_uint_32 version Set to PNG_IMAGE_VERSION
png_uint_32 width Image width in pixels (columns)
png_uint_32 height Image height in pixels (rows)
png_uint_32 format Image format as defined below
png_uint_32 flags A bit mask containing informational flags
- png_controlp opaque Initialize to NULL, free with png_image_free
png_uint_32 colormap_entries; Number of entries in the color-map
png_uint_32 warning_or_error;
char message[64];
-In the event of an error or warning the following field warning_or_error
+In the event of an error or warning the "warning_or_error"
field will be set to a non-zero value and the 'message' field will contain
a '\0' terminated string with the libpng error or warning message. If both
warnings and an error were encountered, only the error is recorded. If there
are multiple warnings, only the first one is recorded.
-The upper 30 bits of this value are reserved; the low two bits contain
-a two bit code such that a value more than 1 indicates a failure in the API
-just called:
+The upper 30 bits of the "warning_or_error" value are reserved; the low two
+bits contain a two bit code such that a value more than 1 indicates a failure
+in the API just called:
0 - no warning or error
1 - warning
@@ -4302,64 +4332,72 @@ channels are linear. Color channels use the RGB encoding (RGB end-points) of
the sRGB specification. This encoding is identified by the
PNG_FORMAT_FLAG_LINEAR flag below.
+When the simplified API needs to convert between sRGB and linear colorspaces,
+the actual sRGB transfer curve defined in the sRGB specification (see the
+article at http://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2
+approximation used elsewhere in libpng.
+
When an alpha channel is present it is expected to denote pixel coverage
of the color or luminance channels and is returned as an associated alpha
channel: the color/gray channels are scaled (pre-multiplied) by the alpha
value.
-When a color-mapped image is used as a result of calling
-png_image_read_colormap or png_image_write_colormap the channels are encoded
-in the color-map and the descriptions above apply to the color-map entries.
-The image data is encoded as small integers, value 0..255, that index the
-entries in the color-map. One integer (one byte) is stored for each pixel.
+The samples are either contained directly in the image data, between 1 and 8
+bytes per pixel according to the encoding, or are held in a color-map indexed
+by bytes in the image data. In the case of a color-map the color-map entries
+are individual samples, encoded as above, and the image data has one byte per
+pixel to select the relevant sample from the color-map.
PNG_FORMAT_*
The #defines to be used in png_image::format. Each #define identifies a
particular layout of channel data and, if present, alpha values. There are
-separate defines for each of the two channel encodings.
+separate defines for each of the two component encodings.
-A format is built up using single bit flag values. Not all combinations are
-valid: use the bit flag values below for testing a format returned by the
-read APIs, but set formats from the derived values.
+A format is built up using single bit flag values. All combinations are
+valid. Formats can be built up from the flag values or you can use one of
+the predefined values below. When testing formats always use the FORMAT_FLAG
+macros to test for individual features - future versions of the library may
+add new flags.
When reading or writing color-mapped images the format should be set to the
format of the entries in the color-map then png_image_{read,write}_colormap
called to read or write the color-map and set the format correctly for the
image data. Do not set the PNG_FORMAT_FLAG_COLORMAP bit directly!
-NOTE: libpng can be built with particular features disabled, if you see
+NOTE: libpng can be built with particular features disabled. If you see
compiler errors because the definition of one of the following flags has been
compiled out it is because libpng does not have the required support. It is
possible, however, for the libpng configuration to enable the format on just
-read or just write; in that case you may see an error at run time. You can
-guard against this by checking for the definition of:
+read or just write; in that case you may see an error at run time.
+You can guard against this by checking for the definition of the
+appropriate "_SUPPORTED" macro, one of:
PNG_SIMPLIFIED_{READ,WRITE}_{BGR,AFIRST}_SUPPORTED
- PNG_FORMAT_FLAG_ALPHA 0x01 format with an alpha channel
- PNG_FORMAT_FLAG_COLOR 0x02 color format: otherwise grayscale
- PNG_FORMAT_FLAG_LINEAR 0x04 png_uint_16 channels else png_byte
- PNG_FORMAT_FLAG_COLORMAP 0x08 libpng use only
- PNG_FORMAT_FLAG_BGR 0x10 BGR colors, else order is RGB
- PNG_FORMAT_FLAG_AFIRST 0x20 alpha channel comes first
+ PNG_FORMAT_FLAG_ALPHA format with an alpha channel
+ PNG_FORMAT_FLAG_COLOR color format: otherwise grayscale
+ PNG_FORMAT_FLAG_LINEAR 2-byte channels else 1-byte
+ PNG_FORMAT_FLAG_COLORMAP image data is color-mapped
+ PNG_FORMAT_FLAG_BGR BGR colors, else order is RGB
+ PNG_FORMAT_FLAG_AFIRST alpha channel comes first
Supported formats are as follows. Future versions of libpng may support more
formats; for compatibility with older versions simply check if the format
macro is defined using #ifdef. These defines describe the in-memory layout
of the components of the pixels of the image.
-First the single byte formats:
+First the single byte (sRGB) formats:
- PNG_FORMAT_GRAY 0
- PNG_FORMAT_GA PNG_FORMAT_FLAG_ALPHA
- PNG_FORMAT_AG (PNG_FORMAT_GA|PNG_FORMAT_FLAG_AFIRST)
- PNG_FORMAT_RGB PNG_FORMAT_FLAG_COLOR
- PNG_FORMAT_BGR (PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_BGR)
- PNG_FORMAT_RGBA (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_ALPHA)
- PNG_FORMAT_ARGB (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_AFIRST)
- PNG_FORMAT_BGRA (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_ALPHA)
- PNG_FORMAT_ABGR (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_AFIRST)
+ PNG_FORMAT_GRAY
+ PNG_FORMAT_GA
+ PNG_FORMAT_AG
+ PNG_FORMAT_RGB
+ PNG_FORMAT_BGR
+ PNG_FORMAT_RGBA
+ PNG_FORMAT_ARGB
+ PNG_FORMAT_BGRA
+ PNG_FORMAT_ABGR
Then the linear 2-byte formats. When naming these "Y" is used to
indicate a luminance (gray) channel. The component order within the pixel
@@ -4368,22 +4406,22 @@ components in the linear format. The components are 16-bit integers in
the native byte order for your platform, and there is no provision for
swapping the bytes to a different endian condition.
- PNG_FORMAT_LINEAR_Y PNG_FORMAT_FLAG_LINEAR
+ PNG_FORMAT_LINEAR_Y
PNG_FORMAT_LINEAR_Y_ALPHA
- (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_ALPHA)
PNG_FORMAT_LINEAR_RGB
- (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR)
PNG_FORMAT_LINEAR_RGB_ALPHA
- (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR|
- PNG_FORMAT_FLAG_ALPHA)
-Color-mapped formats are obtained by calling png_image_{read,write}_colormap,
-as appropriate after setting png_image::format to the format of the color-map
-to be read or written. Applications may check the value of
-PNG_FORMAT_FLAG_COLORMAP to see if they have called the colormap API. The
-format of the color-map may be extracted using the following macro.
+With color-mapped formats the image data is one byte for each pixel. The byte
+is an index into the color-map which is formatted as above. To obtain a
+color-mapped format it is sufficient just to add the PNG_FOMAT_FLAG_COLORMAP
+to one of the above definitions, or you can use one of the definitions below.
- PNG_FORMAT_OF_COLORMAP(fmt) ((fmt) & ~PNG_FORMAT_FLAG_COLORMAP)
+ PNG_FORMAT_RGB_COLORMAP
+ PNG_FORMAT_BGR_COLORMAP
+ PNG_FORMAT_RGBA_COLORMAP
+ PNG_FORMAT_ARGB_COLORMAP
+ PNG_FORMAT_BGRA_COLORMAP
+ PNG_FORMAT_ABGR_COLORMAP
PNG_IMAGE macros
@@ -4391,9 +4429,9 @@ These are convenience macros to derive information from a png_image
structure. The PNG_IMAGE_SAMPLE_ macros return values appropriate to the
actual image sample values - either the entries in the color-map or the
pixels in the image. The PNG_IMAGE_PIXEL_ macros return corresponding values
-for the pixels and will always return 1 after a call to
-png_image_{read,write}_colormap. The remaining macros return information
-about the rows in the image and the complete image.
+for the pixels and will always return 1 for color-mapped formats. The
+remaining macros return information about the rows in the image and the
+complete image.
NOTE: All the macros that take a png_image::format parameter are compile time
constants if the format parameter is, itself, a constant. Therefore these
@@ -4401,46 +4439,39 @@ macros can be used in array declarations and case labels where required.
Similarly the macros are also pre-processor constants (sizeof is not used) so
they can be used in #if tests.
-First the information about the samples.
-
PNG_IMAGE_SAMPLE_CHANNELS(fmt)
Returns the total number of channels in a given format: 1..4
PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt)
Returns the size in bytes of a single component of a pixel or color-map
- entry (as appropriate) in the image.
+ entry (as appropriate) in the image: 1 or 2.
PNG_IMAGE_SAMPLE_SIZE(fmt)
This is the size of the sample data for one sample. If the image is
color-mapped it is the size of one color-map entry (and image pixels are
one byte in size), otherwise it is the size of one image pixel.
+ PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(fmt)
+ The maximum size of the color-map required by the format expressed in a
+ count of components. This can be used to compile-time allocate a
+ color-map:
+
+ png_uint_16 colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(linear_fmt)];
+
+ png_byte colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(sRGB_fmt)];
+
+ Alternatively use the PNG_IMAGE_COLORMAP_SIZE macro below to use the
+ information from one of the png_image_begin_read_ APIs and dynamically
+ allocate the required memory.
+
PNG_IMAGE_COLORMAP_SIZE(fmt)
The size of the color-map required by the format; this is the size of the
- color-map buffer passed to the png_image_{read,write}_colormap APIs, it is
+ color-map buffer passed to the png_image_{read,write}_colormap APIs. It is
a fixed number determined by the format so can easily be allocated on the
stack if necessary.
-#define PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(fmt)\
- (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * 256)
- /* The maximum size of the color-map required by the format expressed in a
- * count of components. This can be used to compile-time allocate a
- * color-map:
- *
- * png_uint_16 colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(linear_fmt)];
- *
- * png_byte colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(sRGB_fmt)];
- *
- * Alternatively, use the PNG_IMAGE_COLORMAP_SIZE macro below to use the
- * information from one of the png_image_begin_read_ APIs and dynamically
- * allocate the required memory.
- */
-
-
Corresponding information about the pixels
- PNG_IMAGE_PIXEL_(test,fmt)
-
PNG_IMAGE_PIXEL_CHANNELS(fmt)
The number of separate channels (components) in a pixel; 1 for a
color-mapped image.
@@ -4466,19 +4497,54 @@ Information about the whole row, or whole image
to start the next row on a 4-byte boundary.
PNG_IMAGE_BUFFER_SIZE(image, row_stride)
- Returns the size, in bytes, of an image buffer given a png_image and a row
- stride - the number of components to leave space for in each row. This
- macro takes care of multiplying row_stride by PNG_IMAGE_PIXEL_COMONENT_SIZE
- when the image has 2-byte components.
+ Return the size, in bytes, of an image buffer given a png_image and a row
+ stride - the number of components to leave space for in each row.
+
+ PNG_IMAGE_SIZE(image)
+ Return the size, in bytes, of the image in memory given just a png_image;
+ the row stride is the minimum stride required for the image.
+
+ PNG_IMAGE_COLORMAP_SIZE(image)
+ Return the size, in bytes, of the color-map of this image. If the image
+ format is not a color-map format this will return a size sufficient for
+ 256 entries in the given format; check PNG_FORMAT_FLAG_COLORMAP if
+ you don't want to allocate a color-map in this case.
+
+PNG_IMAGE_FLAG_*
+
+Flags containing additional information about the image are held in
+the 'flags' field of png_image.
PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB == 0x01
This indicates the the RGB values of the in-memory bitmap do not
correspond to the red, green and blue end-points defined by sRGB.
- PNG_IMAGE_FLAG_COLORMAP == 0x02
- The PNG is color-mapped. If this flag is set png_image_read_colormap
- can be used without further loss of image information. If it is not set
- png_image_read_colormap will cause significant loss if the image has any
+ PNG_IMAGE_FLAG_FAST == 0x02
+ On write emphasise speed over compression; the resultant PNG file will be
+ larger but will be produced significantly faster, particular for large
+ images. Do not use this option for images which will be distributed, only
+ used it when producing intermediate files that will be read back in
+ repeatedly. For a typical 24-bit image the option will double the read
+ speed at the cost of increasing the image size by 25%, however for many
+ more compressible images the PNG file can be 10 times larger with only a
+ slight speed gain.
+
+ PNG_IMAGE_FLAG_16BIT_sRGB == 0x04
+ On read if the image is a 16-bit per component image and there is no gAMA
+ or sRGB chunk assume that the components are sRGB encoded. Notice that
+ images output by the simplified API always have gamma information; setting
+ this flag only affects the interpretation of 16-bit images from an
+ external source. It is recommended that the application expose this flag
+ to the user; the user can normally easily recognize the difference between
+ linear and sRGB encoding. This flag has no effect on write - the data
+ passed to the write APIs must have the correct encoding (as defined
+ above.)
+
+ If the flag is not set (the default) input 16-bit per component data is
+ assumed to be linear.
+
+ NOTE: the flag can only be set after the png_image_begin_read_ call,
+ because that call initializes the 'flags' field.
READ APIs
@@ -4556,6 +4622,13 @@ be written:
Write the image to the named file.
+ int png_image_write_to_memory (png_imagep image, void *memory,
+ png_alloc_size_t * PNG_RESTRICT memory_bytes,
+ int convert_to_8_bit, const void *buffer, ptrdiff_t row_stride,
+ const void *colormap));
+
+ Write the image to memory.
+
int png_image_write_to_stdio(png_imagep image, FILE *file,
int convert_to_8_bit, const void *buffer,
png_int_32 row_stride, const void *colormap)
@@ -4569,10 +4642,11 @@ a 16-bit linear encoded PNG file is written.
With all APIs row_stride is handled as in the read APIs - it is the spacing
from one row to the next in component sized units (float) and if negative
-indicates a bottom-up row layout in the buffer.
+indicates a bottom-up row layout in the buffer. If you pass zero, libpng will
+calculate the row_stride for you from the width and number of channels.
Note that the write API does not support interlacing, sub-8-bit pixels,
-and indexed (paletted) images.
+indexed (paletted) images, or most ancillary chunks.
.SH VI. Modifying/Customizing libpng
@@ -4832,8 +4906,9 @@ for any images with bit depths less than 8 bits/pixel.
The 'method' parameter sets the main filtering method, which is
currently only '0' in the PNG 1.2 specification. The 'filters'
parameter sets which filter(s), if any, should be used for each
-scanline. Possible values are PNG_ALL_FILTERS and PNG_NO_FILTERS
-to turn filtering on and off, respectively.
+scanline. Possible values are PNG_ALL_FILTERS, PNG_NO_FILTERS,
+or PNG_FAST_FILTERS to turn filtering on and off, or to turn on
+just the fast-decoding subset of filters, respectively.
Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB,
PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise
@@ -4847,12 +4922,19 @@ means the first row must always be adaptively filtered, because libpng
currently does not allocate the filter buffers until png_write_row()
is called for the first time.)
- filters = PNG_FILTER_NONE | PNG_FILTER_SUB
+ filters = PNG_NO_FILTERS;
+ filters = PNG_ALL_FILTERS;
+ filters = PNG_FAST_FILTERS;
+
+ or
+
+ filters = PNG_FILTER_NONE | PNG_FILTER_SUB |
PNG_FILTER_UP | PNG_FILTER_AVG |
- PNG_FILTER_PAETH | PNG_ALL_FILTERS;
+ PNG_FILTER_PAETH;
png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE,
filters);
+
The second parameter can also be
PNG_INTRAPIXEL_DIFFERENCING if you are
writing a PNG to be embedded in a MNG
@@ -4860,41 +4942,6 @@ is called for the first time.)
same as the value of filter_method used
in png_set_IHDR().
-It is also possible to influence how libpng chooses from among the
-available filters. This is done in one or both of two ways - by
-telling it how important it is to keep the same filter for successive
-rows, and by telling it the relative computational costs of the filters.
-
- double weights[3] = {1.5, 1.3, 1.1},
- costs[PNG_FILTER_VALUE_LAST] =
- {1.0, 1.3, 1.3, 1.5, 1.7};
-
- png_set_filter_heuristics(png_ptr,
- PNG_FILTER_HEURISTIC_WEIGHTED, 3,
- weights, costs);
-
-The weights are multiplying factors that indicate to libpng that the
-row filter should be the same for successive rows unless another row filter
-is that many times better than the previous filter. In the above example,
-if the previous 3 filters were SUB, SUB, NONE, the SUB filter could have a
-"sum of absolute differences" 1.5 x 1.3 times higher than other filters
-and still be chosen, while the NONE filter could have a sum 1.1 times
-higher than other filters and still be chosen. Unspecified weights are
-taken to be 1.0, and the specified weights should probably be declining
-like those above in order to emphasize recent filters over older filters.
-
-The filter costs specify for each filter type a relative decoding cost
-to be considered when selecting row filters. This means that filters
-with higher costs are less likely to be chosen over filters with lower
-costs, unless their "sum of absolute differences" is that much smaller.
-The costs do not necessarily reflect the exact computational speeds of
-the various filters, since this would unduly influence the final image
-size.
-
-Note that the numbers above were invented purely for this example and
-are given only to help explain the function usage. Little testing has
-been done to find optimum values for either the costs or the weights.
-
.SS Requesting debug printout
The macro definition PNG_DEBUG can be used to request debugging
@@ -5262,7 +5309,8 @@ There are no substantial API changes between the non-deprecated parts of
the 1.4.5 API and the 1.5.0 API; however, the ability to directly access
members of the main libpng control structures, png_struct and png_info,
deprecated in earlier versions of libpng, has been completely removed from
-libpng 1.5.
+libpng 1.5, and new private "pngstruct.h", "pnginfo.h", and "pngdebug.h"
+header files were created.
We no longer include zlib.h in png.h. The include statement has been moved
to pngstruct.h, where it is not accessible by applications. Applications that
@@ -5385,7 +5433,7 @@ a set of "safe" limits is applied in pngpriv.h. These can be overridden by
application calls to png_set_user_limits(), png_set_user_chunk_cache_max(),
and/or png_set_user_malloc_max() that increase or decrease the limits. Also,
in libpng-1.5.10 the default width and height limits were increased
-from 1,000,000 to 0x7ffffff (i.e., made unlimited). Therefore, the
+from 1,000,000 to 0x7fffffff (i.e., made unlimited). Therefore, the
limits are now
default safe
png_user_width_max 0x7fffffff 1,000,000
@@ -5394,7 +5442,7 @@ limits are now
png_user_chunk_malloc_max 0 (unlimited) 8,000,000
The png_set_option() function (and the "options" member of the png struct) was
-added to libpng-1.5.15.
+added to libpng-1.5.15, with option PNG_ARM_NEON.
The library now supports a complete fixed point implementation and can
thus be used on systems that have no floating point support or very
@@ -5502,6 +5550,7 @@ includes the following:
png_image_free()
write functions
png_image_write_to_file()
+ png_image_write_to_memory()
png_image_write_to_stdio()
Starting with libpng-1.6.0, you can configure libpng to prefix all exported
@@ -5536,9 +5585,9 @@ The signatures of many exported functions were changed, such that
png_infop became png_inforp or png_const_inforp
where "rp" indicates a "restricted pointer".
-The support for FAR/far types has been eliminated and the definition of
-png_alloc_size_t is now controlled by a flag so that 'small size_t' systems
-can select it if necessary.
+Dropped support for 16-bit platforms. The support for FAR/far types has
+been eliminated and the definition of png_alloc_size_t is now controlled
+by a flag so that 'small size_t' systems can select it if necessary.
Error detection in some chunks has improved; in particular the iCCP chunk
reader now does pretty complete validation of the basic format. Some bad
@@ -5565,6 +5614,10 @@ enforced. The sRGB chunk is allowed to appear in images with any color type
and is interpreted by libpng to convey a one-tracer-curve gray profile or a
three-tracer-curve RGB profile as appropriate.
+Libpng 1.5.x erroneously used /MD for Debug DLL builds; if you used the debug
+builds in your app and you changed your app to use /MD you will need to
+change it back to /MDd for libpng 1.6.x.
+
Prior to libpng-1.6.0 a warning would be issued if the iTXt chunk contained
an empty language field or an empty translated keyword. Both of these
are allowed by the PNG specification, so these warnings are no longer issued.
@@ -5613,6 +5666,28 @@ length, which resulted in PNG files that cannot be read beyond the bad iTXt
chunk. This error was fixed in libpng-1.6.3, and a tool (called
contrib/tools/png-fix-itxt) has been added to the libpng distribution.
+Starting with libpng-1.6.17, the PNG_SAFE_LIMITS macro was eliminated
+and safe limits are used by default (users who need larger limits
+can still override them at compile time or run time, as described above).
+
+The new limits are
+ default spec limit
+ png_user_width_max 1,000,000 2,147,483,647
+ png_user_height_max 1,000,000 2,147,483,647
+ png_user_chunk_cache_max 128 unlimited
+ png_user_chunk_malloc_max 8,000,000 unlimited
+
+Starting with libpng-1.6.18, a PNG_RELEASE_BUILD macro was added, which allows
+library builders to control compilation for an installed system (a release build).
+It can be set for testing debug or beta builds to ensure that they will compile
+when the build type is switched to RC or STABLE. In essence this overrides the
+PNG_LIBPNG_BUILD_BASE_TYPE definition which is not directly user controllable.
+
+Starting with libpng-1.6.19, attempting to set an over-length PLTE chunk
+is an error. Previously this requirement of the PNG specification was not
+enforced, and the palette was always limited to 256 entries. An over-length
+PLTE chunk found in an input PNG is silently truncated.
+
.SH XIII. Detecting libpng
The png_get_io_ptr() function has been present since libpng-0.88, has never
@@ -5766,14 +5841,17 @@ We prefer #ifdef and #ifndef to #if defined() and #if !defined()
when there is only one macro being tested. We always use parentheses
with "defined".
-We prefer to express integers that are used as bit masks in hex format,
-with an even number of lower-case hex digits (e.g., 0x00, 0xff, 0x0100).
+We express integer constants that are used as bit masks in hex format,
+with an even number of lower-case hex digits, and to make them unsigned
+(e.g., 0x00U, 0xffU, 0x0100U) and long if they are greater than 0x7fff
+(e.g., 0xffffUL).
-We prefer to use underscores in variable names rather than camelCase, except
+We prefer to use underscores rather than camelCase in names, except
for a few type names that we inherit from zlib.h.
-We prefer "if (something != 0)" and "if (something == 0)"
-over "if (something)" and if "(!something)", respectively.
+We prefer "if (something != 0)" and "if (something == 0)" over
+"if (something)" and if "(!something)", respectively, and for pointers
+we prefer "if (some_pointer != NULL)" or "if (some_pointer == NULL)".
We do not use the TAB character for indentation in the C sources.
@@ -5783,13 +5861,11 @@ Other rules can be inferred by inspecting the libpng source.
.SH XVI. Y2K Compliance in libpng
-March 26, 2015
-
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.6.17 are Y2K compliant. It is my belief that earlier
+upward through 1.6.29 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has two year fields. One is a 2-byte unsigned integer
@@ -5851,199 +5927,47 @@ the first widely used release:
source png.h png.h shared-lib
version string int version
------- ------ ----- ----------
- 0.89c ("beta 3") 0.89 89 1.0.89
- 0.90 ("beta 4") 0.90 90 0.90
- 0.95 ("beta 5") 0.95 95 0.95
- 0.96 ("beta 6") 0.96 96 0.96
- 0.97b ("beta 7") 1.00.97 97 1.0.1
- 0.97c 0.97 97 2.0.97
- 0.98 0.98 98 2.0.98
- 0.99 0.99 98 2.0.99
- 0.99a-m 0.99 99 2.0.99
- 1.00 1.00 100 2.1.0
- 1.0.0 1.0.0 100 2.1.0
- 1.0.0 (from here on, the 100 2.1.0
- 1.0.1 png.h string is 10001 2.1.0
- 1.0.1a-e identical to the 10002 from here on, the
- 1.0.2 source version) 10002 shared library is 2.V
- 1.0.2a-b 10003 where V is the source
- 1.0.1 10001 code version except as
- 1.0.1a-e 10002 2.1.0.1a-e noted.
- 1.0.2 10002 2.1.0.2
- 1.0.2a-b 10003 2.1.0.2a-b
- 1.0.3 10003 2.1.0.3
- 1.0.3a-d 10004 2.1.0.3a-d
- 1.0.4 10004 2.1.0.4
- 1.0.4a-f 10005 2.1.0.4a-f
- 1.0.5 (+ 2 patches) 10005 2.1.0.5
- 1.0.5a-d 10006 2.1.0.5a-d
- 1.0.5e-r 10100 2.1.0.5e-r
- 1.0.5s-v 10006 2.1.0.5s-v
- 1.0.6 (+ 3 patches) 10006 2.1.0.6
- 1.0.6d-g 10007 2.1.0.6d-g
- 1.0.6h 10007 10.6h
- 1.0.6i 10007 10.6i
- 1.0.6j 10007 2.1.0.6j
- 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14
- 1.0.7beta15-18 1 10007 2.1.0.7beta15-18
- 1.0.7rc1-2 1 10007 2.1.0.7rc1-2
- 1.0.7 1 10007 2.1.0.7
- 1.0.8beta1-4 1 10008 2.1.0.8beta1-4
- 1.0.8rc1 1 10008 2.1.0.8rc1
- 1.0.8 1 10008 2.1.0.8
- 1.0.9beta1-6 1 10009 2.1.0.9beta1-6
- 1.0.9rc1 1 10009 2.1.0.9rc1
- 1.0.9beta7-10 1 10009 2.1.0.9beta7-10
- 1.0.9rc2 1 10009 2.1.0.9rc2
- 1.0.9 1 10009 2.1.0.9
- 1.0.10beta1 1 10010 2.1.0.10beta1
- 1.0.10rc1 1 10010 2.1.0.10rc1
- 1.0.10 1 10010 2.1.0.10
- 1.0.11beta1-3 1 10011 2.1.0.11beta1-3
- 1.0.11rc1 1 10011 2.1.0.11rc1
- 1.0.11 1 10011 2.1.0.11
- 1.0.12beta1-2 2 10012 2.1.0.12beta1-2
- 1.0.12rc1 2 10012 2.1.0.12rc1
- 1.0.12 2 10012 2.1.0.12
- 1.1.0a-f - 10100 2.1.1.0a-f abandoned
- 1.2.0beta1-2 2 10200 2.1.2.0beta1-2
- 1.2.0beta3-5 3 10200 3.1.2.0beta3-5
- 1.2.0rc1 3 10200 3.1.2.0rc1
- 1.2.0 3 10200 3.1.2.0
- 1.2.1beta-4 3 10201 3.1.2.1beta1-4
- 1.2.1rc1-2 3 10201 3.1.2.1rc1-2
- 1.2.1 3 10201 3.1.2.1
- 1.2.2beta1-6 12 10202 12.so.0.1.2.2beta1-6
- 1.0.13beta1 10 10013 10.so.0.1.0.13beta1
- 1.0.13rc1 10 10013 10.so.0.1.0.13rc1
- 1.2.2rc1 12 10202 12.so.0.1.2.2rc1
- 1.0.13 10 10013 10.so.0.1.0.13
- 1.2.2 12 10202 12.so.0.1.2.2
- 1.2.3rc1-6 12 10203 12.so.0.1.2.3rc1-6
- 1.2.3 12 10203 12.so.0.1.2.3
- 1.2.4beta1-3 13 10204 12.so.0.1.2.4beta1-3
- 1.2.4rc1 13 10204 12.so.0.1.2.4rc1
- 1.0.14 10 10014 10.so.0.1.0.14
- 1.2.4 13 10204 12.so.0.1.2.4
- 1.2.5beta1-2 13 10205 12.so.0.1.2.5beta1-2
- 1.0.15rc1 10 10015 10.so.0.1.0.15rc1
- 1.0.15 10 10015 10.so.0.1.0.15
- 1.2.5 13 10205 12.so.0.1.2.5
- 1.2.6beta1-4 13 10206 12.so.0.1.2.6beta1-4
- 1.2.6rc1-5 13 10206 12.so.0.1.2.6rc1-5
- 1.0.16 10 10016 10.so.0.1.0.16
- 1.2.6 13 10206 12.so.0.1.2.6
- 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2
- 1.0.17rc1 10 10017 12.so.0.1.0.17rc1
- 1.2.7rc1 13 10207 12.so.0.1.2.7rc1
- 1.0.17 10 10017 12.so.0.1.0.17
- 1.2.7 13 10207 12.so.0.1.2.7
- 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5
- 1.0.18rc1-5 10 10018 12.so.0.1.0.18rc1-5
- 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5
- 1.0.18 10 10018 12.so.0.1.0.18
- 1.2.8 13 10208 12.so.0.1.2.8
- 1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3
- 1.2.9beta4-11 13 10209 12.so.0.9[.0]
- 1.2.9rc1 13 10209 12.so.0.9[.0]
- 1.2.9 13 10209 12.so.0.9[.0]
- 1.2.10beta1-7 13 10210 12.so.0.10[.0]
- 1.2.10rc1-2 13 10210 12.so.0.10[.0]
- 1.2.10 13 10210 12.so.0.10[.0]
- 1.4.0beta1-6 14 10400 14.so.0.0[.0]
- 1.2.11beta1-4 13 10210 12.so.0.11[.0]
- 1.4.0beta7-8 14 10400 14.so.0.0[.0]
- 1.2.11 13 10211 12.so.0.11[.0]
- 1.2.12 13 10212 12.so.0.12[.0]
- 1.4.0beta9-14 14 10400 14.so.0.0[.0]
- 1.2.13 13 10213 12.so.0.13[.0]
- 1.4.0beta15-36 14 10400 14.so.0.0[.0]
- 1.4.0beta37-87 14 10400 14.so.14.0[.0]
- 1.4.0rc01 14 10400 14.so.14.0[.0]
- 1.4.0beta88-109 14 10400 14.so.14.0[.0]
- 1.4.0rc02-08 14 10400 14.so.14.0[.0]
- 1.4.0 14 10400 14.so.14.0[.0]
- 1.4.1beta01-03 14 10401 14.so.14.1[.0]
- 1.4.1rc01 14 10401 14.so.14.1[.0]
- 1.4.1beta04-12 14 10401 14.so.14.1[.0]
- 1.4.1 14 10401 14.so.14.1[.0]
- 1.4.2 14 10402 14.so.14.2[.0]
- 1.4.3 14 10403 14.so.14.3[.0]
- 1.4.4 14 10404 14.so.14.4[.0]
- 1.5.0beta01-58 15 10500 15.so.15.0[.0]
- 1.5.0rc01-07 15 10500 15.so.15.0[.0]
- 1.5.0 15 10500 15.so.15.0[.0]
- 1.5.1beta01-11 15 10501 15.so.15.1[.0]
- 1.5.1rc01-02 15 10501 15.so.15.1[.0]
- 1.5.1 15 10501 15.so.15.1[.0]
- 1.5.2beta01-03 15 10502 15.so.15.2[.0]
- 1.5.2rc01-03 15 10502 15.so.15.2[.0]
- 1.5.2 15 10502 15.so.15.2[.0]
- 1.5.3beta01-10 15 10503 15.so.15.3[.0]
- 1.5.3rc01-02 15 10503 15.so.15.3[.0]
- 1.5.3beta11 15 10503 15.so.15.3[.0]
- 1.5.3 [omitted]
- 1.5.4beta01-08 15 10504 15.so.15.4[.0]
- 1.5.4rc01 15 10504 15.so.15.4[.0]
- 1.5.4 15 10504 15.so.15.4[.0]
- 1.5.5beta01-08 15 10505 15.so.15.5[.0]
- 1.5.5rc01 15 10505 15.so.15.5[.0]
- 1.5.5 15 10505 15.so.15.5[.0]
- 1.5.6beta01-07 15 10506 15.so.15.6[.0]
- 1.5.6rc01-03 15 10506 15.so.15.6[.0]
- 1.5.6 15 10506 15.so.15.6[.0]
- 1.5.7beta01-05 15 10507 15.so.15.7[.0]
- 1.5.7rc01-03 15 10507 15.so.15.7[.0]
- 1.5.7 15 10507 15.so.15.7[.0]
- 1.6.0beta01-40 16 10600 16.so.16.0[.0]
- 1.6.0rc01-08 16 10600 16.so.16.0[.0]
- 1.6.0 16 10600 16.so.16.0[.0]
- 1.6.1beta01-09 16 10601 16.so.16.1[.0]
- 1.6.1rc01 16 10601 16.so.16.1[.0]
- 1.6.1 16 10601 16.so.16.1[.0]
- 1.6.2beta01 16 10602 16.so.16.2[.0]
- 1.6.2rc01-06 16 10602 16.so.16.2[.0]
- 1.6.2 16 10602 16.so.16.2[.0]
- 1.6.3beta01-11 16 10603 16.so.16.3[.0]
- 1.6.3rc01 16 10603 16.so.16.3[.0]
- 1.6.3 16 10603 16.so.16.3[.0]
- 1.6.4beta01-02 16 10604 16.so.16.4[.0]
- 1.6.4rc01 16 10604 16.so.16.4[.0]
- 1.6.4 16 10604 16.so.16.4[.0]
- 1.6.5 16 10605 16.so.16.5[.0]
- 1.6.6 16 10606 16.so.16.6[.0]
- 1.6.7beta01-04 16 10607 16.so.16.7[.0]
- 1.6.7rc01-02 16 10607 16.so.16.7[.0]
- 1.6.7 16 10607 16.so.16.7[.0]
- 1.6.8beta01-02 16 10608 16.so.16.8[.0]
- 1.6.8rc01-02 16 10608 16.so.16.8[.0]
- 1.6.8 16 10608 16.so.16.8[.0]
- 1.6.9beta01-04 16 10609 16.so.16.9[.0]
- 1.6.9rc01-02 16 10609 16.so.16.9[.0]
- 1.6.9 16 10609 16.so.16.9[.0]
- 1.6.10beta01-03 16 10610 16.so.16.10[.0]
- 1.6.10rc01-03 16 10610 16.so.16.10[.0]
- 1.6.10 16 10610 16.so.16.10[.0]
- 1.6.11beta01-06 16 10611 16.so.16.11[.0]
- 1.6.11rc01-02 16 10611 16.so.16.11[.0]
- 1.6.11 16 10611 16.so.16.11[.0]
- 1.6.12rc01 16 10612 16.so.16.12[.0]
- 1.6.12 16 10612 16.so.16.12[.0]
- 1.6.13beta01-04 16 10613 16.so.16.13[.0]
- 1.6.13rc01-02 16 10613 16.so.16.13[.0]
- 1.6.13 16 10613 16.so.16.13[.0]
- 1.6.14beta01-07 16 10614 16.so.16.14[.0]
- 1.6.14rc01-02 16 10614 16.so.16.14[.0]
- 1.6.14 16 10614 16.so.16.14[.0]
- 1.6.15beta01-08 16 10615 16.so.16.15[.0]
- 1.6.15rc01-03 16 10615 16.so.16.15[.0]
- 1.6.15 16 10615 16.so.16.15[.0]
- 1.6.16beta01-03 16 10616 16.so.16.16[.0]
- 1.6.16rc01-02 16 10616 16.so.16.16[.0]
- 1.6.16 16 10616 16.so.16.16[.0]
- 1.6.17beta01-06 16 10617 16.so.16.17[.0]
- 1.6.17rc01-06 16 10617 16.so.16.17[.0]
- 1.6.17 16 10617 16.so.16.17[.0]
+ 0.89c "1.0 beta 3" 0.89 89 1.0.89
+ 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90]
+ 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95]
+ 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96]
+ 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97]
+ 0.97c 0.97 97 2.0.97
+ 0.98 0.98 98 2.0.98
+ 0.99 0.99 98 2.0.99
+ 0.99a-m 0.99 99 2.0.99
+ 1.00 1.00 100 2.1.0 [100 should be 10000]
+ 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000]
+ 1.0.1 png.h string is 10001 2.1.0
+ 1.0.1a-e identical to the 10002 from here on, the shared library
+ 1.0.2 source version) 10002 is 2.V where V is the source code
+ 1.0.2a-b 10003 version, except as noted.
+ 1.0.3 10003
+ 1.0.3a-d 10004
+ 1.0.4 10004
+ 1.0.4a-f 10005
+ 1.0.5 (+ 2 patches) 10005
+ 1.0.5a-d 10006
+ 1.0.5e-r 10100 (not source compatible)
+ 1.0.5s-v 10006 (not binary compatible)
+ 1.0.6 (+ 3 patches) 10006 (still binary incompatible)
+ 1.0.6d-f 10007 (still binary incompatible)
+ 1.0.6g 10007
+ 1.0.6h 10007 10.6h (testing xy.z so-numbering)
+ 1.0.6i 10007 10.6i
+ 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0)
+ 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible)
+ 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible)
+ 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible)
+ 1.0.7 1 10007 (still compatible)
+ ...
+ 1.0.19 10 10019 10.so.0.19[.0]
+ ...
+ 1.2.57 13 10257 12.so.0.56[.0]
+ ...
+ 1.5.28 15 10528 15.so.15.28[.0]
+ ...
+ 1.6.29 16 10629 16.so.16.29[.0]
Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be
@@ -6053,11 +5977,10 @@ for applications, is an unsigned integer of the form xyyzz corresponding
to the source version x.y.z (leading zeros in y and z). Beta versions
were given the previous public release number plus a letter, until
version 1.0.6j; from then on they were given the upcoming public
-release number plus "betaNN" or "rcN".
+release number plus "betaNN" or "rcNN".
.SH "SEE ALSO"
-.BR "png"(5), " libpngpf"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5)
-
+.IR libpngpf(3) ", " png(5)
.LP
.IR libpng :
.IP
@@ -6080,7 +6003,7 @@ ftp://ftp.info-zip.org/pub/infozip/zlib
.I libpng
or at
.br
-ftp://ds.internic.net/rfc/rfc2083.txt
+ftp://ftp.rfc-editor.org:/in-notes/rfc2083.txt
.br
or (as a W3C Recommendation) at
.br
@@ -6100,7 +6023,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
-Libpng version 1.6.17 - March 26, 2015:
+Libpng version 1.6.29 - March 16, 2017:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@@ -6112,56 +6035,63 @@ png-mng-implement at lists.sourceforge.net (subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe).
-.SH COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
+.SH NOTICES:
-(This copy of the libpng notices is provided for your convenience. In case of
+This copy of the libpng notices is provided for your convenience. In case of
any discrepancy between this copy and the notices in the file png.h that is
-included in the libpng distribution, the latter shall prevail.)
+included in the libpng distribution, the latter shall prevail.
+
+COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
If you modify libpng you may insert additional notices immediately following
this sentence.
This code is released under the libpng license.
-libpng versions 1.2.6, August 15, 2004, through 1.6.17, March 26, 2015, are
-Copyright (c) 2004,2006-2015 Glenn Randers-Pehrson, and are
-distributed according to the same disclaimer and license as libpng-1.2.5
-with the following individual added to the list of Contributing Authors
-
- Cosmin Truta
-
-libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are
-Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
-distributed according to the same disclaimer and license as libpng-1.0.6
-with the following individuals added to the list of Contributing Authors
+libpng versions 1.0.7, July 1, 2000 through 1.6.29, March 16, 2017 are
+Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
+derived from libpng-1.0.6, and are distributed according to the same
+disclaimer and license as libpng-1.0.6 with the following individuals
+added to the list of Contributing Authors:
Simon-Pierre Cadieux
Eric S. Raymond
+ Mans Rullgard
+ Cosmin Truta
Gilles Vollant
+ James Yu
+ Mandar Sahastrabuddhe
+ Google Inc.
+ Vadim Barkov
and with the following additions to the disclaimer:
- There is no warranty against interference with your
- enjoyment of the library or against infringement.
- There is no warranty that our efforts or the library
- will fulfill any of your particular purposes or needs.
- This library is provided with all faults, and the entire
- risk of satisfactory quality, performance, accuracy, and
- effort is with the user.
+ There is no warranty against interference with your enjoyment of the
+ library or against infringement. There is no warranty that our
+ efforts or the library will fulfill any of your particular purposes
+ or needs. This library is provided with all faults, and the entire
+ risk of satisfactory quality, performance, accuracy, and effort is with
+ the user.
+
+Some files in the "contrib" directory and some configure-generated
+files that are distributed with libpng have other copyright owners and
+are released under other open source licenses.
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
-Copyright (c) 1998, 1999 Glenn Randers-Pehrson
-Distributed according to the same disclaimer and license as libpng-0.96,
-with the following individuals added to the list of Contributing Authors:
+Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
+libpng-0.96, and are distributed according to the same disclaimer and
+license as libpng-0.96, with the following individuals added to the list
+of Contributing Authors:
Tom Lane
Glenn Randers-Pehrson
Willem van Schaik
libpng versions 0.89, June 1996, through 0.96, May 1997, are
-Copyright (c) 1996, 1997 Andreas Dilger
-Distributed according to the same disclaimer and license as libpng-0.88,
-with the following individuals added to the list of Contributing Authors:
+Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
+and are distributed according to the same disclaimer and license as
+libpng-0.88, with the following individuals added to the list of
+Contributing Authors:
John Bowler
Kevin Bracey
@@ -6170,8 +6100,11 @@ with the following individuals added to the list of Contributing Authors:
Greg Roelofs
Tom Tanner
+Some files in the "scripts" directory have other copyright owners
+but are released under this license.
+
libpng versions 0.5, May 1995, through 0.88, January 1996, are
-Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
+Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
For the purposes of this copyright and license, "Contributing Authors"
is defined as the following set of individuals:
@@ -6194,13 +6127,13 @@ Permission is hereby granted to use, copy, modify, and distribute this
source code, or portions hereof, for any purpose, without fee, subject
to the following restrictions:
-1. The origin of this source code must not be misrepresented.
+ 1. The origin of this source code must not be misrepresented.
-2. Altered versions must be plainly marked as such and
- must not be misrepresented as being the original source.
+ 2. Altered versions must be plainly marked as such and must not
+ be misrepresented as being the original source.
-3. This Copyright notice may not be removed or altered from
- any source or altered source distribution.
+ 3. This Copyright notice may not be removed or altered from any
+ source or altered source distribution.
The Contributing Authors and Group 42, Inc. specifically permit, without
fee, and encourage the use of this source code as a component to
@@ -6208,21 +6141,42 @@ supporting the PNG file format in commercial products. If you use this
source code in a product, acknowledgment is not required but would be
appreciated.
+END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
+
+TRADEMARK:
+
+The name "libpng" has not been registered by the Copyright owner
+as a trademark in any jurisdiction. However, because libpng has
+been distributed and maintained world-wide, continually since 1995,
+the Copyright owner claims "common-law trademark protection" in any
+jurisdiction where common-law trademark is recognized.
+
+OSI CERTIFICATION:
+
+Libpng is OSI Certified Open Source Software. OSI Certified Open Source is
+a certification mark of the Open Source Initiative. OSI has not addressed
+the additional disclaimers inserted at version 1.0.7.
+
+EXPORT CONTROL:
+
+The Copyright owner believes that the Export Control Classification
+Number (ECCN) for libpng is EAR99, which means not subject to export
+controls or International Traffic in Arms Regulations (ITAR) because
+it is open source, publicly available software, that does not contain
+any encryption software. See the EAR, paragraphs 734.3(b)(3) and
+734.7(b).
A "png_get_copyright" function is available, for convenient use in "about"
boxes and the like:
- printf("%s",png_get_copyright(NULL));
+ printf("%s", png_get_copyright(NULL));
Also, the PNG logo (in PNG format, of course) is supplied in the
files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
-Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a
-certification mark of the Open Source Initiative.
-
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-March 26, 2015
+March 16, 2017
.\" end of man page