1

I'm trying to blend two images using the Pixastic plugin - here's my code.

These images will be dynamic, I'm not really sure why the test isn't working. Chances are I've done something wrong as I don't think I've coded it correctly. Does this have to be working with the jQuery plugin?

Can someone please explain how to get the blending mode working on 2 images, one of which is unknown but the IDs are fixed?

7
  • What is the demo supposed to do?
    – JJJ
    Jul 26, 2012 at 17:00
  • Looks like it is working to me - the "worry lines" are superimposed on the model's forehead.
    – halfer
    Jul 26, 2012 at 17:01
  • neither of those files (blend, pixastic) reference jquery in them, so no they're not dependent on jquery
    – Kristian
    Jul 26, 2012 at 17:02
  • Thanks guys, the forehead "worry lines" are meant to blend into the picture of the model. Like this pixastic.com/lib/docs/actions/blend I keep getting this error "Unable to get image data from canvas because the canvas has been tainted by cross-origin data. Uncaught Error: SECURITY_ERR: DOM Exception 18 " Jul 27, 2012 at 7:45
  • Don't you think it would have been a good idea to put the error message in the question in the first place? Anyway, the error means that you're being bitten by the same origin policy which puts limitations to what you can do with the data. Put all the pictures to the same server where the script is and you should be good.
    – JJJ
    Jul 27, 2012 at 8:26

1 Answer 1

0
  1. Your second images loaded is retrieving a 404. It means there is any image there.
  2. Your External libraries (pixastic.core.js, blend.js) are retrieving a 404 status too.
  3. You must get the image element on the second line of your javascript.

    var img = new Image(); img = document.getElementById("userImage");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.