mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-10 20:22:31 +02:00
Better animation detection
This commit is contained in:
11
vips/vips.c
11
vips/vips.c
@@ -139,9 +139,14 @@ vips_band_format(VipsImage *in) {
|
||||
|
||||
gboolean
|
||||
vips_is_animated(VipsImage * in) {
|
||||
return( vips_image_get_typeof(in, "page-height") != G_TYPE_INVALID &&
|
||||
vips_image_get_typeof(in, "gif-delay") != G_TYPE_INVALID &&
|
||||
vips_image_get_typeof(in, "gif-loop") != G_TYPE_INVALID );
|
||||
int n_pages;
|
||||
|
||||
return( vips_image_get_typeof(in, "delay") != G_TYPE_INVALID &&
|
||||
vips_image_get_typeof(in, "loop") != G_TYPE_INVALID &&
|
||||
vips_image_get_typeof(in, "page-height") == G_TYPE_INT &&
|
||||
vips_image_get_typeof(in, "n-pages") == G_TYPE_INT &&
|
||||
vips_image_get_int(in, "n-pages", &n_pages) == 0 &&
|
||||
n_pages > 1 );
|
||||
}
|
||||
|
||||
int
|
||||
|
Reference in New Issue
Block a user