How to encoded personal image and generate qr code for personal image ?
I work in visual studio 2015 using c# windows form application .
I need to encode personal image to qr code . Meaning when i select personal image
then click to generate it will generate qr code with personal image and related data as
user name and address and card no .
until now i generated qr code with text data as address textbox and user name and card no
but personal image
How to encoded personal image to be as encoded qr with related data ?
Meaning i need to generate qr code include customer name and address and cardno and
image
I do all data but cannot do image so that
How to encoded personal image and generate qr code for personal image ?
code i made until now to all data without image
- namespace MatrixBarcode
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- //button1 to encoded all data i do all text but remaing image How to make
- private void button1_Click(object sender, EventArgs e)
- {
- if (textBox1.Text =="")
- {
- MessageBox.Show("Please Enter Value ","Error");
- textBox1.Focus();
- }
- else
- {
- 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;
- string encoding="UserName : " + textBox1.Text + "\r\n" + "CardNo : " + textBox2.Text + "\r\n" + textBox3.Text;
- Bitmap bmp = encoder.Encode(encoding);
- pictureBox1.Image = bmp;
- bmp.Save(sv.FileName, ImageFormat.Jpeg);
- }
- }
- }
- }
- //button2 for selecting personal image
- private void button2_Click(object sender, EventArgs e)
- {
- using (OpenFileDialog sv1 = new OpenFileDialog() { Filter = "JPEG|*.jpg", ValidateNames = true,Multiselect=false })
- {
- if (sv1.ShowDialog() == DialogResult.OK)
- {
- pictureBox2.Image = Image.FromFile(sv1.FileName);
- }
- }
- }
- }
- }
Mohamed AbedallahPosted Apr 20, 2017, 11:44 AM
About the YouTube video, it is not clear enough how he handle the QR value to have the image data.
Maybe the QR value itself contains a link to the image which is stored some else. Or maybe the QR value contains an ID that refers to a database record which retrieves the image form it.
However, check the following article that gives information on how to choose the right barcode for your requirement.
http://web3.codeproject.com/Articles/690035/Choosing-the-Right-Barcode-for-Your-Application
ahmed salahPosted Dec 26, 2016, 6:41 AM
ahmed salahPosted Dec 26, 2016, 6:11 AM
ahmed salahPosted Dec 26, 2016, 6:02 AM
Amit GuptaPosted Dec 26, 2016, 5:41 AM
ahmed salahPosted Dec 26, 2016, 5:36 AM
Amit GuptaPosted Dec 26, 2016, 5:22 AM