Hi there,

I have this code:

        CGContextSetRGBFillColor(cref, 0xaa/255.0, 0xb0/255.0,0xc0/255.0, 1) ;
        CGContextFillRect(cref, CGRectMake(0, 0, w, h))  ;
        CGContextFlush(cref) ;

Later on, I get the image buffer to print out the contents of the first pixel:

        unsigned long*data = CGBitmapContextGetData (cref);
        if (data != NULL)
                NSLog( "%lx" , data[0]) ;

Here's the output:

c0b0a9ff

Regardless of what I set the red component to, the value in the actual image buffer is always off by one (it is always exactly one less). This does not seem to be true for the green and blue components.

Any ideas why?

Mike
_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to