Reply to Image width resize

Image width resize new!
by joostvm, 15 years, 7 months ago
My image upload works, the images will upload in 2 folders, but the resize don't work's fine. The first uploaded image will have a width of 200px, the second image will have a width of 800. This is my code:

$handle = new Upload($_FILES['Filedata']);
if ($handle->uploaded) {
  $handle->image_resize            = true;
  $handle->image_x                 = 200;
  $handle->image_ratio_no_zoom_in = true;
  $handle->file_new_name_body = $_GET['nieuwsid'];
  $handle->Process($targetPath."klein/");
  
  // we now process the image a second time, with some other settings
  $handle->image_resize            = true;
  $handle->image_x                 = 800;
  $handle->image_ratio_no_zoom_in = true;
  $handle->file_new_name_body = $_GET['nieuwsid'];
  $handle->Process($targetPath."groot/");
        
  // we check if everything went OK
  if ($handle->processed) {
    echo '1';
  }
  $handle-> Clean();
}

But, my images are 100 and 150 or so pixels. When the image width is larger then 200 and/or 800, the image(s) must be resized, other the size must be original size.

How can I do this?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