If i try to do Spotlight search for “test”, it don’t find this image file at all.
How i need to change this code so that Spotlight can see text in pictures saved by exiftool? I don’t want to use Finder Comments.
set my_comment to "test"
do shell script "exiftool -Keywords+=" & my_comment & " -overwrite_original_in_place -P " & quoted form of POSIX path of (path_here as Unicode text)
If Spotlight doesn’t use EXIF metadata, then you’d either have to write a script that transmits the EXIF metadata to Spotlight yourself, or find an mdimporter that does!
It seems to me that Spotlight doesn’t support EXIF at all, but maybe there are solutions out there if you google.
I saved one picture from webpage in Safari to Downloads-folder. Now if i open Get Info window in Finder, it shows all this information under More Info:
Title, Dimension, Color space, Color profile, Description, Alpha channel and Last opened
And if i do Spotlight search for title or some words in description, then Spotlight finds this picture.
I can see in image editor software that this information is saved using ExifTool 8.18 and Title is “Object Name” and Description is “Caption-Abstract” in ExifTool.
So it looks like it is possible to use ExifTool to save text to picture files and find text using Spotlight.
I can’t get this to work at all. I tried to search “Object Name” and “Caption-Abstract” etc in ExifTool help page but didn’t find it. I think “title” is wrong one:
do shell script "exiftool -overwrite_original_in_place -title='mytesttitle' '/Users/cirno/Desktop/tst.png'"
After you have mended it to point to an image of yours. I do surmise you know how to use mdls (man mdls) to see if you get any metainformation stored.
If the one above doesn’t work, just start from the top of the ‘writing examples’ section in the manual, and inspect the result of the operation with mdls.
Whatever tool you used, It may have its own mdi-tag format, you can try to say to exiftool, that it should write metadata in that format to the file. (Or investigate if it is possible, it is possible at least to write meta-data in photo-shop format).