[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] chewy changes to cvs



> maybe this is related -- I am experiencing some
> strangeness with the surfarray module.  I'm using the
> cvs version and am having trouble going back to the
> old one to check if this was happening before, but it
> seems that pixels3d returns arrays in BGR format both
> in 32 and 24 bit modes, but blit_array uses RGB order
> in 32bit and BGR in 24bit. in other words if you take
> a slice of the pixels3d member in 32 bit mode, blit it
> to a new surface of the same dimensions, then blit
> that back to the display surface the red and blue will
> be reversed. this is on win98 in software and hardware
> surfaces. you probably know about this anyway but if
> not I can send code that shows it. 

i don't believe these are related. the surfarray module
code makes my head hurt if when i debug the source for
extended periods of time. i believe the BGR problem is a
simple a case of getting my 'endian' backwards. i've seen
it work at one points, so i'll doublecheck. it's hard to
tell if the "vgrade" example has the red and blue swapped
since it's just using random colors.

the 3d arrays should always be in RGB order, surfarray
attempts to also reverse data that is in BGR order.
there's likely a case or two that is backwards here :[


 
> also array3d seems to either return garbled results or
> cause a segfault. 

ok, time to spend more work with the surfarray. i also recently
noticed some problems with array2d and 8bit surfaces... whew!

if you could send me the examples that are crashing, i'll work
to get those cases working first.



____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org