How to get rid of png exif metadata?

Started by Marsu42, October 08, 2014, 12:45:15 PM

Previous topic - Next topic

Marsu42

After some jpg->png concersion with ImageMagick and exiftool, I end up with png images containing copies of the jpeg exif metadata. The problem is that currently I cannot find any way to get rid of these tags. Here's a sample output of exiftool -S -G1 -sort -a -e -n


[ExifTool] ExifToolVersion: 9.67
[System] Directory: .
[System] FileAccessDate: 2014:10:08 18:32:39+02:00
[System] FileCreateDate: 2014:10:08 18:32:41+02:00
[System] FileModifyDate: 2014:08:15 12:59:33+02:00
[System] FileName: FAU_L_EF96AA73_576x_WEB.png
[System] FilePermissions: 666
[System] FileSize: 343509
[File] ExifByteOrder: MM
[File] FileType: PNG
[File] MIMEType: image/png
[PNG] BackgroundColor: 255 255 255
[PNG] BitDepth: 8
[PNG] ColorType: 6
[PNG] Compression: 0
[PNG] Filter: 0
[PNG] ImageHeight: 384
[PNG] ImageWidth: 576
[PNG] Interlace: 0
[PNG] PixelUnits: 1
[PNG] PixelsPerUnitX: 2834
[PNG] PixelsPerUnitY: 2834
[PNG] ProfileName: icm
[PNG] SRGBRendering: 0
[PNG] datecreate: 2014-10-08T18:09:24+02:00
[PNG] datemodify: 2014-08-15T12:59:33+02:00
[PNG] exifApertureValue: 7400879/1000000
[PNG] exifColorSpace: 1
[PNG] exifCompression: 6
[PNG] exifCustomRendered: 0
[PNG] exifDateTime: 2014:08:14 23:10:35
[PNG] exifDateTimeDigitized: 2014:08:08 12:28:54
[PNG] exifDateTimeOriginal: 2014:08:08 12:28:54
[PNG] exifExifOffset: 350
[PNG] exifExifVersion: 48, 50, 51, 48
[PNG] exifExposureBiasValue: 0/1
[PNG] exifExposureMode: 1
[PNG] exifExposureProgram: 1
[PNG] exifExposureTime: 1/250
[PNG] exifFNumber: 13/1
[PNG] exifFlash: 9
[PNG] exifFocalLength: 100/1
[PNG] exifFocalPlaneResolutionUnit: 2
[PNG] exifFocalPlaneXResolution: 1036800/181
[PNG] exifFocalPlaneYResolution: 691200/119
[PNG] exifGPSInfo: 912


... and so on. Any ideas on how to access these [PNG] tags? I tried -PNG:all= which does nothing and -PNG:exifWhatever= doesn't work either, or I made some stupid mistake somewere along the way.

Phil Harvey

These sound like PNG TextualData tags.  The PNG tag documentation explains this.

- 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 ($).

Marsu42

Quote from: Phil Harvey on October 08, 2014, 07:27:17 PM
The PNG tag documentation explains this.

Excuse me being very slow, but as far as I understand the link it explains why I *cannot* get rid of the png tags (unless I add each and every one to my config file)? If so, probably at least a working -PNG:all= in exiftool would be nice that gets rid of everything except the core tags.

QuoteThe PNG TextualData format allows arbitrary tag names to be used. The tags listed below are the only ones that can be written (unless new user-defined tags are added via the configuration file), however ExifTool will extract any other TextualData tags that are found.

On an unrelated note and just out of interest: What's the big deal with exiftool just being able to delete every PNG TextualData I want right away w/o whitelisting them in the config file?

Phil Harvey

Good point.  I'll implement this in ExifTool 9.73.

- 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 ($).