Convert jpg image to png image in Flutter iOS
问题 How can I convert a jpg image selected from photo gallery to png image in flutter? 回答1: Take a look at the image package. The following is a snippet available in the examples section, which converts JPEG to PNG : import 'dart:io'; import 'package:image/image.dart'; void main() { // Read a jpeg image from file. Image image = decodeImage(new File('test.jpg').readAsBytesSync()); // Resize the image to a 120x? thumbnail (maintaining the aspect ratio). Image thumbnail = copyResize(image, 120); //