TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mohaammed talha
NA
445
51.2k
How to insert logo in QR code using asp.net and C#
Feb 15 2021 9:17 AM
QR Code Successfully generated but i need to create QR Code with logo .
protected
void
btnGenerate_Click(
object
sender, EventArgs e)
{
string
code = txtName.Text;
if
(!
string
.IsNullOrEmpty(code))
{
string
[] commaSeparatedItems = txtName.Text.Split(
','
);
var Empcd =
string
.Concat(
"'"
,
string
.Join(
"','"
, commaSeparatedItems),
"'"
);
foreach
(var i
in
commaSeparatedItems) {
QRCodeGenerator qrGenerator =
new
QRCodeGenerator();
QRCodeGenerator.QRCode qrCode = qrGenerator.CreateQrCode(i , QRCodeGenerator.ECCLevel.Q);
System.Web.UI.WebControls.Image imgBarCode =
new
System.Web.UI.WebControls.Image();
imgBarCode.Height = 150;
imgBarCode.Width = 150;
using
(Bitmap bitMap = qrCode.GetGraphic(20))
{
using
(MemoryStream ms =
new
MemoryStream())
{
bitMap.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
byte
[] byteImage = ms.ToArray();
File.WriteAllBytes(Server.MapPath(
"QRCodes/"
+ code +
".png"
), byteImage);
imgBarCode.ImageUrl =
"data:image/png;base64,"
+ Convert.ToBase64String(byteImage);
// imgBarCode.ImageUrl = "data:image/png;base64," + Convert.ToBase64String(byteImage);
}
plBarCode.Controls.Add(imgBarCode);
//BindGrid();
load();
}
}
}
Reply
Answers (
3
)
Whether web api service only for .net or other languages like java,vb?
The request was aborted: API