JPEGMetadata (extract EXIF)
ts
function JPEGMetadata(imgFile: string): boolean;
This function extract various meta-information (including full EXIF data) about a JPEG image from the imgFile
file.
Example
ts
{
mdata = JPEGMetadata('./self_portrait.jpg');
Log(JSON.stringify(mdata));
}
The example above produces a result similar to this:
json
{
"Exif": {
"ApertureValue": [
"149/32"
],
"ColorSpace": [
1
],
"ComponentsConfiguration": "",
"CompressedBitsPerPixel": [
"5/1"
],
"CustomRendered": [
0
],
"DateTime": "2003:12:14 12:01:44",
"DateTimeDigitized": "2003:12:14 12:01:44",
"DateTimeOriginal": "2003:12:14 12:01:44",
"DigitalZoomRatio": [
"2272/2272"
],
"ExifIFDPointer": [
196
],
"ExifVersion": "0220",
"ExposureBiasValue": [
"0/3"
],
"ExposureMode": [
0
],
"ExposureTime": [
"1/500"
],
"FNumber": [
"49/10"
],
"FileNumber": [
1171771
],
"FileSource": "",
"FirmwareVersion": "Firmware Version 1.10",
"Flash": [
24
],
"FlashpixVersion": "0100",
"FocalLength": [
2,
682,
286,
215
],
"FocalPlaneResolutionUnit": [
2
],
"FocalPlaneXResolution": [
"2272000/280"
],
"FocalPlaneYResolution": [
"1704000/210"
],
"ImageType": "IMG:PowerShot S40 JPEG",
"InteroperabilityIFDPointer": [
1416
],
"InteroperabilityIndex": "R98",
"Make": "Canon",
"MakerNote": "",
"MaxApertureValue": [
"194698/65536"
],
"MeteringMode": [
2
],
"Model": "Canon PowerShot S40",
"ModelID": [
17891328
],
"Orientation": [
1
],
"PixelXDimension": [
2272
],
"PixelYDimension": [
1704
],
"ResolutionUnit": [
2
],
"SceneCaptureType": [
0
],
"SensingMethod": [
2
],
"ShutterSpeedValue": [
"287/32"
],
"ThumbJPEGInterchangeFormat": [
2036
],
"ThumbJPEGInterchangeFormatLength": [
5448
],
"UserComment": "",
"WhiteBalance": [
0
],
"XResolution": [
"180/1"
],
"YCbCrPositioning": [
1
],
"YResolution": [
"180/1"
]
},
"Height": 360,
"Valid": true,
"Width": 480
}