0

Does anyone know a product that will let me upload jpg images onto a canvas image(big background image). Move, resize, border choices, then save everything to one merged image Final image should look like real image?

I had research a lot Drag an image on another image and save it to one image (like light augmented reality) Blend two images with pixastic does not work. How to get the new image?

But Doesnot found the exact solution? Any ideas?

Community
  • 1
  • 1
Naveen
  • 125
  • 3
  • 13

1 Answers1

0

You can use the following library:

I also created a HTML5 version of the Pixastic effect using canvas:

HTML:

<canvas id="myCanvas" width="578" height="400"></canvas>

JS:

var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
context.globalAlpha=0.5;

// Image 1
var imageObj1 = new Image();
imageObj1.onload = function() {
    context.drawImage(imageObj1, 0, 0);
};
imageObj1.src = 'http://www.pixastic.com/sample/Flower.jpg';

// Image 2
var imageObj2 = new Image();
imageObj2.onload = function() {
    context.drawImage(imageObj2, 0, 0);
};
imageObj2.src = 'http://www.pixastic.com/sample/Butterfly.jpg';

You can check the effect in the JS Fiddle: http://jsfiddle.net/T364V/1/ You should change the value of context.globalAlpha in case you want to change the opacity.

Image Manipulation:

Wissam El-Kik
  • 2,469
  • 1
  • 17
  • 21
  • Thanks for help. My issue is is that i have a wall/room images like http://screencast.com/t/Vlrn1ZHNPGC. User can select any heater image and using drag and drop they can place anywhere on wall. Finally they can download merged image. it should merge acc. to background to give it a real effect. is that possible in canvas? – Naveen May 27 '14 at 10:28
  • Using canvas you can play around with 2D and 3D effects. You can also work on a drag-and-drop effect using canvas. There's many tutorials out there which will help you out. Basically, you need a background image in the canvas, and you need to be able to drag and drop another image in the canvas. The draggable image should probably have a "rotate" feature. – Wissam El-Kik May 27 '14 at 12:49
  • :- Yes thats fine. I can easily create that. My only worry is how image can completely merges on backgroud image to give it real effect. pls see following images [image1](http://www.coveractionpro.com/wp-content/themes/coveractionpro/images/panels/dvd-featured.png) [image2](http://www.coveractionpro.com/wp-content/themes/coveractionpro/images/panels/reports-items.png) is that possible? – Naveen May 28 '14 at 05:54
  • "merge completely" isn't possible. These are 2 different images. There might have a different palette of colors. In your project, you need to be able to rotate the image and to move it around. If the user's gonna rotate and move the image, you can fix predefined values and the image can be placed anywhere (on top of the wall, on the floor etc.). In my opinion, you should have a 2D image (with the wall and all the objects in your current picture) and you'll place the heater on this image. – Wissam El-Kik May 28 '14 at 07:41
  • Also, you can split the 2D image in two. You'll have one background image for all the elements on the screen (except the wall) and another for the wall. You'll use jQuery Draggable and Droppable to allow the heater image to be placed only on the wall image (wall container). It'll be really easy to do. – Wissam El-Kik May 28 '14 at 07:43
  • Well User will itself upload wall or room image and then they can choose any heater from set of heater products. How will i divide the user uploaded image? – Naveen May 28 '14 at 09:06
  • That's really hard to implement. The user can upload an image with some graphical problems (blurry image, shadow, light effect etc.). You really can solve these problems on your website (or app). If you want to allow any image to be uploaded, then you definitely won't be able to "merge completely" 2 images together. You really need to re-think this project, or you should not care about the end result (if the pictures are "merged" or not). That's my 2 cents. – Wissam El-Kik May 28 '14 at 09:12
  • well i already Commit to my client. I cant go backword now. See this site http://www.myecovermaker.com/ecover-design what do you think which approach they are using? its not in canvas i know? Do you any other approach to achive my objectives? – Naveen May 28 '14 at 11:09
  • This site is using a 2D approach, and the book images are predefined. The wall images aren't predefined in your case. – Wissam El-Kik May 28 '14 at 11:14