Author Topic: Exif size option?  (Read 196 times)

WayneF

  • Jr. Member
  • **
  • Posts: 11
Exif size option?
« 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

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14405
    • ExifTool Home Page
Re: Exif size option?
« Reply #1 on: February 11, 2019, 09:21:28 PM »
exiftool -preview:all -exif FILE

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

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 2365
Re: Exif size option?
« Reply #2 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?
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14405
    • ExifTool Home Page
Re: Exif size option?
« Reply #3 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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

WayneF

  • Jr. Member
  • **
  • Posts: 11
Re: Exif size option?
« Reply #4 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.