How to read EXIF

See all posts Reply

How to read EXIF new!
by Roger, 17 years, 7 months ago
The code is very useful to image upload script.

But how do I read the exif using this class?Reply
Re: How to read EXIF new!
by colin, 17 years, 7 months ago
The class can't read EXIF. However, you can find some PHP code on Internet to read/write EXIF.

Reading EXIF requires quite a lot of code, and I don't plan to integrate it into the class for now.

Maybe for a future version, when the class will have been refactored, and will be able to handle plugins (EXIF plugins, but also some others such as MP3 tags, ZIP/TGZ archives, etc...).Reply
Re: How to read EXIF new!
by dimitrikx, 10 years, 2 months ago
$exif = exif_read_data($_FILES['Filedata']["tmp_name"]);
if(!empty($exif['Orientation'])) {          
  switch($exif['Orientation']) {
    case 8:
      echo 2;
      $handle->image_rotate = 270;
      break;
    case 3:
      echo 3;
      $handle->image_rotate = 180;
      break;
    case 6:
      echo 4;
      $handle->image_rotate = 90;
      break;
  }
}
Reply
Re: How to read EXIF new!
by colin, 8 years, 4 months ago
This is now implemented in the class, you can grab the latest version of the code on GithubReply