Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ZacharyDenison

macrumors newbie
Original poster
Feb 27, 2008
8
0
Hello,

I am trying to make a small drag-n-drop utility with Xcode in Objective-C / Cocoa to create dmg files, I am not sure how to programmatically set the background image of a folder. Does anyone know the name of the class that handles this?

Thank you.

Zach.
 

yeroen

macrumors 6502a
Mar 8, 2007
944
2
Cambridge, MA
You'll have to manipulate the Folder image, which typically (I believe) is stored in a resource fork. I not 100% about Cocoa, but other frameworks (like Qt) allow you to manipulate images by applying transparency masks. You could layer the new image onto the folder image, flatten, then write back to the file.

There's probably a simpler way of doing this, but I don't know what that might be.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.