Skip to content
Next
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
298
Merge Requests
39
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
6ebcc9a4
Commit
6ebcc9a4
authored
1 hour ago
by
Ben Hayward
Browse files
Options
Download
Reverting accidental file commit
parent
8106b05a
fix/spam-detection-return-1104
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
37 deletions
+11
-37
Core/Media/Imagick/Resize.php
View file @
6ebcc9a4
...
...
@@ -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
;
...
...
This diff is collapsed.
Please
register
or
sign in
to comment