note 61251 added to function.imagecopyresampled
| From: | areddan at silverarm dot ie | Date: | Sun, 29 Jan 2006 14:30:54 +0000 |
| Subject: | note 61251 added to function.imagecopyresampled | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-102668@lists.php.net to get a copy of this message | ||
$file =$_FILES[userfile];
//name of the input form file upload element is userfile
//$to_file is a full path including filename
//to where you want the thumnail to be copied to .
//example /usr/www/users/www/images/thumbs/thumb1.jpg
copy($file[tmp_name],$to_file) or die("The file $file[tmp_name] you are trying to upload
couldn't be copied to $to_file");
//Extra stuff to put into the output to allow for jpeg / png or gif
//replace line: imagegif($thumb2, $fileout); //write to file with the following
switch($format)
{
case 'image/jpeg':
imagejpeg($thumb2, $fileout,90); //write to file
break;
case 'image/gif';
imagegif($thumb2, $fileout); //write to file
break;
case 'image/png':
imagepng($thumb2, $fileout); //write to file
break;
}
----
Server IP: 193.95.141.37
Probable Submitter: 62.77.173.3
----
Manual Page -- http://www.php.net/manual/en/function.imagecopyresampled.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+61251
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61251&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61251&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61251&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61251&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61251&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61251&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61251&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+61251&report=yes
Search -- http://master.php.net/manage/user-notes.php