fromPNG static method
Decode from a PNG image, using the Image
library
Implementation
static QOI fromPNG(
Uint8List raw, {
Channels? overrideChannels,
int? overrideColorspace,
}) {
final Image image = PngDecoder().decodeImage(raw)!;
return QOI.fromRaw(
bytes: image.getBytes(),
width: image.width,
height: image.height,
channels: overrideChannels ?? image.channels,
colorspace: overrideColorspace ?? 0,
);
}