Re: Decompressing JPEG data into specific format, getting raw pixels

2017-08-17 Thread Sean McBride
On Wed, 16 Aug 2017 18:39:56 -0500, Ken Thomases said: >On Aug 16, 2017, at 6:29 PM, Sean McBride 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,

Re: Decompressing JPEG data into specific format, getting raw pixels

2017-08-16 Thread Jens Alfke
> On Aug 16, 2017, at 4:29 PM, Sean McBride 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. I

Re: Decompressing JPEG data into specific format, getting raw pixels

2017-08-16 Thread Ken Thomases
On Aug 16, 2017, at 6:29 PM, Sean McBride 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

Re: Decompressing JPEG data into specific format, getting raw pixels

2017-08-16 Thread Sean McBride
On Tue, 15 Aug 2017 10:07:47 -0700, Doug Hill said: >>> Check out CoreImage ColorControls filter, which has a Saturation parameter: >> >> Thanks Doug and Jonathan for the CIImage suggestion, I'll take a >closer look. But one thing I don't see at all in CIImage.h is how to >get an NSData of the

Re: Decompressing JPEG data into specific format, getting raw pixels

2017-08-15 Thread Sean McBride
On Tue, 15 Aug 2017 09:41:25 -0700, Doug Hill said: >Check out CoreImage ColorControls filter, which has a Saturation parameter: Thanks Doug and Jonathan for the CIImage suggestion, I'll take a closer look. But one thing I don't see at all in CIImage.h is how to get an NSData of the pixels of

Re: Decompressing JPEG data into specific format, getting raw pixels

2017-08-15 Thread Doug Hill
> On Aug 15, 2017, at 9:54 AM, Sean McBride wrote: > > On Tue, 15 Aug 2017 09:41:25 -0700, Doug Hill said: > >> Check out CoreImage ColorControls filter, which has a Saturation parameter: > > Thanks Doug and Jonathan for the CIImage suggestion, I'll take a closer

Re: Decompressing JPEG data into specific format, getting raw pixels

2017-08-15 Thread Doug Hill
Check out CoreImage ColorControls filter, which has a Saturation parameter: https://developer.apple.com/library/content/documentation/GraphicsImaging/Reference/CoreImageFilterReference/#//apple_ref/doc/filter/ci/CIColorControls

Decompressing JPEG data into specific format, getting raw pixels

2017-08-15 Thread Sean McBride
Hi all, I get some JPEG data from the network. I want to efficiently decompress this data into a specific format (8 bit greyscale) and have an NSData of the raw pixels. What's the best way to do this? I'm currently using NSBitmapImageRep initWithData:, then testing if the result is