A user reported that PySpaceWar fails on 64-bit Linux machines if I try
to scale the alpha channel. Here's the code (simplified):
import pygame
import Numeric
image = pygame.image.load('title.png') # has an alpha channel
mask = pygame.surfarray.array_alpha(image).astype(Numeric.Int)
array = pygame.surfarray.pixels_alpha(self.image)
alpha = 42.5 # a float between 1 and 255
array[:] = (mask * alpha / 255).astype(Numeric.UnsignedInt8)
The error happens on the last line, and it says
ValueError: matrices are not aligned for copy
Any ideas? The code works fine on 32-bit systems.
Marius Gedminas