Don’t use imagecreatefromstring
If you’re looking to create a jpg file from raw image data, like from an email attachment, don’t use imagecreatefromstring(); because it strips almost all the header data including a ton of exif info off the file. Simply do this $filename = 'pic.jpg'; $r = fopen($filename,'x'); fwrite($r,$raw_data); //$raw_data is the data string of the image [...]
