Reply to Re: Processing a second time after first process?

Re: Processing a second time after first process? new!
by Murray Summers, 13 years, 11 months ago
Got it! I needed to restate some of the initial variables again. My code now is this -
if ($handle->uploaded) {
  // we now process the image a second time, with some other settings
  $handle->image_resize        = true;
  $handle->image_ratio_y       = true;
  $handle->image_x             = 84;
  $handle->image_border        = '1px';
  $handle->image_border_color  = '#FFFFFF';
  $handle->file_new_name_body  = substr($_POST['current1'],0,-4);
  $handle->file_overwrite      = true;
  $handle->Process($dir_dest);

  // we check if everything went OK
  if ($handle->processed) {
    if ($handle->image_dst_y > 70) {
      $handle->image_crop = array(0,0,($handle->image_dst_y - 70),0);
      $handle->image_resize        = true;
      $handle->image_ratio_y       = true;
      $handle->image_x             = 84;
      $handle->image_border        = '1px';
      $handle->image_border_color  = '#FFFFFF';
      $handle->file_new_name_body  = substr($_POST['current1'],0,-4);
      $handle->file_overwrite      = true;
      $handle->Process($dir_dest);

That seems to work within the 30-second time limit.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