Search code examples
jquerybrightnesspixastic

How to change contrast with Pixastic jquery?


I try to change the contrast of my picture using Pixastic but it gives me an error telling me that

Error: uncaught exception: [Exception... "Security error" code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" location: "file:///C:/Users/maydin/Desktop/pixastic/pixastic.custom.js Line: 49"]

function lowerBrightness(){
        $('#tok').pixastic("brightness", {brightness:50});  
    }   

Is there anyone who used this brightness feature before? How can I fix this?

$('#tok').pixastic("blurfast", {amount:0.8});     <- this one works fine  
$('#tok').pixastic("rotate", {angle:+90});        <- this one works fine as well 

I cant find any information in the documentation
http://www.pixastic.com/lib/docs/actions/brightness/


Solution

  • You should also be aware that, due to security restrictions in the canvas element, Pixastic will only work with images that reside on the same host as the page you're using it on.

    from Pixastic Documentation

    more here:

    Pixastic doesn't work properly for me, why?