Hello
In the method:
public byte[] GetGraphic(int pixelsPerModule, bool drawQuietZones = true)
{
using var png = new PngBuilder();
var size = (QrCodeData.ModuleMatrix.Count - (drawQuietZones ? 0 : 8)) * pixelsPerModule;
png.WriteHeader(size, size, 1, PngBuilder.ColorType.Greyscale);
var scanLines = DrawScanlines(pixelsPerModule, drawQuietZones);
png.WriteScanlines(scanLines);
#if HAS_SPAN
ArrayPool.Shared.Return(scanLines.Array!);
#endif
png.WriteEnd();
return png.GetBytes();
}
the quiet zone size is set to 0 or 8, depending on the drawQuietZones flag.
I suggest adding the ability to specify the quiet zone size in the method parameter.
Hello
In the method:
public byte[] GetGraphic(int pixelsPerModule, bool drawQuietZones = true)
{
using var png = new PngBuilder();
var size = (QrCodeData.ModuleMatrix.Count - (drawQuietZones ? 0 : 8)) * pixelsPerModule;
png.WriteHeader(size, size, 1, PngBuilder.ColorType.Greyscale);
var scanLines = DrawScanlines(pixelsPerModule, drawQuietZones);
png.WriteScanlines(scanLines);
#if HAS_SPAN
ArrayPool.Shared.Return(scanLines.Array!);
#endif
png.WriteEnd();
return png.GetBytes();
}
the quiet zone size is set to 0 or 8, depending on the drawQuietZones flag.
I suggest adding the ability to specify the quiet zone size in the method parameter.