GithubHelp home page GithubHelp logo

tchigher / image Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brendan-duncan/image

0.0 0.0 0.0 36.92 MB

Dart library for decoding/encoding image formats, and image processing.

License: Other

Dart 99.03% HTML 0.21% CSS 0.76%

image's Introduction

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
  • PVR(PVRTC)

Read Only:

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

Write Only:

  • ICO
  • CUR

Documentation

API

Examples

Format Decoding Functions

Samples

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

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.
  Image image = decodeImage(File('test.webp').readAsBytesSync());

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

  // Save the thumbnail as a PNG.
  File('thumbnail.png')..writeAsBytesSync(encodePng(thumbnail));
}

image's People

Contributors

a-siva avatar bcko avatar brendan-duncan avatar brendan-duncan-g avatar bryant1410 avatar cjkao avatar creativecreatorormaybenot avatar diegocatalano avatar fox32 avatar jfoutts avatar jtmcdole avatar keertip avatar lrhn avatar luavolk avatar luisvasquez avatar mjeffw avatar nucleartux avatar pambrose avatar plateaukao avatar refi64 avatar richgoldmd avatar ryankauk avatar sergey-o avatar simonit avatar t39uh avatar thefedex87 avatar tmaiaroto avatar tvolkert avatar yaslama avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.