Reply to Re: Resize based on both height and width

Re: Resize based on both height and width new!
by Mack, 15 years, 4 months ago
Oops, sorry my code was wrong.

this worked..
$handle = new upload($_FILES['image']);
if ($handle->uploaded) {
  $handle->file_new_name_body   = $_POST['image'];
  $handle->image_resize         = true;
  $handle->image_x              = MIMAGETHUMBSIZE;
  $handle->image_y                            = 150;
  $handle->image_ratio_y        = true;
  $handle->image_ratio_x              = true;
  $handle->image_convert = 'png';
  $handle->process(MIMAGETHUMBPATH);

  $handle->file_new_name_body   = $_POST['image'];
  $handle->image_resize         = true;
  $handle->image_x              = MIMAGESIZE;
  $handle->image_ratio_y        = true;
  $handle->image_convert = 'png';
  $handle->process(MIMAGEPATH);

  if ($handle->processed) {
    $handle->clean();
  }
}
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