Use the following snippet to convert any jpeg image into the equivalent image in ASCII format. It works by loading an image using the PHP GD2 library function ImageCreateFromJpeg() and then figures out the height and width of it. It then uses these values to loop through every pixel in the image and figures out the colour of that pixel. It uses this value to create a <span> element that uses the text colour of a # to change the colour of the text.
Hiding your email address in an image is the best way of encrypting your email, but if your server doesn't support the GD2 library, or if you don't want to use it, then you might want to look at a different way of doing this.
Providing a text box for users to type information in is very common, but usually people want to include line breaks and links with the text and they expect the site to lay it out just as they had intended it. The following function will turn any ASCII text string into the approximate HTML equivalent.