Why setting image as its own icon with sips result a blurred icon? Are there any alternatives?
5
votes
2
answers
2068
views
I've successfully changed icons using the procedure described in an another question: Changing or setting a file or folder icon programmatically. Either my
What I did before the blurrification:
$ cp FIN-2.png FIN-3.png
$ sips -i FIN-3.png
So FIN-2 and FIN-3 are the same. FIN-2 is a 512x512 PNG-file
**Furthermore:** using
sips
(or Finder) got broken afterwards or I just zoomed in for the first time (it seems the icon is sharp from ≈100x100 downwards), but, anyway, the icon that sips -i image.png
creates is blurry/pixelated:

sips
breaks *all* further attempts when trying to set a custom icon even with *any GUI method* and with *any file* in *any folder*.
Only cure is to delete ~/Library/Caches/com.apple.finder/
and restart Finder. Then changing icon via GUI (drag&drop, copy&paste) works normally with any file.
---
Two main questions—and answering to either one probably solves the problem close enough for me:
2. **How can I set an image as an icon programmatically without using sips -i
(= sips --addIcon
) in the process?** (again, refer to the other question for more comprehensive info)
- Shell (bash) or AppleScript is preferred
- I could convert the PNG to e.g. ICNS if needed.
1. Is sips
broken? Why/How? Can it be fixed; how? (Or is it the Finder? Or something else?)
Asked by Jari Keinänen
(8370 rep)
Mar 23, 2011, 12:45 AM
Last activity: May 20, 2016, 01:35 AM
Last activity: May 20, 2016, 01:35 AM