Re: NSImage representations
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