In Tiger (10.4.6), +[NSGraphicsContext graphicsContextWithBitmapImageRep:] does not properly map the NSBitmapFormat of the BIR (NSBitmapImageRep) to a CGBitmapInfo for CGBitmapContext (rdar://4687512). The effect of this is that the graphics context will be RGBA, even if the BIR is ARGB. This method properly maps the bitmap format, so that you will get an ARGB context.

Note: Planar BIR data isn't supported at this time. It would need to be deplaned. So far, I haven't had a need to do that. Feel free to submit a patch.

— Peter Hosey (boredzo@gmail.com), 2006-08-13.
This code is under a BSD license; see the included LICENSE.txt for details.
