Re: Decompressing JPEG data into specific format, getting raw pixels
Re: Decompressing JPEG data into specific format, getting raw pixels
- Subject: Re: Decompressing JPEG data into specific format, getting raw pixels
- From: Ken Thomases <email@hidden>
- Date: Wed, 16 Aug 2017 18:39:56 -0500
On Aug 16, 2017, at 6:29 PM, Sean McBride <email@hidden> 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 (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