i want to crop a photo retrieved from database, i have done the following to retrieve the image from the database
protected void Page_Load(object sender, EventArgs e) { MemoryStream stream = new MemoryStream(); SqlConnection connection = new SqlConnection(@"Data Source=localhost;Initial Catalog=card;User Id=sa;Password=db2admin;"); try { connection.Open(); SqlCommand command = new SqlCommand("select Photo from iffcar", connection); byte[] image = (byte[])command.ExecuteScalar(); stream.Write(image, 0, image.Length); Bitmap bitmap = new Bitmap(stream); Response.ContentType = "image/gif"; bitmap.Save(Response.OutputStream, ImageFormat.Jpeg); } catch (Exception ee) { connection.Close(); stream.Close(); HttpContext.Current.Response.Write(ee.Message); } } The image that is retrieved is displayed inside the browser.
Now i am stuck at how to crop this image,i want to allow the user to crop the image retrieved from the database and store the cropped image to be passed onto crystal report.
Is this possible? If so than is there any tutorial or help which would guide me to my end requirement.please help me to understand how to proceed with my query