I'm getting a fatal error on the following script using MS Win 98 / Apache Server / PHP 4.1.1. / php_gd.dll
Fatal error: imagecreatetruecolor(): requires GD 2.0 or later in c:\apache\htdocs\testphoto.php on line 6 Is there a workaround to this function so that I can crop part of the source .jpeg? Thank you. Tony Ritter ....................................... <? function im_crop($cropX,$cropY,$cropH,$cropW,$source,$destination,$type='jpeg') { // source image $sim = ImageCreateFromJPEG($source); // create the destination image $dim = imagecreatetruecolor($cropW, $cropH); // pass trought pixles of source image for ( $i=$cropY; $i<($cropY+$cropH); $i++ ) { for ( $j=$cropX; $j<($cropX+$cropW); $j++ ) { $pixel = imagecolorat($sim, $j, $i); imagesetpixel($dim, $j-$cropX, $i-$cropY, $pixel); } } imagedestroy($sim); ImageJPEG($dim, $destination); imagedestroy($dim); } // example im_crop(0,0,75,75,'1_data.jpeg','2_data.jpeg','jpeg'); ?> ................................ Fatal error: imagecreatetruecolor(): requires GD 2.0 or later in c:\apache\htdocs\testphoto.php on line 6 --- [This E-mail scanned for viruses by gonefishingguideservice.com] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php