Reply to Re: How to get original image properties

Re: How to get original image properties new!
by Janno, 16 years, 10 months ago
I use script like this:
if ($handle->uploaded) {
  $handle->file_new_name_body = 'mypic';
  $handle->file_max_size = '10857640';
  $handle->process($originaldir);
  if ($handle->processed) {
    mysql_query("INSERT INTO images SET 
      ImageSourceName='$newname.".$handle->file_src_name_ext."',
      ImageName='".$handle->file_src_name."',
      OriginalSize='".$handle->file_src_size."',
      OriginalWidth='".$handle->image_src_x."',
      OriginalHeight='".$handle->image_src_y.""); 
  } 
  $handle-> clean();
}

but in database 'OriginalWidth' and 'OriginalHeight' values are zero.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