i´m wondering how can i realize this? I want to have an bigger image in the background and be able to drag and drop a smaller image to the position i want on the bigger image and save it finally, so it bees one.
Is this possible with javascript & html5?
appreciate any ideas!
thanks
i´m wondering how can i realize this? I want to have an bigger image in the background and be able to drag and drop a smaller image to the position i want on the bigger image and save it finally, so it bees one.
Is this possible with javascript & html5?
appreciate any ideas!
thanks
Yes, when you have your images in position:
The data url can be set as src on the background image or you can upload it directly to a server etc. Setting it to an image allow you to right-click it and use Save as.
If you initially use the canvas as the "background" image (covering the window) - you just initialize it with the image you want in the background, then continue from point three above.
For the drag an drop part you can just position one image on top of the other and give it some alpha-value to make it half-transparent:
#dragme {
opacity:0.4;
}
the drag-and-drop you can do with jquery-ui:
$("#dragme").draggable();
try it out at:
http://jsfiddle/bjelline/k3vaX/
If you want to actually merge the two images to create a new one use an image processing library, like pixatastic http://www.pixastic./lib/docs/actions/blend/