Hi, I've been attempting to remove a non-standard tag from a tiff file as it stops me from importing the image into R for some analysis I need to perform.
using the -validate and -v options
ExifToolVersion = 12.58
FileName = test.tif
Directory = [snip]
FileSize = 4183146
FileModifyDate = 1679588798.47259
FileAccessDate = 1679591103.85383
FileCreateDate = 1679588484.75865
FilePermissions = 33206
FileType = TIFF
FileTypeExtension = TIF
MIMEType = image/tiff
ExifByteOrder = II
+ [IFD0 directory with 20 entries]
| 0) ImageWidth = 1360
| 1) ImageHeight = 1024
| 2) BitsPerSample = 8 8 8
| 3) Compression = 1
| 4) PhotometricInterpretation = 2
| 5) Make = Olympus
| 6) Model = DP71
| 7) StripOffsets = 628 261748 522868 783988 1045108 1306228 1567348 1828468 2089588[snip]
| 8) Orientation = 1
| 9) SamplesPerPixel = 3
| 10) RowsPerStrip = 64
| 11) StripByteCounts = 261120 261120 261120 261120 261120 261120 261120 261120 26112[snip]
| 12) XResolution = 72 (72/1)
| 13) YResolution = 72 (72/1)
| 14) PlanarConfiguration = 1
| 15) ResolutionUnit = 2
| 16) ModifyDate = 2022:08:26 13:03:39
| 17) Artist = Olympus
| Warning = [minor] Non-standard IFD0 tag 0x8318 Exif_0x8318
| 18) Exif_0x8318 = 4207738
| 19) ExifOffset (SubDirectory) -->
| + [ExifIFD directory with 11 entries]
| | 0) ExposureTime = 0.001659 (1659/1000000)
| | 1) ExifVersion = 0210
| | 2) CreateDate = 2022:08:26 13:03:39
| | 3) ApertureValue = 0.95 (19/20)
| | 4) SubjectDistance = 0.00018 (9/50000)
| | 5) MeteringMode = 3
| | 6) FlashpixVersion = 0100
| | 7) ColorSpace = 1
| | 8) ExifImageWidth = 1360
| | 9) ExifImageHeight = 1024
| | 10) ExposureMode = 1
Warning = ExifIFD tag 0xa402 ExposureMode requires ExifVersion 0220 or higher
Warning = [minor] ExifIFD tag 0xa002 ExifImageWidth is not allowed in TIFF
Warning = [minor] ExifIFD tag 0xa003 ExifImageHeight is not allowed in TIFF
Validate = 0 4 3
Validate : 4 Warnings (3 minor)
(I removed the file directory, but otherwise this is as it comes out)
I attempted to remove it with the following
-Exif_0x8318-= -v
Warning: Tag 'Exif_0x8318' is not defined
Nothing to do.
any advice on how to remove this non-standard tag so I can carry on with the rest of my image processing would be greatly appreciated.
[edit]also tried -exif:0x8318 with same response
You need to create a user-defined tag to be able to write/delete any non-standard tag. See NewEXIFTag in the sample config file (https://exiftool.org/config.html) for an example of how to do this.
- Phil
Thanks Phil, it worked perfectly.