Page 1 of 1

Help with imagecreatefrompng

Posted: Fri Aug 09, 2002 1:24 pm
by jrp
I am trying to learn php. Was doing just find until I tried to use imagecreatefrompng.

Specs: Running on W2K with 256k memory. Apache/PHP/mySQL
Code:
$fontfile="http://nest/public/kazaam/Arial.ttf";

do
{
$font_size--;
$bbox=imagettfbbox ($font_size, 0, $fontfile, $button_text);

I get the following error on the last line of code.

Warning: Could not find/open font in c:\phpdev\www\public\kazaam\make_button.php on line 32

Posted: Sat Aug 10, 2002 5:03 am
by twigletmac
Try changing

Code: Select all

$fontfile = 'http://nest/public/kazaam/Arial.ttf';
to

Code: Select all

$fontfile = 'Arial.ttf';
and make sure you have got a copy of Arial.ttf in your kazaam folder.

Mac

Made the change you suggested; with the same results.

Posted: Sat Aug 10, 2002 8:36 am
by jrp
:( change make. line now reads

$fontfile = "arial.ttf";

Still get the same results[/url]

Posted: Sat Aug 10, 2002 9:26 am
by twigletmac
Is Arial.ttf in the kazaam folder?

Mac

Posted: Sat Aug 10, 2002 9:57 am
by jrp
Yes. I have even tried moving it to another subdirectory, name fonts.

I have tried every combination I can think of. Even looked at some "Classes" to see if I had missed something. As a Newbie I can't say this is the first instruction I have had problems with, however it is the first that for the life of me, I can't make work.