exif_read_data
PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8
exif_read_data - Reads the EXIF headers from an image file
Example #1 exif_read_data with streams available as of PHP 7.2.0
Result: EXIF Headers:
Height => 576
Width => 1024
IsColor => 1
ByteOrderMotorola => 0
ApertureFNumber => f/5.6
UserComment =>
UserCommentEncoding => UNDEFINED
Copyright => Denis
Thumbnail.FileType => 2
Thumbnail.MimeType => image/jpeg
Example #2 exif_read_data example
Result: test1.jpg:
No header data found.
test2.jpg:
FILE.FileName: test2.jpg
FILE.FileDateTime: 1017666176
FILE.FileSize: 1240
FILE.FileType: 2
FILE.SectionsFound: ANY_TAG, IFD0, THUMBNAIL, COMMENT
COMPUTED.html: width="1" height="1"
COMPUTED.Height: 1
COMPUTED.Width: 1
COMPUTED.IsColor: 1
COMPUTED.ByteOrderMotorola: 1
COMPUTED.UserComment: Exif test image.
COMPUTED.UserCommentEncoding: ASCII
COMPUTED.Copyright: Photo (c) M.Boerger, Edited by M.Boerger.
COMPUTED.Copyright.Photographer: Photo (c) M.Boerger
COMPUTED.Copyright.Editor: Edited by M.Boerger.
IFD0.Copyright: Photo (c) M.Boerger
IFD0.UserComment: ASCII
THUMBNAIL.JPEGInterchangeFormat: 134
THUMBNAIL.JPEGInterchangeFormatLength: 523
COMMENT.0: Comment #1.
COMMENT.1: Comment #2.
COMMENT.2: Comment #3end
THUMBNAIL.JPEGInterchangeFormat: 134
THUMBNAIL.Thumbnail.Height: 1
THUMBNAIL.Thumbnail.Height: 1