Re: Keeping grayscale image grayscale

2011-10-19 Thread Ken Ferry
On Tue, Oct 18, 2011 at 6:26 AM, Jonathan Taylor j.m.tay...@durham.ac.ukwrote: Belated thanks for the various replies to my question. I'm working through the posted code and links now and looking at what I can learn from it. One query though: On 12 Oct 2011, at 16:42, Heinrich Giesen wrote:

Re: Keeping grayscale image grayscale

2011-10-18 Thread Jonathan Taylor
Belated thanks for the various replies to my question. I'm working through the posted code and links now and looking at what I can learn from it. One query though: On 12 Oct 2011, at 16:42, Heinrich Giesen wrote: Another rule of thumb is: if you need -[NSImage TIFFRepresentation] you do

Re: Keeping grayscale image grayscale

2011-10-12 Thread Heinrich Giesen
Jonathan Taylor wrote: I'm working with 16-bit grayscale images, and for the most part I'm just manipulating bits within NSBitmapImageRep objects. However for convenience it would be nice to do some stuff with NSImages, particularly when rescaling and suchlike. The problem is that whenever

Re: Keeping grayscale image grayscale

2011-10-12 Thread Ken Ferry
Thanks Heinrich. Your code looks correct to me! See also http://cocoadev.com/index.pl?NSBitmapImageRep. I wrote most of that. -Ken Cocoa Frameworks On Wed, Oct 12, 2011 at 8:42 AM, Heinrich Giesen heinrich.gie...@t-online.de wrote: Jonathan Taylor wrote: I'm working with 16-bit grayscale

Keeping grayscale image grayscale

2011-10-10 Thread Jonathan Taylor
I'm working with 16-bit grayscale images, and for the most part I'm just manipulating bits within NSBitmapImageRep objects. However for convenience it would be nice to do some stuff with NSImages, particularly when rescaling and suchlike. The problem is that whenever I draw into such an NSImage

Re: Keeping grayscale image grayscale

2011-10-10 Thread Scott Ribe
On Oct 10, 2011, at 11:43 AM, Jonathan Taylor wrote: Does anyone have any suggestions? Personally, I use Apple's vImage library (in the Accelerate framework). Much lower level, but it gives you total control, while still using highly-optimized algorithms. -- Scott Ribe