Re: Which color space?

2010-06-01 Thread Simon Raisin
Thanks Seth. I haven't been able to find any good docs on this stuff. Do you happen to know where I can read conceptual material about color spaces? On Mon, May 31, 2010 at 1:11 PM, Seth Willits wrote: > On May 31, 2010, at 4:06 AM, Simon Raisin wrote: > > > Thank yo

Reduce the size of an NSImage

2010-06-01 Thread Simon Raisin
Hi, I am trying to reduce the size of an NSImage by 50% and then save the reduced image out to disk. The following code does not reduce the image. Should I be going about this a different way? Thanks! Simon NSImage* inputImage = [[NSImage alloc] initWithContentsOfFile:[fileNames objectAtI

Re: Which color space?

2010-06-01 Thread Simon Raisin
channel. I hate it when the docs are incorrect. And I copied that method call from an Apple sample... I'll remove the extraneous casts. :) Thanks again, Simon On Sun, May 30, 2010 at 10:08 PM, Seth Willits wrote: > On May 29, 2010, at 7:09 AM, Simon Raisin wrote: > > > I would li

Which color space?

2010-05-30 Thread Simon Raisin
I would like to create an 8-bit grayscale image but I cannot find a color space that uses only 1 8-bit value per pixel. Everything seems to either be RGB, RGBA, or one color *plus* an alpha channel. Am I going about this the wrong way? Thank you in advance, Simon NSBitmapImageRep* outputIma

Re: Create an NSImage using pixel (RGB) data

2010-05-25 Thread Simon Raisin
geData = [bitmapImageRep representationUsingType: NSJPEGFileType properties:imageProps]; [outputImageData writeToFile:@"output.jpg" atomically:NO]; [bitmapImageRep release]; [pool drain]; return 0; } On Tue, May 25, 2010 at 8:24 AM, Simon Raisin wrote: > Hi, > &g

Create an NSImage using pixel (RGB) data

2010-05-25 Thread Simon Raisin
Hi, I would like to create an new NSImage (of a specified size) by modifying its pixel data directly. I'm assuming that I have to create/provide a representation then call [rep bitmapData], but I've been unable to come up with a working solution thus far. Does anyone know of an example I might l

stringByTrimmingCharactersInSet

2009-05-06 Thread Simon Raisin
NSString *s = [@"1,660.0" stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@","]]; For some reason s is always "1,660.0". Shouldn't the comma be removed? Thanks, CxT ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.c

Bindings confusion

2009-04-28 Thread Simon Raisin
Hi, I'm running into a binding issue is my main application so I wrote a small test app to try to track down the problem: primarily that I cannot get the UI to update appropriately when it is configured to observe my model objects via bindings. // AppDelegate.h @class ModelObject; @interface AppD

Simon Raisin wants to chat

2008-10-01 Thread Simon Raisin
--- Simon Raisin wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-4cf3a124c9-b5625013e4-863fde0ab01abf2e You'