• 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: NSImage representations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImage representations


  • Subject: Re: NSImage representations
  • From: Alastair Houghton <email@hidden>
  • Date: Mon, 9 Jul 2007 11:57:35 +0100

On 8 Jul 2007, at 20:32, Dorian Johnson wrote:

The way I generally do it, to avoid TIFFRepresentation and ensure that all of my bitmap image reps are 32 ARGB is create the bitmap rep explicitly, then lock focus onto it
(there's a method for that in NSGraphicsContext) and draw the NSImage on it.

Presumably you're talking here about creating a new graphics context using +graphicsContextWithBitmapImageRep: rather than locking focus on the image? If you have an NSImage and do -lockFocus, AFAIK the system converts (one of) the image reps to match the current display, which is possibly not what you want.


It's worth pointing out as well that the Accelerate framework has a large number of highly-optimized functions for converting between different pixel formats. See

<http://developer.apple.com/documentation/Performance/Conceptual/ vImage/index.html>

for more information on that.

Kind regards,

Alastair.

--
http://alastairs-place.net


_______________________________________________

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: NSImage representations
      • From: Dorian Johnson <email@hidden>
References: 
 >Fwd: NSImage representations (From: Jeremy Rotsztain <email@hidden>)
 >Re: NSImage representations (From: Dorian Johnson <email@hidden>)
 >Re: NSImage representations (From: Dorian Johnson <email@hidden>)
 >Re: NSImage representations (From: Jeremy Rotsztain <email@hidden>)
 >Re: NSImage representations (From: Dorian Johnson <email@hidden>)
 >Re: NSImage representations (From: Jeremy Rotsztain <email@hidden>)
 >Re: NSImage representations (From: Dorian Johnson <email@hidden>)

  • Prev by Date: Re: NSNumber increment
  • Next by Date: Re: Decoding a line of Objective-C
  • Previous by thread: Re: NSImage representations
  • Next by thread: Re: NSImage representations
  • Index(es):
    • Date
    • Thread