标签:pack art image 大小 write new res rgb pac
import ‘dart:io‘ as Io; import ‘package:image/image.dart‘; void main() { // Read a jpeg image from file. Image image = decodeImage(new Io.File(‘test.jpg‘).readAsBytesSync()); // Resize the image to a 120x? thumbnail (maintaining the aspect ratio). Image thumbnail = copyResize(image,120); // Save the thumbnail as a PNG. new Io.File(‘out/thumbnail-test.png‘) ..writeAsBytesSync(encodePng(thumbnail)); }
如何在Flutter / Dart中读取(从磁盘)和调整图像大小
标签:pack art image 大小 write new res rgb pac
原文地址:https://www.cnblogs.com/liuys635/p/14911101.html