[TYPO3-english] Image Effects - How to add / modify existing entries
Denyer Ec
denyerec at gmail.com
Sat Jan 16 18:34:17 CET 2010
SOLVED!
Many thanks for Phil1 and Atmos4 from IRC.
Solution:
First create a custom frame, by adding the following to the pageTS on
the root page:
TCEFORM.tt_content.section_frame {
addItems.110 = Watermark Image
}
Then add this to the main template TS:
tt_content.image.20.1.file >
tt_content.image.20.1.file = GIFBUILDER
tt_content.image.20.1.file {
format = jpg
XY = [10.w],[10.h]
10 = IMAGE
10 {
file.import.current = 1
file.width.field = imagewidth
file.maxW = {$styles.content.imgtext.maxW}
file.maxW.override.data = register:maxImageWidth
file.maxWInText = {$styles.content.imgtext.maxWInText}
file.maxWInText.override.data = register:maxImageWidthInText
}
20 = IMAGE
20 {
offset = [10.w]-[20.w]-10,[10.h]-[20.h]-10
file = fileadmin/small_watermark.png
file.width = 100
file.height = 75
file.format = png
}
20.if.value = 110
20.if.equals.field = section_frame
}
Note here that 20.if.value = 110 references the ID number given to
the custom frame in the pageTS.
The uploaded PNG was a 32-bit png with transparency and the offset
here puts it 10px from the edges in the bottom right of the target
image.
Also note that you must have 24bit PNG support enabled in your install
tool! png_truecolor = 1
Now all an editor must do to watermark an image is set the "frame" on
the image content element to the custom one. Maybe this will help
someone else in future, who knows. Many thanks again to those who
helped!
Kind regards,
Denyer
-------
http://gallery.denyerec.co.uk
More information about the TYPO3-english
mailing list