From 37865e34f80d42aac0dc30d165db1ebd5768d328 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Tue, 30 Apr 2019 20:07:08 +0100 Subject: [PATCH] oop silly webp jpg mixup in last commit --- libvips/resample/thumbnail.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libvips/resample/thumbnail.c b/libvips/resample/thumbnail.c index bb01e8c1..e9de9ddd 100644 --- a/libvips/resample/thumbnail.c +++ b/libvips/resample/thumbnail.c @@ -936,11 +936,10 @@ vips_thumbnail_file_open( VipsThumbnail *thumbnail, double factor ) { VipsThumbnailFile *file = (VipsThumbnailFile *) thumbnail; - if( vips_isprefix( "VipsForeignLoadJpeg", thumbnail->loader ) || - vips_isprefix( "VipsForeignLoadWebp", thumbnail->loader ) ) { + if( vips_isprefix( "VipsForeignLoadJpeg", thumbnail->loader ) ) { return( vips_image_new_from_file( file->filename, "access", VIPS_ACCESS_SEQUENTIAL, - "scale", factor, + "shrink", (int) factor, NULL ) ); } else if( vips_isprefix( "VipsForeignLoadOpenslide", @@ -951,7 +950,8 @@ vips_thumbnail_file_open( VipsThumbnail *thumbnail, double factor ) NULL ) ); } else if( vips_isprefix( "VipsForeignLoadPdf", thumbnail->loader ) || - vips_isprefix( "VipsForeignLoadSvg", thumbnail->loader ) ) { + vips_isprefix( "VipsForeignLoadSvg", thumbnail->loader ) || + vips_isprefix( "VipsForeignLoadWebp", thumbnail->loader ) ) { return( vips_image_new_from_file( file->filename, "access", VIPS_ACCESS_SEQUENTIAL, "scale", factor, @@ -1128,13 +1128,12 @@ vips_thumbnail_buffer_open( VipsThumbnail *thumbnail, double factor ) { VipsThumbnailBuffer *buffer = (VipsThumbnailBuffer *) thumbnail; - if( vips_isprefix( "VipsForeignLoadJpeg", thumbnail->loader ) || - vips_isprefix( "VipsForeignLoadWebp", thumbnail->loader ) ) { + if( vips_isprefix( "VipsForeignLoadJpeg", thumbnail->loader ) ) { return( vips_image_new_from_buffer( buffer->buf->data, buffer->buf->length, buffer->option_string, "access", VIPS_ACCESS_SEQUENTIAL, - "scale", factor, + "shrink", (int) factor, NULL ) ); } else if( vips_isprefix( "VipsForeignLoadOpenslide", @@ -1147,7 +1146,8 @@ vips_thumbnail_buffer_open( VipsThumbnail *thumbnail, double factor ) NULL ) ); } else if( vips_isprefix( "VipsForeignLoadPdf", thumbnail->loader ) || - vips_isprefix( "VipsForeignLoadSvg", thumbnail->loader ) ) { + vips_isprefix( "VipsForeignLoadSvg", thumbnail->loader ) || + vips_isprefix( "VipsForeignLoadWebp", thumbnail->loader ) ) { return( vips_image_new_from_buffer( buffer->buf->data, buffer->buf->length, buffer->option_string,