String key = url.toString( ); Image image = getImageRegistry( ).get( key ); if ( image != null )
URL url = generateURL( uri ); if ( url == null )
	private Image loadImage( URL url ) throws IOException	{		String key = url.toString( );		Image image = getImageRegistry( ).get( key );		if ( image != null )		{			return image;		}		InputStream in = null;		try		{			if ( url.toString( ).toLowerCase( ).endsWith( ".svg" ) ) //$NON-NLS-1$			{				// convert svg image to JPEG image bytes				JPEGTranscoder transcoder = new JPEGTranscoder( );				// set the transcoding hints				transcoder.addTranscodingHint( JPEGTranscoder.KEY_QUALITY,						new Float( .8 ) );				// create the transcoder input				String svgURI = url.toString( );				TranscoderInput input = new TranscoderInput( svgURI );				// create the transcoder output				ByteArrayOutputStream ostream = new ByteArrayOutputStream( );				TranscoderOutput output = new TranscoderOutput( ostream );				try				{					transcoder.transcode( input, output );				}				catch ( TranscoderException e )				{				}				// flush the stream				ostream.flush( );				// use the outputstream as Image input stream.				in = new ByteArrayInputStream( ostream.toByteArray( ) );			}			else			{				in = url.openStream( );			}			image = new Image( null, in );		}		catch ( IOException e )		{			throw e;		}		finally		{			if ( in != null )			{				in.close( );			}		}		if ( image != null )		{			getImageRegistry( ).put( key, image );		}		return image;	}