-
-
Notifications
You must be signed in to change notification settings - Fork 105
Description
First of all, great library, really easy to use and also fast!
This is not a critical issue but it does cause me some complications on my local server.
I have the following setup:
- Windows 10
- Apache 2.4.25
- PHP 7.4.11
I am using CodeIgniter 4.1.9 and WebpConvert 2.9.1 which I think is the latest version as per this post.
So, I use the following code:
$fuente = '1200x500_processed_file.jpg';
$destino = 'uploades/1200x500_processed_file.webp';
$opciones = [
'converters' => ['gd'],
'png' => [
'encoding' => 'auto',
'near-lossless' => 60,
'quality' => 85,
'sharp-yuv' => true,
],
'jpeg' => [
'encoding' => 'auto',
'quality' => 'auto',
'max-quality' => 80,
'default-quality' => 75,
'sharp-yuv' => true,
]
];
WebPConvert::convert($fuente, $destino, $opciones);If I use this on Ubuntu it works like a charm, but when I use it on Windows it completely ignores the quality settings and inputs extremely low quality images:
The JPG is previously compressed and resized accordingly, but as you can see in the example, the difference in quality is enormous.
Example:
Original processed JPG - 7.48 kb

Webp converted file from the original JPG - 588 bytes

Is there some issue with the library and Windows or am I configuring something incorrectly? I tried using imagemagick as a converter but I get PHP errors, that might be a config issue from my side.