check alpha on animation rects too
see https://github.com/libvips/libvips/issues/1351#issuecomment-506942104
This commit is contained in:
parent
7d8b6d9d9f
commit
d3cd51a8c3
@ -493,11 +493,13 @@ read_header( Read *read, VipsImage *out )
|
|||||||
vips_image_set_int( out, "gif-delay",
|
vips_image_set_int( out, "gif-delay",
|
||||||
VIPS_RINT( read->delay / 10.0 ) );
|
VIPS_RINT( read->delay / 10.0 ) );
|
||||||
|
|
||||||
/* If we find a frame which doesn't fill the canvas,
|
/* We need the alpha in an animation if:
|
||||||
* we'll need to save as RGBA.
|
* - any frame has transparent pixels
|
||||||
|
* - any frame doesn't fill the whole canvas.
|
||||||
*/
|
*/
|
||||||
do {
|
do {
|
||||||
if( iter.x_offset != 0 ||
|
if( iter.has_alpha ||
|
||||||
|
iter.x_offset != 0 ||
|
||||||
iter.y_offset != 0 ||
|
iter.y_offset != 0 ||
|
||||||
iter.width != read->canvas_width ||
|
iter.width != read->canvas_width ||
|
||||||
iter.height != read->canvas_height ) {
|
iter.height != read->canvas_height ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user