imagePNG() !!!

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I would like to write text in an existing image png. Like
making a menu but in several languages.

When I create a page with only the code below, it goes well. The text
fits well in each 4 button which I make then reactive.

On the other hand when I put this code in a cell of a table, it is the
dump image which goes up.

Somebody could it help me. Thank you very much by advance.

Here is the code:

    header("Content-type: image/png");
    $im = imagecreatefrompng("images/4button.png");
    $color = imagecolorallocate($im, 0, 0, 153);
    $px = (imagesx($im)-7.5*strlen($string))/2;

    $string="Piano Globale";
    $px = (imagesx($im)-7.5*strlen($string))/2;

    $px = (imagesx($im)-7.5*strlen($string))/2;

    $px = (imagesx($im)-7.5*strlen($string))/2;

Re: imagePNG() !!!

"dagor" <> wrote:

Quoted text here. Click to load it


So the above script is used as an image, right?
Like this:
<img src="getmyimage.php" width=200 height=50>

Often images are cached by the visitors browser.
So once your browser thinks it has the image delivered by getmyimage.php, it  
will pull that one out of it's cache. You do not want that.

Maybe that is happening to you.
An easy way to circumvent that is adding some bogusdata, like this:
<img src="getmyimage.php?bla=<?php echo time(); ?>" width=200 height=50>

Maybe that helps.

Erwin Moller

Re: imagePNG() !!!


Veiled, I have a site which I must translate into several
languages. The menus are made with Web-optimizing of Ulead. But, when
the name is long, that is not too beautiful This is why I would like
to have an image of 3 or 4 or 5 buttons and to be able to write with
stolen text in each button

see at (in construction !!!)  the menu on the left of  
each language

Thank you very much

"Erwin Moller"  
Quoted text here. Click to load it

Site Timeline