mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[master] Ported functions from libpng-1.4.0rc01:
png_calloc(), png_get_io_state(),
png_get_io_chunk_name(), png_set_premultiply_alpha, and
png_do_read_premultiply_alpha().
This commit is contained in:
17
pngwrite.c
17
pngwrite.c
@@ -1506,11 +1506,6 @@ png_write_png(png_structp png_ptr, png_infop info_ptr,
|
||||
{
|
||||
if (png_ptr == NULL || info_ptr == NULL)
|
||||
return;
|
||||
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
|
||||
/* Invert the alpha channel from opacity to transparency */
|
||||
if (transforms & PNG_TRANSFORM_INVERT_ALPHA)
|
||||
png_set_invert_alpha(png_ptr);
|
||||
#endif
|
||||
|
||||
/* Write the file header information. */
|
||||
png_write_info(png_ptr, info_ptr);
|
||||
@@ -1570,6 +1565,18 @@ png_write_png(png_structp png_ptr, png_infop info_ptr,
|
||||
png_set_packswap(png_ptr);
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
|
||||
/* Invert the alpha channel from opacity to transparency */
|
||||
if (transforms & PNG_TRANSFORM_INVERT_ALPHA)
|
||||
png_set_invert_alpha(png_ptr);
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
|
||||
/* Invert the alpha channel from opacity to transparency */
|
||||
if (transforms & PNG_TRANSFORM_INVERT_ALPHA)
|
||||
png_set_invert_alpha(png_ptr);
|
||||
#endif
|
||||
|
||||
/* ----------------------- end of transformations ------------------- */
|
||||
|
||||
/* Write the bits */
|
||||
|
||||
Reference in New Issue
Block a user