Project

General

Profile

Actions

Feature #41347

closed

ImageViewHelper: more flexible arguments

Added by Thomas Luzat about 12 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2012-09-25
Due date:
% Done:

0%

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

Description

Many features of getImgResource are currently not available through the view helper. It is unlikely that all functionality can easily be offered. I propose to at least allow passing arbitrary arguments as done with the attached patch. Usage example which converts an image to grayscale and adjusts its brightness:

<f:image src="{image}" alt="" params="{ params: '-level 0%,100%,5.0 -colorspace Gray' }" />

One may consider limiting the implementation to only allow passing ImageMagick params, which would be fine for my use case and would lead to:

<f:image src="{image}" alt="" params="-level 0%,100%,5.0 -colorspace Gray" />

This would obviously disallow passing other additional arguments to getImgResource.


Files

ImageViewHelper.php.patch (1.1 KB) ImageViewHelper.php.patch ImageViewHelper patch Thomas Luzat, 2012-09-25 12:56
Actions

Also available in: Atom PDF