WebPEncoder class

Encode an image to the PNG format.

Inheritance

Constructors

WebPEncoder({int format: LOSSY, num quality: 100})
format can be LOSSY or LOSSLESS. quality is controls lossy compression, in the range 0 (smallest file) and 100 (biggest).

Properties

delay int
read / write
format int
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
output OutputBuffer
read / write
quality num
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
supportsAnimation bool
Does this encoder support animation?
read-only, override

Methods

addFrame(Image image, {int duration}) → void
Add a frame to be encoded. Call finish to encode the added frames. If only one frame is added, a single-image WebP is encoded; otherwise if there are more than one frame, a multi-frame animated WebP is encoded.
encodeAnimation(Animation anim) List<int>
Encode an animation.
override
encodeImage(Image image) List<int>
Encode a single frame image.
override
finish() List<int>
Encode the images that were added with addFrame.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Constants

LOSSLESS → const int
0
LOSSY → const int
1