生成并保存二维码图片,此方法最清晰

 

 

#region 程序集 ThoughtWorks.QRCode.dll, v1.0.2774.19990
// E:\WorkSpace\AutoReceivingSystem\03-CD\SMS.TaskService\WorkDll\NEW\ThoughtWorks.QRCode.dll
#endregion

 

 /// 
      /// 生成并保存二维码图片,此方法最清晰
      /// 
      /// 二维码内容
      /// 生成图片保存地址
      public static void GetBestQRCodeBmpSave(string data, string picPath)
      {
          QRCodeEncoder qrCodeEncoder = new QRCodeEncoder();
          qrCodeEncoder.QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE;
          qrCodeEncoder.QRCodeScale = 4;
          qrCodeEncoder.QRCodeVersion = 0;
          qrCodeEncoder.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M;
          Bitmap bmp = qrCodeEncoder.Encode(data); 
          bmp.Save(picPath);
      }

  

转载于:https://www.cnblogs.com/lhlong/p/9717638.html

你可能感兴趣的:(生成并保存二维码图片,此方法最清晰)