Save image area and load

Kioko

New member
Joined
Jan 18, 2011
Messages
1
Programming Experience
Beginner
Hi!

I need to load a picture and save some areas into a database (like you do it on Facebook when tag peopple into pictures).

I need to save de selected area and then, in another form, show the picture and the selected areas in blue

does someone have any example or clue?

thank you in advance
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,171
Location
Sydney, Australia
Programming Experience
10+
The areas would be represented by Rectangle objects, which can be represented by four numbers (Top, Left, Width, Height). You would have an Image table and an Area table. The Area table would have AreaID and ImageID columns, a column each for the four Rectangle parameters and perhaps a column for a tag. When you load an Image into a PictureBox you would also read the areas. You would then use GDI+, i.e. Graphics.DrawRectangle, to draw the Rectangles over the Image. You could draw then directly onto the Image itself, making them permanent, or draw them onto the PictureBox in its Paint event handler, making them editable.
 
Top Bottom