From ac64d74bdffd844f35f7efd5afaeb1dce8e0c163 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 14 Oct 2020 14:39:50 +0200 Subject: [PATCH] tif_webp.c: fix compiler warnings with MSVC --- libtiff/tif_webp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libtiff/tif_webp.c b/libtiff/tif_webp.c index 912bc6f0..6ad20f78 100644 --- a/libtiff/tif_webp.c +++ b/libtiff/tif_webp.c @@ -356,7 +356,7 @@ TWebPSetupEncode(TIFF* tif) } if (!WebPConfigInitInternal(&sp->sEncoderConfig, WEBP_PRESET_DEFAULT, - sp->quality_level, + (float)sp->quality_level, WEBP_ENCODER_ABI_VERSION)) { TIFFErrorExt(tif->tif_clientdata, module, "Error creating WebP encoder configuration."); @@ -579,7 +579,7 @@ TWebPVSetField(TIFF* tif, uint32 tag, va_list ap) #if WEBP_ENCODER_ABI_VERSION >= 0x0100 sp->lossless = va_arg(ap, int); if (sp->lossless){ - sp->quality_level = 100.0f; + sp->quality_level = 100; } return 1; #else @@ -657,7 +657,7 @@ TIFFInitWebP(TIFF* tif, int scheme) tif->tif_tagmethods.vsetfield = TWebPVSetField; /* hook for codec tags */ /* Default values for codec-specific fields */ - sp->quality_level = 75.0f; /* default comp. level */ + sp->quality_level = 75; /* default comp. level */ sp->lossless = 0; /* default to false */ sp->state = 0; sp->nSamples = 0;