php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79287 imagewebp function quality parametter as no effect JPG only
Submitted: 2020-02-19 16:20 UTC Modified: 2020-02-19 17:43 UTC
From: pierre at lookit dot fr Assigned:
Status: Not a bug Package: GD related
PHP Version: 7.2.27 OS: xubuntu 18.04.4 LTS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pierre at lookit dot fr
New email:
PHP Version: OS:

 

 [2020-02-19 16:20 UTC] pierre at lookit dot fr
Description:
------------
When i change the quality parameter in the imagewebp function, the image returned is exactly the same. This parameter seems to have no effect on the conversion process. I've tested with jpeg and png images files. The file is well converted, but when i change the quality parameter to another value, nothing appear to change on image resulted.

Test script:
---------------
$destination = '1.webp';
$origine = '1.png';
@$webp = imagewebp(imagecreatefrompng($origine), $destination);
$destination = '2.webp';
$origine = '2.jpg';
@$webp = imagewebp(imagecreatefromjpeg($origine), $destination);
$destination = '3.webp';
$origine = '1.png';
@$webp = imagewebp(imagecreatefrompng($origine), $destination,50);
$destination = '4.webp';
$origine = '2.jpg';
@$webp = imagewebp(imagecreatefromjpeg($origine), $destination, 50);
//Ok after that i open results in photoshop for a deeper analyse on change....but nothing appear to have changed !!!


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-02-19 16:39 UTC] pierre at lookit dot fr
-Summary: imagewebp function quality parametter as no effect +Summary: imagewebp function quality parametter as no effect JPG only
 [2020-02-19 16:39 UTC] pierre at lookit dot fr
After news tests, it seems that this bug affect only JPG images
 [2020-02-19 16:46 UTC] pierre at lookit dot fr
-Status: Open +Status: Closed
 [2020-02-19 16:46 UTC] pierre at lookit dot fr
After a lot of turn arround, it seems to be ok. Bug is not really one !
Jpg quality is functionnal. You just have to play with lowest or highest quality. exemple : when i put a value of 30 i can see the changes, with 50 nothing appear. The size of the file is the same of the original file.
 [2020-02-19 17:43 UTC] cmb@php.net
-Status: Closed +Status: Not a bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 20:01:31 2024 UTC