private int getBlockIntensity(int x, int y) {
        int averageIntensity = 0;
        for (int i = x; i < scale + x; i++) {
            for (int j = y; j < scale + y; j++) {
                averageIntensity += getIntensity(i, j);
            }
        }
        return averageIntensity / (scale * scale);
    }