• 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
Scaled images and garbage pixels
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >double precision errors and numbers not adding correctly (From: Chad Armstrong <email@hidden>)
 >Re: double precision errors and numbers not adding correctly (From: "Erik M. Buck" <email@hidden>)

  • Prev by Date: Re: CADO: Cocoa Application Developers Organization?
  • Next by Date: Problems with isEqualToString
  • Previous by thread: Re: double precision errors and numbers not adding correctly
  • Next by thread: Re: double precision errors and numbers not adding correctly
  • Index(es):
    • Date
    • Thread