imagecreate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am trying to replace the images in a page with this code

 <?
          $im = imagecreatetruecolor(400, 30);
          $ross = imagecolorallocate($im, 203, 116, 0);
     $font = 'simran__.ttf';

           $text = 'chicken pakora';
           imagettftext($im, 20, 0, 10, 20, $ross, $font, $text);
             imagepng($im);
               imagedestroy($im);
               ?>


This is fine here...
http://www.ecurry.net/example1.php
http://www.ecurry.net/example2.php

but when I try and embed in inside a html page I get a garbled mess

http://www.ecurry.net/menu6.php
http://www.ecurry.net/menu6.phps


I know this has something to so with the header but cannnot work it out!

I tried

header("Content-type: image/png");

before the output but I get a garbled mess and the header error.

R.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux