I am trying to add a background color to text that I have added to an image.
When just adding a background color to an image that just contains text it works as described in the manual. But when I try to add a background color to text on my image nothing happens.
When you place text on a solid background color, the text edges are anti-aliased against that solid background to create nice smooth text. If you add the &transparent=true option (and are using a format of gif or png that supports transparency) you'll see the background color disappear to be transparent, and the text will remain with a slight 'halo' around it which is the antialiasing to blend in with the background color. That way you could place the text on top of other parts of your site (a background image for your navigation bar, for instance).
When you put text on top of an image, though, the background color is still used for antialiasing the edges of the text, but... the solid background is always made transparent so you can see the image below it. Otherwise you would never be able to put text on top of an image and still see the image.
If you want a block of text with a solid background color on top of an image I'd recommend you a text-only image and set it on top of the image (which might also be resized with ImageGen) using z-ordering in your css.
Background color for text on an image
I am trying to add a background color to text that I have added to an image.
When just adding a background color to an image that just contains text it works as described in the manual. But when I try to add a background color to text on my image nothing happens.
At this moment I use the following url:
http://localhost/imageGen.ashx?image=/media/16782/dina.png&class=myBanner&text=<bannerheader>My header</bannerheader><br/><bannerbody>my body</bannerbody>
I use the following classes in the ImageGen.config
Any help is welcome.
When you place text on a solid background color, the text edges are anti-aliased against that solid background to create nice smooth text. If you add the &transparent=true option (and are using a format of gif or png that supports transparency) you'll see the background color disappear to be transparent, and the text will remain with a slight 'halo' around it which is the antialiasing to blend in with the background color. That way you could place the text on top of other parts of your site (a background image for your navigation bar, for instance).
When you put text on top of an image, though, the background color is still used for antialiasing the edges of the text, but... the solid background is always made transparent so you can see the image below it. Otherwise you would never be able to put text on top of an image and still see the image.
If you want a block of text with a solid background color on top of an image I'd recommend you a text-only image and set it on top of the image (which might also be resized with ImageGen) using z-ordering in your css.
cheers,
doug.
is working on a reply...