// Draw into a canvas and then apply the effect, because if we snapshotted the image view, we'd end up
// with the rounded corners which we don't want.
Image image = new Image(getResource("default-cover-image.png").openStream());
Canvas canvas = new Canvas(image.getWidth(), image.getHeight());
GraphicsContext gc = canvas.getGraphicsContext2D();
gc.drawImage(image, 0, 0);
gc.applyEffect(colorAdjust);
WritableImage colouredImage = new WritableImage((int) image.getWidth(), (int) image.getHeight());
canvas.snapshot(new SnapshotParameters(), colouredImage);
coverImageView.setImage(colouredImage);
// Convert to a PNG and store in the project model.