phpphpthumb

Resize with PHPTumb


I've got a problem with PHPThumb, my resize function doesn't work. This function must resize an image to the maxi dimension x or y of a DIV :

if($thumb_x_value>$thumb_y_value) { 
      $thumb->resize($thumb_x_value, $thumb_x_value)->save($url_fichier); 
    }
    else { 
      $thumb->resize($thumb_y_value, $thumb_y_value)->save($url_fichier); 
    }

The image is not resized.

Is the solution here ? The path used is a the relative path, because the file is stored in an another folder, and the $url is

../../../uploads/image.jpg

Any idea ?


Solution

  • Enlarge image isn't allowed by default.

    Edit GD Thumb.inc.php, line 710 into the SetOptions public function and set resizeUp false to true

    $defaultOptions = array ( 
    'resizeUp' => true
    

    That's all