Wrox Programmer Forums
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 23rd, 2004, 09:38 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default About GD

Hi
i have question

Apache 1.3 3.1
php 4.3.4-win32
mysql
windows Xp Home Edition

I install those and and all work good:)

I want to make GD works in php
As we know in new php zip package, we do not have php_gd.dll, instead of that we have php_gd2.dll
Here is what i did:
i went to php.ini in my dir c:\windows\php.ini (and also I copy and paste the all folder from C:\php\dlls to system.
and i omit the ; on ;extension php_gd2.dll:
    that means i change this ;extension php_gd2.dll to this extention php_gd.dll
and the extention_dir c:\php\extensions
I made the code like

<?php
header ("Content-type: image/png");
header ("Content-type: image/jpeg");
?>
<html>
<body>
<?php
$image = imagecreate(200, 200);
$white = imagecolorallocate($image, 255, 255, 255);
$black = imagecolorallocate($image, 0, 0, 0);

imagefilledrectangle($image, 10, 10, 190, 190, $black);
     for ($i=1; $i<=5; $i++)
          imagestring($image, $i, 15, $i*10, 'Font-Test', $black);
imagepng($image);
imagejpeg($image);

imagedestroy($image);
?>
</body>
</html>
and I save it as image.php
when i run it all i got was something realy crazy. i was some type of font that i cannot even read them like %^&$#$%^&DYSWR#$5fg#$%
PLEASE HELP ME:(

 
Old August 25th, 2004, 03:50 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Read my reply at this thread:
http://p2p.wrox.com/topic.asp?TOPIC_ID=18043

HTH!

Regards,
Rich

--
[http://www.smilingsouls.net]
[http://pear.php.net/Mail_IMAP] A PHP/C-Client/PEAR solution for webmail
 
Old August 26th, 2004, 08:38 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Thanks
You guys are the best
thanks:)

Best Regards
Mani_he
Thanks:)






Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP with GD anyone? cutesneakers PHP How-To 0 January 15th, 2005 12:24 AM
thumbnails without gd library? cutesneakers PHP How-To 1 January 14th, 2005 05:34 AM
Install GD on Windows rezagholi PHP How-To 3 August 25th, 2004 03:40 AM
Image quality in GD Library ss2003 Beginning PHP 1 February 14th, 2004 06:08 PM
GD Library hosefo81 Beginning PHP 2 October 22nd, 2003 08:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.