Commit 912262d7 authored by Mark Harding's avatar Mark Harding

Revert "Merge branch 'fix/gif-resize' into 'master'"

This reverts commit af77626a, reversing
changes made to 8a5e4d6a.
parent 97246e55
No related merge requests found
Pipeline #94698438 failed with stages
in 2 minutes and 38 seconds
......@@ -127,38 +127,13 @@ class Resize
$params = $this->getResizeParameters();
// If is animated,
if ($this->image->getNumberImages() > 1) {
foreach ($this->image as $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']);
}
}
} 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']);
}
// 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->output = $this->image;
......
Please register or to comment