On 09/11/2009, at 7:28 PM, Michael Robinson wrote: > I'm getting images with a lot of noise in them, I was wondering if > anyone has any ideas why this would be? I've attached a screenshot of > the noisy images I've been getting. The shot is of four images that .... > well shouldn't have any noise at all.
An NSBitmapImageRep is not guaranteed to be empty when you create it and in general it's just full of random bits. You need to clear it explicitly if you are drawing non-opaque content: void ClearBitmapImageRep(NSBitmapImageRep* bitmap) { unsigned char* bitmapData = [bitmap bitmapData]; if (bitmapData != NULL) { bzero(bitmapData, [bitmap bytesPerRow] * [bitmap pixelsHigh]); } } -- Rob Keniger _______________________________________________ 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