Main Menu

Recent posts

#1
This is just my opinion, but the -m should never be used as a default option. There have been far too many times when I've gone round and round trying to figure out someone's problem that could have be figured out instantly by not including it. You should want to know when there's a problem with the file.
#2
This got me on the right track. For the record, here is what works for me:

exiftool.exe" -G1 -a -s -if "${RegionName;s/,?\s*Ignored,?\s*//g} ne ${RegionName;s/,?\s*Ignored,?\s*//g;NoDups}" -r FOLDER
In Picasa I actually tag faces I want to ignore with the name "Ignored" so they don't get re-recognized if I have to reset the database. Unfortunately, many images end up with multiple "Ignored" tags. So I strip "Ignored" tags before doing the dedup comparison.

Thank you very much for your help.
#3
Thanks for pinpointing to an old thread.
I see that Phil has hesitated to introduce "fix", but did it anyway.

I would have never guessed that "ignoring minor errors and warnings" option may cause getting false results in conditional clause. Has anyone thought about fixing documentation and not breaking the logic why conditional clause is used in the first place? I mean... What's the point of having -if "defined" in case -m ruins the results? Implementation/usage of -if with -m looks too complicated...
#4
Here's the relevent thread.

The releveant documentation is in the -m (-ignoreMinorErrors) option
QuoteNote that this causes missing values in -tagsFromFile, -p and -if strings to be set to an empty string rather than an undefined value.

This is how it was documented for a long time (Archive.org, Dec 5, 2019). Technically, this was a fix for a long-standing bug.
#5
Newbies / Re: acdsee:categories/Digikam
Last post by StarGeek - Today at 10:25:12 AM
Quote from: ArchZu on Today at 04:27:20 AMDigikam writes one way, it seems to use exiv2 to write 'x:xmptk="XMP Core 4.4.0-Exiv2"'. exiftool is recording the data differently.

Both are legitimate XMP. One uses the newer, short, and compact way of writing, exiftool uses the older, more expansive way by default. The older way is often more compatible, especially with apps that don't have large companies behind them. Adobe, ACDSee, and such shouldn't have problems with either version.

You can customize the way exiftool writes XMP in a variety of ways using the -api Compact option. Try
-api Compact=OneDesc
or
-api Compact=AllFormat

Also note that this is XMP, not XML. XMP is based upon XML, but has differences in the formatting. At least, that's my understanding based on previous comments by Phil. I haven't taken the time to figure out the actual differences. That's something I should look at and try to find a webpage that explains it and that I can link to in the future.
#6
I have used exiftool version 10.26 for years to filter image files on conditional tag and formatting print output, but after upgrading to version 12.96 I have noticed different behavior: files are listed as having conditional tag even they don't...

I have started to check why do I get different results and noticed that it is related to "-m" option and changes done in exiftool version 12.60...

As per changelog of Apr. 5, 2023 - Version 12.60 (production release):
<...>
- Fixed handling of undefined tags in -if conditions to conform with documentation and match -p and -tagsFromFile behaviour when -m or -f option is used

I do believe it refers to this documentation part:
"If a specified tag does not exist, a minor warning is issued and the line with the missing tag is not printed. However, the -f option may be used to set the value of missing tags to '-' (but this may be configured via the API MissingTagValue option), or the -m option may be used to ignore minor warnings and leave the missing values empty. Alternatively, -q -q may be used to simply suppress the warning messages."

Maybe it was meant this way, but I find it very odd that -if returns wrong results while -m is related to -p (output format) option... If someone is willing to filter image files without defined specific tag and format output with -m, he/she can't do this in one pass... For example:

exiftool-1259.exe DSC*.JPG -if "defined $imageuniqueid" -p \"$directory/$filename,$dateacquired\" -m
3 files failed condition
0 image files read

exiftool-1260.exe DSC*.JPG -if "defined $imageuniqueid" -p \"$directory/$filename,$dateacquired\" -m
"./DSC_0320.JPG,"
"./DSC_0321.JPG,"
"./DSC_0380.JPG,"
3 image files read
#7
Metadata / Re: Post your LensType / LensI...
Last post by grubste - Today at 06:11:04 AM
Hi Phil,

I recently purchased the new Laowa 10mm f/2.8 Zero-D FF AF for Nikon Z.

The exif info on the lens properties are nulled, so no ext lens id could be derived,
but the lens identifies itself as a Nikon Z Lens with ID 2305 on the Nikon Z9:

LensDataVersion = 0802
ExitPupilPosition = 0
AFAperture = 0
FocusPosition = 0
FocusDistance = 0
FocalLength = 0
LensIDNumber = 0
LensFStops = 0
MinFocalLength = 0
MaxFocalLength = 0
MaxApertureAtMinFocal = 0
MaxApertureAtMaxFocal = 0
MCUVersion = 0
EffectiveMaxAperture = 0
-> ExtendedLensID = 00 00 00 00 00 00 00 00

ZLensID = 2305
  LensMountType = Z-mount Lens
  ZMaxAperture = 2,82842712474619
  ZFNumber = 5,99322830750673
  ZFocalLength = 10
  FocusDistanceRangeWidth = 144
  ZFocusDistance = 89,1250938133746
  LensDriveEnd = 0
  LensPositionAbsolute = 55
  LensName = Laowa FFII 10mm f/2.8 AF C&D Dreamer

Sample picture attached.
#8
Newbies / Re: Subgroups tags separator
Last post by ArchZu - Today at 04:42:55 AM
Quote from: StarGeek on September 11, 2024, 10:26:33 AMThis is entirely dependent upon the programs you use. You would have to test each program.

I thought about it, I'll change the single quote, double quote, and acute accent because they can cause problems with scripts. And change the slash in the names. It's easier to adapt only for the programs I use, then if I come to use other software, I adapt the tags with some script. 👍
#9
Newbies / Re: acdsee:categories/Digikam
Last post by ArchZu - Today at 04:27:20 AM
Quote from: StarGeek on Today at 01:35:06 AMI'm not sure what you are trying to do. Which of these has the correct data and the incorrect data. What exactly are you trying to set Categories to?

Digikam writes one way, it seems to use exiv2 to write 'x:xmptk="XMP Core 4.4.0-Exiv2"'. exiftool is recording the data differently.

exiv2:
<rdf:Description rdf:about=""
  acdsee:categories=""
/>

exiftool:
<rdf:Description rdf:about=''
  xmlns:acdsee='http://ns.acdsee.com/iptc/1.0/'>
  <acdsee:categories></acdsee:categories>
</rdf:Description>

I made these scripts for testing. but I will modify them later, they are still not good.
./stringtoxml.pl --tags "Anime/RPG" --tags "Anime/Isekai" --tags "Anime/Tensei" --tags "Manhwa/Isekai" --tags "Manhwa/Tensei" --tags "Manhwa/RPG" --tags "Manga/RPG" --tags "Manga/Isekai" --tags "Manga/Tensei" --tags "1/22/333" > output.xml
cat output.xml | sed 's/^[ \t]*//' | sed ':a;N;$!ba;s/\n//g' > output_minify.xml

#10
Newbies / Re: acdsee:categories/Digikam
Last post by StarGeek - Today at 01:35:06 AM
I'm not sure what you are trying to do. Which of these has the correct data and the incorrect data. What exactly are you trying to set Categories to?

Exiftool doesn't edit XML and cannot edit the XML in the Categories tag. If you need to make changes to the data, you have to do it outside exiftool and then re-embed it as you would normally assign a string.

So if you needed to change
<Categories><Category Assigned="1">Anime<Category Assigned="1">RPG1</Category>into
<Categories><Category Assigned="0">Anime<Category Assigned="1">RPG1</Category>you would do it with some other program that can deal with XML and then rewrite the tag with
exiftool -Categories="<Categories><Category Assigned="0">Anime<Category Assigned="1">RPG1</Category>" file.jpg