Skip to content

PixelPerfect is a little jQuery plugin I wrote that allows you to scale images with different algorithms, such as Nearest Neighbor.

License

Notifications You must be signed in to change notification settings

acorn1010/PixelPerfect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

PixelPerfect

PixelPerfect is a little jQuery plugin I wrote that allows you to scale images with different algorithms, such as Nearest Neighbor.

Example usage:

<html>
<head>
</head>
<body>
    <canvas class="pixelperfect" data-url="http://mysite.com/myimage.png" data-scale="2" />

    <script type="text/javascript" language="javascript" src="/js/jquery.js"></script>
    <script type="text/javascript" language="javascript" src="/js/jquery.pixelperfect.js"></script>
    <script type="text/javascript" charset="utf-8">
        var pixelPerfect = new CodePeg.PixelPerfect($('canvas.pixelperfect'), {
            urlTag: 'url',
            scaleTag: 'scale',
            filter: 'nearestneighbor'
        });
    </script>
</body>
</html>

PixelPerfect supports arbitrary scaling on width and height. If your canvas resizes dynamically, you can call pixelPerfect.scale(); to re-scale the image.

About

PixelPerfect is a little jQuery plugin I wrote that allows you to scale images with different algorithms, such as Nearest Neighbor.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published