Module brewcompressedimage :: Class BCIImageHandler
[hide private]
[frames] | no frames]

Class BCIImageHandler

source code

       object --+            
                |            
  wx._core.Object --+        
                    |        
wx._core.ImageHandler --+    
                        |    
  wx._core.PyImageHandler --+
                            |
                           BCIImageHandler

Instance Methods [hide private]
PyImageHandler
__init__(self)
This is the base class for implementing image file loading/saving, and image creation from data, all written in Python.
source code
 
GetImageCount(self, _) source code
 
LoadFile(self, image, stream, verbose, index) source code
 
SaveFile(self, image, stream, verbose) source code
 
DoCanRead(self, stream) source code

Inherited from wx._core.PyImageHandler (private): _SetSelf

Inherited from wx._core.ImageHandler: CanRead, CanReadStream, GetExtension, GetMimeType, GetName, GetType, SetExtension, SetMimeType, SetName, SetType

Inherited from wx._core.Object: Destroy, GetClassName, IsSameAs, __repr__

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from wx._core.PyImageHandler: thisown

Inherited from wx._core.ImageHandler: Extension, MimeType, Name, Type

Inherited from wx._core.Object: ClassName

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

This is the base class for implementing image file loading/saving, and image creation from data, all written in Python. To create a custom image handler derive a new class from wx.PyImageHandler and provide the following methods:

   def DoCanRead(self, stream) --> bool
       '''Check if this handler can read the image on the stream'''

   def LoadFile(self, image, stream, verbose, index) --> bool
       '''Load image data from the stream and load it into image.'''

   def SaveFile(self, image, stream, verbose) --> bool
       '''Save the iamge data in image to the stream using
          this handler's image file format.'''

   def GetImageCount(self, stream) --> int
       '''If this image format can hold more than one image,
          how many does the image on the stream have?'''

To activate your handler create an instance of it and pass it to `wx.Image_AddHandler`. Be sure to call `SetName`, `SetType`, and `SetExtension` from your constructor.

Returns: PyImageHandler
Overrides: object.__init__
(inherited documentation)