Re: imagecopyresized just copies

From: Date: Sun, 20 Nov 2005 17:36:53 +0000
Subject: Re: imagecopyresized just copies
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-226160@lists.php.net to get a copy of this message
On Sun, Nov 20, 2005 at 05:14:08PM +0100, Andy Pieters wrote: > Hi all > > I wanted to make a simple script to make a resized image from an uploaded one. > > I used the example found on the php.net website > > ... > {imagecopyresized($thumb,$main,0,0,0,0,$newwidth,$newheight,$width, > $height); > switch($type) > case 2: imagejpeg($main,$thumbname); > ... > When I examine the two files, the are binary different but size and width are > equal. You are re-saving the original file, not the thumb. I think you really wanted: imagejpeg($thumb,$thumbname); btw, it would help to make the code more readable if you removed all those leading tabs when posting it to the list. Curt. -- cat .signature: No such file or directory

« previous php.general (#226160) next »