[Typo3] dynamic image creation via typoscript within TV
Esan
magic at senvita.de
Wed Aug 17 16:58:45 CEST 2005
Hello Folks
I've got a littele problem with conditions in TV using GIFBUILDER.
My code looks like this:
<TypoScript>
<![CDATA[
temp = IMAGE
temp.file.import = uploads/tx_templavoila/
temp.file.import.current = 1
temp.file.import.listNum = 0
10 = CASE
10.key = 1
10.if.value < temp.w //************* HERE'S THE PROBLEM!!! *********//
10.if.isGreaterThan = 187
10.default = IMAGE
10.default.file.import = uploads/tx_templavoila/
10.default.file.import.current = 1
10.default.file.import.listNum = 0
10.1 = IMAGE
10.1.file.import = uploads/tx_templavoila/
10.1.file.import.current = 1
10.1.file.import.listNum = 0
10.1.file = GIFBUILDER
10.1.file {
10 = IMAGE
10.file.import = uploads/tx_templavoila/
10.file.import.current = 1
10.file.import.listNum = 0
10.file.maxW = 600
10.file.maxH = 600
XY = [10.w],[10.h]
11 = SCALE
11.params = -scale 187
}
// temp delete
temp >
]]>
</TypoScript>
What this code should do is:
-- reading an image path via Templavoila (works)
-- scaling the image proportional to a maximum width of 187 (works)
-- only do the scaling via GIFBUILDER if the width of the original image is greater than 187,
otherwise using the original image, which may not be put through GIFBUILDER (because then
for instance animated gifs are destroyed)
So what I need is a conditon based on the size of the uploaded image, that tells either GIFBUILDER to scale the image and otherwise leave the image as is.
Any suggestions?
- Esan (esanakoko)
-----------------------
The mailing list archive is found here:
http://typo3.org/documentation/mailing-lists/english-main-list-archive/
More information about the TYPO3-english
mailing list