addImage method
Implementation
void addImage(
Image image, {
bool needGrayscale = false,
}) {
final int widthPx = image.width;
final int heightPx = image.height;
final int widthBytes = (widthPx + 7) ~/ 8;
final List<int> resterizedData = _toRasterFormat(
image,
needGrayscale: needGrayscale,
);
final List<int> header = "BITMAP 0,0,$widthBytes,$heightPx,0,".codeUnits;
_byte += header;
_byte += resterizedData;
_byte += tscFix.codeUnits;
}