TextureData class

TextureData class

This class contains the raw data and format definition of a texture.

The TextureData type exposes the following members:

Constructors

ConstructorDescription
initConstructor of TextureData
initConstructs a new TextureData and allocate pixel data.
initConstructor of TextureData

Properties

PropertyDescription
dataRaw bytes of pixel data
widthNumber of horizontal pixels
heightNumber of vertical pixels
strideNumber of bytes of a scanline.
bytes_per_pixelNumber of bytes of a pixel
pixel_formatThe pixel’s format

Methods

MethodDescription
saveSave texture data into specified image format
saveSave texture data into image file
saveSave texture data into image file
map_pixelsMap all pixels for read/write
map_pixelsMap all pixels for read/write in given pixel format
map_pixelsMap pixels addressed by rect for reading/writing in given pixel format
from_streamLoad a texture from stream
from_fileLoad a texture from file
transform_pixel_formatTransform pixel’s layout to new pixel format.

See Also