se.unlogic.standardutils.image
Class ImageUtils

java.lang.Object
  extended by se.unlogic.standardutils.image.ImageUtils

public class ImageUtils
extends Object


Field Summary
static String BMP
           
static String GIF
           
static String JPG
           
static String PNG
           
static String WBMP
           
 
Constructor Summary
ImageUtils()
           
 
Method Summary
static BufferedImage getImage(InputStream inputStream)
           
static BufferedImage getImage(String url)
           
static BufferedImage getImageByResource(String url)
           
static boolean isReadable(String url)
           
static BufferedImage scaleImage(BufferedImage image, double xFactor, double yFactor)
           
static BufferedImage scaleImage(BufferedImage image, int maxHeight, int maxWidth, int quality, int imageType)
           
static BufferedImage scaleImageByHeight(BufferedImage image, int maxHeight, int quality, int imageType)
           
static BufferedImage scaleImageByWidth(BufferedImage image, int maxWidth, int quality, int imageType)
           
static void writeImage(BufferedImage image, String url, String format)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JPG

public static final String JPG
See Also:
Constant Field Values

GIF

public static final String GIF
See Also:
Constant Field Values

PNG

public static final String PNG
See Also:
Constant Field Values

BMP

public static final String BMP
See Also:
Constant Field Values

WBMP

public static final String WBMP
See Also:
Constant Field Values
Constructor Detail

ImageUtils

public ImageUtils()
Method Detail

getImageByResource

public static BufferedImage getImageByResource(String url)

getImage

public static BufferedImage getImage(String url)

isReadable

public static boolean isReadable(String url)

getImage

public static BufferedImage getImage(InputStream inputStream)

scaleImage

public static BufferedImage scaleImage(BufferedImage image,
                                       double xFactor,
                                       double yFactor)

scaleImage

public static BufferedImage scaleImage(BufferedImage image,
                                       int maxHeight,
                                       int maxWidth,
                                       int quality,
                                       int imageType)

scaleImageByWidth

public static BufferedImage scaleImageByWidth(BufferedImage image,
                                              int maxWidth,
                                              int quality,
                                              int imageType)

scaleImageByHeight

public static BufferedImage scaleImageByHeight(BufferedImage image,
                                               int maxHeight,
                                               int quality,
                                               int imageType)

writeImage

public static void writeImage(BufferedImage image,
                              String url,
                              String format)
                       throws IOException,
                              NullPointerException
Throws:
IOException
NullPointerException


Copyright © 2011. All Rights Reserved.