473,473 Members | 2,080 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Draw layers on image using canvas

23 New Member
I want to achieve following
1. Editing a image by drawing it on canvas(by drawing shape such as rectangle, circle, pencil etc)
2. To store only the drawing on canvas and not the entire canvas with image. This will be considered as single layer. User can draw as many layers on same image and save each layer separately so later he can choose the required layer and view it on canvas again.
3. As I have to store these layers somewhere, could you please help on how should I save it. Should I separate each layer separately in database or should I store coordinates for the shapes in database(this won![enter image description here][1]’t be helpful in case of pencil tool)?(need smarter approach then working harder)
4. Also user should be able to change the shape colors as per configuration(please have a look to my attached file)
5. Not finished yet. When hovered over any drawn line, the tooltip corresponding to that line should be displayed.
Please help me with proper approach to do this.
Attached Images
File Type: jpg myimage.jpg (55.2 KB, 242 views)
Jan 30 '14 #1
2 1711
gavinW
1 New Member
GoJS is a great library for that sort of diagram.

http://www.gojs.net/
Jan 30 '14 #2
Frinavale
9,735 Recognized Expert Moderator Expert
There will be a lot of JavaScript involved to do the drawing portion. I found this live demo online that may give you a starting point with this portion. If you have problems with this, you should post your questions in the JavaScript forum.

I imagine the user will use JavaScript to create Canvas objects that stack on top of your image and on top each other.

When you click the save button you will have to somehow serialize the content of the canvases and send that information to the server so that it can be stored for later use (typically people store information like this in a database).

You may need to track the objects that the user has created so that you can recreate them upon deserializing the information in the future (to be able to edit them etc).

Once you have attempted to implement this project, please post back here with the questions you have (or in the JavaScript forum if it is a JavaScript question.)

-Frinny
Jan 30 '14 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

21
by: DraguVaso | last post by:
Hi, I have an inherited DataGrid, that does lots of extra stuff. For exemple drawing a backgroundimage in every cell. The problem is that it's taking too much time (using gdi+), so I want to do...
6
by: felix | last post by:
Hi, I have an Image that is drawn with Graphics.DrawImage(..). What I want to do is drawing it with a given transparency, e.g. at an alpha of only 180 instead of 255. How am I doing that?!?!?...
1
by: zxo102 | last post by:
Hi everyone, I have tried two days to figure out how to draw the image in wx.BufferedDC on the page created by AddPage of wx.Notebook but still got no clue. The attached example works fine. If...
1
by: namratapatil | last post by:
Hi...i am trying to load an image that has been saved at the following path: C:\WTK22\apps\MyProject\res After exectuing the program, the NullPointerException is thrown...Kindly let me know how to...
4
by: annsh | last post by:
Hi On a windows form - I want to be able to allow a user to draw an image (on a graphics tablet). Its for an application for selling carpets - customer comes in and describes room where carpet...
4
by: neovantage | last post by:
Hey geeks, i want to draw a jpeg image of pattern chess. I can draw solid color image using gd libraray and here is my code //$t_im having image path, $t_wt,$t_ht is specified width and...
1
by: Myo Thura Lwin | last post by:
Hello, I am facing one problem with canvas control of Visual Editor on eclipse galileo. I would like to show the image onto canvas in fitted size. But when the image is larger than the...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.