How to draw over a image and it be save?
-
please ans: i do a graphics project ,i want to known can i draw over a image using pen or brush.in c# please response.......
-
please ans: i do a graphics project ,i want to known can i draw over a image using pen or brush.in c# please response.......
using (Graphics gr = Graphics.FromImage(image)) { // Draw on the bitmap using the graphics object }
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
using (Graphics gr = Graphics.FromImage(image)) { // Draw on the bitmap using the graphics object }
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
i am using like this. img = (Bitmap)Bitmap.FromFile(ofd.FileName); Graphics gr = Graphics.FromImage(img); gr.DrawEllipse(new Pen(Color.Black), new Rectangle(300, 300, 10, 50)); doc[1].inkPicture1.Image = and i am using a ink picture box how to add his graphics object to this picture box
-
i am using like this. img = (Bitmap)Bitmap.FromFile(ofd.FileName); Graphics gr = Graphics.FromImage(img); gr.DrawEllipse(new Pen(Color.Black), new Rectangle(300, 300, 10, 50)); doc[1].inkPicture1.Image = and i am using a ink picture box how to add his graphics object to this picture box
sathishtl007 wrote:
how to add his graphics object to this picture box
You don't. You add a bitmap to a picture box, and you use a graphics object to change a bitmap. doc[1].inkPicture1.Image = img; should show your ellipse, assuming it's not on a bitmap that's all black anyhow. ( and that the bitmap is larger than 300 x 300, otherwise, you drew it off the bitmap )
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
sathishtl007 wrote:
how to add his graphics object to this picture box
You don't. You add a bitmap to a picture box, and you use a graphics object to change a bitmap. doc[1].inkPicture1.Image = img; should show your ellipse, assuming it's not on a bitmap that's all black anyhow. ( and that the bitmap is larger than 300 x 300, otherwise, you drew it off the bitmap )
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
one more Question ? how to place a image over an image? and how can i save this grouped images?
-
one more Question ? how to place a image over an image? and how can i save this grouped images?
sathishtl007 wrote:
how to place a image over an image?
gr.DrawImage will draw an image into a graphics object. If that graphics object is made from another Image, they get drawn onto each other
sathishtl007 wrote:
and how can i save this grouped images?
That's two questions :-) Just to be clear - you have only one bitmap, the bitmap you draw over it is not a grouping of images, it's a bitmap where a block of pixels has been changed to look like the source bitmap. The Bitmap class has a Save method.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog