EffectsSdkImage.fromRaw constructor

EffectsSdkImage.fromRaw({
  1. required Uint8List data,
  2. required RawImageFormat format,
  3. required int width,
  4. required int height,
  5. int bytesPerRow = 0,
})

Creates image from raw pixel data.

  • data: Raw pixel bytes in specified format
  • format: Pixel format (must be RawImageFormat.rgba)
  • width: Image width in pixels
  • height: Image height in pixels
  • bytesPerRow: Optional stride. Defaults to width * 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,
);