Oh, thanks! I was missing that, now it works ok. I'll keep playing with this toy code.
M. On Mar 3, 2010, at 11:02 PM, Graham Cox wrote: > > On 04/03/2010, at 3:54 PM, Martin Beroiz wrote: > >> bitsPerSample:8 > >> pixels[0] = 1; >> pixels[1] = 0; >> pixels[2] = 0; >> pixels[3] = 0; > >> The docs say that NSDeviceWhiteColorSpace has pure white at 1.0, so I'm >> guessing that pixels[0] = 1 will set a white pixel, am I wrong? > > > Yes. Because you're setting the pixel buffer values directly, you need to set > the 8 bits you asked for. So value 0 is one end, value 255 is the other. > Pixels are not expressed directly as values in a colour space. > > --Graham > > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com