image 2.1.14

Dart native js
Flutter Android iOS web

Provides server and web apps the ability to load, manipulate, and save images with various image file formats including PNG, JPEG, GIF, BMP, WebP, TIFF, TGA, PSD, PVR, and OpenEXR.

example/example.dart

import 'dart:io';
import 'package:image/image.dart';

void main() {
  // Read an image from file (webp in this case).
  // decodeImage will identify the format of the image and use the appropriate
  // decoder.
  var image = decodeImage(File('test.webp').readAsBytesSync());

  // Resize the image to a 120x? thumbnail (maintaining the aspect ratio).
  var thumbnail = copyResize(image, width: 120);

  // Save the thumbnail as a PNG.
  File('thumbnail.png').writeAsBytesSync(encodePng(thumbnail));
}
163
likes
100
pub points
99%
popularity

Provides server and web apps the ability to load, manipulate, and save images with various image file formats including PNG, JPEG, GIF, BMP, WebP, TIFF, TGA, PSD, PVR, and OpenEXR.

Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

Uploader

brendanduncan@gmail.com

License

Apache 2.0 (LICENSE)

Dependencies

archive, xml

More

Packages that depend on image