• 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: Getting iPod icon, was Getting the network Machine Icon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting iPod icon, was Getting the network Machine Icon


  • Subject: Re: Getting iPod icon, was Getting the network Machine Icon
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Fri, 23 Jan 2009 14:56:48 +0100


Le 23 janv. 09 à 14:29, Dave a écrit :

Hi,

Is there some sample code anywhere that renders (e.g. applies the mask etc.) an Icon from a .icns file at a given resolution? I'd then like to be able to save the rendered image as a JPEG file.

If anyone knows of some sample code to get me going or can point me to the best starting place for this, I'd be really Grateful.

Thanks a lot

All the Best
Dave


An icns file can be opened using NSImage methods.
Then choose the representation you need and convert it to JPEG as you would do with any image.


If you want to go the "hard" way (that is not that hard):
Use ReadIconFromFSRef() to load the icns file.
Convert it into an FSRef using GetIconRefFromIconFamilyPtr().
And then draw it using PlotIconRefInContext().

_______________________________________________

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: Getting iPod icon, was Getting the network Machine Icon
      • From: Dave <email@hidden>
References: 
 >Getting the network Machine Icon (From: Sandro Noel <email@hidden>)
 >Getting iPod icon, was Getting the network Machine Icon (From: Dave <email@hidden>)
 >Re: Getting iPod icon, was Getting the network Machine Icon (From: Russell Hancox <email@hidden>)
 >Re: Getting iPod icon, was Getting the network Machine Icon (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Getting iPod icon, was Getting the network Machine Icon (From: "email@hidden" <email@hidden>)
 >Re: Getting iPod icon, was Getting the network Machine Icon (From: Dave <email@hidden>)

  • Prev by Date: Core Plot open source plotting framework
  • Next by Date: Encryption: Simplest method to encrypt a SQLite DB file...?
  • Previous by thread: Re: Getting iPod icon, was Getting the network Machine Icon
  • Next by thread: Re: Getting iPod icon, was Getting the network Machine Icon
  • Index(es):
    • Date
    • Thread