deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.framework.util
Class ImageUtils

java.lang.Object
  extended by org.deegree.framework.util.ImageUtils

public class ImageUtils
extends java.lang.Object

Some utility methods for reading standard images

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Andreas Poth, last edited by: $Author: mschneider $

Constructor Summary
ImageUtils()
           
 
Method Summary
static void encodeGif(java.io.OutputStream out, java.awt.image.BufferedImage img)
           
static java.awt.image.BufferedImage loadImage(java.io.File file)
          reads an image from the passed file location using JAI mechanism
static java.awt.image.BufferedImage loadImage(java.io.InputStream is)
          reads an image from the passed InputStream using JAI mechanism
static java.awt.image.BufferedImage loadImage(java.lang.String fileName)
          reads an image from the passed file location using JAI mechanism
static java.awt.image.BufferedImage loadImage(java.net.URL url)
          reads an image from the passed URL using JAI mechanism
static void saveImage(java.awt.image.BufferedImage image, java.io.File file, float quality)
          stores the passed image in the passed file with defined quality
static void saveImage(java.awt.image.BufferedImage image, java.io.OutputStream os, java.lang.String format, float quality)
          write an image into the passed output stream. after writing the image the stream will be closed.
static void saveImage(java.awt.image.BufferedImage image, java.lang.String fileName, float quality)
          stores the passed image in the passed file name with defined quality
 
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

loadImage

public static java.awt.image.BufferedImage loadImage(java.net.URL url)
                                              throws java.io.IOException
reads an image from the passed URL using JAI mechanism

Parameters:
url - address of the image
Returns:
read image
Throws:
java.io.IOException

loadImage

public static java.awt.image.BufferedImage loadImage(java.io.InputStream is)
                                              throws java.io.IOException
reads an image from the passed InputStream using JAI mechanism

Parameters:
is -
Returns:
read image
Throws:
java.io.IOException

loadImage

public static java.awt.image.BufferedImage loadImage(java.lang.String fileName)
                                              throws java.io.IOException
reads an image from the passed file location using JAI mechanism

Parameters:
fileName -
Returns:
read imagey
Throws:
java.io.IOException

loadImage

public static java.awt.image.BufferedImage loadImage(java.io.File file)
                                              throws java.io.IOException
reads an image from the passed file location using JAI mechanism

Parameters:
file -
Returns:
read image
Throws:
java.io.IOException

saveImage

public static void saveImage(java.awt.image.BufferedImage image,
                             java.lang.String fileName,
                             float quality)
                      throws java.io.IOException
stores the passed image in the passed file name with defined quality

Parameters:
image -
fileName -
quality - just supported for jpeg (0..1)
Throws:
java.io.IOException

saveImage

public static void saveImage(java.awt.image.BufferedImage image,
                             java.io.File file,
                             float quality)
                      throws java.io.IOException
stores the passed image in the passed file with defined quality

Parameters:
image -
file -
quality - just supported for jpeg (0..1)
Throws:
java.io.IOException

saveImage

public static void saveImage(java.awt.image.BufferedImage image,
                             java.io.OutputStream os,
                             java.lang.String format,
                             float quality)
                      throws java.io.IOException
write an image into the passed output stream. after writing the image the stream will be closed.

Parameters:
image -
os -
format -
quality -
Throws:
java.io.IOException

encodeGif

public static void encodeGif(java.io.OutputStream out,
                             java.awt.image.BufferedImage img)
                      throws java.io.IOException
Parameters:
out -
img -
Throws:
java.io.IOException

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org