KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Our server is saving EXIF data to every file saved with imagejpeg() . As far as I know, this is not the default behavior (or even possible, from what I've read). But, it is occurring, and due to the FileDateTime information being included (and using the time of save), it is breaking functionality in our upload/approval system ( md5_file() returns a different value for the exact same image due to FileDateTime always being different). Is there a way to prevent imagejpeg() from saving EXIF data for images by default? Server Information CentOS 5 Parallels Plesk Panel 10.4.4 GD Version: bundled (2.0.34 compatible) PHP 5.3 Code <?php public function upload_book_cover($book, $cover, $filename = NULL, $approved = NULL){ global $c_consummo, $user; $approved = bool($approved, true, true); if(filesize($cover)>5242880){ return false; // Too large; } $max_width = 450; $cover_info = getimagesize($cover); if(!$this->is_valid_book_cover_type($cover_info['mime'])){ return false; // Invalid image type } $width = $cover_info[0]; $height = $cover_info[1]; if($width<200){ return false; // Too small } elseif($width>1500){ return false; // Too wide } $original_cover = false; switch($cover_info[2]){ case IMAGETYPE_GIF: $original_cover = imagecreatefromgif($cover); break; case IMAGETYPE_JPEG: $original_cover = imagecreatefromjpeg($cover); break; case IMAGETYPE_PNG: $original_cover = imagecreatefrompng($cover); break; case IMAGETYPE_BMP: $original_cover = imagecreatefrombmp($cover); break; } if(!$original_cover){ return false; // Unsupported type } if(
Tags (comma-separated)
Save Edits
Cancel