Mogrify - Image wont save...?

K

Kriekie

Guest
Hi

I have the following code, but cant get the file to save to the server path:

Code:
foreach ($_FILES["myfile"]["error"] as $key => $error) {
   if ($error == UPLOAD_ERR_OK) {
       $tmp_name = $_FILES["myfile"]["tmp_name"][$key];
       $name = $_FILES["myfile"]["name"][$key];
	   $size = getimagesize ($tmp_name);
       $path= "/temp";

       if (($size[0] >= 300) or $size[1] >= 200) {
       $ratio = $size[0] / 300;
       $newx = 300;
       $newy = $size[1] / $ratio;
       $mogrify="/usr/bin/mogrify";
       $size = $newx."x".$newy;
       $result="$mogrify -size $size $path/$name -resize $size +profile \"*\"";
       exec($result);
	   }
	   }
	   }

What am I doing wrong?

Thnx!
 
Back
Top