Package pyjsdl :: Module pyjsarray :: Class ImageMatrix

Class ImageMatrix

object --+    
         |    
   Ndarray --+
             |
            ImageMatrix

Instance Methods
 
__init__(self, imagedata)
Provides an interface to canvas ImageData as an Ndarray array. The argument required is the ImageData instance to be accessed.
 
getWidth(self)
Return ImageData width.
 
getHeight(self)
Return ImageData height.
 
getPixel(self, index)
Get pixel RGBA. The index arguement references the 2D array element.
 
setPixel(self, index, value)
Set pixel RGBA. The arguements index references the 2D array element and value is pixel RGBA.
 
getPixelRGB(self, index)
Get pixel RGB. The index arguement references the 2D array element.
 
setPixelRGB(self, index, value)
Set pixel RGB. The arguements index references the 2D array element and value is pixel RGB.
 
getPixelAlpha(self, index)
Get pixel alpha. The index arguement references the 2D array element.
 
setPixelAlpha(self, index, value)
Set pixel alpha. The arguements index references the 2D array element and value is pixel alpha.
 
getPixelInteger(self, index)
Get pixel integer color. The index arguement references the 2D array element.
 
setPixelInteger(self, index, value)
Set pixel integer color. The arguements index references the 2D array element and value is pixel color.
 
getImageData(self)
Return JavaScript ImageData instance.

Inherited from Ndarray: __abs__, __add__, __and__, __div__, __divmod__, __eq__, __floordiv__, __ge__, __getitem__, __getslice__, __gt__, __iadd__, __iand__, __idiv__, __ifloordiv__, __ilshift__, __imod__, __imul__, __invert__, __ior__, __ipow__, __irshift__, __isub__, __iter__, __itruediv__, __ixor__, __le__, __len__, __lshift__, __lt__, __matmul__, __mod__, __mul__, __ne__, __neg__, __or__, __pos__, __pow__, __repr__, __rshift__, __setitem__, __setslice__, __str__, __sub__, __truediv__, __xor__, astype, cmp, copy, empty, fill, getArray, getshape, matmul, op, reshape, set, setshape, swapaxes, tolist, view

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Variables
  shape = property(getshape, setshape)
Properties

Inherited from object: __class__

Method Details

__init__(self, imagedata)
(Constructor)

 
Provides an interface to canvas ImageData as an Ndarray array. The argument required is the ImageData instance to be accessed.
Overrides: object.__init__