AZZA-KHAMEES
asked on
change image size without changing the resolution
Hi Experts,
i created a simple code in C# to generate QRCode image size 197x197 for employees, my question is how to change the size without losing the quality.
any suggestion
thank you
i created a simple code in C# to generate QRCode image size 197x197 for employees, my question is how to change the size without losing the quality.
protected void Page_Load(object sender, EventArgs e)
{
//--read employees information
string text, strSQL;
strSQL = "select CPRNo, EngName,'1757' + OfficeTel as Tel,FaxNo,EmpEmail from GetUserDetailsE where PERUserName='mffinjm' ";
EmpInfo empinfo = new EmpInfo();
SqlDataReader sqlReader = null;
using (SqlConnection con = GetConnectedPr())
{
SqlCommand myCommand = new SqlCommand(strSQL, con);
sqlReader = myCommand.ExecuteReader();
while (sqlReader.Read())
{
empinfo.CPR = sqlReader["CPRNo"].ToString();
empinfo.EngName = sqlReader["EngName"].ToString();
empinfo.Tell = sqlReader["Tel"].ToString();
empinfo.email = sqlReader["EmpEmail"].ToString();
empinfo.Fax = sqlReader["FaxNo"].ToString();
}
}
//--Create QRCode
QRCodeEncoder encoder = new QRCodeEncoder();
text = "N:" +empinfo.EngName + ";TEL:"+ empinfo.Tell +";URL:http://www.mof.gov.bh;EMAIL:"+ empinfo.email +
";FAX:" + empinfo.Fax + ";NOTE:Ministry of Finance";
Bitmap img = encoder.Encode(text);
img.Save(Server.MapPath("/images/"+ empinfo.CPR +".jpg"), ImageFormat.Jpeg);
QRImage.ImageUrl = "~/images/" + empinfo.CPR + ".jpg";
}
any suggestion
thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.