Bug #83407
closedCropping gif images results in errornous images
100%
Description
Having a .gif image and trying to crop anywhere else than from (0,0) gives me an errornous image - both in the preview in BE and also when the image is processed in FE :-(
Files
Updated by Frans Saris almost 7 years ago
What's the use-case for such a big gif image? Isn't it an option to go for a JPEG?
Is it a multi frame image?
Do you have the same issue with other gif files?
Updated by Claus Harup almost 7 years ago
Hi Frans
....sure it an option to go with .png or .jpg, but tell that to ALL your clients :-)
Any gif I tried with..... - I have attached 3 images:
xmas.jpg (original)
xmas.png (xmas.jpg saved as .png)
xmas.gif (xmas.jpg saved as .gif)
..... so Im sure that the gif is not an animated gif :-)
I have cropped them all with 16:9 in the middle of the image and still the .gif fails :-(
Greatings Claus
Updated by Frans Saris almost 7 years ago
confirmed, the result is a transparent image with the dimensions of the original with the cropped part.
Updated by Frans Saris almost 7 years ago
Ok, looks like a GM issue:
command when processing gif files:
'/usr/bin/convert' +profile '*' -geometry 2000x1331! -crop 454x375+982+511 '/var/www/master/Web/content/user_upload/xmas.gif[0]' '/var/www/master/Web/typo3temp/assets/images/crop_b7068225b8.gif'
command when processing jpg files:
'/usr/bin/convert' +profile '*' -geometry 1900x1200! -crop 788x731+716+269 '/var/www/master/Web/content/user_upload/8583557560_ea525fcd38_o.jpg[0]' '/var/www/master/Web/typo3temp/assets/images/crop_3454656605.jpg'
Updated by Frans Saris almost 7 years ago
Looks like we need to add some extra processing options for gif files https://stackoverflow.com/a/14036766/2757523
- Animated gifs are often optimised to save space, but imagemagick doesn't seem to consider this when applying the crop command and treats each frame individually.
-coalesce
rebuilds the full frames. - Crop does not remove the canvas that it snipped from the image. Applying
+repage
after the crop will do this.
Updated by Gerrit Code Review almost 7 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55269
Updated by Gerrit Code Review almost 7 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55269
Updated by Gerrit Code Review over 6 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55980
Updated by Frans Saris over 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 17c4580cec21a9dca51566cdfd153fecc214c55d.