2013-07-08 142 views
0

我用我的生成QR碼ZXing.Net(http://zxingnet.codeplex.com/ZXing.Net QR碼大小

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

這個代碼,但圖像是非常非常小的..

如何設置,如果維可能?

回答

3

您可以設置寬度和所產生的圖像高度與選項屬性:

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

對我來說不是工作,它總是很小=( – Federal09

+0

我真的不能相信,對我來說它是有效的,你有沒有嘗試其他的值?也許你應該將結果圖像寫入一個文件並檢查它的寬度和高度。 – Michael

+0

它僅適用於桌面版的工作不silverlght =( – Federal09

1

像約翰·達不溜,我發現大小似乎「跳」,它不能擴展到任何整數。我使用ZXing QRCodeWriter和BarcodeWriter,它們都表現出相同的行爲。