Image filter on TextToImage-generated images

Image filter on TextToImage-generated images

Tuesday 06 November 2007 6:53:06 am - 3 replies

Modified on Tuesday 06 November 2007 7:20:08 am by Gunnar Birkeland

Author Message

Felix Laate

Tuesday 06 November 2007 2:06:40 pm

HI Gunnar,

did you have a look at <i>/PATH/TO/ezpublish/settings/texttoimage.ini</i>?

I seems that the image is stored once in a given size. If you need more versions you could make your own textToImage operator where you add code to store versions of the image.

Cheers

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Gunnar Birkeland

Wednesday 07 November 2007 12:18:35 am

Hi:)

I was, as allways, hoping to avoid any customizing here. Seems this may be the only option available or not?

attribute(show) on the new object gives me the following.

filepath string 'var/cache/texttoimage/imagetext/7/c/f/7cf88a5bc61094113c35b80a3472b70a' 
filename string '26.png' 
width integer 195 
height integer 170 
alternative_text string 26 
imagepath string 'var/cache/texttoimage/imagetext/7/c/f/7cf88a5bc61094113c35b80a3472b70a/26.png'
has_size boolean true 

Does anyone know if its possible to put an imagemagick filter on this image with the information provided by its attributes?

</major>
----------------------------
ez-version: 3.9.3.
PHP: 4.4.2-1
MYSQL: 4.0.24

Gunnar Birkeland

Thursday 08 November 2007 12:43:35 am

[SOLVED]

In short i wanted to create google_maps pins in .png format dynamically. So on my way there i stumbled upon an example, http://issues.ez.no/IssueView.php?Id=1689&activeItem=7, in our issue tracker</a> which led me in the right direction.

Anyway, in case someone wonders, heres my code for it.

{def $my_gmap_png_filepath= image( 'my_new_image', imagefile( 'path_to_the_background_image' ),       		array( 'text_layer_on_my_new_image'|texttoimage( 'my_custom_texttoimage_font' ),
                hash( 'halign', 'center',
                'valign', 'middle',
                'y', 6,
                'x', 1 ) ) ).filepath}

Kaping!

</major>
----------------------------
ez-version: 3.9.3.
PHP: 4.4.2-1
MYSQL: 4.0.24

You must be logged in to post messages in this topic!

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