[TYPO3-english] Typoscript if => maxW cropped.
Loek Hilgersom
loek at netcoop.nl
Wed Feb 2 23:00:23 CET 2011
Hi,
Certainly possible. Try this:
Remove this part:
10.file.minH = 120
10.file.maxH = 120
10.file.maxW = 180
and replace by:
10.file.height = 120
10.file.width = 180c
If the result is not exactly what you want (portrait orientation may come out
different from what you want), then you could do a 2 step resize:
first create an IMAGE object which resizes to height = 120,
then feed that into a new object that crops width at 180.
See tsref for these c and m options for height and width.
Hth.
Loek
On 02/02/2011 12:25 PM, Koen Van Nuffelen wrote:
>
> Hi,
>
> I'm searching for the following solution in Typoscript:
>
> I can set the minW & maxW and maxH for an image, which is fairly easy:
>
> 10 = IMAGE
> 10.file.import = uploads/tx_templavoila/
> 10.file.import.current = 1
> 10.file.import.listNum = 0
> 10.file.minH = 120
> 10.file.maxH = 120
> 10.file.maxW = 180
>
> The more difficult (if it's even possible with typoscript) part is this:
> After the resize to maxH,
> I want to do a check if the image width is still above 180
> and if yes then crop the width to 180 (180c)
>
> Is this possible in Typoscript and if so, how to solve?
> Any hints or tips?
>
> Kind regards,
> Koen Van Nuffelen
>
More information about the TYPO3-english
mailing list