On Sat, Nov 1, 2008 at 11:22 AM, josch <[EMAIL PROTECTED]> wrote:
>
> Hello all!
>
> Easy reproduction: everytime I load this image: 
> http://rabenfrost.net/josch/heroes/0.png
> or similar ones which I happen to have a lot, and scale them to
> anything different from it's original size it will look like this
> afterwards: http://rabenfrost.net/josch/heroes/0_zoom.png
>
> here is the demo code: http://phpfi.com/372196
>
> Why is that and how can I circumvent this?

If you open the source image up in Gimp or Photoshop and inspect the
colour values in the transparent areas, you'll notice they're (255, 0,
255, 0) -- that is, magenta with 0 alpha.  When you bilinear
interpolate between that and an adjacent non-transparent pixel, the
colour is blended as well, giving the pink, translucent outline.

You can fix the source images in either Gimp (replace the colours) or
programmatically yourself by iterating over the pixel data.  AFAIK
there is no way to change OpenGL's blending behaviour to have it
weight the colour values by alpha.

Alex.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to