• 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
why is quartz still interpolating ??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

why is quartz still interpolating ??


  • Subject: why is quartz still interpolating ??
  • From: Robert Clair <email@hidden>
  • Date: Mon, 19 Apr 2004 12:41:58 -0400

I draw a bunch of single color bitmaps. Since the color may change, I drop
down into core graphics and use image masks. My problem is that I can't
get Quartz to stop interpolating - no matter what I do I wind up with a
few pixels that are neither the color that I'm drawing in nor the
background color.

The image mask is created with the last argument of CGCreateImageMask
("shouldInterpolate") set to NO.

I also call :

CGContextSetShouldAntialias(gcref, NO );
CGContextSetInterpolationQuality( gcref, kCGInterpolationNone);

This cuts down on the number of interpolated pixels but doesn't eliminate them.

Why do I care ? In some cases I'm essentially making a false color image.
The colors encode something and I examine the pixels produced after rendering
to try and extract some information. It is extremely inconvenient to have colors that I
didn't ask for.

This seems a bit unreasonable to me - InterpolateNone should be the easiest thing to
do - either the center of the destination pixel, transformed back to the source image
is inside a colored pixel or not.

Does anyone know a way to force this to behave? - I have a workaround, but it is ugly.

.....Bob Clair
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: why is quartz still interpolating ??
      • From: "M. Uli Kusterer" <email@hidden>
    • Re: why is quartz still interpolating ??
      • From: Shawn Erickson <email@hidden>
  • Prev by Date: Outlined strokes and transparency WAS: Getting PDF and/or EPS data
  • Next by Date: Re: why is quartz still interpolating ??
  • Previous by thread: Outlined strokes and transparency WAS: Getting PDF and/or EPS data
  • Next by thread: Re: why is quartz still interpolating ??
  • Index(es):
    • Date
    • Thread