diff --git a/libvips/foreign/webp2vips.c b/libvips/foreign/webp2vips.c index 55956180..ce56b38d 100644 --- a/libvips/foreign/webp2vips.c +++ b/libvips/foreign/webp2vips.c @@ -641,7 +641,8 @@ read_next_frame( Read *read ) printf( "don't blend\n" ); #endif /*DEBUG*/ - if( read->iter.duration != read->delay ) + if( read->frame_count > 1 && + read->iter.duration != read->delay ) g_warning( "webp2vips: " "not all frames have equal duration" ); diff --git a/libvips/resample/thumbnail.c b/libvips/resample/thumbnail.c index c0798ea8..84a58320 100644 --- a/libvips/resample/thumbnail.c +++ b/libvips/resample/thumbnail.c @@ -885,7 +885,8 @@ vips_thumbnail_file_open( VipsThumbnail *thumbnail, double factor ) { VipsThumbnailFile *file = (VipsThumbnailFile *) thumbnail; - if( vips_isprefix( "VipsForeignLoadJpeg", thumbnail->loader ) ) { + if( vips_isprefix( "VipsForeignLoadJpeg", thumbnail->loader ) || + vips_isprefix( "VipsForeignLoadWebp", thumbnail->loader ) ) { return( vips_image_new_from_file( file->filename, "access", VIPS_ACCESS_SEQUENTIAL, "shrink", (int) factor, @@ -899,8 +900,7 @@ vips_thumbnail_file_open( VipsThumbnail *thumbnail, double factor ) NULL ) ); } else if( vips_isprefix( "VipsForeignLoadPdf", thumbnail->loader ) || - vips_isprefix( "VipsForeignLoadSvg", thumbnail->loader ) || - vips_isprefix( "VipsForeignLoadWebp", thumbnail->loader ) ) { + vips_isprefix( "VipsForeignLoadSvg", thumbnail->loader ) ) { return( vips_image_new_from_file( file->filename, "access", VIPS_ACCESS_SEQUENTIAL, "scale", factor, @@ -1076,7 +1076,8 @@ vips_thumbnail_buffer_open( VipsThumbnail *thumbnail, double factor ) { VipsThumbnailBuffer *buffer = (VipsThumbnailBuffer *) thumbnail; - if( vips_isprefix( "VipsForeignLoadJpeg", thumbnail->loader ) ) { + if( vips_isprefix( "VipsForeignLoadJpeg", thumbnail->loader ) || + vips_isprefix( "VipsForeignLoadWebp", thumbnail->loader ) ) { return( vips_image_new_from_buffer( buffer->buf->data, buffer->buf->length, buffer->option_string, "access", VIPS_ACCESS_SEQUENTIAL, @@ -1092,8 +1093,7 @@ vips_thumbnail_buffer_open( VipsThumbnail *thumbnail, double factor ) NULL ) ); } else if( vips_isprefix( "VipsForeignLoadPdf", thumbnail->loader ) || - vips_isprefix( "VipsForeignLoadSvg", thumbnail->loader ) || - vips_isprefix( "VipsForeignLoadWebp", thumbnail->loader ) ) { + vips_isprefix( "VipsForeignLoadSvg", thumbnail->loader ) ) { return( vips_image_new_from_buffer( buffer->buf->data, buffer->buf->length, buffer->option_string, "access", VIPS_ACCESS_SEQUENTIAL,