de.jreality.util
Class ImageUtility

java.lang.Object
  extended by de.jreality.util.ImageUtility

public class ImageUtility
extends java.lang.Object

Static methods for handling various image-related tasks.

Author:
gunn

Method Summary
static java.awt.image.BufferedImage captureScreenshot(Viewer v)
          Captures a screen shot from the viewer's viewing component.
static java.awt.image.BufferedImage getValidBufferedImage(ImageData data)
           
static java.awt.image.BufferedImage rearrangeChannels(java.awt.image.BufferedImage img)
          I need this when i do offscreen rendering in the JOGL backend ..
static java.awt.image.BufferedImage rearrangeChannels(java.awt.image.BufferedImage bi, java.awt.image.BufferedImage img)
           
static java.awt.image.BufferedImage resizeToPowerOfTwo(java.awt.image.BufferedImage input)
           
static void writeBufferedImage(java.io.File file, java.awt.image.BufferedImage img)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

writeBufferedImage

public static void writeBufferedImage(java.io.File file,
                                      java.awt.image.BufferedImage img)

resizeToPowerOfTwo

public static java.awt.image.BufferedImage resizeToPowerOfTwo(java.awt.image.BufferedImage input)

rearrangeChannels

public static java.awt.image.BufferedImage rearrangeChannels(java.awt.image.BufferedImage img)
I need this when i do offscreen rendering in the JOGL backend .. don't really understand why since it appears I'm just copying from one image to the other. -gunn

Parameters:
img -
Returns:

rearrangeChannels

public static java.awt.image.BufferedImage rearrangeChannels(java.awt.image.BufferedImage bi,
                                                             java.awt.image.BufferedImage img)

getValidBufferedImage

public static java.awt.image.BufferedImage getValidBufferedImage(ImageData data)

captureScreenshot

public static java.awt.image.BufferedImage captureScreenshot(Viewer v)
Captures a screen shot from the viewer's viewing component. This requires a viewer that has an AWT component as viewing component, and it requires a AWT Robot, which may not be available when running as a webstart or applet.

Parameters:
v - the viewer to capture
Returns:
the screen capture of the viewer's viewing component, or null