• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CGImageRef to bitmap context? [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: CGImageRef to bitmap context? [SOLVED]
      • From: Scott Thompson <email@hidden>
References: 
 >CGImageRef to bitmap context? (From: Mike McNamara <email@hidden>)
 >Re: CGImageRef to bitmap context? (From: Scott Thompson <email@hidden>)

  • Prev by Date: Re: Is SearchKit's binary index Universal?
  • Next by Date: Re: CGImageRef to bitmap context? [SOLVED]
  • Previous by thread: Re: CGImageRef to bitmap context?
  • Next by thread: Re: CGImageRef to bitmap context? [SOLVED]
  • Index(es):
    • Date
    • Thread