Optimize and improve QR code display

This commit is contained in:
2dust
2025-09-21 14:35:49 +08:00
parent c2c13ad318
commit 534c7ab444
5 changed files with 75 additions and 19 deletions
@@ -23,8 +23,16 @@ public partial class QrcodeView : UserControl
private Bitmap? GetQRCode(string? url)
{
var bytes = QRCodeUtils.GenQRCode(url);
return ByteToBitmap(bytes);
try
{
var bytes = QRCodeUtils.GenQRCode(url);
return ByteToBitmap(bytes);
}
catch (Exception ex)
{
Logging.SaveLog("GetQRCode", ex);
return null;
}
}
private Bitmap? ByteToBitmap(byte[]? bytes)