Skip to content

Commit

Permalink
1.1
Browse files Browse the repository at this point in the history
* [*] save PNG always use default zlib quality (-1)
  • Loading branch information
KarelWintersky committed May 17, 2022
1 parent cd89628 commit 946d7f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sources/GDImageInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,10 @@ public function store($quality = null): GDImageInfo
}
case 'png': {
$this->quality = $q = 100;
// quality setting not used for PNG
// $this->quality = is_null($quality) ? $this->quality : $quality;
// $q = round((100-$this->quality)/10, 0, PHP_ROUND_HALF_DOWN);
$this->valid = imagepng($this->data, $this->filename, 0); //@todo: полагаю, это временное решение, и должно быть ( (100 - $quality) / 10) с округлением вниз
$this->valid = imagepng($this->data, $this->filename);
break;
}
case 'gif': {
Expand Down

0 comments on commit 946d7f2

Please sign in to comment.