Re: CGImageRef to bitmap context? [SOLVED]
Re: CGImageRef to bitmap context? [SOLVED]
- Subject: Re: CGImageRef to bitmap context? [SOLVED]
- From: Mike McNamara <email@hidden>
- Date: Mon, 13 Aug 2007 10:50:26 -0600
At 8:46 AM -0500 8/13/07, Scott Thompson wrote:
CGImageRef is certainly a "bitmap style image". All CGImages
represent a rectangular array of color samples (i.e. pixels).
I think I was thrown off by the fact the documentation says that the
only way to guarantee access to equivalent bits is to create a bitmap
context. Which, in my sleep deprived, under-caffeinated state meant
the image were something aside from bitmap images for some reason!
How are you magnifying the image? With Quartz 2D? With OpenGL?
Quartz 2D. I was creating a CGRect at a given magnification multiple
and then drawing the captured image at the scale of that CGIRect via
CGContextDrawImage(). Which worked fine, except...
I suspect that when you scale the image, the system is using
interpolation to create the resulting image and you are
misinterpreting the interpolation artifacts.
You've hit the nail on the head. That was precisely the problem.
Thank you very much!
CGContextSetInterpolationQuality called with an interpolation quality
of kCGInterpolationNone was the magic bullet. I was simply not
familiar enough with Quartz or CGContextReference.
Thank Scott and Ulo for your help. This list is great.
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden