Pixel format conversion helper functions. Adapted from Sam Twidale (https://samcodes.co.uk/) project https://github.com/Tw1ddle/geometrize-haxe-example/
Static methods
staticinlineargbToRgba (bytes:Bytes):Bytes
Converts a buffer of image data in ARGB format to RGBA in-place.
Parameters:
bytes | The byte buffer to convert. |
---|
Returns:
The bytes converted to RGBA format.
staticinlinebrgaToRgba (bytes:Bytes):Bytes
Converts a buffer of image data in BRGA format to RGBA in-place.
Parameters:
bytes | The byte buffer to convert. |
---|
Returns:
The bytes converted to RGBA format.
staticinlinergbaToArgb (bytes:Bytes):Bytes
Converts a buffer of image data in RGBA format to ARGB in-place.
Parameters:
bytes | The byte buffer to convert. |
---|
Returns:
The bytes converted to ARGB format.
staticinlinergbaToBgra (bytes:Bytes):Bytes
Converts a buffer of image data in RGBA format to BGRA in-place.
Parameters:
bytes | The byte buffer to convert. |
---|
Returns:
The bytes converted to BGRA format.