encode method
- Buffer<
int> input, { - Iterable<
String> comments = const [], - NetpbmFormat? format,
override
Encodes pixel data as an ASCII Netpbm image.
The comments
are added to the image.
If the format
is omitted, defaults to:
- NetpbmFormat.graymap for grayscale pixel data.
- NetpbmFormat.pixmap for RGB pixel data.
- NetpbmFormat.bitmap otherwise.
Implementation
@override
String encode(
Buffer<int> input, {
Iterable<String> comments = const [],
NetpbmFormat? format,
}) {
return netpbmAsciiEncoder.convert(
input,
comments: comments,
format: format,
);
}