Solved

imagecolorallocate imagestring

Posted on 2008-06-24
2
285 Views
Last Modified: 2008-06-24
Hello,

I like to make the background transparent and the font color white.
some help is needed please:


$image = imagecreate(60, 17);

$white = imagecolorallocate($image, 255, 255, 255);

$black = imagecolorallocate($image,   0,   0,   0);

imagestring ($image, 3, 0, 4, $t_num, $black);

imagepng    ($image);

imagedestroy($image);

Open in new window

0
Comment
Question by:Milcoi
2 Comments
 

Author Comment

by:Milcoi
ID: 21854334
can I just add??:
ImageColorTransparent($Image, $back);
0
 
LVL 20

Accepted Solution

by:
virmaior earned 50 total points
ID: 21855829
yes but in all lower case and $black instead of $back (http://us2.php.net/manual/en/function.imagecolortransparent.php)

and when you do that anything which was black will be transparent...

transparency makes that color a signal in the image rather than setting the color to transparent for future painting.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now