• 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
Largest image representation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Largest image representation


  • Subject: Largest image representation
  • From: Daniel Gobera <email@hidden>
  • Date: Fri, 9 Mar 2007 11:43:47 -0800

Hi.
I have an NSImage with 3 representations (it's actually an icon obtained from NSWorkspace iconForFile). I'd like to save this image, but I only need the largest representation. Is there a way to obtain this directly? NSImage's bestRepresentationForDevice: returns the 32x32 representation, but I want the 128x128 one.


Currently what I do is iterate over the array of representations and compare their sizes to manually get the largest one. It may not be too expensive, but I wanted to know if there's a more elegant solution.

Thanks,
Daniel
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: Largest image representation
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: Re: Adding Checkboxes and PopUp Menus to OutlineViews
  • Next by Date: Re: Multi-threaded help
  • Previous by thread: Re: Adding Checkboxes and PopUp Menus to OutlineViews
  • Next by thread: Re: Largest image representation
  • Index(es):
    • Date
    • Thread