Login / Status
developer.Resource
Home . Documentation . Document Library
Sponsors
hosted by punkt.deTYPO3 and Open Source Magazine

5.2. imgResource:

imgResource is properties that is used with the data type imgResource.

Example:

This scales the image toplogo.gif to the width of 200 pixels

file = toplogo.gif
file.width = 200

Property:

Data type:

Description:

Default:

ext

imageExtension /

stdWrap

web

width

pixels / stdWrap

If both the width and heigth is set and one of the numbers has an "m" after it, the proportions will be preserved and thus width/height will work as max-dimensions for the image.

height

pixels / stdWrap

params

ImageMagick command-line:

fx. "-rotate 90" or "-negate"

sample

boolean

If set, -sample is used to scale images instead of -geometry. Sample does not use antialiasing and is therefore much faster.

alternativeTempPath

string

Enter an alternative path to use for temp images. Must be found in the list in TYPO3_CONF_VARS[FE][allowedTempPaths]

frame

int

Chooses which frame in an gif-animation or pdf-file.

"" = first frame (zero)

import

path / stdWrap

value should be set to the path of the file

with stdWrap you get the filename from the data-array

Example:

This returns the first image in the field "image" from the data-array:

.import = uploads/pics/

.import.field = image

.import.listNum = 0

maxW

pixels / stdWrap

Max width

maxH

pixels / stdWrap

Max height

minW

pixels

Min width (overrules maxW/maxH)

minH

pixels

Min height (overrules maxW/maxH)

Masking:

(Black hides, white shows)

   

m.mask

imgResource

The mask by which the image is masked onto "m.bgImg". Both "m.mask" and "m.bgImg" is scaled to fit the size of the imgResource image!

NOTE: Both "m.mask" and "m.bgImg" must be valid images.

m.bgImg

imgResource

NOTE: Both "m.mask" and "m.bgImg" must be valid images.

m.bottomImg

imgResource

An image masked by "m.bottomImg_mask" onto "m.bgImg" before the imgResources is masked by "m.mask".

Both "m.bottomImg" and "m.bottomImg_mask" is scaled to fit the size of the imgResource image!

This is most often used to create an underlay for the imgResource.

NOTE: Both "m.bottomImg" and "m.bottomImg_mask" must be valid images.

m.bottomImg_mask

imgResource

(optional)

NOTE: Both "m.bottomImg" and "m.bottomImg_mask" must be valid images.

[tsref:->imgResource]