Feature #22133
closedimgResource params stdWrap
0%
Description
It would be nice to have params for imagemagick stdWrapped...
For our customers (editors) we mostly cofigure content images with fixed cropped sizes (done via imagemagick). And with stdWrapped params it is more configurable.
Example:
tt_content.image.20.1.file.params.cObject = CASE tt_content.image.20.1.file.params.cObject { # imagewidth was reconfigured to combobox via TCA key.field = imagewidth # square default = TEXT default.value = -resize x184 -resize "184x<" -resize 50% -gravity center -crop 92x92+0+0 -sharpen 0x0.5 # rectangle 1 = TEXT 1.value = -resize x236 -resize "290x<" -resize 50% -gravity center -crop 145x118+0+0 -sharpen 0x0.5 ... }
Until today we xclassed tslib_content, but this change (I hope) could be added to TYPO3 core.
in sysext/cms/tslib/class.tslib_content.php, in function getImgResource before this line:
if (is_array($maskArray) ...
can be added this:
$fileArray['params'] = $this->stdWrap($fileArray['params'], $fileArray['params.']);
(issue imported from #M13572)
Updated by Jo Hasenau over 13 years ago
- Target version deleted (
0)
Shouldn't this be done with the "official" width and height properties, that can ge values like
width = 300c
height = 150c
for cropping or
width = 300m
height = 150m
for scaling the image to fit a certain area?
Updated by Stano Paska over 13 years ago
Yes, this can be done (our old version of TYPO3 had a bug).
But with imagemagick's params can be done much more effects and it could be nice to have it configurable...
Updated by Benni Mack almost 10 years ago
- Status changed from New to Resolved
it's done like you described! Thanks for the bug report.