Upgrade to 3.9.0

This commit is contained in:
Bastian Allgeier
2023-01-17 14:50:16 +01:00
parent 0ebe0c7b16
commit 6e5c9d1f48
132 changed files with 1664 additions and 1254 deletions

View File

@@ -34,7 +34,7 @@ class SimpleImage {
ERR_WRITE = 11,
ERR_INVALID_FLAG = 12;
protected $flags;
protected $image;
protected $mimeType;
protected $exif;
@@ -63,7 +63,7 @@ class SimpleImage {
$this->flags = [
"sslVerify" => true // Skip SSL peer validation
];
// Override default flag values.
foreach($flags as $flag => $value) {
$this->setFlag($flag, $value);
@@ -206,7 +206,7 @@ class SimpleImage {
$alpha = imagecolorallocatealpha($gif, 0, 0, 0, 127);
imagecolortransparent($gif, $alpha);
imagefill($gif, 0, 0, $alpha);
imagecopy($this->image, $gif, 0, 0, 0, 0, $width, $height);
imagedestroy($gif);
break;
@@ -526,7 +526,7 @@ class SimpleImage {
if($pct < 100) {
// Disable alpha blending and "colorize" the image using a transparent color
imagealphablending($srcIm, false);
imagefilter($srcIm, IMG_FILTER_COLORIZE, 0, 0, 0, 127 * ((100 - $pct) / 100));
imagefilter($srcIm, IMG_FILTER_COLORIZE, 0, 0, 0, round(127 * ((100 - $pct) / 100)));
}
imagecopy($dstIm, $srcIm, (int) $dstX, (int) $dstY, (int) $srcX, (int) $srcY, (int) $srcW, (int) $srcH);