if (image != null)
{
//editor.zoomSetOriginalSize();
Image awtImage = ImageCreator.convertToAwtImage(image, RGBA.DEFAULT_ALPHA);
scrollPane = new ScrollPane(ScrollPane.SCROLLBARS_AS_NEEDED);
canvas = new ImageCanvas(scrollPane);
canvas.setInterpolation(editor.getInterpolation());
canvas.setZoomToFit(editor.getZoomToFit());
canvas.setImage(awtImage);
canvas.setZoomFactors(editor.getZoomFactorX(), editor.getZoomFactorY());
//canvas.computeZoomToFitSize();