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
297
Merge Requests
40
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
8106b05a
Commit
8106b05a
authored
1 day ago
by
Ben Hayward
Browse files
Options
Download
Lint
parent
ba436a4f
fix/spam-detection-return-1104
1 merge request
!391
[Sprint/RollingRabbit](fix): Updated returned exception of offending spam link. #1104
Pipeline
#94744808
failed with stages
in 2 minutes and 48 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
21 deletions
+26
-21
Core/Media/Imagick/Resize.php
View file @
8106b05a
...
...
@@ -128,39 +128,44 @@ class Resize
$params
=
$this
->
getResizeParameters
();
// If is animated,
if
(
$this
->
image
->
getNumberImages
()
>
1
)
{
foreach
(
$this
->
image
as
$frame
)
{
// Crop into square.
$frame
->
cropImage
(
// 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'
]);
}
}
}
else
{
// Crop the image to selection dimensions
$this
->
image
->
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'
])
{
$
this
->
imag
e
->
thumbnailImage
(
$params
[
'newwidth'
],
$params
[
'newheight'
]);
$
fram
e
->
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