RE: [PHP] imagecreatefromstring

2005-08-22 Thread Jay Blanchard
[snip]
This is my script

header(Content-type: image/png);
$string = 'hello';
$im= imagecreatefrompng(images/button1.png);
$orange = imagecolorallocate($im, 220, 210, 60);
$px= (imagesx($im) - 7.5 * strlen($string)) / 2;
imagestring($im, 3, $px, 9, $string, $orange);
imagepng($im);
imagedestroy($im);
[/snip]

try placing the full path to button1.png in the arguement for the
function

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



[PHP] imagecreatefromstring

2005-08-22 Thread Ross
Hi,

i am trying this out of curiosity and get sme errors

My gd extension is set up in the correct folder.

This is my script

header(Content-type: image/png);
$string = 'hello';
$im= imagecreatefrompng(images/button1.png);
$orange = imagecolorallocate($im, 220, 210, 60);
$px= (imagesx($im) - 7.5 * strlen($string)) / 2;
imagestring($im, 3, $px, 9, $string, $orange);
imagepng($im);
imagedestroy($im);


Warning: imagecreatefrompng(images/button1.png) 
[function.imagecreatefrompng]: failed to open stream: No such file or 
directory in c:\Inetpub\wwwroot\blue-fly\contact.php on line 7

Warning: imagecolorallocate(): supplied argument is not a valid Image 
resource in c:\Inetpub\wwwroot\blue-fly\contact.php on line 8

Warning: imagesx(): supplied argument is not a valid Image resource in 
c:\Inetpub\wwwroot\blue-fly\contact.php on line 9

Warning: imagestring(): supplied argument is not a valid Image resource in 
c:\Inetpub\wwwroot\blue-fly\contact.php on line 10

Warning: imagepng(): supplied argument is not a valid Image resource in 
c:\Inetpub\wwwroot\blue-fly\contact.php on line 11

Warning: imagedestroy(): supplied argument is not a valid Image resource in 
c:\Inetpub\wwwroot\blue-fly\contact.php on line 12 

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



[PHP] imagecreatefromstring

2002-10-01 Thread Todd Pasley

Hi,


I asked a question similar to this earlier, but I thought it may have
required simplification/rewording. According to the doco,
imagecreatefromstring has the following declaration:

resource imagecreatefromstring ( string image)

Does anyone know how an image can be transformed into a string that will be
in a valid format for use with imagecreatefromstring.

Any help at all would be greatly appreciated.

Cheers,

Todd.


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