EffectsSdkImage.fromRaw constructor
- required Uint8List data,
- required RawImageFormat format,
- required int width,
- required int height,
- int bytesPerRow = 0,
Creates image from raw pixel data.
data
: Raw pixel bytes in specified formatformat
: Pixel format (must be RawImageFormat.rgba)width
: Image width in pixelsheight
: Image height in pixelsbytesPerRow
: Optional stride. Defaults towidth * 4
.
Implementation
EffectsSdkImage.fromRaw({
required Uint8List data,
required RawImageFormat format,
required int width,
required int height,
int bytesPerRow = 0,
}) : source = RawImage(
data: data,
format: format,
width: width,
height: height,
bytesPerRow: (bytesPerRow > 0) ? bytesPerRow : width * 4,
);