class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
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
But how do I read the exif using this class?
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...).
$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; } }