Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread Display Modes
Old Jun 30, 2012, 09:36 PM   #1
macrumors member
Join Date: Jan 2011
Color Calibration Problem

I am reading pixels from an image using NSReadPixel. This gives me a color with NSDeviceRGBColorSpace. I read in a small collection of these colors and then recreate the image with the reduced color set using the NSBitmapImageRep method:

initWithBitmapDataPlanes:(unsigned char **)planes
colorSpaceName:(NSString *)colorSpaceName
To do this, I need to have my image data as unsigned characters. So I use the NSColor method getRed:green:blue:alpha: (then multiply each of the floats by 255 typecasted as unsigned char). I use NSDeviceRGBColorSpace for the colorSpace name in the initWithBitmapPlanes: method.

The colors in the image that I get as a result are off. How can I fix this problem?

If I fill bezier paths with the colors I create from the unsigned char bitmaps, then the colors match better (using both colorWithCalibratedRed:green:blue:alpha: and colorWithDeviceRed:green:blue:alpha

Last edited by Thethuthinang; Jun 30, 2012 at 09:37 PM. Reason: spacing
Thethuthinang is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
IMac Display Color Calibration Question kathyricks iMac 3 Dec 3, 2013 08:18 PM
13in Retina color calibration? Mac.User MacBook Pro 4 Sep 29, 2013 06:24 PM
Color Calibration hardware - monitor agnostic? macmesser Mac Peripherals 8 Jul 5, 2013 06:07 PM
Color Calibration kenaiking Digital Photography 12 Aug 5, 2012 06:08 AM
Color Calibration with Lion Artful Dodger Digital Photography 2 Jul 3, 2012 01:55 AM

Forum Jump

All times are GMT -5. The time now is 11:58 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2015, MacRumors.com, LLC