scot63 Posted September 18, 2003 Posted September 18, 2003 Hi, Using vb.net 2003 So I have an app that (1) loads a jpeg into a picture box and (2) using the mouse you can draw lines over the image in the picture box. Now I need help with (3) saving the image AND lines in the picture box to the hard drive. I suspect I need to use fromHbitmap, but i cannot find good reference on how to do this. i have a bitmap var prepared Dim ThisBitmap As Bitmap i also have the code needed to save the bitmap ThisBitmap.Save("saved.jpg", System.Drawing.Imaging.ImageFormat.Jpeg) i need help between these two commands, where the pixel data in the picture box is somehow stored in a bitmap. thanks, scot Quote
*Experts* mutant Posted September 18, 2003 *Experts* Posted September 18, 2003 Are you saying the lines dont show up after the image is saved? If yes then you are probably drawing to the picturebox itself and not the image object it contains to which you have to draw for anything to become the part of the image, Quote
scot63 Posted September 18, 2003 Author Posted September 18, 2003 (edited) Mutant, yes, when i save the image it's an exact copy of the loaded image. the lines do not appear. how would i target the image and not the picturebox? I'll dig further into this. thanks, scot Edited September 19, 2003 by scot63 Quote
scot63 Posted September 19, 2003 Author Posted September 19, 2003 Ahhh - i see! I was using... dim g as graphics I changed it to... Dim g As Graphics = Graphics.FromImage(P1.Image) Which sends my drawline commands to the image in the picture box (P1). Thanks to you both, Scot Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.