• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Icon Overlay on Mac OSX
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Icon Overlay on Mac OSX


  • Subject: Re: Icon Overlay on Mac OSX
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 02 Aug 2012 19:26:09 -0700

On Aug 2, 2012, at 6:54 PM, KappA <email@hidden> wrote:

> get the attributes
> get the icon
> composite the overlay
> set the icon
> set the attributes

This has an obvious race condition, but it should work most of the time. If you don't change the icon often, you should be OK.

> I am not sure how this affects MD5 checksum, I am going to look into that next...

It doesn't, because it doesn't affect the contents of the file. Unless you use a fancy checksum tool that incorporates all the extended-attribute metadata.

It *is* going to affect the disk space used, though. Since a 512x512 32-bit icon is a megabyte in size, that means you may be adding 1MB per file you badge. That can add up. And it's not at all obvious to a user where that space went, or how to recover it. So I would avoid doing this to lots of files.

It also slows down the Finder a bit since it has to open the file and read the icon instead of just looking it up from a cache based on the file-type. (This can be really painful when viewing that folder over AFP file sharing, in fact IIRC the Finder may turn off the display of custom icons on remote folders for this reason.)

—Jens
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Icon Overlay on Mac OSX
      • From: Charles Srstka <email@hidden>
References: 
 >Re: Icon Overlay on Mac OSX (From: Alfian Busyro <email@hidden>)
 >Re: Icon Overlay on Mac OSX (From: Jens Alfke <email@hidden>)
 >Re: Icon Overlay on Mac OSX (From: Uli Kusterer <email@hidden>)
 >Re: Icon Overlay on Mac OSX (From: KappA <email@hidden>)
 >Re: Icon Overlay on Mac OSX (From: Charles Srstka <email@hidden>)
 >Re: Icon Overlay on Mac OSX (From: Alfian Busyro <email@hidden>)
 >Re: Icon Overlay on Mac OSX (From: KappA <email@hidden>)

  • Prev by Date: Re: crash in showOpenPanel on ML
  • Next by Date: Re: Anybody know why instantiateNibWithOwner:topLevelObjects: was deprecated?
  • Previous by thread: Re: Icon Overlay on Mac OSX
  • Next by thread: Re: Icon Overlay on Mac OSX
  • Index(es):
    • Date
    • Thread