0

i want to make my image size as my given size when it upload.

my php code

$picture_name =time().'-' .$_FILES["picture"]["name"];
if($c->Insert())
{
move_uploaded_file($_FILES["picture"]["tmp_name"], "Portfolio_Image/" . $picture_name); 
} 

But how can i re-size image at upload time

shanto
  • 115
  • 1
  • 3
  • 11
  • possible duplicate of [PHP upload and resize image](http://stackoverflow.com/questions/2159897/php-upload-and-resize-image) –  Mar 04 '14 at 19:05

1 Answers1

0

Take a look at the PHP GD library. In particular the imagecopyresized function. The example on there is a pretty good one.

BOMEz
  • 1,020
  • 14
  • 34