bgrBytesToRgbFloat32 function
Float32List
bgrBytesToRgbFloat32({
- required Uint8List bytes,
- required int totalPixels,
- Float32List? buffer,
Converts BGR bytes to a flat Float32List with 0.0..1.0 normalization.
Performs a BGR-to-RGB channel swap and divides each value by 255.
Parameters:
bytes: Raw BGR image bytes (length must be totalPixels * 3)totalPixels: Total number of pixels (width * height)buffer: Optional pre-allocated Float32List of length totalPixels * 3 to reuse
Returns a flat Float32List with normalized RGB pixel values in 0.0..1.0.
Implementation
Float32List bgrBytesToRgbFloat32({
required Uint8List bytes,
required int totalPixels,
Float32List? buffer,
}) => _bgrToRgbFloat32(
bytes: bytes,
totalPixels: totalPixels,
lut: _lutUnit,
buffer: buffer,
);