} else {
// Create the SWT Image from the passed image data and create
// a preview for it. When the preview control is destroyed, the
// Image is is displaying will be destroyed with it.
final Image swtImage = new Image(null, image);
preview = new ImagePreview(container, style, swtImage);
preview.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
swtImage.dispose();
}
});