当前位置:   article > 正文

zxing二维码的生成与解码(C#)_c# com.google.zxing

c# com.google.zxing

二维码的生成:

using com.google.zxing.qrcode;
using com.google.zxing;
using com.google.zxing.common;
using ByteMatrix = com.google.zxing.common.ByteMatrix;
using EAN13Writer = com.google.zxing.oned.EAN13Writer;
using EAN8Writer = com.google.zxing.oned.EAN8Writer;
using MultiFormatWriter = com.google.zxing.MultiFormatWriter;

 

 private void button1_Click(object sender, EventArgs e)
        {


            string content = textBox1.Text;
            ByteMatrix byteMatrix = new MultiFormatWriter().encode(content, BarcodeFormat.QR_CODE, 200, 200);
            Bitmap bitmap = toBitmap(byteMatrix);
            pictureBox1.Image = bitmap;
            //writeToFile(byteMatrix, System.Drawing.Imaging.ImageFormat.

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/715798
推荐阅读
相关标签
  

闽ICP备14008679号