79227918

Date: 2024-11-26 18:47:14
Score: 2
Natty:
Report link

Thanks to: badrshs https://github.com/codebude/QRCoder/issues/577#issuecomment-2355421626

[SuppressMessage("Interoperability", "CA1416:Validate platform compatibility")]
private Bitmap GenerateQrCode(string text, int size)
{
    using var qrGenerator = new QRCodeGenerator();
    using QRCodeData qrCodeData = qrGenerator.CreateQrCode(text, QRCodeGenerator.ECCLevel.Q);
    using var qrCode = new PngByteQRCode(qrCodeData);
    byte[] qrCodeAsPngByteArr = qrCode.GetGraphic(size);

    using var ms = new MemoryStream(qrCodeAsPngByteArr);
    return new Bitmap(ms);
}
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: GrasM4n