How to get original image properties

See all posts See thread Reply

Re: How to get original image properties new!
by Janno, 17 years, 5 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
Re: How to get original image properties new!
by colin, 17 years, 5 months ago
This is normal, since the image is not manipulated (resized, etc..) so the file is treated like any other file, and not like an image.

However, this feature will be available in the next version, soon to be released.Reply