[master] Imported from libpng-1.2.41beta08.tar
This commit is contained in:
parent
4b14b35208
commit
4f67b78853
73
libpng.3
73
libpng.3
@ -1703,6 +1703,15 @@ images) is fully transparent, with
|
|||||||
|
|
||||||
png_set_invert_alpha(png_ptr);
|
png_set_invert_alpha(png_ptr);
|
||||||
|
|
||||||
|
The PNG format only supports pixels with postmultiplied alpha.
|
||||||
|
If you want to replace the pixels, after reading them, with pixels
|
||||||
|
that have premultiplied color samples, you can do this with
|
||||||
|
|
||||||
|
png_set_premultiply_alpha(png_ptr);
|
||||||
|
|
||||||
|
If you do this, any input with a tRNS chunk will be expanded to
|
||||||
|
have an alpha channel.
|
||||||
|
|
||||||
PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as
|
PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as
|
||||||
they can, resulting in, for example, 8 pixels per byte for 1 bit
|
they can, resulting in, for example, 8 pixels per byte for 1 bit
|
||||||
files. This code expands to 1 pixel per byte without changing the
|
files. This code expands to 1 pixel per byte without changing the
|
||||||
@ -3756,6 +3765,70 @@ selection of assembler code features:
|
|||||||
We replaced all of these functions with simple stubs in libpng-1.2.20,
|
We replaced all of these functions with simple stubs in libpng-1.2.20,
|
||||||
when the Intel assembler code was removed due to a licensing issue.
|
when the Intel assembler code was removed due to a licensing issue.
|
||||||
|
|
||||||
|
These macros are deprecated:
|
||||||
|
|
||||||
|
PNG_READ_TRANSFORMS_NOT_SUPPORTED
|
||||||
|
PNG_PROGRESSIVE_READ_NOT_SUPPORTED
|
||||||
|
PNG_NO_SEQUENTIAL_READ_SUPPORTED
|
||||||
|
PNG_WRITE_TRANSFORMS_NOT_SUPPORTED
|
||||||
|
PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED
|
||||||
|
PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED
|
||||||
|
|
||||||
|
They have been replaced, respectively, by:
|
||||||
|
|
||||||
|
PNG_NO_READ_TRANSFORMS
|
||||||
|
PNG_NO_PROGRESSIVE_READ
|
||||||
|
PNG_NO_SEQUENTIAL_READ
|
||||||
|
PNG_NO_WRITE_TRANSFORMS
|
||||||
|
PNG_NO_READ_ANCILLARY_CHUNKS
|
||||||
|
PNG_NO_WRITE_ANCILLARY_CHUNKS
|
||||||
|
|
||||||
|
PNG_MAX_UINT was replaced with PNG_UINT_31_MAX. It has been
|
||||||
|
deprecated since libpng-1.0.16 and libpng-1.2.6.
|
||||||
|
|
||||||
|
The function
|
||||||
|
png_check_sig(sig, num)
|
||||||
|
was replaced with
|
||||||
|
!png_sig_cmp(sig, 0, num)
|
||||||
|
It has been deprecated since libpng-0.90.
|
||||||
|
|
||||||
|
The function
|
||||||
|
png_set_gray_1_2_4_to_8()
|
||||||
|
which also expands tRNS to alpha was replaced with
|
||||||
|
png_set_expand_gray_1_2_4_to_8()
|
||||||
|
which does not. It has been deprecated since libpng-1.0.18 and 1.2.9.
|
||||||
|
|
||||||
|
Functions png_set_benign_errors(), png_benign_error(), and
|
||||||
|
png_chunk_benign_error() were added.
|
||||||
|
|
||||||
|
Support for setting the maximum amount of memory that the application
|
||||||
|
will allocate for reading chunks was added, as a security measure.
|
||||||
|
The functions png_set_chunk_cache_max() and png_get_chunk_cache_max()
|
||||||
|
were added to the library.
|
||||||
|
|
||||||
|
We implemented support for I/O states. Added png_ptr member io_state, and
|
||||||
|
functions png_get_io_chunk_name() and png_get_io_state() in pngget.c
|
||||||
|
|
||||||
|
The png_calloc() function was added and is used in place of
|
||||||
|
of "png_malloc(); png_memset();" except in the case in png_read_png()
|
||||||
|
where the array consists of pointers; in this case a "for" loop is used
|
||||||
|
after the png_malloc() to set the pointers to NULL.
|
||||||
|
|
||||||
|
We added PNG_TRANSFORM_GRAY_TO_RGB to the available high-level
|
||||||
|
input transforms.
|
||||||
|
|
||||||
|
We added the png_set_premultiply_alpha and
|
||||||
|
png_do_read_premultiply_alpha() functions.
|
||||||
|
|
||||||
|
The call to png_do_chop() in pngrtran.c, which reduces 16-bit input
|
||||||
|
files to 8-bit bit depth, was relocated ahead of the building
|
||||||
|
of gamma tables. This allows us to build 8-bit tables instead
|
||||||
|
of 16-bit tables, when only 8-bit tables are needed. This avoids
|
||||||
|
wasting some computing resources when the application has called
|
||||||
|
the png_set_strip_16() function and encounters a 16-bit PNG file.
|
||||||
|
|
||||||
|
Checking for and reporting of errors in the IHDR chunk is more thorough.
|
||||||
|
|
||||||
.SH IX. (Omitted)
|
.SH IX. (Omitted)
|
||||||
.SH X. Detecting libpng
|
.SH X. Detecting libpng
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user