EmbeddedImage newImage = newEmbeddedImageFrom( baseImage, baseImage .getName( ), targetModule ); targetModule.rename( newImage ); return newImage;
Library lib = targetModule.getModule( ).getLibraryByLocation( baseModule.getLocation( ) ); if ( lib == null ) { throw new LibraryException( baseModule, new String[]{( (Library) baseModule ).getNamespace( )}, LibraryException.DESIGN_EXCEPTION_LIBRARY_NOT_FOUND ); }  String namespace = lib.getNamespace( ); StructRefValue libReference = new StructRefValue( namespace, baseImage .getName( ) ); image.setProperty( EmbeddedImage.LIB_REFERENCE_MEMBER, libReference ); image.setName( name );  return image;
	public static EmbeddedImage newEmbeddedImageFrom(			EmbeddedImageHandle baseImage, ModuleHandle targetModule )			throws LibraryException	{		if ( baseImage == null )			return null;		EmbeddedImage newImage = newEmbeddedImageFrom( baseImage, baseImage				.getName( ), targetModule );		targetModule.rename( newImage );		return newImage;	}