image 1.1.19 copy "image: ^1.1.19" to clipboard
image: ^1.1.19 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, JPEG, GIF and WebP.

image #

Build Status

##Overview

A Dart library providing the ability to load, save and manipulate images in a variety of different file formats.

The library has no reliance on dart:io, so it can be used for both server and web applications.

Supported Image Formats:

Read/Write:

  • PNG / Animated APNG
  • JPEG
  • Targa
  • GIF / Animated GIF

Read Only:

  • WebP / Animated WebP
  • TIFF
  • Photoshop PSD
  • OpenEXR

##Documentation

##API

##Examples

##[Format Decoding Functions] (https://github.com/brendan-duncan/image/wiki#format-decoding-functions)

##Samples

Load an image, resize it, and save it as a png:

import 'dart:io' as 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.
  Image image = decodeImage(new Io.File('test.webp').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('thumbnail.png')
        ..writeAsBytesSync(encodePng(thumbnail));
}
1566
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, JPEG, GIF and WebP.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

Dependencies

archive, xml

More

Packages that depend on image