/** * Find image to install into Title or into Application icon. First try icons installed for * toplevel. Null is returned, if there is no icon and default Duke image should be used. */ private CImage getImageForTarget() { CImage icon = null; try { icon = CImage.getCreator().createFromImages(target.getIconImages()); } catch (Exception ignored) { // Perhaps the icon passed into Java is broken. Skipping this icon. } return icon; }
public BufferedImage createImageWithSize( final long image, final double width, final double height) { final CImage img = new CImage(image); img.resize(width, height); return img.toImage(); }