Watermark images

Author Message

Tuesday 26 April 2005 6:07:59 am

Hi,

I would like to watermark all my images when they are presented with the view=imagelarge view. How do I accomplish this ?

Jan Borsodi

Thursday 28 April 2005 2:16:55 am

You will need to use the <i>image</i>, <i>imagefile</i> and <i>texttoimage</i> template operators.
Basically you will need to layer the original (or scaled) image with a transparent text on top of it.

Here's an example from the new documentation, you will need to get the path to the image and pass it to the <i>imagefile</i> operator.

{image( "It's A Kind Of Magic",
        imagefile( 'design/example/images/test1.png' ),
        array( "It's A Kind Of Magic"|texttoimage( 'smartie' ),
               hash( 'transparency', 0.64,
                     'halign',       'right',
                     'valign',       'top' ) ) )}

This example will generate an image with 64% transparent text using the "smartie" style. The text will be aligned to the upper right corner of the "example1.png" image. The alternative image text will be "It's A Kind Of Magic" - which is the same as the merged in transparent text.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 21:31:09
Script start
Timing: Jan 30 2025 21:31:09
Module start 'layout'
Timing: Jan 30 2025 21:31:09
Module start 'content'
Timing: Jan 30 2025 21:31:09
Module end 'content'
Timing: Jan 30 2025 21:31:09
Script end

Main resources:

Total runtime0.0222 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 588.0313151.1953
Module start 'layout' 0.00490.0029 739.2266220.6563
Module start 'content' 0.00780.0128 959.8828997.8984
Module end 'content' 0.02060.0015 1,957.781329.9922
Script end 0.0222  1,987.7734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002711.9859140.0002
Check MTime0.00114.9235140.0001
Mysql Total
Database connection0.00072.979010.0007
Mysqli_queries0.00188.182930.0006
Looping result0.00000.040810.0000
Template Total0.00125.210.0012
Template load0.00093.901910.0009
Template processing0.00031.283810.0003
Override
Cache load0.00062.757710.0006
General
dbfile0.00073.207980.0001
String conversion0.00000.022640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs