ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: WayneF on February 11, 2019, 07:12:19 PM

Title: Exif size option?
Post by: WayneF on February 11, 2019, 07:12:19 PM
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
Title: Re: Exif size option?
Post by: Phil Harvey on February 11, 2019, 09:21:28 PM
exiftool -preview:all -exif FILE

- Phil
Title: Re: Exif size option?
Post by: StarGeek on February 12, 2019, 01:27:34 PM
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?
Title: Re: Exif size option?
Post by: Phil Harvey on February 12, 2019, 01:34:45 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
Title: Re: Exif size option?
Post by: WayneF on February 18, 2019, 12:59:03 PM
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.