DasGenie: !Scrap
« Beauty is skin deep... | Main | Joel on IT Conversations »

Freitag, 1. Oktober 2004

Add Icon Droplet

sips is very nice, but on the other hand, adding icons per drag and drop is nicer, so here you go with your applescript editor:

-- save in Script Editor as Application
-- drag files to its icon in Finder

on open some_items
    
repeat with this_item in some_items
        
try
            addicon_and_save
(this_item)
        
end try
    
end repeat
end open

to addicon_and_save(this_item)
    
try
        
tell application "Image Events"
            
launch
            
set this_image to open this_item
            
save this_image with icon
            
close this_image
        
end tell
    
end try
end addicon_and_save

macosxhints has a nice Drag-and-drop script to quickly resize any image which brought this possibility to my attention.
01:14 - Freitag, 1. Oktober 2004
Comments

I have a similar script, but the problem is that the script ends up opening and re-encoding the JPEG file, which means it'll be a different size, and it will lose image quality. You can see that the data fork is a different size by doing 'ls -l' in a terminal.

I've been trying to figure a way around it, using sips, but sips seems to do the same thing. Any ideas?

Posted by: Winston at 24.11.04 05:56

Thanks for pointing this out to me. This is awful and totally unacceptable... reencoding JPEG files is the worst you can do when simply should add metadata.
So here are 2 apps that add icons less intrusively:
- http://www.devon-technologies.com/download/shareware.php
Thumbs up from devon, freeware and good
- http://www.mikethole.com/thumbnail/
Thumbnail Pro which is fancier (nice "Themes" for the icons) but also shareware

Posted by: Domink Wagner at 24.11.04 12:27