0
我想旋转存储在数据库内的图像是可能的吗? 我可以从数据库中获取图像,我只是不知道如何旋转它。我怎么能从数据库中旋转图像
string img = (Request.QueryString["cn"]);
Byte[] bytes = null;
if (rbPhoto1.Checked == true)
{
if (img != null)
{
//string str = "select mem_contenttype, mem_photo from tblCardRequestDetail2 where mem_cardno = '" + Request.QueryString["cn"] + "'";
string str = "select mem_contenttype1, mem_photo1 from tblphotoupload where mem_cardno = '" + img + "'";
SqlCommand cmd = new SqlCommand(str); cmd.Parameters.Add("@1", SqlDbType.VarChar).Value = img;
DataTable dt = GetData(cmd);
bytes = (Byte[])dt.Rows[0]["mem_photo1"];
Response.OutputStream.Write(bytes, 0, bytes.Length);
Response.Buffer = true;
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = dt.Rows[0]["mem_contenttype1"].ToString();
Response.AddHeader("content-disposition", "attachment;filename=" + dt.Rows[0]["mem_photo1"].ToString());
Response.BinaryWrite(bytes);
Response.Flush();
//Response.End();
}
}