Re: Image Question

From: Date: Mon, 08 Apr 2002 23:14:32 +0000
Subject: Re: Image Question
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-92146@lists.php.net to get a copy of this message
At 5:56 PM -0500 8/4/02, Jay Paulson wrote: >Well my host had GD "2.0 or higher" installed. Wonder if there is something >I need to ask my host about the package they have installed? You do create a new image with "ImageCreateTrueColor" don't you? This works for me: $tmp_img = ImageCreateTrueColor($sxd, $syd); ImageInterlace($tmp_img, 1); ImageCopyResized( $tmp_img, $src_img, 0, 0, $sx1, $sy1, $sxd, $syd, $sxd, $syd); ImageCopyResampled($dst_img, $tmp_img, 0, 0, 0, 0, $dx, $dy, $sxd, $syd); $tmpfname = tempnam("/tmp", "MyJPG"); imagejpeg($dst_img, $tmpfname, $jpeg_quality); imagedestroy($src_img); imagedestroy($dst_img); ## Read the image back in $fd = fopen($tmpfname, "r"); $photo = fread($fd, filesize($tmpfname)); fclose($fd); unlink ($tmpfname); ...R.

« previous php.general (#92146) next »