fromAbgr8888 method

  1. @override
Float32x4 fromAbgr8888(
  1. int pixel
)
override

Converts a pixel in the abgr8888 pixel format to this pixel format.

ABGR8888 is used as the canonical integer-based pixel format, and this method guarantees that all pixel formats can be converted from it. Loss of precision may occur when converting from a higher-precision format.

Example

print(floatRgba.fromAbgr8888(abgr8888.red)); // [1.0, 0.0, 0.0, 1.0]
print(floatRgba.fromAbgr8888(abgr8888.white)); // [1.0, 1.0, 1.0, 1.0]

Implementation

@override
Float32x4 fromAbgr8888(int pixel) => abgr8888.toFloatRgba(pixel);