mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[devel] Fixed bug in background transformation handling in pngrtran.c
(it was looking for the flag in png_ptr->transformations instead of in png_ptr->flags).
This commit is contained in:
@@ -1068,7 +1068,7 @@ png_init_read_transformations(png_structp png_ptr)
|
||||
*/
|
||||
png_ptr->transformations &= ~PNG_BACKGROUND;
|
||||
png_ptr->transformations &= ~PNG_GAMMA;
|
||||
png_ptr->transformations |= PNG_STRIP_ALPHA;
|
||||
png_ptr->flags |= PNG_FLAG_STRIP_ALPHA;
|
||||
}
|
||||
|
||||
/* if (png_ptr->background_gamma_type!=PNG_BACKGROUND_GAMMA_UNKNOWN) */
|
||||
@@ -1202,7 +1202,7 @@ png_init_read_transformations(png_structp png_ptr)
|
||||
|
||||
/* Handled alpha, still need to strip the channel. */
|
||||
png_ptr->transformations &= ~PNG_BACKGROUND;
|
||||
png_ptr->transformations |= PNG_STRIP_ALPHA;
|
||||
png_ptr->flags |= PNG_FLAG_STRIP_ALPHA;
|
||||
}
|
||||
#endif /* PNG_READ_BACKGROUND_SUPPORTED */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user