Skip to content

Very low quality of resulting images on Windows  #338

@mihail-minkov

Description

@mihail-minkov

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
image

Webp converted file from the original JPG - 588 bytes
image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions