Bug #33728
closedError in Crop Parameter for ImageMagick convert
0%
Description
While executing a crop with the ImageMagick convert and the picture is bigger on either width or height but smaller at the other parameter, the convert command is not able to process correctly.
It results in 1 negative and 1 positive Offset for the Crop parameter.
To Solve the Problem you have to make sure both offsets for the Crop Parameter are either positive or negative.
You can achive this by extending the if queries at \t3lib\class.t3lib_stdgraphic.php line 2274-2284 like this:
// Cropscaling: if ($data['crs']) { if (!$data['origW'] || ($data['origW']>$data[0] && $data['origH']<$data[1])) { $data['origW'] = $data[0]; } if (!$data['origH'] || ($data['origW']<$data[0] && $data['origH']>$data[1])) { $data['origH'] = $data[1]; } $offsetX = intval(($data[0] - $data['origW']) * ($data['cropH'] + 100) / 200); $offsetY = intval(($data[1] - $data['origH']) * ($data['cropV'] + 100) / 200); $params .= ' -crop ' . $data['origW'] . 'x' . $data['origH'] . '+' . $offsetX . '+' . $offsetY . ' '; }
Updated by Markus Klein almost 13 years ago
Hi Florian!
Thank you for reporting this issue.
In order to manage our code changes we have a review system.
Would you mind pushing your suggestion to this system?
These links describes how to do this:
http://wiki.typo3.org/Git_Gerrit
http://wiki.typo3.org/Contribution_Walkthrough_Tutorials
Thank you.
Updated by Thorsten Kahler almost 13 years ago
- Status changed from New to Accepted
- Target version set to 4.7.0-beta1
- Complexity changed from no-brainer to easy
Image generation is never a no-brainer ;-)
I didn't test it yet but your suggested code change looks reasonable and I'll have a look at it.
Updated by Steffen Gebert almost 13 years ago
- Target version deleted (
4.7.0-beta1)
Updated by Gerrit Code Review over 12 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9143
Updated by Gerrit Code Review over 12 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9143
Updated by Gerrit Code Review over 12 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9143
Updated by Gerrit Code Review over 12 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9143
Updated by Gerrit Code Review about 12 years ago
Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9143
Updated by Gerrit Code Review over 11 years ago
Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/9143
Updated by Gerrit Code Review over 11 years ago
Patch set 7 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/9143
Updated by Gerrit Code Review almost 10 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/9143
Updated by Markus Klein over 9 years ago
- Status changed from Under Review to Needs Feedback
- Is Regression set to No
Please post clear instructions on how to reproduce this error. TypoScript code + test-image
Thanks.
Updated by Alexander Opitz over 9 years ago
- Status changed from Needs Feedback to Closed
No feedback within the last 90 days => closing this issue.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.
BTW: Patch was abandoned.