mirror of
https://github.com/ShareX/ShareX.git
synced 2024-06-30 20:20:34 +12:00
fixed #6685: Fix QR code SVG saving
This commit is contained in:
parent
2c2e1149d7
commit
55b15a4dd2
|
@ -33,7 +33,7 @@
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using ZXing;
|
using ZXing;
|
||||||
using ZXing.Common;
|
using ZXing.QrCode;
|
||||||
using ZXing.Rendering;
|
using ZXing.Rendering;
|
||||||
|
|
||||||
namespace ShareX
|
namespace ShareX
|
||||||
|
@ -216,13 +216,14 @@ private void tsmiSaveAs_Click(object sender, EventArgs e)
|
||||||
|
|
||||||
if (filePath.EndsWith("svg", StringComparison.OrdinalIgnoreCase))
|
if (filePath.EndsWith("svg", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
BarcodeWriterSvg writer = new BarcodeWriterSvg
|
BarcodeWriterSvg writer = new BarcodeWriterSvg()
|
||||||
{
|
{
|
||||||
Format = BarcodeFormat.QR_CODE,
|
Format = BarcodeFormat.QR_CODE,
|
||||||
Options = new EncodingOptions
|
Options = new QrCodeEncodingOptions()
|
||||||
{
|
{
|
||||||
Width = pbQRCode.Width,
|
Width = pbQRCode.Width,
|
||||||
Height = pbQRCode.Height
|
Height = pbQRCode.Height,
|
||||||
|
CharacterSet = "UTF-8"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
SvgRenderer.SvgImage svgImage = writer.Write(txtQRCode.Text);
|
SvgRenderer.SvgImage svgImage = writer.Write(txtQRCode.Text);
|
||||||
|
|
Loading…
Reference in a new issue