I need to create a prototype application where I overlay a small image on the file icons of this folder. Say I have a folder / MyDocuments / and there are three files / MyDocuments / Doc 1.rtf / MyDocuments / Doc1.pdf and / MyDocuments / Doc1.jpg and I have an image myicon.png , now I have to overlay this image on myicon .png to file icons of all three files present in / MyDocuments /
I understand that I can use the methods in NSWorkspace sharedWorkspace to get and set the file icons for these files, but I have no idea how to use the myicon.png image and overlay it on top of the existing icons of these files.
If someone saw the Dropbox app (dropbox.com), then it looks like the way you see the changed icons in the Dropbox folder
I assume this will be done using NSImage, but I do not know how to do this.
Note. The image myicon.png will occupy only the upper left part of the original icon of these files, i.e. the image should not completely overlap with existing icons, but only 1/4 of the upper left should be occupied.
source
share