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?
getter/setter pair
format int
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
output OutputBuffer?
getter/setter pair
quality num
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportsAnimation bool
Does this encoder support animation?
no setteroverride

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 nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

LOSSLESS → const int
LOSSY → const int