0.9.4 • Published 5 years ago
gif-writer v0.9.4
gif-writer
GIF (version 89a) Encoder written in TypeScript.
This library provides both JavaScript modules and TypeScript declaration files (.d.ts files).
Classes
Two fundamental classes are included.
- GifWriter
- MedianCutColorReducer
GifWriter
The GifWriter class writes an indexed color image data to an output stream.
- An indexed color image data is represented with an object which has IIndexedColorImageinterface. TheIndexedColorImageimplements this interface.
- An output stream is represented with an object which has IOutputStreaminterface.
MedianCutColorReducer
MedianCutColorReducer is simple color quantizer.
It uses the median cut algorithm.
If you have a full color image data and you want to write it as GIF by using GifWriter,
you must do color quantization by using this class (or by other way) first.
Example
The gif-writer project provides a subproject to show how to use this module.
Please see it.