Method ConvertRGB24
ConvertRGB24()
Creates a new ImageBuffer with pixel data converted to 24-bit RGB (RGB24).
public ImageBuffer ConvertRGB24()
Returns
- ImageBuffer
A new ImageBuffer instance with RGB24 pixel data.
Remarks
When converting from GRAY8, each grayscale value is replicated across the red, green, and blue channels.
When converting from ARGB32, the alpha channel is discarded and only the red, green, and blue channels are preserved.
If the image is already in RGB, this method produces a deep copy of the image data.Exceptions
- InvalidOperationException
Thrown if the native conversion fails.