| Home | Trees | Index | Help |
|
|---|
| Package wx :: Class 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 |
If the image has alpha channel, this method converts it to mask. |
ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool | |
| Bitmap | ConvertToBitmap(self,
depth)
|
ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image | |
ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap | |
| Image | Copy(self)
|
CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long | |
Create(self,
width,
height)
| |
Deletes the C++ object this Python object is a proxy for. | |
| (success, r, g, b) |
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)
|
| (r,g,b) |
Get the current mask colour or find a suitable colour. |
| 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)
|
Initializes the image alpha channel data. | |
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) |
unsigned char r2, unsigned char g2, unsigned char b2) | |
| Image | Rescale(self,
width,
height)
|
| Image | Resize(self,
size,
pos,
r,
g,
b)
|
| 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(self, int x, int y, unsigned char alpha) | |
SetAlphaBuffer(self,
data)
| |
SetAlphaData(self,
data)
| |
SetData(self,
data)
| |
SetDataBuffer(self,
data)
| |
SetMask(self,
mask)
| |
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(self, int x, int y, unsigned char r, unsigned char g, unsigned char b) | |
SetRGBRect(self, Rect rect, unsigned char r, unsigned char g, unsigned char b) | |
| Image | ShrinkBy(self,
xFactor,
yFactor)
|
| Image | Size(self,
size,
pos,
r,
g,
b)
|
| 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
If the image image doesn't have alpha channel, ConvertAlphaToMask does nothing.
|
ConvertColourToAlpha(*args, **kwargs)ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool This method converts an image where the original alpha information is only available as a shades of a colour (actually shades of grey) typically when you draw anti-aliased text into a bitmap. The DC drawing routines draw grey values on the black background although they actually mean to draw white with differnt alpha values. This method reverses it, assuming a black (!) background and white text. The method will then fill up the whole image with the colour given. |
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.
|
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.
|
GetOrFindMaskColour()Get the current mask colour or find a suitable colour.
|
InitAlpha(self)Initializes the image alpha channel data. It is an error to call it if the image already has alpha data. If it doesn't, alpha data will be by default initialized to all pixels being fully opaque. But if the image has a a mask colour, all mask pixels will be completely transparent. |
Replace(*args, **kwargs)
|
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) |
SetRGBRect(*args, **kwargs)SetRGBRect(self, Rect rect, unsigned char r, unsigned char g, unsigned char b) |
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1.20040428.rpd on Tue Mar 15 17:15:28 2005 | http://epydoc.sf.net |