Constructing a WritableImage with a width or height <= 0 with throw an exception in the toolkit:
java.lang.IllegalArgumentException: Image dimensions must be > 0
at com.sun.prism.Image.<init>(Image.java:135)
at com.sun.prism.Image.<init>(Image.java:118)
at com.sun.prism.Image.fromByteBgraPreData(Image.java:44)
at com.sun.javafx.tk.quantum.QuantumToolkit.createPlatformImage(QuantumToolkit.java:1312)
at javafx.scene.image.Image.<init>(Image.java:662)
at javafx.scene.image.WritableImage.<init>(WritableImage.java:70)
This should be documented if this is the desired behavior (which I think it is).