Description
The RGB565
field is a member of the ImageFormat
enumeration in the Sandbox namespace. It represents an image format where each pixel is stored using 16 bits. Specifically, the format uses 5 bits for the red channel, 6 bits for the green channel, and 5 bits for the blue channel. This format is commonly used in scenarios where memory efficiency is important, such as in embedded systems or mobile devices, where full 24-bit color depth is not necessary.
Usage
Use the ImageFormat.RGB565
when you need to work with images that require a compact representation with moderate color fidelity. This format is particularly useful when dealing with hardware that supports 16-bit color depth natively.
Example
// Example of using ImageFormat.RGB565
// Assume we have a method that loads an image with a specific format
public void LoadImage(string filePath, ImageFormat format)
{
// Implementation for loading the image
}
// Load an image using the RGB565 format
LoadImage("path/to/image.png", ImageFormat.RGB565);