Click here to Skip to main content
15,893,161 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi All,

I have images, i want to edit each image(like draw some shapes like rectangles,ellipse etc) and store the information of each shape and position of the shape on the image in a list. Plz give me suggestions how can i create a collection to store the data.

I want the collection to store data like this.

Image1----DrawingList(should contain each shape Name eg: Drawing1, Drawing2 etc.)
|___Drawing1(eg:rectangle shape should contain shape&Position Data)
|___shape(starting point location and ending point location)
|___Position(centrepoint location of the shape on the image)
|___Drawing2(eg: ellipse shape should contain shape&Position Data)
|___shape(starting point location and ending point location)
|___Position(centrepoint location of the shape on the image)

Image2---DrawingList
|___Drawing1(eg:rectangle shape)
|___Shape
|___Position
|___Drawing2(eg:rectangle shape)
|___Shape
|___Position
...............
...............

Image list should contain image ID's each image should contain no. of shapes drawn in Drawinglist. In the drawing list each shape starting and ending locations and position of the shape on the image. Now next images should contain the same information like this .

Any help will be much appreciated.

Thanks,
Posted
Updated 17-Oct-11 18:51pm
v2
Comments
Sergey Alexandrovich Kryukov 18-Oct-11 1:31am    
Why on Earth? You really should explain the ultimate goals of all this activity.
--SA

1 solution

Create a class called shape with the name of the shape and the xy coords of the top left and bottom right of the shape.

Create another class for image which has a name and a list of shapes

Your ultimate collection is a of images and this is bound to your control of choice.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900