1. pygame
  2. Untitled project
  3. pygame

Source

pygame / lib / _numpysurfarray.py

Author Commit Message Date Builds
Lenard Lindstrom
Avoid possible problems with Numpy 1.7 The numpy folks are playing with array casting, making it more strict. This prevents using numpy.rint to convert from float to unsigned int. Do explicit casting instead.
illume
float96 not available on all numpy versions
Lenard Lindstrom
Let _numpysurfarray.blit_array and make_surface methods accept float arrays ( closes #81 ) As requested, surfarray once again excepts numpy arrays with a float dtype. Float values are rounded to int with the numpy.rint ufunc. In Pygame 1.9.1, floats were simply truncated.
Lenard Lindstrom
Move surfarray.make_surface into pixelcopy so can create the new surface from array interface information. This allows surface creation from non-array arrays (PixelArray will be sprouting an array interface shortly.)
Lenard Lindstrom
Surface.get_view('2') now returns a view for 24 bit surfaces. pixelcopy.map_surface now accepts 24 bit integers in target array. pixelcopy.map_surface properly handles 1 dimensional indices in source array. Color type exports array struct interface; can be used as map_surface source array.
Lenard Lindstrom
Merge the surface_buffer branch back into trunk. 1) Rename module _arraysurfarray to pixelcopy, which implements array_to_surface (blit_surface), surface_to_array, and map_array. 2) Reimplement _numpysurfarray methods array2d, array3d, array_alpha, array_colorkey, and map_surface to use new pixelcopy methods. Module pixelcopy reimplements _numericsurfarray using generic copy methods that accept objects exporting an array struct interface. Along with Surface views, it moves almost all of the _numpysurfarray.py functionality into C code. pixelcopy is also independent of NumPy, so can work with other array like objects.
Lenard Lindstrom
Merge the buffer branch back into trunk. 1) Extend pygame.mixer.Sound() to load samples from an object with an array struct interface or the new buffer protocol. Exports an array struct interface. 2) Update sndarray to use the new Sound features on numpy arrays, removing the Python array manipulation code. 3) Add a new Type, pygame._view.View as a proxy for exporting an array struct interface. 4) Add the pygame.Surface.get_view() method,…
Lenard Lindstrom
upgrade numpy handling to Python 3.x
Lenard Lindstrom
allow all Python modules to install with Python 3.1, though some may not work correctly
Lenard Lindstrom
_numpysurfarray.array_alpha() bug with per-pixel alpha surfaces having blanket alpha 0
Lenard Lindstrom
surfarray tests for make_surface, map_array, pixels2d and pixels_alpha, Finished surfarray_test.py
Lenard Lindstrom
add array_alpha and array_colorkey tests to surfarray_test.py. array_alpha values incompatible with unmap_rgb for 16 bit surfaces - fixed in _numpysurfarray.py, ignored in deprecated _numericsurfarray.c.
Lenard Lindstrom
add surfarray.array2d, array3d, pixels2d and pixels3d unit tests
Lenard Lindstrom
surfarray.array3d unit test and 16 bitsize bug fix
marcus
_Really_ fixed 24bpp access for pygame.surfarray.pixels3d().
marcus
Fixed pygame.surfarray.pixels3d() using numpy for 24bpp surfaces.
marcus
Fixed mask settings for 8-bit surfaces created by surfarray.make_surface()
marcus
Fixed surfarray.make_surface() and surfarray.blit_array() bugs as reported by Lenard Lindstrom.
marcus
Put numpyarray and the (old) surfarray under pygame.surfarray. Added methods to switch between numpy and Numeric usage.