problem in displaying the image with embedded cmyk profile
problem in displaying the image with embedded cmyk profile
- Subject: problem in displaying the image with embedded cmyk profile
- From: "padmanaban gandhi" <email@hidden>
- Date: 2 Feb 2005 14:29:25 -0000
Dear All,
We are facing a problem in our colormatching Application .
We are developing colormatching application in Cocoa.( application for softproofing)
In our application, we can display images using NSImageView with embedded RGB
profiles. But it shows blank page when we try to open
an image with embedded CMYK Profile. We would be thankful to you if you could
suggest us a effective solution to this problem.
We are getting an NSBitmapImage representation of the image to be displayed. We are
adding the above NSBitmapImage representaion for one of the NSImage instance.
We have used this below code to get the NSBitmapImage representation for RGB color
space and it works fine.
bitsPerSample = 8;
samplesPerPixel = 4;
hasAlpha = YES;
isPlanar = NO;
destRowBytes = portWidth * samplesPerPixel;
imageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL
pixelsWide:portWidth
pixelsHigh:portHeight
bitsPerSample:bitsPerSample
samplesPerPixel:samplesPerPixel
hasAlpha:hasAlpha
isPlanar:NO
colorSpaceName:NSDeviceRGBColorSpace
bytesPerRow:destRowBytes
bitsPerPixel:0];
But for CMYK colorspace, we have used the below code,
bitsPerSample = 8;
samplesPerPixel = 5;
hasAlpha = YES;
isPlanar = NO;
destRowBytes = portWidth * samplesPerPixel;
imageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL
pixelsWide:portWidth
pixelsHigh:portHeight
bitsPerSample:bitsPerSample
samplesPerPixel:samplesPerPixel
hasAlpha:hasAlpha
isPlanar:NO
colorSpaceName:NSDeviceCMYKColorSpace
bytesPerRow:destRowBytes
bitsPerPixel:0];
And we were getting blank page.( and the error log shows that it is an invalid
representation).
thanks,
pathu.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden