Changing the Color Space of NSImage
Hi everybody. Is there a way I can change the color space of an NSimage or NSBitmapImageRep/CGimage or the like. I am open to any way. Preferably the way photoshop does it. ...
Hi everybody. Is there a way I can change the color space of an NSimage or NSBitmapImageRep/CGimage or the like. I am open to any way. Preferably the way photoshop does it. ...
Hi, I'm writing application that operates on black&white images. I'm doing it by passing a NSImage object into my method and then making NSBitmapImageRep from NSImage. All works but quite slow. Here's my code: - (NSImage *)skeletonization: (NSImage *)image { int x = 0, y = 0; NSUInteger pixelVariable = 0; NSBitmapImageRep *bitm...
I have an NSImage with different images inside it. The positions of the images inside of it will stay the same all the time, so I need to specify a rectangle to get a subimage at the position of the rectangle is inside of the image. How could this be done? ...
I have an IKImageView, and I'm putting CGImages (That I make out of NSImages) onto it. However, a normal 200DPI 8.5/11 page takes like 3 seconds to come up, appearing in rectangles about 2inches (screen) on a side at a time. This is really annoying. Is there a way around this? Alternatively, is there a way to double buffer the view? To ...
Ok, it appears that the I'm creating a PDFDocument where pixelWidth is incorrect in the images that I created. So the question becomes: How do I get the correct resolution into the image? I start with bitmap data from a scanner. I'm doing this: CGDataProviderRef provider= CGDataProviderCreateWithData(NULL (UInt8*)data, bytesPerRow * le...
I have a bunch of NSImages that I'm keeping in a PDFDocument, as PDFPages. When I insert the NSImage the first time, the size of the NSImage is in points (72 dpi), and the size of the (only) NSImageRep is in pixels (200 dpi). However, the NSImage that I get out of the PDFPage has 72 dpi for both image AND imagerep. How do I recover my...
Hi Following is the code snippet that I have: // Make Auto release pool NSAutoreleasePool * autoReleasePool = [[NSAutoreleasePool alloc] init]; try { if (mCapture) { // Get the image reference NSImage* image = NULL; image = [mCapture getCurrentFrameImage]; // Get the TIFF data NSData *pDataTifData = [[NSData all...
Hi, Is it possible for me to take use an image as a green screen type thing like in photo booth where it takes the background out? ...
Whenever I do: xxx = [NSImage imageNamed:@"Package.png"]; xxx loads but it's width and height remain 0. And whenever I try loading it into an NSImageCell I get this error: NSImageCell's object value must be an NSImage. Can someone help me out? I've never had this problem before. Edit: Sorry, I've missed this bit out. So when I ...
I have an NSView that display an image, and i'd like to make this view acts like a cropping image effect. Then i make 3 rectangles (imageRect, secRect and IntersectRect), the imageRect is the rect which show an image, secRect is rect which just act to darken whole imageRect, and the intersectRect is a rect which like an observe rect, wha...
I need to know which image file type was used in the file i loaded with "initWithContentsOfFie" because i don't want to trust the file extension. Unfortunately i can't find anything about the format in NSImage and NSImageRep, ...
Hi, I think i'm missing something really basic here. If I do this with a legal URL/path which I know exists: NSImage* img = [[NSImage alloc] initWithContentsOfFile:[[selectedItem url] path]]; NSLog(@"Image width: %d height: %d", [img size].width, [img size].height); then I get reported to the console that the width is -2080177216 and...
Hi, I have to render a PDF into a very high resolution image (say up to and even over 100,000 * 80,000 pixels). I managed to do that without going out of ram by splitting the render into several slices and then rendering each one using NSOperationQueue, basically drawing the NSImage pdf representation into a new NSImage using drawInRect...
I am trying to draw a repeating background image in my NSView, I have this till now: // INIT - (id)initWithFrame:(NSRect)frame { if (self = [super initWithFrame:frame]) { self.backgroundImage = [NSImage imageNamed:@"progressBackground.pdf"]; } return self; } // DRAW - (void)drawRect:(NSRect)dirtyRect { // Draw the backgrou...
hey guys, I have a large image, and then i'm extracting a portion of the image out via: [mBaseImage lockFocus]; NSBitmapImageRep* bitmapImageRep = [[NSBitmapImageRep alloc] initWithFocusedViewRect: NSMakeRect(startX,startY,width,height)]; [mBaseImage unlockFocus]; followed by: extractedImage = [[NSImage alloc] initWithSize:[bitmapIma...
Hi. i have created a custom NSView that displays an image. i have created a property in Inspector view with binding to File's Owner. Everything works fine in runtime image changing. But nothing is loaded when i save and load xib file. here is the simplified code: IBDocument *document = [IBDocument documentForObject:self]; [self->defau...
I have an NSView in an NSScrollView that I want to create an NSImage from. Because it's in an NSScrollView it's not always completely visible, and it can be even bigger that the screen's size. Can anyone help me? Thanks. ...