Empty keywords by Irfanview or xnview

Started by Hefaistos, February 14, 2025, 02:13:18 PM

Previous topic - Next topic

Hefaistos

I use
exiftool -if "not length($Keywords)" -filepath -r "x:\FileServer\Archief\Open\fotoarchief fad\08_Gebouwen\08.38.00 campus-homburgterrein" > c:\temp\lege_keywords.txt
to find keywords that are made empty with irfanview or xnvieuw . Both finds the changes.
exiftool -G -IPTC:Keywords -XMP:Subject
gives both as not empty. Total commander [=jpg-comment.Keywords] finds the changes.  What is the cause of this difference and how do I solve it?

StarGeek

I don't understand what you mean by "empty"? Can you give an example?

Or maybe that tags exist with 0 length entries. For example, this command
exiftool "-keywords^=" y:\!temp\Test4.jpg
will create a keyword that has no characters, i.e. is 0 length. This would be listed with your first command

example:C:\>exiftool -P -overwrite_original -all= "-keywords^=" y:\!temp\Test4.jpg
    1 image files updated

C:\>exiftool -G1 -a -s -if "not length($Keywords)" -filepath y:\!temp\Test4.jpg
[System]        FilePath                        : y:/!temp/Test4.jpg

C:\>exiftool -G1 -a -s -Keywords y:\!temp\Test4.jpg
[IPTC]          Keywords                        :

"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Hefaistos

Keywords have been removed with Irfanview (keywords : 08.38)

Hefaistos

#3
by the way i used
exiftool -G -a -s -IPTC:Keywords -XMP:Subject "x:\FileServer\Archief\Open\fotoarchief fad\08_Gebouwen\08.38.00  campus-homburgterrein\60076.jpg"
[IPTC]          Keywords                        : 08.38
[XMP]          Subject                        : 08.38

StarGeek

Ah, yes. The fun that is Fotostation metadata. The command in FAQ #3 is best used here

C:\>exiftool -G1 -a -s -Subject -Keywords Y:\!temp\x\y\60076.jpg
[XMP-dc]        Subject                         : 08.38
[IPTC2]         Keywords                        : 08.38

Note that Keywords is in IPTC2. Fotostation creates a second IPTC block as a trailer, which appears after the image data rather than using the standard location for IPTC data
Full output
C:\>exiftool -G1 -a -s -e --file:all --JFIF:all Y:\!temp\x\y\60076.jpg
[ExifTool]      ExifToolVersion                 : 13.19
[XMP-x]         XMPToolkit                      : XMP Core 4.4.0
[XMP-xmp]       Rating                          : 0
[XMP-dc]        Description                     : Homburg Campus.. Stadsgesprek Homburg Campus
[XMP-dc]        Subject                         : 08.38
[XMP-photoshop] Credit                          : eigendom gemeente Cuijk/digitaal
[XMP-photoshop] SupplementalCategories          : Gesloten
[IPTC]          CodedCharacterSet               : UTF8
[IPTC]          EnvelopeRecordVersion           : 4
[IPTC]          Caption-Abstract                : Homburg Campus.. Stadsgesprek Homburg Campus
[IPTC]          Credit                          : eigendom gemeente Cuijk/digitaal
[IPTC]          SupplementalCategories          : Gesloten
[FotoStation]   OriginalImageWidth              : 800
[FotoStation]   OriginalImageHeight             : 533
[FotoStation]   ColorPlanes                     : 3
[FotoStation]   XYResolution                    : 72
[FotoStation]   Rotation                        : 0
[FotoStation]   CropLeft                        : 0%
[FotoStation]   CropTop                         : 0%
[FotoStation]   CropRight                       : 100%
[FotoStation]   CropBottom                      : 100%
[FotoStation]   ThumbnailImage                  : (Binary data 7038 bytes, use -b option to extract)
[IPTC2]         ApplicationRecordVersion        : 2
[IPTC2]         Caption-Abstract                : Homburg Campus.. Stadsgesprek Homburg Campus
[IPTC2]         By-line                         : 60076
[IPTC2]         Credit                          : eigendom gemeente Cuijk/digitaal
[IPTC2]         ObjectName                      : 8  Gebouwen
[IPTC2]         DateCreated                     : 28-08-2008
[IPTC2]         Keywords                        : 08.38
[IPTC2]         DocumentHistory                 : fad 8-6-2011 15:51:24  Edit Saved as : F:\nog num\gemeente nieuw\fotos\_Nog in IdImager verwerken\Homburg Campus\60076-08.38.jpg.fad 8-6-2011 15:51:32  Text Saved.fad 6-3-2014 15:06:34  Tekst opgeslagen
[IPTC2]         ExifCameraInfo                  : Model :                .NIKON D3000..Software :            .Ver.1.00 ..

Because the data isn't in the standard location, Irfanview can't remove it. Also note that Irfanview can't edit XMP data, so Subject will remain.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Hefaistos

Thanks so much for the explanation, but does this mean that I have to remove all [IPTC2]Keywords before I can work with irfanview

StarGeek

Irfanview, and most other programs, can't see the Keywords written by FotoStation. It will completely ignore them. Remove them or not, Irfanview doesn't care.

If you use Irfanview's Lossless JPEG plugin, the entire Fotostation trailer will be removed.

Overall, what you want to do with the Fotostation trailer depends upon the programs you are using. If you're using Fotostation, then you can't use Irfanview to remove Keywords, you'll have to do it in Fotostation.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Hefaistos

Photo station was used in the beginning. We are now working on XNviewmp and Digikam. I want to remove as many errors as possible from the older photos. It concerns approximately 100,000 photos. Can i do this with Lossless JPEG plugin? And Yes how

StarGeek

You can remove the Fotostation trailer with
exiftool -fotostation:all= /path/to/files/

Though you might want to make sure that you don't need any of the information there are copy the data into standard locations.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Hefaistos

Good morning from the Netherlands.
On behalf of cuijksarchief.nl, thanks for the help