private void paintIntoImage() {
        final int w = image.getWidth();
        final int h = image.getHeight();
        for (int y = 0; y < h; y++) {
            for (int x = 0; x < w; x++) {
                image.setRGB(x, y, getColor(x, y));
            }
        }
    }