String swtImageAsPNGResourceURL( Image image ) {
ImageLoader loader = new ImageLoader();
loader.data = new ImageData[] {image.getImageData()};
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
loader.save(outputStream, SWT.IMAGE_PNG);
ResourceManager manager = RWT.getResourceManager();
String name = image.hashCode() + ".png";
manager.register( name, new ByteArrayInputStream( outputStream.toByteArray() ) );
return manager.getLocation( name );
}