Search code examples
c#qr-codezxingsilverlight-5.0

ZXing.Net QR Code Size


I use this code for generating my qr code ZXing.Net (http://zxingnet.codeplex.com/)

IBarcodeWriter writer = new BarcodeWriter { Format = BarcodeFormat.QR_CODE };
qrcode.Source = writer.Write(stringsecure.Text);

but the image is very very small..

How to set the dimension if possible?


Solution

  • You can set the width and height of the resulting image with the Options property:

    IBarcodeWriter writer = new BarcodeWriter
    {
       Format = BarcodeFormat.QR_CODE,
       Options = new QrCodeEncodingOptions
          {
             Width = 400,
             Height = 400
          }
    };
    qrcode.Source = writer.Write(stringsecure.Text);