pygame pixel array color swap?
Author |
Message |
coolgod
|
Posted: Fri Feb 04, 2011 2:21 am Post subject: pygame pixel array color swap? |
|
|
if i'm using pygame pixearray and i do like pxarray=PixelArray(canvas) #canvas is my surface
and i set pxarray[0][0]=(255,0,0) it changes it to blue instead.
A user reported issue b4 and said " I had this weird thing where blue/red was inversed, but not the other colours, when I was mapping some pixels from one image to a blank surface.
It was caused by copying the color integer directly to one pixel to the other, so the trick is to always surface.unmap_rgb(pixel) before setting the color to a new pixel "
I don't exactly how i can set that pixel color to blue using pixel array.
i searched it up and I think it had something to do with sdl stuff.
Someone help me?
http://sdl.beuc.net/sdl.wiki/FAQ_GUI |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
|
|