[TYPO3-english] grayscale images (with colored mask) )for tt_content

Thomas Hirt info at thomas-hirt.at
Sun Feb 22 21:18:18 CET 2009


Hi Xavier,
thanks for this snippet, it did the job!
I just had to change very little from your code.

Here my result for anyone who is interested:

tt_content.image.20.1.file >
tt_content.image.20.1.file = GIFBUILDER
tt_content.image.20.1.file {
   	XY = [10.w],[10.h]
   	10 = IMAGE
   	10.file.import.current = 1
   	10.file.width.field = imagewidth
  	
  	20 = EFFECT
	20.value = gray | gamma=2.0
	
	30 = IMAGE
   	30.offset = 0,0
   	
	# this is just a blue png (600 x 600 Pixels wide)
	30.file = {$path}bilder/overlay.png
  	
	# this is the mask,
	#the darker it is the less blue will be in the image (600 x 600 Pixels wide)
	30.mask = {$path}bilder/mask.png
}

tt_content.image.20.1.imageLinkWrap = 1
tt_content.image.20.1.imageLinkWrap {
	enable = 1
	typolink.parameter.cObject = IMG_RESOURCE
	typolink.parameter.cObject.file {
		import.current = 1
		maxW = 880
		maxH = 580
	}
     typolink.ATagParams = rel="lightbox"
}

Would have been great to add a new effect to the content element; something like "colored grayscale".
So the backend user can chose freely the effect.
Really don't know how I could achieve that.

Greetings,
Thomas



Xavier Perseguers schrieb:
> Hi,
> 
> Tomas Mrozek wrote:
>>> I think the GIFBUILDER Object ist not working together with IMGTEXT
>>> Object.
>>
>> The "click enlarge" functionality is achieved though "imageLinkWrap" 
>> property of the IMAGE object and as the reference says "ONLY active if 
>> linkWrap is NOT set and file is NOT GIFBUILDER (as it works with the 
>> original imagefile)" [1], it won't work when you set .file to GIFBUILDER.
> 
> Here is a code I used once to get a "click-enlarge" effect with lightbox 
> in TemplaVoila context, while using a GIFBUILDER. You will have to 
> change TS but perhaps you'll get an idea on how to achieve your goal.
> 
> HTH
> 
> <TypoScript>
>                     <![CDATA[
>     10 = IMAGE
>     10.file = GIFBUILDER
>     10.file {
>         XY = 144,[10.h]
>         10 = IMAGE
>         10.file {
>             import = uploads/tx_templavoila/
>             import.current = 1
>             import.listNum = 0
>             maxW = 144
>             maxH = 220
>         }
>        
>         20 = IMAGE
>         20 {
>             file = fileadmin/templates/my_design/images/image_zoom.gif
>             offset = [10.w]-[20.w],[10.h]-[20.h]
>         }
>     }
>     
>     10.imageLinkWrap = 1
>     10.imageLinkWrap {
>         enable = 1
>         typolink.parameter.cObject = IMG_RESOURCE
>         typolink.parameter.cObject.file {
>             import = uploads/tx_templavoila/
>             import.current = 1
>             import.listNum = 0
>             maxW = 800
>             maxH = 600
>         }
>         typolink.ATagParams = rel="lightbox"
>     }
>                     ]]>
>                     </TypoScript>
> 


More information about the TYPO3-english mailing list