Description
The BGRA8888
field is a member of the ImageFormat
enumeration in the Sandbox namespace. It represents an image format where each pixel is stored as four bytes, with the blue, green, red, and alpha channels in that order. Each channel is 8 bits, providing a total of 32 bits per pixel. This format is commonly used for images that require an alpha channel for transparency.
Usage
Use the BGRA8888
format when you need to work with images that require a full 32-bit color depth with an alpha channel. This format is suitable for applications where precise color representation and transparency are important, such as in game textures or UI elements.
Example
// Example of using ImageFormat.BGRA8888
// Assuming you have a method to load an image with a specific format
Image myImage = LoadImage("path/to/image.png", ImageFormat.BGRA8888);
// Use the image in your application
DisplayImage(myImage);