Scaled images and garbage pixels
Scaled images and garbage pixels
- Subject: Scaled images and garbage pixels
- From: "Erik M. Buck" <email@hidden>
- Date: Sat, 23 Mar 2002 12:35:32 -0600
I have a bunch of images that contain alpha. When I
use -drawAtPoint:fromRect:operation:fraction: to draw the images in an
identity coordinate system everything is fine. If the coordinate system is
scaled at all, sparkly garbage pixels appear anywhere there was transparency
in the source images. It does not matter what color the images are draw
over. Colors that are not in the image or the background appear such as
cyan and magenta.
I assume that scaling an image produces pixels that may combine a
transparent pixel with an adjacent opaque pixel during interpolation. Why
is the interpolation producing random pixel colors? I could understand if
the alpha value of a pixel is used for any interpolated pixel based upon it.
I could understand lots of algorithms for interpolating colors including
alpha when scaling images. Why am I seeing garbage pixels ?
Is this just a bug ?
OpenGL drawPixels() in combination with glZoomPixels() does not exhibit this
behavior, but I can not use OpenGL for this application when not in full
screen mode for a variety of reasons I won't get into here.
Does anyone know a way to avoid garbage pixels in scaled NSImages that
include alpha ?
_______________________________________________
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.