Re: NSBitmapImageRep byte/color component ordering
Re: NSBitmapImageRep byte/color component ordering
- Subject: Re: NSBitmapImageRep byte/color component ordering
- From: Benjamin Stiglitz <email@hidden>
- Date: Thu, 1 Nov 2007 11:33:25 -0700
If you're certain that the data you're seeing is BGRA, where are you
getting it from?
An NSImage, -TIFFRepresentation. (The NSImage was created with
-initFromContentsOfURL:.) Note that this source NSImage displays
correctly in a NSImageView. No, I'm not 100% sure it's BGR, but
that's the only explanation I can come up with for the blue and red
colors being reversed when I copy the pixels to the new imgrep (which
presumably expects ARGB/RGBA only). Gonna start sampling known pixels
from the input to see what's going on.
Uncompressed TIFFs are BGR. Try -[NSBitmapImageRep initWithData:].
-Ben
_______________________________________________
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