ImageFormat LINEAR_BGRX8888

book_4_sparkGenerated
code_blocksInput

Description

The LINEAR_BGRX8888 field is a member of the ImageFormat enumeration in the Sandbox namespace. This field represents an image format where the pixel data is stored in a linear color space with a BGRX layout. Each pixel is represented by 32 bits, with 8 bits for each of the blue, green, and red channels, and 8 bits reserved (unused) for the alpha channel, which is typically set to 255 (fully opaque).

Usage

Use the LINEAR_BGRX8888 format when you need to work with images that require a linear color space and do not need an alpha channel. This format is particularly useful for rendering operations where the alpha channel is not needed, and you want to ensure that color calculations are performed in a linear space for more accurate results.

Example

// Example of using LINEAR_BGRX8888 in a texture creation
Texture texture = new Texture();
texture.Format = ImageFormat.LINEAR_BGRX8888;
texture.LoadFromFile("path/to/image.file");