Good day!

The task is as follows: the picture is uploaded to the site. One of several layers is selected for overlaying on top of it (also a picture) And the ability to load the resulting image. (Example) The code from the example cannot be used because most of the resources are on the backend.

The question is: How can you implement this functionality? What to use? Maybe what library someone will tell. Thank you in advance)

    1 answer 1

    You need Ajax to load the image on the server from where you will pull it onto the background under the masks, and hang up the trigger or substitute the url into the download button; I advise you to at least connect ui or to a keydown event so that you can move the image in different directions

    • Thank you) With the download on the page, I almost figured it out. and how to download the resulting picture, which already consists of 2. - Vladimir Mikhailov
    • Hang up on the link, and href = "url pictures on the server" like this htmlbook.ru/html/a/download - Lieutenant Jim Dangle
    • Very much help !!!) a few more questions if not difficult: how to "pull" the picture on the background under the mask. And the second: what it is and how it is connected to ui, so that there would be an opportunity to move the picture - Vladimir Mikhailov
    • in general, you can do it differently, you can wrap it in a div ex: <div style = "background: url (mask); z-index: 9"> <img style = "z-index: -9" src = "url (ajax variable which is responsible for loading the image) "/> </ div> as an option, dynamically change the mask to which you need. ui jquery: jqueryui.com/draggable so that the picture can be moved with the cursor, or keydown event: api.jquery.com/keydown or on the native one the same function to change the position of the picture by clicking on the keys. - Lieutenant Jim Dangle
    • Is it possible if I add a picture to the server, then "put on" my picture on it, and then download it with the help of a link with which I’ll point to my href, then the exact one that I downloaded without being hung from above will be downloaded. Is it not?) - Vladimir Mikhailov