Exif size option?

Started by WayneF, February 11, 2019, 07:12:19 PM

Previous topic - Next topic

WayneF

Is there an Exiftool option or a way to show the size (in bytes in the file) of the Exif data in the image file? 
And also to show the size of the embedded JPG image data in a raw file?
Thanks

Phil Harvey

exiftool -preview:all -exif FILE

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

I was actually going to post the EXIF solution until I ran into a hiccup.  Since WayneF mentioned raw files, I tested it first on a NEF (and later a CR2).  This command doesn't return anything for the EXIF part.  Is this because such raw files are tiff based and as such, the entire file is technically an EXIF block?
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

Quote from: StarGeek on February 12, 2019, 01:27:34 PM
Since WayneF mentioned raw files, I tested it first on a NEF (and later a CR2).  This command doesn't return anything for the EXIF part.  Is this because such raw files are tiff based and as such, the entire file is technically an EXIF block?

Yes.  The EXIF in a JPEG is separate and can be extracted as a block.  But this block in a raw image is the entire file, including the raw data.  One could use ExifTool to create an EXIF-only file without the image data:

exiftool -o %d%f.exif FILE

which would be only that part of the EXIF metadata that is writable by ExifTool.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

WayneF

Thanks, that is very helpful.  So I'm going with my assumption that the raw NEF file Exif data is essentially the same size as the Exif that the camera writes into its JPG file.