Last post Jul 27, 2010 10:20 PM by mvark
Jul 27, 2010 04:03 PM|suggy1982|LINK
I have an image and I want to add to /annotate the image with some text values which I am pulling from a db.
I haven't used the Drawing class before and wondered if anyone could give me some advice/guidance on doing this.
I already have the base image saved in my images folder as a jpeg and once I have added the text I have to display the image on screen, but do not want to overwrite the original image.
Jul 27, 2010 05:15 PM|AceCorban|LINK
Do you mean you want to have the text be a part of the image itself? If so, look into watermarking:
There is some discussion in that article about placing text on an image. In order to not alter your original image, you would have to maintain two copies of each image.
Otherwise, you can also work some css magic to place text above, below or even over an image. It all depends on where exactly you want the text.
Jul 27, 2010 10:20 PM|mvark|LINK
If you want to overlay text over another image in a web page, the trick is to use the position and z-index CSS attributes with a DIV tag to create a "layer" for each entity and then position the layers as required - http://www.developertutorials.com/tutorials/css/css-position-text-images-050629/page1.html
To programmatically add text to an image, check this code snippet -