[TYPO3-dev] Resize image based on its orientation (portrait or landscape)

JoH asenau info at cybercraft.de
Tue Jun 22 17:06:30 CEST 2010


> I want to resize an image via TypoScript (not a common content elemen)
> based on it's orientation. In other words; I want to define a maximum
> width for landscape images and a maximum height for portrait images.
> 
> The problem is, defining the width or height appended with the 'c' or
> 'm' parameter doesn't help, because the image is always resized to
> it's smallest, allowed size.

Shouldn't be like that.

width = 100m
height = 100m

should give you

landscape images with 100px width and less height
portrait images with 100px height and less width

In most cases using a square as a base of calculation should do the job, so using equal values for both width and height should work.

HTH

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com


More information about the TYPO3-dev mailing list