ScaleBitmap Demo

A very basic example demonstrating the ScaleBitmap class.

In it's simplest form include the js-file and write the following code:
var grid = {x:18, y:22, width:12, height:4};
var img = new ScaleBitmap('img/folder.png', grid);
img.setWidth(350);
document.body.appendChild(img.canvas);
Original image on the left, ScaleBitmap on the right:

In the example below you can adjust the width and height of the image with the sliders.

Download source files