Anyone successfully overlay text on an image?

Author Message

Mark Marsiglio

Tuesday 28 September 2004 12:45:35 pm

I have tried to take text from a text line in my class and overlay it over an image from the same class with quite unreliable and varied results.

The goal is to have white text over the image background. So far I have been able to achieve:
-a solid white box approximately the size of the text
-text that is a dark semi-transparent color
-text knocked out of a white background with some transparency (but not able to control it)
-a background image whose colors are completely distorted (looks like it was converted to a 4 color image)

I have tried the following as source images:
-PNG-8
-PNG-24
-JPG
-GIF

JPG is the worst offender, as the colors are always way off. I was hoping to allow my content managers to upload any file within reason and have it automatically add the text, resize it, and place it on the page for them.

I have tried this code:

{image("hometest16",imagefile('var/cache/texttoimage/testing.png'),
array(" Activities"|texttoimage(top),
hash(transparency,0,halign,left,valign,top)))}

Where the source image is testing.png, the text we want to add is "Activities" and the texttoimage(top) style is set to white text, no background color. This results in the white box (white text on a white background added on top of the image).

From the docs this seems possible, but if someone can help with a code sample that works it would be great (or any troubleshooting ideas).

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Björn Dieding@xrow.de

Tuesday 28 September 2004 3:30:01 pm

please try the 3.5 kernel...

I did some improvements on the image resource handling there.

Please also confirm that setup GD/GD2.

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Mark Marsiglio

Tuesday 28 September 2004 5:14:26 pm

I just installed 3.5 from the CVS last night. I will give it a shot - thanks.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

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