Strange problem

See all posts Reply

Strange problem new!
by Clone, 15 years, 10 months ago
I've used the class several times on my localhost, so i'm sure that everything works fine there, and that all the needed libraries are installed.
Now with a new code, where i upload and image and process it 3 times something odd happens.
The process goes like this:
- Upload the image
- Create a thumbnail (width of 60 px if the image is portrait, or height of 60 px if it's landscape), this works just fine.
- Then, create a medium image (320 width if portrait, or 240 if landscape) this uses the default image width / height of 150 px, which is wrong.
- Then copy the image without resizing, this works ok.

Here's the piece of code that doesn't work:
$handle->image_resize = true;
if($handle->image_src_x > $handle->image_src_y){
  $handle->image_ratio_x = true;
  $handle->image_y = 240;
} else {
  $handle->image_ratio = true;
  $handle->image_x = 320;
}
$handle->Process(....);

Any ideas?Reply
Re: Strange problem new!
by colin, 15 years, 10 months ago
Shouldn't it be:
$handle->image_resize = true;
if($handle->image_src_x > $handle->image_src_y){
  $handle->image_ratio_x = true;
  $handle->image_y = 240;
} else {
  $handle->image_ratio_y = true;  // I added _y here
  $handle->image_x = 320;
}
$handle->Process(....);

If that is not the problem, can you paste here the full log for the three processes?Reply