问题
I have a case: I took a photo. Now I want to read date of the created photo (the shooting photo date) using GD.
Is it possible to get this date created from the image metadata?
回答1:
Use exif_read_data() function instead, you will get everything you'd need :)
http://php.net/manual/en/function.exif-read-data.php
Look for the particular Exif data with a key DateTimeOriginal.
Make sure that the software you are using are not stripping the actual exif. For example if you are using Photoshop, doing a "Save as JPG" retains the exif but "Export for web and devices" does not.
来源:https://stackoverflow.com/questions/19692596/get-image-create-date-in-php-gd