Reorder image resizing operations
This commit is contained in:
parent
308704023b
commit
4c2c686d3e
1 changed files with 3 additions and 3 deletions
|
@ -88,12 +88,12 @@ class Image extends File
|
|||
if ($palette > 0 && ! \imagetruecolortopalette($image, true, $palette)) {
|
||||
throw new FileException('Failed to convert image to palette');
|
||||
}
|
||||
if (false === \imagecopyresampled($image, $this->image, 0, 0, 0, 0, $width, $height, $oldW, $oldH)) {
|
||||
throw new FileException('Failed to resize image');
|
||||
}
|
||||
if (false === \imagealphablending($image, false) || false === \imagesavealpha($image, true)) {
|
||||
throw new FileException('Failed to adjust image');
|
||||
}
|
||||
if (false === \imagecopyresampled($image, $this->image, 0, 0, 0, 0, $width, $height, $oldW, $oldH)) {
|
||||
throw new FileException('Failed to resize image');
|
||||
}
|
||||
|
||||
$this->image = $image;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue