image = Image.getInstance( content.getURI( ) );
URL url = new URL(content.getURI( )); InputStream in = url.openStream( ); try { byte[] buffer = new byte[in.available( )]; in.read( buffer ); image = Image.getInstance( buffer ); } catch ( Exception ex ) { logger.log( Level.WARNING, ex.getMessage( ), ex ); } finally { in.close( ); }
	protected Dimension getIntrinsicDimension( IImageContent content )			throws BadElementException, MalformedURLException, IOException	{		Image image = null;		switch ( content.getImageSource( ) )		{			case IImageContent.IMAGE_FILE :				image = Image.getInstance( content.getURI( ) );				break;			case IImageContent.IMAGE_NAME :			case IImageContent.IMAGE_EXPRESSION :				image = Image.getInstance( content.getData( ) );				break;			case IImageContent.IMAGE_URL :				image = Image.getInstance( new URL( content.getURI( ) ) );				break;			default :				assert ( false );		}		if ( image != null )		{			Object design = content.getGenerateBy( );			int resolution = 96;			if ( design instanceof ExtendedItemDesign )			{				resolution = 192;			}			return new Dimension( (int) ( image.plainWidth( ) * 1000					/ resolution * 72 ), (int) ( image.plainHeight( ) * 1000					/ resolution * 72 ) );		}		return null;	}