clear gif pages before load
some gifs may not clear the background, so we must init pages as 0 see https://github.com/lovell/sharp/issues/1331
This commit is contained in:
parent
9a5249ca20
commit
01b66f5ccd
@ -18,6 +18,8 @@
|
|||||||
* 21/11/17
|
* 21/11/17
|
||||||
* - add "gif-delay", "gif-loop", "gif-comment" metadata
|
* - add "gif-delay", "gif-loop", "gif-comment" metadata
|
||||||
* - add dispose handling
|
* - add dispose handling
|
||||||
|
* 13/8/18
|
||||||
|
* - init pages to 0 before load
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -779,6 +781,13 @@ vips_foreign_load_gif_new_page( VipsForeignLoadGif *gif )
|
|||||||
return( NULL );
|
return( NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Some GIFs may not clear the background, so we must start
|
||||||
|
* transparent.
|
||||||
|
*/
|
||||||
|
memset( VIPS_IMAGE_ADDR( out, 0, 0 ),
|
||||||
|
0,
|
||||||
|
VIPS_IMAGE_SIZEOF_IMAGE( out ) );
|
||||||
|
|
||||||
return( out );
|
return( out );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user