I have a picturebox control in which by using mouse down and mouse move events ,I am drawing a image using points and storing it in my database. and in update mode I am retrieving the bytes and drawing an image in to the picture box control and now I am adding few lines more on the image but either I am getting newly added lines or the old image but i want both
//rect is my picture box
Bitmap bmp = new Bitmap(rect.Width, rect.Height);
// Create compatible graphics
Graphics gxComp = Graphics.FromImage(bmp);
//If i have a image
System.IO.MemoryStream memStream = new System.IO.MemoryStream(TmpSign);
Bitmap im = new Bitmap(memStream);
Tmp is my byte array of my image
gxComp.DrawLines(pen, _currentStroke.ToArray());
_currentStroke is the list of points.
Creating the grahics of image and drawing lines on to that graphics object has solved my problem.
//Creating the graphics of the image if exists
and //writing my new drawn points on to the graphics