0

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 ?

Pepi San
  • 93
  • 1
  • 10
  • OK, I've found the problem. Enlarge image wasn't allowed and my images test are smaller than the div target. GD Thumb.inc.php edit the line 710, into the SetOptions public function and change resizeUp false to true $defaultOptions = array ( 'resizeUp' => true, – Pepi San Feb 07 '15 at 00:43

1 Answers1

1

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

Pepi San
  • 93
  • 1
  • 10