image 1.1.5 copy "image: ^1.1.5" to clipboard
image: ^1.1.5 copied to clipboard

outdatedDart 1 only

Provides server and web apps the ability to load, manipulate, and save images with various image file formats including PNG and JPG.

image #

Build Status

##Overview

A Dart library to encode and decode various image formats.

The library has no reliance on dart:io, so it can be used for both server and web applications. The image library currently supports the following formats:

  • PNG
  • JPG
  • TGA

##Documentation

##Samples

Load a jpeg, resize it, and save it as a png:

import 'dart:io' as Io;
import 'package:image/image.dart';
void main() {
  // Read a jpeg image from file.
  Image image = readJpg(new Io.File('res/cat-eye04.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-cat-eye04.png')
        ..createSync(recursive: true)
        ..writeAsBytesSync(writePng(thumbnail));
}
1555
likes
0
pub points
99%
popularity

Publisher

verified publisherloki3d.com

Provides server and web apps the ability to load, manipulate, and save images with various image file formats including PNG and JPG.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

Dependencies

archive, xml

More

Packages that depend on image