Copyright 2011-01-06 Werner Randelshofer

ch.randelshofer.gui.image
Class BitmapImageFactory

java.lang.Object
  extended by ch.randelshofer.gui.image.BitmapImageFactory

public class BitmapImageFactory
extends java.lang.Object

Creates a BufferedImage from a BitmapImage.

We put these factory methods into this class instead of into class BitmapImage, because we don't want to put this additional code into Java applets that don't need this functionality.

Version:
1.0 December 25, 2006 Created.
Author:
Werner Randelshofer

Method Summary
static java.awt.image.BufferedImage toBufferedImage(BitmapImage bm)
          Creates a BufferedImage using the provided BitmapImage.
static java.awt.Image toMemoryImage(BitmapImage bm)
           
static void write(BitmapImage bm, java.io.File f)
           
static void write(BitmapImage bm, java.io.OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toBufferedImage

public static java.awt.image.BufferedImage toBufferedImage(BitmapImage bm)
Creates a BufferedImage using the provided BitmapImage.

Parameters:
bm - The BitmapImage holding the image data.

toMemoryImage

public static java.awt.Image toMemoryImage(BitmapImage bm)

write

public static void write(BitmapImage bm,
                         java.io.File f)
                  throws java.io.IOException
Throws:
java.io.IOException

write

public static void write(BitmapImage bm,
                         java.io.OutputStream out)
                  throws java.io.IOException
Throws:
java.io.IOException

Copyright 2011-01-06 Werner Randelshofer