Package wx :: Class Image
[frames | no frames]

Type Image

object --+    
         |    
    Object --+
             |
            Image


Method Summary
Image __init__(self, name, type, index)
  __del__(self)
  __nonzero__(self)
  __repr__(self)
  AddHandler(handler)
(Static method)
bool CanRead(name)
(Static method)
bool CanReadStream(stream)
(Static method)
unsigned long ComputeHistogram(self, h)
bool ConvertAlphaToMask(self, threshold)
If the image has alpha channel, this method converts it to mask.
Bitmap ConvertToBitmap(self, depth)
  ConvertToMono(*args, **kwargs)
ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image
  ConvertToMonoBitmap(*args, **kwargs)
ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap
Image Copy(self)
  CountColours(*args, **kwargs)
CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long
  Create(self, width, height)
  Destroy(self)
Deletes the C++ object this Python object is a proxy for.
(success, r, g, b) FindFirstUnusedColour(startR, startG, startB)
Find first colour that is not used in the image and has higher RGB values than startR, startG, startB.
unsigned char GetAlpha(self, x, y)
PyObject GetAlphaBuffer(self)
PyObject GetAlphaData(self)
unsigned char GetBlue(self, x, y)
PyObject GetData(self)
PyObject GetDataBuffer(self)
unsigned char GetGreen(self, x, y)
int GetHeight(self)
int GetImageCount(name, type)
(Static method)
String GetImageExtWildcard()
(Static method)
unsigned char GetMaskBlue(self)
unsigned char GetMaskGreen(self)
unsigned char GetMaskRed(self)
String GetOption(self, name)
int GetOptionInt(self, name)
unsigned char GetRed(self, x, y)
Size GetSize(self)
Image GetSubImage(self, rect)
int GetWidth(self)
bool HasAlpha(self)
bool HasMask(self)
bool HasOption(self, name)
  InsertHandler(handler)
(Static method)
bool LoadFile(self, name, type, index)
bool LoadMimeFile(self, name, mimetype, index)
bool LoadMimeStream(self, stream, mimetype, index)
bool LoadStream(self, stream, type, index)
Image Mirror(self, horizontally)
bool Ok(self)
  Paste(self, image, x, y)
bool RemoveHandler(name)
(Static method)
  Replace(*args, **kwargs)
unsigned char r2, unsigned char g2, unsigned char b2)
Image Rescale(self, width, height)
Image Rotate(self, angle, centre_of_rotation, interpolating, offset_after_rotation)
Image Rotate90(self, clockwise)
bool SaveFile(self, name, type)
bool SaveMimeFile(self, name, mimetype)
Image Scale(self, width, height)
  SetAlpha(*args, **kwargs)
SetAlpha(self, int x, int y, unsigned char alpha)
  SetAlphaBuffer(self, data)
  SetAlphaData(self, data)
  SetData(self, data)
  SetDataBuffer(self, data)
  SetMask(self, mask)
  SetMaskColour(*args, **kwargs)
SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)
bool SetMaskFromImage(self, mask, mr, mg, mb)
  SetOption(self, name, value)
  SetOptionInt(self, name, value)
  SetRGB(*args, **kwargs)
SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)
Image ShrinkBy(self, xFactor, yFactor)

Instance Method Details

ConvertAlphaToMask(self, threshold=128)

If the image has alpha channel, this method converts it to mask. All pixels with alpha value less than threshold are replaced with mask colour and the alpha channel is removed. Mask colour is chosen automatically using FindFirstUnusedColour.

If the image image doesn't have alpha channel, ConvertAlphaToMask does nothing.

Parameters:
threshold
           (type=byte)
Returns:
bool

ConvertToMono(*args, **kwargs)

ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image

ConvertToMonoBitmap(*args, **kwargs)

ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap

CountColours(*args, **kwargs)

CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long

Destroy(self)

Deletes the C++ object this Python object is a proxy for.
Overrides:
wx.Object.Destroy

FindFirstUnusedColour(startR=1, startG=0, startB=0)

Find first colour that is not used in the image and has higher RGB values than startR, startG, startB. Returns a tuple consisting of a success flag and rgb values.
Parameters:
startR
           (type=int)
startG
           (type=int)
startB
           (type=int)
Returns:
(success, r, g, b)

Replace(*args, **kwargs)

Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
unsigned char r2, unsigned char g2, unsigned char b2)

SetAlpha(*args, **kwargs)

SetAlpha(self, int x, int y, unsigned char alpha)

SetMaskColour(*args, **kwargs)

SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)

SetRGB(*args, **kwargs)

SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)

Generated by Epydoc 2.1.20040428.rpd on Tue Nov 9 17:03:24 2004 http://epydoc.sf.net