ZXing一维码/二维码使用文档

时间:2018-10-16 15:19:44
【文件属性】:

文件名称:ZXing一维码/二维码使用文档

文件大小:25.56MB

文件格式:ZIP

更新时间:2018-10-16 15:19:44

ZXing 一维码 二维码

ZXing一维码/二维码 使用文档 样例: System.IO.Stream stmYiWei = new System.IO.MemoryStream(); BitMatrix byteMatrix = new MultiFormatWriter().encode(sCode, BarcodeFormat.CODE_39, 230, 40); toBitmap(byteMatrix).Save(stmYiWei, ImageFormat.Bmp); Byte[] byteYiWei = new byte[stmYiWei.Length]; stmYiWei.Position = 0; stmYiWei.Read(byteYiWei, 0, (int)stmYiWei.Length); //将图片文件流保存为二进制文件以便保存到数据库中 System.IO.Stream stmErWei = new System.IO.MemoryStream(); IDictionary hints = new Dictionary(); hints.Add(EncodeHintType.CHARACTER_SET, "UTF-8"); byteMatrix = new MultiFormatWriter().encode(sTmp, BarcodeFormat.QR_CODE, 200, 200, hints); toBitmap(byteMatrix).Save(stmErWei, ImageFormat.Bmp); Byte[] byteErWei = new byte[stmErWei.Length]; stmErWei.Position = 0; stmErWei.Read(byteErWei, 0, (int)stmErWei.Length); //将图片文件流保存为二进制文件以便保存到数据库中 strSQL = "insert into gdzc_biaoqian( bq_gd_no,bq_yiweima,bq_erweima,bq_us_no) values("; strSQL = strSQL + " @bq_gd_no,@bq_yiweima,@bq_erweima,@bq_us_no)"; SqlCommand commandImage = new SqlCommand(strSQL, connectionImage); commandImage.Parameters.Clear(); commandImage.Parameters.Add("@bq_gd_no", SqlDbType.Int).Value = Convert.ToInt32(sGdzcNo); commandImage.Parameters.Add("@bq_yiweima", SqlDbType.Image).Value = byteYiWei; commandImage.Parameters.Add("@bq_erweima", SqlDbType.Image).Value = byteErWei; commandImage.Parameters.Add("@bq_us_no", SqlDbType.Int).Value = Convert.ToInt32(Session["LoginUserID"]); commandImage.ExecuteNonQuery(); commandImage.Dispose();


【文件预览】:
Documentation
----portable()
--------zxing.net.portable.chm(2.91MB)
----wp7.0()
--------zxing.wp7.0.chm(2.83MB)
----sl4()
--------zxing.sl4.chm(2.83MB)
----wp7.1()
--------zxing.wp7.1.chm(2.83MB)
----sl5()
--------zxing.sl5.chm(2.91MB)
----net3.5()
--------zxing.net3.5.chm(2.92MB)
----unity()
--------zxing.unity.chm(2.91MB)
----net2.0()
--------zxing.net2.0.chm(2.94MB)
----net4.0()
--------zxing.net.chm(2.99MB)

网友评论

  • 很有学习价值的文档,感谢.