Skip to content

Commit b2001b3

Browse files
authored
Make PNG compression level configurable (#1684)
Co-authored-by: Caprico85 <Caprico85@users.noreply.github.com>
1 parent 95d52d3 commit b2001b3

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lib/Varien/Image/Adapter/Gd2.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,7 @@ public function save($destination=null, $newName=null)
205205
// set quality param for PNG file type
206206
if (!is_null($this->quality()) && $this->_fileType == IMAGETYPE_PNG)
207207
{
208-
$quality = round(($this->quality() / 100) * 10);
209-
if ($quality < 1) {
210-
$quality = 1;
211-
} elseif ($quality > 10) {
212-
$quality = 10;
213-
}
214-
$quality = 10 - $quality;
215-
$functionParameters[] = $quality;
208+
$functionParameters[] = 9;
216209
}
217210

218211
call_user_func_array($this->_getCallback('output'), $functionParameters);

0 commit comments

Comments
 (0)