why is quartz still interpolating ??
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.