一 C#的二维码

   示例:

    class Program
    {
        static void Main(string[] args)
        {
            QrEncoder qrEncoder = new QrEncoder(ErrorCorrectionLevel.H);
            QrCode qrCode = new QrCode();
            qrEncoder.TryEncode("菡,现在想起你,真的是太突然了,你跳个舞给我看嘛,能不能不要这么诱人啊,我已经逻辑混乱了", out qrCode);
            int ModuleSize = 12; //大小
            QuietZoneModules QuietZones = QuietZoneModules.Two;  //空白区域  
            var render = new GraphicsRenderer(new FixedModuleSize(ModuleSize, QuietZones));
            using (System.IO.Stream stream = File.OpenWrite(@"E:\RuPeng_Project\DiDao\DIDAO.Front\News\11\8.png"))
            {
                render.WriteToStream(qrCode.Matrix,System.Drawing.Imaging.ImageFormat.Png, stream);
            }
        }
    }
Program.cs

相关文章:

  • 2021-12-09
  • 2021-11-21
  • 2021-11-21
  • 2021-09-01
  • 2021-07-24
  • 2022-12-23
猜你喜欢
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2021-08-31
  • 2021-10-30
  • 2021-10-18
  • 2022-12-23
相关资源
相似解决方案