Copyright 2012-04-26 Werner Randelshofer

org.monte.media.image
Class BitmapImageFactory

java.lang.Object
  extended by org.monte.media.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 BitmapImage toBitmapImage(java.awt.image.BufferedImage mis)
           
static BitmapImage toBitmapImage(ColorCyclingMemoryImageSource mis)
           
static BitmapImage toBitmapImage(java.awt.image.MemoryImageSource mis)
           
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)

toBitmapImage

public static BitmapImage toBitmapImage(java.awt.image.MemoryImageSource mis)

toBitmapImage

public static BitmapImage toBitmapImage(ColorCyclingMemoryImageSource mis)

toBitmapImage

public static BitmapImage toBitmapImage(java.awt.image.BufferedImage mis)

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 2012-04-26 Werner Randelshofer