ImageFormat BGRX8888_LINEAR

book_4_sparkGenerated
code_blocksInput

Description

The BGRX8888_LINEAR field is a member of the ImageFormat enumeration in the Sandbox API. This field represents an image format where each pixel is stored using 32 bits, with 8 bits for each of the blue, green, and red channels, and 8 bits reserved (unused). The color data is stored in a linear color space, which means that the color values are not gamma-corrected.

Usage

Use BGRX8888_LINEAR when you need to work with images that require a linear color space representation with a BGRX channel order. This format is particularly useful in graphics programming where linear color calculations are necessary, such as in rendering pipelines that perform lighting calculations in linear space.

Example

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