An Image is displayed in an ImageView. There is a number of effects applied to the ImageView an the user can modify the effect via sliders. For displaying purposes the image is loaded in lower resolution.
When saving the result to disk the image is loaded in original resolution to a new ImageView and the specified effect is applied. Every now and then the snapshot fails (even when using the same image over and over), when the images are bigger (around 3000x2000 px and above) these errors get more frequent. Images are .jpg or .png, this error seems to happen equally frequent in these image formats.
Stacktrace:
[] ERROR 2013-01-31 14:44:44,464 ImageEditorController.saveImage - Unrecognized image loader: null
java.lang.IllegalArgumentException: Unrecognized image loader: null
at javafx.scene.image.WritableImage.loadTkImage(WritableImage.java:230)
at javafx.scene.image.WritableImage.access$000(WritableImage.java:44)
at javafx.scene.image.WritableImage$1.loadTkImage(WritableImage.java:49)
at javafx.scene.Scene.doSnapshot(Scene.java:1140)
at javafx.scene.Node.doSnapshot(Node.java:1632)
at javafx.scene.Node.snapshot(Node.java:1710)
at com.infowerk.fx.imageEditor.ImageEditorController.saveImage(SourceFile)
[...]
The effects that are applied to the imageViews:
ColorAdjust adjust = new ColorAdjust();
SepiaTone sepia = new SepiaTone();
sepia.setInput(adjust);
GaussianBlur blur = new GaussianBlur();
blur.setInput(sepia);
Bloom bloom = new Bloom();
bloom.setInput(blur);
InnerShadow innerShadow = new InnerShadow();
innerShadow.setInput(bloom);
return innerShadow;