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
|