QRCode Library is a .NET component that can be
used to encode and decode QRCode. QRCode is a 2 dimensional bar code that
originated in Japan. Nowadays it is widely used in a wide range of industries,
e.g. for vehicle parts tracking and inventory management.
QR stands for “Quick Response”. It was created
by the Japanese corporation Denso-Wave in 1994 and is aimed at decoding
contents at high speed. Nowadays, QR Code is used in mobile phones to ease data
entry.
QRCode can also be printed on a business card
or shown on any display, which can then be captured by the mobile phone
provided the mobile phone has the software to read QRCode.
Now go to practical
side:-
Step1: Download
the QR Code Library from “Manage NuGet Package”.
Step2: Write
below code.
/// <summary>
/// Generate QR Code of google
/// </summary>
private Bitmap GenerateQRCode()
{
Bitmap img = null;
Bitmap newQRImage = null;
try
{
QRCodeEncoder qrEncode = new QRCodeEncoder();
img = qrEncode.Encode("https://www.google.co.in);
// for QR Code image size.
Size size = new Size(100, 100);
newQRImage = new Bitmap(img, size);
}
catch (Exception ex)
{
}
return newQRImage;
}
|
No comments:
Post a Comment