A lot of code cleanup and code sanitation done.
This commit is contained in:
@@ -115,7 +115,7 @@ class imageProcessor
|
||||
return in_array($mime, ['image/png', 'image/webp']);
|
||||
}
|
||||
|
||||
private function setTransparentCanvas($image, $width, $height)
|
||||
private function setTransparentCanvas($image, $width, $height): void
|
||||
{
|
||||
// Enable alpha blending and preserve alpha channel
|
||||
imagealphablending($image, false);
|
||||
@@ -125,7 +125,6 @@ class imageProcessor
|
||||
$transparent = imagecolorallocatealpha($image, 0, 0, 0, 127);
|
||||
imagefilledrectangle($image, 0, 0, $width, $height, $transparent);
|
||||
|
||||
return $image;
|
||||
}
|
||||
|
||||
private function resizeToFitRestrictions($mime, $width, $height)
|
||||
|
||||
Reference in New Issue
Block a user