Image failed to resize

See all posts Reply

Image failed to resize new!
by Troy Moseley, 16 years, 4 months ago
I can't seem to get the image to resize. Here's my code:

if ($handle->uploaded) {
  $handle->file_new_name_body   = 'image_resized';
  $handle->image_resize         = true;
  $handle->image_x              = 640;
  $handle->image_ratio_y        = true;
  $handle->Process($image_folder);

  // we check if everything went OK
  if ($handle->processed) {
    // everything was fine !
    echo 'file uploaded with success';
    $info = getimagesize($handle->file_dst_pathname);
    echo '' . $info['mime'] . '  -  ' . $info[0] . ' x ' . $info[1] .'  -  ' . round(filesize($handle->file_dst_pathname)/256)/4 . 'KB';
    echo '  link to the file just uploaded: images/' . $handle->file_dst_name . '';
  } else {
    // one error occured
    echo 'file not uploaded to the wanted location';
    echo '  Error: ' . $handle->error . '';
  }

  // we delete the temporary files
  $handle-> Clean();

} else {
  // if we're here, the upload file failed for some reasons
  // i.e. the server didn't receive the file
  echo 'file not uploaded on the server';
  echo '  Error: ' . $handle->error . '';
}

Here's the log print out:

link to the file just uploaded: 204688005_3.jpg
log info: system information
- GD version : GD not present
- supported image types : none
- open_basedir : no restriction
- language : en_GB
source is an uploaded file
- upload OK
- file name OK
- source variables
file_src_name : 204688005.jpg
file_src_name_body : 204688005
file_src_name_ext : jpg
file_src_pathname : /var/tmp/phpxX2Z7l
file_src_mime : image/pjpeg
file_src_size : 40577 (max= 10485760)
file_src_error : 0
process file to ./images/
- file size OK
- file mime OK : image/pjpeg
- file name safe format
- destination variables
file_dst_path : ./images/
file_dst_name_body : 204688005
file_dst_name_ext : jpg
- no image operation, keep extension
- checking for auto_rename
auto_rename to 204688005_3.jpg
- destination file details
file_dst_name : 204688005_3.jpg
file_dst_pathname : ./images/204688005_3.jpg
- 204688005_3.jpg doesn't exist already
- no image processing wanted
- process OK


Why does it say no image processing wanted? And what do I need to do to make it work...

ThanksReply
Re: Image failed to resize new!
by colin, 16 years, 4 months ago
Apparently, GD is not installed on your system, as the log indicates: GD version : GD not presentReply