Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Add Spotlight keywords to images with Preview Apps
Tiger only hintSo Spotlight works with all kind of file metadata (size, DPI, etc. for images). iPhoto is a great application, but I usually leave out anything that isn't a photo (like, say, drawings). That said, I couldn't take advantage of performing a Keyword search on such files (a feature present with iPhoto). I could only add 'keywords' onto Spotlight's Comment field (in the Finder's Get Info window).

However, JPEGs can contain metadata for copyrights and stuff -- for those who want to search more into that, it's called IPTC data. Today, I've discovered that Preview will allow you to add such metadata keywords directly onto JPG files. Just use Tools -> Get Info -> Keywords, and then click Add. Save your changes, and your keywords are attached to the JPEG image. Now you can perform more powerful searches with Spotlight!

[robg adds: You should be able to add keywords for any file that Preview can open -- I added some to TIFFs, for instance.]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[14,740 views]  

10.4: Add Spotlight keywords to images with Preview | 18 comments | Create New Account
Click here to return to the '10.4: Add Spotlight keywords to images with Preview' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Add Spotlight keywords to images with Preview
Authored by: ij00mini on Jun 16, '05 10:17:24AM

I dont understand the appeal, you can add spotlight words to any file on your system via the get info command in finder.



[ Reply to This | # ]
10.4: Add Spotlight keywords to images with Preview
Authored by: club60.org on Jun 16, '05 10:22:21AM

In Finder you add comments. In Preview you can add keywords. This is slightly different.



[ Reply to This | # ]
10.4: Add Spotlight keywords to images with Preview
Authored by: diamondsw on Jun 16, '05 11:15:03AM

Not to mention these keywords are saved in the file, and will survive trips to other platforms and filesystems. The Get Info window comments only work on HFS+ volumes.



[ Reply to This | # ]
10.4: Add Spotlight keywords to images with Preview
Authored by: bewebste on Jun 16, '05 11:50:45AM

Actually, Finder comments are also saved on non-HFS+ volumes, but other platforms can't access them. So if you put comments on a file on a PC formatted disk, Windows won't be able to interpret them, but they should show up if you plug that disk into another Mac.



[ Reply to This | # ]
10.4: Add Spotlight keywords to images with Preview
Authored by: dlong on Jun 16, '05 12:00:23PM

What I would _hope_ is that adding keywords wouldn't degrade (recompress) JPG files. Any idea whether this is the case, or whether multiple trips to the "Add one more keyword" wagon will start to junk up lossily-compressed files in Preview?



[ Reply to This | # ]
10.4: Add Spotlight keywords to images with Preview
Authored by: q-wert on Jun 16, '05 07:47:09PM

From what I can tell from a quick test, the image is re-processed by Preview. (I used FileMerge to quickly compare the raw data). In my tests I've also noticed that Photoshop can also add keywords but without re-processing the image. However, it has some peculiarities when dealing with some metadata data (there's different metadata formats for JPG. IPTC is just one of them and Photoshop might mess up the others - or this one, I don't remember)



[ Reply to This | # ]
10.4: Add Spotlight keywords to images with Preview
Authored by: network23 on Jun 17, '05 12:08:01PM

Something is definitely going on with the image when you add the keywords via Preview, but from what I can tell, the image is not being recompressed. I took a file, copied it, and added keywords to the copy multiple times, resulting in six additional saves. I then loaded them up in Photoshop and looked at them at 1600%. No pixels shifted or looked recompressed (the "layout" of pixels from the original compression looked identical), but I did notice some slight color shifting in some of the pixels. At 1200-1600%, the copied image looked more "rainbow-y" than the original, but when viewed at normal size, little, if any, change could be discerned.

So the image is being altered, but I do not think it is being recompressed.

I've posted my test image comparison.

---
Live and Direct, only from
Network 23

[ Reply to This | # ]

10.4: Add Spotlight keywords to images with Preview
Authored by: SeanAhern on Oct 07, '05 02:17:10PM

I think it's likely that it's being recompressed. Recall that JPEG compression involves color manipulation so as to remove colors that the eye "cannot see".

I took your two images that were side by side, brought them into Photoshop, and differenced them. The resultant image was almost black, but not quite. Once I adjusted the contrast to highlight the differences, you can easily see a variation. See here.



[ Reply to This | # ]
10.4: Add Spotlight keywords to images with Preview
Authored by: benishs on Jun 16, '05 01:09:56PM

OK - but is there a way to add keyword(s) to a batch of files all at once? If I have a bunch of photos from a vacation, do I need to individually tag each one, even though they would all share some keywords?



[ Reply to This | # ]
10.4: Add Spotlight keywords to images with Preview
Authored by: richmc on Jun 16, '05 01:30:28PM

My big question is, is there a way to add keywords to any file? Anyone know if a script or program is out there that will allow keyword additions, instead of comments?

Rich



[ Reply to This | # ]
10.4: Add Spotlight keywords to images with Preview
Authored by: leraillez@netinf on Jun 16, '05 06:29:00PM

GraphicConverter lets you change the IPTC data. I tried to script GC but I didn't find the right way to change the "comments" that way (didn't try more than 15 mn though ;-)

If you search IPTC on VersionTracker you'll find a few apps that'll let you batch modify the metat data on images without opening them so the jpeg will stay untouched.



[ Reply to This | # ]
10.4: Add Spotlight keywords to images with Preview
Authored by: Whosawhatsis on Jun 17, '05 12:03:44AM
You mean like this?

---
I was offered a penny for my thoughts, so I gave my two cents... I got ripped off.

[ Reply to This | # ]

10.4: Add Spotlight keywords to images with Preview
Authored by: richmc on Jun 17, '05 12:43:04AM

Its very close, but what I don't want to use is the comments field which actually is kMDItemFinderComment, I want to palce the keywords in the keywords field, kMDItemKeywords.

Rich



[ Reply to This | # ]
10.4: Add Spotlight keywords to images with Preview
Authored by: Tom Robinson on Jun 17, '05 02:06:42AM

GraphicConverter can definitely change the IPTC data for multiple files in one hit, and if you put the text into the IPTC Keywords field, it's loaded into Spotlight's kMDItemKeywords.

Just use the GC Browser to show the files you want to change, select them (shift click, ctrl-click, etc.), and do a command-I.

GC's Convert & Modify can also batch load IPTC data from a text file, but I haven't tried that.

Cheers



[ Reply to This | # ]
10.4: Add Spotlight keywords to images with Preview
Authored by: Tom Robinson on Jun 17, '05 02:13:49AM

And after rereading the questions...

GC can add/edit IPTC data to files which support it (JPEG, GIF, TIFF, others?)

For other files you're stuck with whatever file format you're dealing with. Plain text files don't support any keywords, Word documents have their own properties you set within Word, RTFs have keywords you can set with TextEdit, etc.

Finder comments work but they've always been flakey. You may be able to instruct Spotlight to store additional data for the file (like it stores where Safari's downloaded a file from), but again, it's not something to be relied on.



[ Reply to This | # ]
10.4: Add Spotlight keywords to images with Preview
Authored by: Anonymous on Jun 17, '05 03:32:14AM

I have a neat combination of applescripts and plugins for iPhoto that I use the achieve this.

You can use GraphicConverter file browser window to select all of the images you want to add keywords to and then open the IPTC info window to add them.

Until iPhoto 5 i only used GraphicConverter to browse and tag my digital photos with IPTC keywords. When iPhoto 5 came along I decided it was good enough to use instead of GraphicConverter....but iPhoto doesn't understand IPTC keywords.

So I wrote an applescript that imported all of my IPTC keywords into the iPhoto keyword list and applied them to the images. I also have a script the exports iPhoto's keywords back to IPTC keywords in each image. That way when you export an image from iPhoto the keywords go with it. The combination I use is:

iPhoto 5
Keyword Assistant Plugin http://homepage.mac.com/kenferry/software.html
GraphicConverter
My Import/Export Applescripts - which I'll post link to later as I don't have them ready for general consumption.

Keyword Assistant is fantastic as it does autocompletion of keywords as you type from you keyword list or from your Address Book. It also allows you to create new keywords using applescript. Something again the iPhoto is lacking.

I use GraphicConverter to get/set IPTC keywords. One complaint I have is that if Preview.app was scriptable I probably wouldn't have use GraphicConverter!



[ Reply to This | # ]
10.4: Add Spotlight keywords to images with Preview
Authored by: Anonymous on Nov 13, '05 06:33:47PM
I finally got around to uploading my iPhoto IPTC keyword import export scripts. You can find them at:

http://scriptbuilders.net/files/iphotoiptckeywordimportexportutilities1.0.html

[ Reply to This | # ]

10.4: Add Spotlight keywords to images with Preview
Authored by: bonatoc on Aug 20, '05 10:11:03AM

you may try this :

http://www.versiontracker.com/dyn/moreinfo/macosx/26689



[ Reply to This | # ]