Search code examples
javascriptjquerypixastic

Pixastic: Effects not working


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="pixastic.custom.js"></script>
<script type="text/javascript">
    $(document).ready(function()    {
    $('#image').pixastic("desaturate");
});
</script>
</head>

<body>
    <img id="image" src="test2.jpg"/>
</body>

</html>

This is the code that i'm working with and when i load the page in the browser, image does not desaturate. Can anyone please help me rectify what's wrong with the code!


Solution

  • OK, so caman not working out?

    Heres and example of the desaturate filter working:

    http://jsfiddle.net/PCbvb/7/

    Things to bear in mind with pixastic:

    (1) you should try the : $(whatever).pixastic("desaturate",{average : false}); (average:false bit)

    (2) canvas only works when the image is on the same domain as the script using it.

    Hope that helps.

    Alex