在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
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)); }
|
请发表评论