From 1c30a8567cb06eeefce3eb86f53b5ab9a14a8646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Sobala?= Date: Fri, 5 Jul 2019 13:14:32 +0200 Subject: [PATCH] [webp] Use well documented use_sharp_yuv option instead of preprocessing --- configure.ac | 6 +++--- libvips/foreign/vips2webp.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 0cf70507..fbf34be9 100644 --- a/configure.ac +++ b/configure.ac @@ -1160,14 +1160,14 @@ if test x"$with_cfitsio" != x"no"; then ) fi -# libwebp ... target 0.5+ to reduce complication +# libwebp ... target 0.6+ to reduce complication # webp has the stuff for handling metadata in two separate libraries -- we # insit on having all of them AC_ARG_WITH([libwebp], AS_HELP_STRING([--without-libwebp], [build without libwebp (default: test)])) if test x"$with_libwebp" != x"no"; then - PKG_CHECK_MODULES(LIBWEBP, libwebp >= 0.5 libwebpmux >= 0.5 libwebpdemux >= 0.5, + PKG_CHECK_MODULES(LIBWEBP, libwebp >= 0.6 libwebpmux >= 0.6 libwebpdemux >= 0.6, [AC_DEFINE(HAVE_LIBWEBP,1,[define if you have libwebp/libwebpmux/libwebpdemux installed.]) with_libwebp=yes PACKAGES_USED="$PACKAGES_USED libwebp libwebpmux libwebpdemux" @@ -1476,7 +1476,7 @@ SVG import with librsvg-2.0: $with_rsvg zlib: $with_zlib file import with cfitsio: $with_cfitsio file import/export with libwebp: $with_libwebp - (requires libwebp, libwebpmux, libwebpdemux 0.5.0 or later) + (requires libwebp, libwebpmux, libwebpdemux 0.6.0 or later) text rendering with pangoft2: $with_pangoft2 file import/export with libpng: $with_png (requires libpng-1.2.9 or later) diff --git a/libvips/foreign/vips2webp.c b/libvips/foreign/vips2webp.c index b45a1d4b..91ffd55a 100644 --- a/libvips/foreign/vips2webp.c +++ b/libvips/foreign/vips2webp.c @@ -184,7 +184,7 @@ vips_webp_write_init( VipsWebPWrite *write, VipsImage *image, if( near_lossless ) write->config.near_lossless = Q; if( smart_subsample ) - write->config.preprocessing |= 4; + write->config.use_sharp_yuv = 1; if( !WebPValidateConfig( &write->config ) ) { vips_webp_write_unset( write );