28 May 2013
(Updated 22 Jul 2013)
Read and write full Exif metadata from image files. A Matlab front end for ExifTool, by Phil Harvey.
function [exifdata, nf] = getexif(fname)
%[status] = getexif(fname) read Exif data from an image file
% fname = name of image file, e.g., 'myfile.jpg'
%Needs ExifTool.exe, written by Phil Harvey
% 1. Download the file, exiftool(-k).exe
% 2. Rename this file, exiftool.exe
% 3. Save this file in a folder on your Matlab path, e.g. .../matlab/
%Peter Burns, 28 May 2013
% 22 July 2013, following suggestions from jhh and Jonathan via
% Matlab Central.
test = which('exiftool.exe');
disp('ExifTool not available:');
disp('Please download from,')
disp('make sure that the installed exiftool.exe is on your Matlab path')
nf = 0;
TS=[ '"' test '" -s "' fname '"'];
[status, exifdata] = system(TS);
nf = find(exifdata==':');
nf = length(nf);