Commit 6ebcc9a4 authored by Ben Hayward's avatar Ben Hayward

Reverting accidental file commit

1 merge request!391[Sprint/RollingRabbit](fix): Updated returned exception of offending spam link. #1104
Pipeline #95370293 failed with stages
in 2 minutes and 39 seconds
......@@ -127,45 +127,19 @@ class Resize
$params = $this->getResizeParameters();
// If is animated,
// if ($this->image->getNumberImages() > 1) {
$this->image = $this->image->coalesceImages();
foreach ($this->image as $frame) {
error_log("processing frame...");
// Crop into square.
$frame->cropImage(
$params['selectionwidth'],
$params['selectionheight'],
$params['xoffset'],
$params['yoffset']
);
// Resize canvas to new image
$frame->setImagePage(0, 0, 0, 0);
// If selected with / height differ from selection width/height, then we need to resize
if ($params['selectionwidth'] !== $params['newwidth'] || $params['selectionheight'] !== $params['newheight']) {
$frame->thumbnailImage($params['newwidth'], $params['newheight']);
}
// First crop the image
$this->image->cropImage(
$params['selectionwidth'],
$params['selectionheight'],
$params['xoffset'],
$params['yoffset']
);
// If selected with / height differ from selection width/height, then we need to resize
if ($params['selectionwidth'] !== $params['newwidth'] || $params['selectionheight'] !== $params['newheight']) {
$this->image->thumbnailImage($params['newwidth'], $params['newheight']);
}
$this->image = $this->image->deconstructImages();
// } else {
// // Crop the image to selection dimensions
// $this->image->cropImage(
// $params['selectionwidth'],
// $params['selectionheight'],
// $params['xoffset'],
// $params['yoffset']
// );
// // If selected with / height differ from selection width/height, then we need to resize
// if ($params['selectionwidth'] !== $params['newwidth'] || $params['selectionheight'] !== $params['newheight']) {
// $this->image->thumbnailImage($params['newwidth'], $params['newheight']);
// }
// }
$this->output = $this->image;
return $this;
......
Please register or to comment