如何将图像徽标放入生成的二维码中 [英] How to put image logo within generated qr code

查看:121
本文介绍了如何将图像徽标放入生成的二维码中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使Windows应用程序生成c#qr代码

I make windows application to generate c# qr code 

我成功做到了,但我需要将图像放在生成的条形码的中心

I success to do that but i need to put image in center of generated bar code 

但是这实际上是我的问题吗?

我在Visual Studio 2015 Windows窗体应用程序中工作

我使用messagetoolkitqrcode

我的代码是由c#生成的qr代码,如下所示:

private void button1_Click(object sender, EventArgs e)
        {
            using (SaveFileDialog sv = new SaveFileDialog() { Filter = "JPEG|*.jpg", ValidateNames = true })
            {
                if (sv.ShowDialog()==DialogResult.OK)
                {
                    MessagingToolkit.QRCode.Codec.QRCodeEncoder encoder = new MessagingToolkit.QRCode.Codec.QRCodeEncoder();
                    encoder.QRCodeScale = 8;
                    Bitmap bmp = encoder.Encode(textBox1.Text);
                    pictureBox1.Image = bmp;
                    bmp.Save(sv.FileName, ImageFormat.Jpeg);
                }

            }
                
                    
        }

如何将徽标放入生成的裸代码中,如下图所示

How to put logo inside my generated bare code as following image

我生成以下内容时需要在qr条形码中放入的我的徽标是NASA徽标:

my logo i need to put inside qr bar code is NASA logo when i generate it as following :

AND徽标

c/nasa.jpg

c/nasa.jpg


推荐答案

Wiki 对此进行了解释,这是通过纠错实现的.

The wiki has explanation on this as made possible by error correction.

只要您看到的纠错能力高于恢复图像所覆盖信息所需的级别,就应该毫无问题地对QR码进行解码.

As long as you see the error correction capability higher than the level needed to recover the information covered by the image, the QR code should be decoded without problem.


这篇关于如何将图像徽标放入生成的二维码中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆