PngDecoder class

Decode a PNG encoded image.

Constructors

PngDecoder()

Properties

hashCode int
The hash code for this object.
no setterinherited
info → PngInfo?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decodeAnimation(List<int> bytes) → Animation?
Decode all of the frames from an animation. If the file is not an animation, a single frame animation is returned. If there was a problem decoding the file, null is returned.
decodeFrame(int frame) → Image?
Decode the frame (assuming startDecode has already been called).
decodeHdrFrame(int frame) → HdrImage?
Decode a single high dynamic range (HDR) frame from the data that was set with startDecode. If the format of the file does not support HDR images, the regular image will be converted to an HDR image as (color / 255). If frame is out of the range of available frames, null is returned. Non animated image files will only have frame 0. An Image is returned, which provides the image, and top-left coordinates of the image, as animated frames may only occupy a subset of the canvas.
inherited
decodeHdrImage(List<int> bytes, {int frame = 0}) → HdrImage?
Decode the file and extract a single High Dynamic Range (HDR) image from it. HDR images are stored in floating-poing values. If the format of the file does not support HDR images, the regular image will be converted to an HDR image as (color / 255). If the file is animated, the specified frame will be decoded. If there was a problem decoding the file, null is returned.
inherited
decodeImage(List<int> bytes, {int frame = 0}) → Image?
Decode the file and extract a single image from it. If the file is animated, the specified frame will be decoded. If there was a problem decoding the file, null is returned.
isValidFile(List<int> data) bool
Is the given file a valid PNG image?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
numFrames() int
The number of frames that can be decoded.
startDecode(List<int> data) → DecodeInfo?
Start decoding the data as an animation sequence, but don't actually process the frames until they are requested with decodeFrame.
toString() String
A string representation of this object.
inherited

Operators

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

Constants

FILTER_AVERAGE → const int
FILTER_NONE → const int
FILTER_PAETH → const int
FILTER_SUB → const int
FILTER_UP → const int
GRAYSCALE → const int
GRAYSCALE_ALPHA → const int
INDEXED → const int
RGB → const int
RGBA → const int