TextureData class
TextureData class
This class contains the raw data and format definition of a texture.
Inheritance: TextureData
→
A3DObject
The TextureData type exposes the following members:
Constructors
Constructor | Description |
---|---|
__init__(self, width, height, stride, bytes_per_pixel, pixel_format, data) | Constructor of TextureData |
__init__(self, width, height, pixel_format) | Constructs a new TextureData and allocate pixel data. |
__init__(self) | Constructor of TextureData |
Properties
Property | Description |
---|---|
name | Gets or sets the name. |
properties | Gets the collection of all properties. |
data | Raw bytes of pixel data |
width | Number of horizontal pixels |
height | Number of vertical pixels |
stride | Number of bytes of a scanline. |
bytes_per_pixel | Number of bytes of a pixel |
pixel_format | The pixel’s format |
Methods
Method | Description |
---|---|
remove_property(self, property) | Removes a dynamic property. |
remove_property(self, property) | Remove the specified property identified by name |
save(self, stream, format) | Save texture data into specified image format |
save(self, file_name) | Save texture data into image file |
save(self, file_name, format) | Save texture data into image file |
map_pixels(self, map_mode) | Map all pixels for read/write |
map_pixels(self, map_mode, format) | Map all pixels for read/write in given pixel format |
map_pixels(self, rect, map_mode, format) | Map pixels addressed by rect for reading/writing in given pixel format |
get_property(self, property) | Get the value of specified property |
set_property(self, property, value) | Sets the value of specified property |
find_property(self, property_name) | Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name) |
from_stream(, stream) | Load a texture from stream |
from_file(, file_name) | Load a texture from file |
transform_pixel_format(self, pixel_format) | Transform pixel’s layout to new pixel format. |
See Also
- module
aspose.threed.render
- class
A3DObject
- class
TextureData