I am trying to generate an image from Picture rendered from Canvas. When I apply height and width then this image clipped and particular area generated. I want to resize the over all image and generate file from this.
Here is my code:
//Generate Thumbnail
ui.Image thumbnail = await picture.toImage(200, 120,);
ByteData thumbByteData = await thumbnail.toByteData(format: ui.ImageByteFormat.png, );
Uint8List thumbBytes = thumbByteData.buffer.asUint8List();
final resultThumbnail = await ImageGallerySaver.saveImage(
Uint8List.fromList(thumbBytes)
quality: 100,
name: "${DateTime.now().millisecondsSinceEpoch}",
isReturnImagePathOfIOS: true,
);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…