[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Pixel alpha blends tutorial



> newalpha = pygame.surfarray.pixels_alpha(newcol) #
> pixels_alpha gives us a ref
> for n in range(len(newalpha)):
>     newalpha[n] = alphaarray[n] # and so we simply
> replace each referenced pixel
> del newalpha # and then clean up (this unlocks the
> surface)


Traceback (most recent call last):
  File "C:\coding\alphasprite\alphatests.py", line 47, in ?
    newalpha[n] = alphaarray[n] # and so we simply replace each referenced pixel

ValueError: matrices are not aligned for copy


Alan