Open's a splash window using the specified image.
@param image The splash image.
355359
public static Container splash(Container container, Image image)
    {
        if (instance == null && image != null) {
            Window frame = null;
            int heading = 0;
            if (container == null)
            {
                frame = new JWindow();
                container = new JApplet();  // Just to be consistent
                ((JWindow)frame).getContentPane().add(container);
            }
            else
            {
                frame = new JFrame();
                ((JFrame)frame).getContentPane().add(container);
                if (container instanceof JApplet)
                    heading = 50;   // TODO There must be a way to get this
            }                

            // Create the splash image
            instance = new Splash(container, image);
            
            Dimension dimension = container.getSize();
            frame.setSize(dimension.width, dimension.height + heading);
            Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize();
            frame.setLocation(
            (screenDim.width - dimension.width) / 2,
            (screenDim.height - dimension.height) / 2
            );

            // Show the window.
            frame.setVisible(true);
            
            // Wait until its paint method has been called at least once.
            if (! EventQueue.isDispatchThread() 
            && Runtime.getRuntime().availableProcessors() == 1) {
                synchronized (instance) {
                    while (! instance.paintCalled) {
                        try { instance.wait(); } catch (InterruptedException e) {}
                    }
                }
            }
        }
        return container;
    }
1135431
public EmbedBuilder setImage(InputStream image, String fileType) {
        delegate.setImage(image, fileType);
        return this;
    }
925753
public static byte[] bufferedImageToJPGByteArray(BufferedImage image) {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try {
            ImageIO.write(image, "jpg", baos);
            //baos.flush();
            byte[] imageInByte = baos.toByteArray();
            //baos.close();
            return imageInByte;
        } catch (IOException ex) {
            Logger.getLogger(PHATImageUtils.class.getName()).log(Level.SEVERE, "bufferedImageToByteArray", ex);
        }
        return null;
    }
496092
public static ImageIcon newImageIcon(File image)
	{
		ImageIcon img = new ImageIcon(image.getAbsolutePath());
		return img;
	}
781377
private static InputStream openResource(final String file) throws IOException {
		InputStream stream = HtmlConverterApplication.class.getResourceAsStream("/" + file);
		if (stream == null) {
			throw new FileNotFoundException(file);
		} else {
			return stream;
		}
	}
1006076
@Override
   public Image loadImage(URL image, float opacity) throws VectorPrintException {
      try {
         if (log.isLoggable(Level.FINE)) {
            log.fine(String.format("loading image from %s", String.valueOf(image)));
         }
         BufferedImage awtim = null;
         if ("file".equals(image.getProtocol())) {
            awtim = makeImageTranslucent(ImageIO.read(new File(image.getFile())), opacity);
         } else {
            awtim = makeImageTranslucent(ImageIO.read(image), opacity);
         }
         return Image.getInstance(awtim, null);
      } catch (BadElementException | IOException ex) {
         throw new VectorPrintException(String.format("unable to load image %s", image.toString()), ex);
      }
   }
682692
public void setImage(T image) {
		this.image = image;

		// precompute offsets for faster computing later on
		for( int i = 0; i < definition.samplePoints.length ; i++ ) {
			Point2D_I32 a = definition.samplePoints[i];

			offsets[i] = image.stride*a.y + a.x;
		}

		for( int i = 0; i < definition.compare.length ; i++ ) {
			Point2D_I32 p = definition.compare[i];
			offsetsA[i] = offsets[p.x];
			offsetsB[i] = offsets[p.y];
		}
	}
821178
public static void releaseGraphicsForImage(Image image) throws SlickException {
		Graphics g = (Graphics) graphics.remove(image.getTexture());
		
		if (g != null) {
			g.destroy();
		}
	}
193925
public void add(Image image) {
    assert !start || listener == null;
    ++total;
    image.addCallback(callback);
  }
1349504
public void setIcon(final Image IMAGE) {
        if (null == icon) {
            _icon = IMAGE;
            fireSectionEvent(UPDATE_EVENT);
        } else {
            icon.set(IMAGE);
        }
    }
272738
public void setBufferedImage(BufferedImage img) {
        image = img;
        width = img.getWidth();
        height = img.getHeight();
        updateColorArray();
    }
337511
private BufferedImage create_BACKGROUND_Image(final int WIDTH, BufferedImage image) {
        if (WIDTH <= 0) {
            return null;
        }
        if (image == null) {
            image = UTIL.createImage(WIDTH, WIDTH, Transparency.TRANSLUCENT);
        }
        final Graphics2D G2 = image.createGraphics();
        G2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

        switch (getFrameType()) {
            case SQUARE:
                BACKGROUND_FACTORY.createLinearBackground(WIDTH, WIDTH, getBackgroundColor(), getCustomBackground(), getModel().getTextureColor(), image);
                break;
            case ROUND:

            default:
                BACKGROUND_FACTORY.createRadialBackground(WIDTH, getBackgroundColor(), getCustomBackground(), getModel().getTextureColor(), image);
                break;
        }
        G2.dispose();

        return image;
    }
859610
public void setImage (Mirage image)
    {
        if (_mirage != null) {
            _totalTileMemory -= _mirage.getEstimatedMemoryUsage();
        }
        _mirage = image;
        if (_mirage != null) {
            _totalTileMemory += _mirage.getEstimatedMemoryUsage();
        }
    }
257008
public BufferedImage put(IconRow iconRow, BufferedImage image) {
		return put(iconRow.getId(), image);
	}
542720
public void loadImage() throws InterruptedException {
		synchronized(this) {
			status=0;
			image.getSource().startProduction(this);
			while((status&(IMAGEABORTED|IMAGEERROR|SINGLEFRAMEDONE|STATICIMAGEDONE))==0) {
				wait();
			}
		}
	}
126451
private void createAreas(final BufferedImage IMAGE) {
        if (bImage != null) {
            final double ANGLE_STEP;
            if (!isLogScale()) {
                ANGLE_STEP = Math.toDegrees(getModel().getAngleRange()) / (getMaxValue() - getMinValue());
            } else {
                ANGLE_STEP = Math.toDegrees(getModel().getAngleRange()) / UTIL.logOfBase(BASE, (getMaxValue() - getMinValue()));
            }

            if (bImage != null && !getAreas().isEmpty()) {
                final double OUTER_RADIUS = bImage.getWidth() * 0.38f;
                final double RADIUS;
                if (isSectionsVisible()) {
                    RADIUS = isExpandedSectionsEnabled() ? OUTER_RADIUS - bImage.getWidth() * 0.12f : OUTER_RADIUS - bImage.getWidth() * 0.04f;
                } else {
                    RADIUS = OUTER_RADIUS;
                }
                final double FREE_AREA = bImage.getWidth() / 2.0 - RADIUS;
                final Rectangle2D AREA_FRAME = new Rectangle2D.Double(bImage.getMinX() + FREE_AREA, bImage.getMinY() + FREE_AREA, 2 * RADIUS, 2 * RADIUS);
                for (Section area : getAreas()) {
                    if (!isLogScale()) {
                        area.setFilledArea(new Arc2D.Double(AREA_FRAME, getModel().getOriginCorrection() - (area.getStart() * ANGLE_STEP) + (getMinValue() * ANGLE_STEP), -(area.getStop() - area.getStart()) * ANGLE_STEP, Arc2D.PIE));
                    } else {
                        area.setFilledArea(new Arc2D.Double(AREA_FRAME, getModel().getOriginCorrection() - (UTIL.logOfBase(BASE, area.getStart()) * ANGLE_STEP) + (UTIL.logOfBase(BASE, getMinValue()) * ANGLE_STEP), -UTIL.logOfBase(BASE, area.getStop() - area.getStart()) * ANGLE_STEP, Arc2D.PIE));
                    }
                }
            }

            // Draw the areas
            if (isAreasVisible() && IMAGE != null) {
                final Graphics2D G2 = IMAGE.createGraphics();
                G2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
                for (Section area : getAreas()) {
                    G2.setColor(isTransparentAreasEnabled() ? area.getTransparentColor() : area.getColor());
                    G2.fill(area.getFilledArea());
                    if (area3DEffectVisible) {
                        G2.setPaint(area3DEffect);
                        G2.fill(area.getFilledArea());
                    }
                }
                G2.dispose();
            }
        }
    }
235086
public EmbedBuilder setImage(BufferedImage image, String fileType) {
        delegate.setImage(image, fileType);
        return this;
    }