On Aug 16, 2017, at 6:29 PM, Sean McBride <s...@rogue-research.com> wrote:
> 
> 
> Right, but then I'm back where I started. :(  Because there's (apparently) no 
> way to ensure that the NSBitmapImageRep I get is in a particular format, and 
> I absolutely need 8 bit per pixel & greyscale.

It's quite old now, but the 10.6 AppKit release notes had a lot of good 
information about working with images in Cocoa viz. Core Graphics.  From 
<https://developer.apple.com/library/content/releasenotes/AppKit/RN-AppKitOlderNotes/#X10_6Notes>,
 search for "NSImage, CGImage, and CoreGraphics impedance matching" and read 
from there.

They also have advice about what you're trying to do.  The advice is to *not* 
try to interpret an arbitrary image rep's bitmap data.  It's to make a bitmap 
with the format you desired and draw the source image into it.  Then, you have 
bitmap data in the format you want, for sure.  For that, search for 
"NSBitmapImageRep: CoreGraphics impedance matching and performance notes".

Regards,
Ken

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to