Reply to Image_ratio_crop doesn't work

Image_ratio_crop doesn't work new!
by Fabio Spampinato, 12 years, 6 months ago
Hi,
first of all thank you for this wonderful class is really fantastic!
I use it on my under-development site: www.wallpaperup.com , everything works beautifully if the output image is resized while maintaining the same ratio, but does not work if the ratio of the output image is different. Test it yourself for better understanding, click on some resolutions under this wallpaper for example: http://www.wallpaperup.com/butterfly-224.html the code that deals with this is:

if ( ! file_exists ( $location . $width . $height . '.jpg' ) )  {
  include_once ( ROOTPATH . '/scripts/class.upload.php' );
  $handle = new Upload ( $original_file);
  if ( $handle->uploaded ) {
    $handle->image_resize = true;
    $handle->image_ratio_crop = true;
    $handle->image_x = $width;
    $handle->image_y = $height;
    $handle->file_new_name_body = $width . $height;
    $handle->process ( $location );
    if ( $handle->processed ) {
      unset ( $handle );
    }
  }
}

Which may be the problem? Thank you in advance.

( Where do I enter the code "echo $ handle-> log;" to write log file? And where it will be created? )Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important