Bug #65378
closedScaling/cropping images in GIFBUILDER does not work
100%
Description
I am using following TypoScript to center an image on a specified rectangle.
This will not work after updating to 6.2.10
lib.prodImage = COA lib.prodImage { 10 = IMAGE 10 { file = GIFBUILDER file { format = jpg workArea = 0,0,200,200 XY = 200,200 backColor = #ffffff quality = 95 10 = IMAGE 10 { file.import.current = 1 file.maxH = 200 file.maxW = 200 align = c,c } } } }
Files
Updated by Geddo no-lastname-given over 9 years ago
same here. I'm using gifbuilder to scale images + watermarks etc. Everything was fine in 6.2.9 and is now messed up in 6.2.10
Here is a test-snippet
page = PAGE page { config { no_cache = 1 } 10 = IMAGE 10 { file = GIFBUILDER file { format = jpg quality = 90 XY = 500,500 10 = IMAGE 10 { file = fileadmin/template/img/test.jpg file.width = 500c # HAS NO EFFECT in 6.2.10! file.height= 500c # HAS NO EFFECT in 6.2.10! } } } }
OK folks so here is the deal: https://review.typo3.org/#/c/36180/3/typo3/sysext/frontend/Classes/Imaging/GifBuilder.php
$fileInfo3 gets the correctly scaled, processed image while $fileInfo['originalFile']->getForLocalProcessing(FALSE) delivers the original, unscaled image.
So I don't know why this condition was implemented but at least it should rescale the originalFile like the one in $fileInfo3
Updated by Claus Harup over 9 years ago
I have the same problem with any GIFBUILDER configuration after upgrading to 6.2.10 :-|
Updated by Claus Harup over 9 years ago
- File screen.jpg screen.jpg added
Attachment to previous bug....
Updated by Philipp Müller over 9 years ago
Since TYPO3 6.2.10 I've the same problem like Geddo with GIFBUILDER. The problem occurs with width= and height=, too.
I work with:- GraphicsMagick 1.3.18 2013-03-10 Q8
- PHP 5.5.9
- Ubuntu 14.04.2 LTS.
Updated by Gerrit Code Review over 9 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 http://review.typo3.org/37483
Updated by Adrian no-lastname-given over 9 years ago
Same here. After upgrading TYPO3 from version 6.2.9 to 6.2.10 the scaling images using GIFBUILDER didn't work. When I'm testing image processing in Instal Tool everything looks ok, byt when I want to change img using GIFBUILDER scaling img didn't work. I'm using GIFBUILDER to adding watermark to yag gallery.
Updated by Gerrit Code Review over 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37483
Updated by Gerrit Code Review over 9 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37483
Updated by Gerrit Code Review over 9 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37483
Updated by Stephan Großberndt over 9 years ago
- Subject changed from Typo3 6.2.10 Gifbuilder to Scaling/cropping images in GIFBUILDER does not work
- Target version set to next-patchlevel
- Complexity set to medium
- Is Regression changed from No to Yes
This is a regression in TYPO3 CMS 6.2.10 caused by https://review.typo3.org/#/c/36180
Updated by Gerrit Code Review over 9 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37483
Updated by Stephan grass over 9 years ago
Under php 5.4.34 GifBuilder.php will cause the error:
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /Users/stephangrass/Documents/_Webs_/MR-Chemie/typo3/typo3_src-6.2.10/typo3/sysext/frontend/Classes/Imaging/GifBuilder.php on line 141
Updated by Christian Kuhn over 9 years ago
@Stephan: I can not confirm your "fatal" report (our test environment would also have found that in travis-ci for php 5.4 on 6.2.10)
Updated by Gerrit Code Review over 9 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37533
Updated by Torben Hansen over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset ef5f6cc8ee556c66caf8787635ef049a68e88006.
Updated by Ralph Brugger over 9 years ago
Under php 5.4.34 GifBuilder.php will cause the error:
Same for me wihtin
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /Users/stephangrass/Documents/_Webs_/MR-Chemie/typo3/typo3_src-6.2.10/typo3/sysext/frontend/Classes/Imaging/GifBuilder.php on line 141
This worked for me: 4 or 5 times in this file:
... GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
Updated by Christoph Lehmann over 9 years ago
The applied changeset breaks PHP 5.3.10 too