Home | Trees | Index | Help |
|
---|
Module eagle :: Class Image |
|
object
--+ |_EGObject
--+ |object
--+ | | |AutoGenId
--+ | Image
Method Summary | |
---|---|
Image constructor. | |
__del__(self)
| |
__get_gtk_pixbuf__(self)
| |
Bits per pixel | |
Return raw data and information about this image. | |
Bits per pixel | |
Get supported image format information. | |
get_height(self)
| |
Number of channels. | |
Row stride is the allocated size of a row. | |
Return a tuple ( width, heigt ) | |
get_width(self)
| |
Get formats that support saving/writing. | |
If it has an alpha channel | |
Load image from raw data. | |
Load image from file given its filename. | |
Save image to a file. | |
Inherited from _EGObject | |
| |
| |
Inherited from AutoGenId | |
(Class method) | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value |
Property Summary | |
---|---|
Inherited from _EGObject | |
id |
Class Variable Summary | |
---|---|
Inherited from AutoGenId | |
int |
last_id_num = 0 |
Instance Method Details |
---|
__init__(self,
**kargs)
|
get_bits_per_pixel(self)Bits per pixel |
get_data(self)Return raw data and information about this image.
|
get_depth(self)Bits per pixel |
get_formats(self)Get supported image format information.
|
get_n_channels(self)Number of channels. |
get_rowstride(self)Row stride is the allocated size of a row. Generally, rowstride is the number of elements in a row multiplied by the size of each element (bits per pixel). But there are cases that there is more space left, a padding, to align it to some boundary, so you may get different value for row stride. |
get_size(self)Return a tuple ( width, heigt ) |
get_writable_formats(self)Get formats that support saving/writing.
|
has_alpha(self)If it has an alpha channel |
load_data(self, data, width, height, depth=24, has_alpha=None, rowstride=None)Load image from raw data. If no value is provided as has_alpha, then it's set to
>>> i = Image()
>>> i.load_data( my_data1, 800, 600, depth=32, has_alpha=False )
>>> i.load_data( my_data2, 400, 300, depth=24 )
|
load_file(self, filename)Load image from file given its filename. filename may be a string or a tuple/list with path elements, this helps your program to stay portable across different platforms.
>>> i = Image()
>>> i.load_file( 'img.png' )
>>> i.load_file( ( 'test', 'img.png' ) )
|
save(self, filename, format=None, **options)Save image to a file. If format is not specified, it will be guessed from filename. Format may be an extension or a mime type, seeget_writable_formats() .
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Apr 27 16:28:55 2006 | http://epydoc.sf.net |