function _calculatePixelAmount(){
        
        _allImagePixels = KNZ.Utils.getPixels( _ctx );

        // iterate over the pixels
        for (var i = 0, n = _allImagePixels.length; i < n; i += 4) {

            // if find a black pixel, add +1 
            if (_allImagePixels[i] === 0 && _allImagePixels[i + 1] === 0 && _allImagePixels[i + 2] === 0) {
                _blackPixelAmount ++;
            }
        }

        _isPixelCalculated = true;
    
    }
// Claculates the base amount of black pixel
Claculates the base amount of black pixel
Claculates the base amount of black pixel
function _calculatePixelAmount(){
        _allImagePixels = KNZ.Utils.getPixels( _ctx );
        for (var i = 0, n = _allImagePixels.length; i < n; i += 4) {
            if (_allImagePixels[i] === 0 && _allImagePixels[i + 1] === 0 && _allImagePixels[i + 2] === 0) {
                _blackPixelAmount ++;
            }
        }
        _isPixelCalculated = true;
    }
function _calculatePixelAmount ( ) { _allImagePixels = KNZ . Utils . getPixels ( _ctx ) ; for ( var i = 0 , n = _allImagePixels . length ; i < n ; i += 4 ) { if ( _allImagePixels [ i ] === 0 && _allImagePixels [ i + 1 ] === 0 && _allImagePixels [ i + 2 ] === 0 ) { _blackPixelAmount ++ ; } } _isPixelCalculated = true ; }
Claculates the base amount of black pixel
Claculates the base amount of black pixel
// iterate over the pixels // if find a black pixel, add +1 