anindya6023 Posted November 20, 2011 Posted November 20, 2011 I have 1 image and i draw some lines on the image. i want to insert this picture with the lines to SQL..how i can combine 2 different object become one, and insert to SQL?? Quote
mandelbrot Posted December 28, 2012 Posted December 28, 2012 Hi Anin, Firstly you're going to want to store the image into an image field, probably using something like this... http://www.dotnet-guide.com/save-image-in-sql.html The image should be pristine, any drawn lines not affecting the image itself - you may want to put a transparent canvas over the top of the image to catch any clicks and draw the lines onto this. Then you're going to want to save start and end points that were clicked by the user for each line into an array and then transfer this array into the database. When the image is recalled from the database you'll then need to re-render the lines on. Alternatively you could simply save the second canvas as an image also, but this doesn't give you any editing facility - at least with the previous method you could click near one of the previously rendered points and allow it to be moved (for example). I'm no GDI programmer, though, but this is more of a design issue than a GDI question. Kind regards, Paul. 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.