ImageFormat ImageFormat { get; set; }

robot_2Generated
code_blocksInput

Description

The ImageFormat property of the Texture class specifies the format of the image data used by the texture. This property is of type Sandbox.ImageFormat, which defines the various formats that a texture can have, such as RGB, RGBA, etc.

Usage

Use the ImageFormat property to determine or set the format of a texture's image data. This can be useful when creating or manipulating textures, as different formats may be required for different rendering techniques or performance optimizations.

Example

// Example of accessing the ImageFormat property
Texture myTexture = new Texture();
Sandbox.ImageFormat format = myTexture.ImageFormat;

// Example of setting the ImageFormat property
myTexture.ImageFormat = Sandbox.ImageFormat.RGBA;