The Pixastic JavaScript library allows us to perform various operations on images we use in our code. The following code sample shows how simple it is to use this JavaScript library in our code.

<!DOCTYPE html>
<html>
<head>
    <title>pixastic.js demo</title>
    <script src="pixastic.core.js"></script>
    <script src="glow.js"></script>
    <script type="text/javascript">
        function changepix(img)
        {
            var newpix = Pixastic.process(img, "glow", {amount:0.2});
            newpix.onmouseout = function (img)
            {
                Pixastic.revert(this);
            };
        }

    </script>
</head>
<body>
    <img src="nicepix.jpg" onmouseover="changepix(this);" />
</body>
</html>

The following video clip overviews the code, explains each and every part of its and shows its execution.

You can find more video clips, code samples and training material for learning how to use this library in my free online courses website at http://abelski.lifemichael.com.

Leave a Reply

Your email address will not be published. Required fields are marked *