src/canvas/ImageGridIndex.js
function(image, width, height) {
        var g;
        if (image.tagName === 'CANVAS' && image.width === width
                && image.height === height) {
            g = image.getContext('2d');
        } else {
            var canvas = this._newCanvas(width, height);
            canvas.width = width;
            canvas.height = height;
            g = canvas.getContext('2d');
            g.drawImage(image, 0, 0, width, height);
        }
        var data = g.getImageData(0, 0, width, height).data;
        return data;
    }
function(image, width, height) {
        var g;
        if (image.tagName === 'CANVAS' && image.width === width
                && image.height === height) {
            g = image.getContext('2d');
        } else {
            var canvas = this._newCanvas(width, height);
            canvas.width = width;
            canvas.height = height;
            g = canvas.getContext('2d');
            g.drawImage(image, 0, 0, width, height);
        }
        var data = g.getImageData(0, 0, width, height).data;
        return data;
    }
function ( image , width , height ) { var g ; if ( image . tagName === 'CANVAS' && image . width === width && image . height === height ) { g = image . getContext ( '2d' ) ; } else { var canvas = this . _newCanvas ( width , height ) ; canvas . width = width ; canvas . height = height ; g = canvas . getContext ( '2d' ) ; g . drawImage ( image , 0 , 0 , width , height ) ; } var data = g . getImageData ( 0 , 0 , width , height ) . data ; return data ; }
Returns a raw data for the resized image.
Returns a raw data for the resized image .