TextureData

Overview

TextureData is a class in Aspose.3D FOSS for .NET. Inherits from: A3DObject, INamedObject.

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

This class provides 19 methods for working with TextureData objects in .NET programs. Available methods include: A3DObject, FindProperty, FromFile, FromStream, GetProperty, MapPixels, RemoveProperty, Save, SetProperty, TextureData, TransformPixelFormat. All public members are accessible to any .NET application after installing the Aspose.3D FOSS for .NET package. Properties: BytesPerPixel, Data, Height, Name, PixelFormat, Properties, and 2 more.

Properties

NameTypeAccessDescription
Databyte[]ReadRaw bytes of pixel data
WidthintReadNumber of horizontal pixels
HeightintReadNumber of vertical pixels
StrideintReadNumber of bytes of a scanline.
BytesPerPixelintReadNumber of bytes of a pixel
PixelFormatPixelFormatReadThe pixel’s format
NamestringRead/WriteGets or sets the name.
PropertiesPropertyCollectionReadGets the collection of all properties.

Methods

SignatureDescription
TextureData()Constructor of
TextureData(width: int, height: int, pixelFormat: PixelFormat)Constructs a new and allocate pixel data.
TextureData(width: int, height: int, stride: int, bytesPerPixel: int, pixelFormat: PixelFormat, data: byte[])Creates a new instance of the TextureData class
FromStream(stream: Stream)Not implemented in the FOSS edition — throws at runtime. Load a texture from stream
FromFile(fileName: string)Not implemented in the FOSS edition — throws at runtime. Load a texture from file
Save(stream: Stream, format: string)Not implemented in the FOSS edition — throws at runtime. Save texture data into specified image format
Save(fileName: string)Not implemented in the FOSS edition — throws at runtime. Save texture data into image file
Save(fileName: string, format: string)Not implemented in the FOSS edition — throws at runtime. Save texture data into image file
MapPixels(mapMode: PixelMapMode)Not implemented in the FOSS edition — throws at runtime. Map all pixels for read/write
MapPixels(mapMode: PixelMapMode, format: PixelFormat)Not implemented in the FOSS edition — throws at runtime. Map all pixels for read/write in given pixel format
MapPixels(rect: Aspose.ThreeD.Utilities.Rect, mapMode: PixelMapMode, format: PixelFormat)Not implemented in the FOSS edition — throws at runtime. Map pixels addressed by rect for reading/writing in given pixel format
TransformPixelFormat(pixelFormat: PixelFormat)Not implemented in the FOSS edition — throws at runtime. Transform pixel’s layout to new pixel format.
A3DObject()Initializes a new instance of the A3DObject class with no name.
A3DObject(name: string)Initializes a new instance of the A3DObject class.
RemoveProperty(property: Property)Removes a dynamic property.
RemoveProperty(property: string)Remove the specified property identified by name
GetProperty(property: string)Get the value of specified property
SetProperty(property: string, value: object?)Sets the value of specified property
FindProperty(propertyName: string)Finds the property.

See Also

 English