If you use ViewerController to get the image URI it gives you all kinds of images supported by extensions, currently there are not only bitmaps but also SVG images. But the methods you used for painting the image can not draw SVG images. So actually it looks like you can not use ViewerController unless you find a way to use its viewers for painting and scaling the background image which is basically possible and actually a nice solution. Look at usages of org.freeplane.view.swing.features.filepreview.IViewerFactory.createViewer(URI, Dimension) . After you get a component you can call its paint method with graphics object created by call of BufferedImage.createGraphics() so that you can later use the result as a background image.

However painting of SVG images happens asynchronously and you should be able to properly handle it.