PdfImage.fromImage constructor
PdfImage.fromImage(
- PdfDocument pdfDocument, {
- required Image image,
- PdfImageOrientation orientation = PdfImageOrientation.topLeft,
Create an image from an im.Image
object
Implementation
factory PdfImage.fromImage(
PdfDocument pdfDocument, {
required im.Image image,
PdfImageOrientation orientation = PdfImageOrientation.topLeft,
}) {
final raster = PdfRasterBase.fromImage(image);
return PdfImage(
pdfDocument,
image: raster.pixels,
width: raster.width,
height: raster.height,
alpha: raster.alpha,
orientation: orientation,
);
}