Skip to content

Commit

Permalink
fixed ShareX#6685: Fix QR code SVG saving
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaex committed Jan 18, 2023
1 parent 2c2e114 commit 55b15a4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ShareX/Forms/QRCodeForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ You should have received a copy of the GNU General Public License
using System.Threading;
using System.Windows.Forms;
using ZXing;
using ZXing.Common;
using ZXing.QrCode;
using ZXing.Rendering;

namespace ShareX
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 55b15a4

Please sign in to comment.