Skip to content

Commit a708d93

Browse files
committed
修正png质量 最大不超过9
1 parent b45055c commit a708d93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Image.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function save($pathname, $type = null, $quality = 80, $interlace = true)
132132
//设定保存完整的 alpha 通道信息
133133
imagesavealpha($this->im, true);
134134
//ImagePNG生成图像的质量范围从0到9的
135-
imagepng($this->im, $pathname, max((int)($quality / 10), 9));
135+
imagepng($this->im, $pathname, min((int)($quality / 10), 9));
136136
} else {
137137
$fun = 'image' . $type;
138138
$fun($this->im, $pathname);

0 commit comments

Comments
 (0)