In my application i have an image in a div,a button.
I want to rotate the image displayed and save the rotated image when i clicked on the button using jquery.
it will helps to rotate an image and save the image in whatever the angle image has. for example we rotated image into 180 degrees .we can save that image (180 degrees) into our folder.here we used canvas.it helps for ASP.NET developers
protected void OKFinalSave_Click(object sender, EventArgs e)
{
string
CropImageLocation = ConfigurationManager.AppSettings["CropFileLocation"].ToString();
CropImageLocation = CropImageLocation + DateTime.Now.ToString("yyyyMMdd") + "\\" + LoanNumber.Value;
string
a = CropImageLocation + "\\" + LoanNumber.Value + "_SIGN";
string
base64String = hfData.Value.Replace("data:image/png;base64,", string.Empty);
byte[]
bytes = Convert.FromBase64String(base64String);
string
filePath = a;
if (!Directory.Exists(CropImageLocation)) {
Directory.CreateDirectory(CropImageLocation);
}
if (File.Exists(a)) {
File.Delete(CropImageLocation + "\\" + LoanNumber.Value + "_SIGN");
}
System.IO.File.WriteAllBytes(CropImageLocation + "\\" + LoanNumber.Value + "_SIGN.jpeg", bytes);
SaveCropedPath(LoanNumber.Value, CropImageLocation + "\\" + LoanNumber.Value + "_SIGN.jpeg");
}