buildTestQrImage function
Renders payload as raw pixels, for testing decodeImageData and
camera-frame code paths. See buildTestQrPng.
Implementation
RgbaImage buildTestQrImage(
String payload, {
int moduleSize = 4,
int quietZone = 4,
}) {
final image = renderTestQr(
payload,
moduleSize: moduleSize,
quietZone: quietZone,
).convert(numChannels: 4);
return RgbaImage(
data: image.getBytes(order: img.ChannelOrder.rgba),
width: image.width,
height: image.height,
);
}