[OS X 10.5.6. Xcode 3. All updates. No funny stuff.]
I'm getting the following error in my log
<Error>: CGBitmapContextCreate: unsupported parameter combination: 8
integer bits/component; 24 bits/pixel; 3-component colorspace;
kCGImageAlphaNone; 1536 bytes/row.
when I execute the last line of the following:
NSBitmapImageRep* showListRep = nil;
showListRep = [[[[leftImageView image] representations] objectAtIndex:0]
copy];
[NSGraphicsContext saveGraphicsState];
[NSGraphicsContext setCurrentContext:[NSGraphicsContext
graphicsContextWithBitmapImageRep:showListRep]];
The 'leftImageView' in question is an NSView which has had an image
dragged into it from the Finder. I have tried it with two images
(generated by other people and working perfectly in all other situations)
and both give similar messages. In each case the maths makes sense.
I also tried making up my own image using 'initWithBitmapDataPlanes' and
got the same error when I used the same parameters. However, if I set it
to use 4 samples per pixel (even though I don't need Alpha for this) the
error went away.
If I understand this correctly, the complaint is that it can't use a 3-
component representation as a graphics context. If that's the case, how
come my programs can use these images for other image operations without
problems ?
My finished program doesn't need to work with and OS X < 10.4.
Simon.
--
http://www.hearsay.demon.co.uk