Take the 2-minute tour ×

The Javascript "pixastic.custom (5) file was created from Pixastic using just the core code and "lighten" filter. The code works to redraw the image in the canvas in a Mozilla Broweser, however it is not filtering it. The HTML5 is coding the canvas, drawing the image on the canvas, and supposed to be redrawing the image through the Javascript Filter on to the canvas where it would then be lightened. Does any of this make sense?

Here is my code below:

    <script type="text/javascript" charset="utf-8" src="pixastic.custom  (5).js"></script>
        body {
            margin: 0px;
            padding: 0px;
        #myCanvas {
            border: 1px solid #9C9898;
        window.onload = function() {
            var canvas = document.getElementById("myCanvas");
            var context = canvas.getContext("2d");
            var imageObj = new Image();
            imageObj.onload = function() {
                var options ={};
                Pixastic.process(imageObj, "lighten", options)
                    {amount : .5
                context.drawImage(imageObj, 80, 60);

            imageObj.src = "IMAG8703.jpg";
    <canvas id="myCanvas" width="2000" height="4000"></canvas>

Thank you for looking over my code...I really have no idea why it isn't working. Everything is in the same directory and everything matches up. The code is combined from the PIXASTIC site with HTML5 Canvas framework everything should work smoothly...

share|improve this question
add comment

1 Answer

The problem is at the 7th line from the script tag. Not sure what you are trying to do but there's gonna be an error.

This is legal.

Pixastic.process(imageObj, "lighten", {amount : .5});
share|improve this answer
add comment

Your Answer


