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 #1

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?

Actions #2

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...

Actions #3

Updated by Thorsten Kahler over 13 years ago

  • TYPO3 Version set to 4.7
Actions #4

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.

Actions #5

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF