Extract a JavaFX CSS gradient from an image