j3d.org Code

org.j3d.util
Class ImageUtils

java.lang.Object
  extended by org.j3d.util.ImageUtils

public class ImageUtils
extends java.lang.Object

A utility class that allows you to do various actions with images, such as conversions and creating items that are useful as textures.

Version:
$Revision: 1.2 $
Author:
Justin Couch

Constructor Summary
ImageUtils()
           
 
Method Summary
static java.awt.image.BufferedImage createBufferedImage(java.awt.Image img)
          Create a BufferedImage from the given source image.
static java.awt.image.BufferedImage createBufferedImage(java.awt.image.ImageProducer prod)
          Create a BufferedImage from the given source image producer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageUtils

public ImageUtils()
Method Detail

createBufferedImage

public static java.awt.image.BufferedImage createBufferedImage(java.awt.Image img)
Create a BufferedImage from the given source image. If the source image is already a buffered image it will immediately return with the parameter as the return value.

Parameters:
img - The source image to create buffered image from
Returns:
A complete buffered image representation of this image

createBufferedImage

public static java.awt.image.BufferedImage createBufferedImage(java.awt.image.ImageProducer prod)
Create a BufferedImage from the given source image producer. If the source is an animated GIF, it will only return the first frame.

Parameters:
prod - The source imageproducer to create buffered image from
Returns:
A complete buffered image representation of this image

j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org