PdfRasterBase.fromImage constructor

PdfRasterBase.fromImage(
  1. Image image
)

Implementation

factory PdfRasterBase.fromImage(im.Image image) {
  final data = image
      .convert(format: im.Format.uint8, numChannels: 4, noAnimation: true)
      .toUint8List();
  return PdfRasterBase(image.width, image.height, true, data);
}