Shouldn't this be 'if (pixels > sizeLimit)' ?