display image with embedded CMYK profile
display image with embedded CMYK profile
- Subject: display image with embedded CMYK profile
- From: "padmanaban gandhi" <email@hidden>
- Date: 31 Jan 2005 15:41:03 -0000
Dear All,
I have an imageViewing application, in which i can display images with
embedded RGB profiles. But in my application, it shows blank page when i try to open
an image with embedded CMYK Profile.
I am getting an NSBitmapImage representation of the image to be displayed.
I am adding the above NSBitmapImage representaion for one of the NSImage instance.
I 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, i 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 i get only blank page.( and the error log shows that it is an invalid
representation).
Can any one please help me out, where i am wrong.
thanks in advance.
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