Main Menu

Minimize XMP padding

Started by Xyzzy, March 02, 2015, 07:33:16 AM

Previous topic - Next topic

Xyzzy

Hi

I have noticed that exiftools adds significant (1kB+) padding when fe I delete some elements from XMP. Is there a way to avoid/minimise it?

Phil Harvey

You can avoid this padding with the -z option:

       -z (-zip)
            When reading, causes information to be extracted from .gz and .bz2
            compressed images.  (Only one image per archive.  Requires gzip
            and bzip2 to be installed on the system.)  When writing, causes
            compressed information to be written if supported by the image
            format.  (eg. The PNG format supports compressed text.)  This
            option also disables the recommended padding in embedded XMP,
            saving 2424 bytes when writing XMP in a 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 ($).