Utility to write a JavaFX image as a PNG file