Skip to content

Instantly share code, notes, and snippets.

@cliffordp
Forked from arunbasillal/sample-exif-data
Created February 25, 2023 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cliffordp/9b8f989a0ad513fa008725e128139aeb to your computer and use it in GitHub Desktop.
Save cliffordp/9b8f989a0ad513fa008725e128139aeb to your computer and use it in GitHub Desktop.
Sample EXIF data using exif_read_data()
// EXIF data extracted using exif_read_data() PHP function from https://github.com/ianare/exif-samples/blob/master/jpg/Canon_40D.jpg
Array (
[FileDateTime] => 0
[FileSize] => 7958
[FileType] => 2
[MimeType] => image/jpeg
[SectionsFound] => ANY_TAG, IFD0, THUMBNAIL, EXIF, GPS, INTEROP
[COMPUTED] => Array
(
[html] => width="100" height="68"
[Height] => 68
[Width] => 100
[IsColor] => 1
[ByteOrderMotorola] => 0
[CCDWidth] => 0mm
[ApertureFNumber] => f/7.1
[UserComment] =>
[UserCommentEncoding] => UNDEFINED
[Thumbnail.FileType] => 2
[Thumbnail.MimeType] => image/jpeg
)
[Make] => Canon
[Model] => Canon EOS 40D
[Orientation] => 1
[XResolution] => 72/1
[YResolution] => 72/1
[ResolutionUnit] => 2
[Software] => GIMP 2.4.5
[DateTime] => 2008:07:31 10:38:11
[YCbCrPositioning] => 2
[Exif_IFD_Pointer] => 214
[GPS_IFD_Pointer] => 978
[THUMBNAIL] => Array
(
[Compression] => 6
[XResolution] => 72/1
[YResolution] => 72/1
[ResolutionUnit] => 2
[JPEGInterchangeFormat] => 1090
[JPEGInterchangeFormatLength] => 1378
)
[ExposureTime] => 1/160
[FNumber] => 71/10
[ExposureProgram] => 1
[ISOSpeedRatings] => 100
[ExifVersion] => 0221
[DateTimeOriginal] => 2008:05:30 15:56:01
[DateTimeDigitized] => 2008:05:30 15:56:01
[ComponentsConfiguration] =>
[ShutterSpeedValue] => 483328/65536
[ApertureValue] => 368640/65536
[ExposureBiasValue] => 0/1
[MeteringMode] => 5
[Flash] => 9
[FocalLength] => 135/1
[UserComment] =>
[SubSecTime] => 00
[SubSecTimeOriginal] => 00
[SubSecTimeDigitized] => 00
[FlashPixVersion] => 0100
[ColorSpace] => 1
[ExifImageWidth] => 100
[ExifImageLength] => 68
[InteroperabilityOffset] => 948
[FocalPlaneXResolution] => 3888000/876
[FocalPlaneYResolution] => 2592000/583
[FocalPlaneResolutionUnit] => 2
[CustomRendered] => 0
[ExposureMode] => 1
[WhiteBalance] => 0
[SceneCaptureType] => 0
[GPSVersion] =>
[InterOperabilityIndex] => R98
[InterOperabilityVersion] => 0100
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment