Project

General

Profile

Actions

Feature #22133

closed

imgResource params stdWrap

Added by Stano Paska almost 15 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-02-18
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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)

Actions

Also available in: Atom PDF