From 55b15a4dd27e6b21db4d8b1158dc2030670b2137 Mon Sep 17 00:00:00 2001 From: Jaex Date: Wed, 18 Jan 2023 03:40:45 +0300 Subject: [PATCH] fixed #6685: Fix QR code SVG saving --- ShareX/Forms/QRCodeForm.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ShareX/Forms/QRCodeForm.cs b/ShareX/Forms/QRCodeForm.cs index 1a3d964b9..a6e961904 100644 --- a/ShareX/Forms/QRCodeForm.cs +++ b/ShareX/Forms/QRCodeForm.cs @@ -33,7 +33,7 @@ using System.Threading; using System.Windows.Forms; using ZXing; -using ZXing.Common; +using ZXing.QrCode; using ZXing.Rendering; namespace ShareX @@ -216,13 +216,14 @@ private void tsmiSaveAs_Click(object sender, EventArgs e) if (filePath.EndsWith("svg", StringComparison.OrdinalIgnoreCase)) { - BarcodeWriterSvg writer = new BarcodeWriterSvg + BarcodeWriterSvg writer = new BarcodeWriterSvg() { Format = BarcodeFormat.QR_CODE, - Options = new EncodingOptions + Options = new QrCodeEncodingOptions() { Width = pbQRCode.Width, - Height = pbQRCode.Height + Height = pbQRCode.Height, + CharacterSet = "UTF-8" } }; SvgRenderer.SvgImage svgImage = writer.Write(txtQRCode.Text);