JHotDraw 7.1

org.jhotdraw.util
Class Images

java.lang.Object
  extended by org.jhotdraw.util.Images

public class Images
extends java.lang.Object

Image processing methods.

Version:
2.1 2007-07-25 Added method toBufferedImage(RenderedImage).
1.0.2 2005-09-12 Brought my work-around for Java 1.4.1 back to live.
1.0.1 2005-05-21 Accidentaly used bitmask transparency instead of translucent transparency.
1.0 13 March 2005 Created.
Author:
Werner Randelshofer

Method Summary
static java.awt.Image createImage(java.net.URL resource)
           
static boolean hasAlpha(java.awt.Image image)
          This method returns true if the specified image has transparent pixels Code taken from the Java Developers Almanac 1.4 http://javaalmanac.com/egs/java.awt.image/HasAlpha.html
static java.awt.image.BufferedImage toBufferedImage(java.awt.Image image)
           
static java.awt.image.BufferedImage toBufferedImage(java.awt.image.RenderedImage rImg)
          Converts an Image to BufferedImage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createImage

public static java.awt.Image createImage(java.net.URL resource)

toBufferedImage

public static java.awt.image.BufferedImage toBufferedImage(java.awt.image.RenderedImage rImg)
Converts an Image to BufferedImage. If the Image is already a BufferedImage, the same image is returned.

Parameters:
rImg - An Image.
Returns:
A BufferedImage.

toBufferedImage

public static java.awt.image.BufferedImage toBufferedImage(java.awt.Image image)

hasAlpha

public static boolean hasAlpha(java.awt.Image image)
This method returns true if the specified image has transparent pixels Code taken from the Java Developers Almanac 1.4 http://javaalmanac.com/egs/java.awt.image/HasAlpha.html


Copyright 1996-2007 (c) JHotDraw.org.
Some rights reserved.