com.webstersmalley.picweb.utils
Class ImageManipulator
java.lang.Object
com.webstersmalley.picweb.utils.ImageManipulator
public class ImageManipulator
- extends java.lang.Object
- Author:
- Matthew Smalley
|
Field Summary |
private static org.apache.commons.logging.Log |
log
Logger for the class. |
private static float |
QUALITY
|
|
Method Summary |
static java.awt.image.BufferedImage |
createImageFromString(java.lang.String text,
int width,
int height,
int x,
int y)
|
static java.awt.image.BufferedImage |
loadBufferedImage(java.io.File input)
|
static void |
resizeImage(java.io.File source,
java.io.File destination,
int targetSize)
|
static void |
saveImageToDisk(java.awt.image.BufferedImage bi,
java.io.File output)
|
private static java.awt.image.BufferedImage |
scale(double scale,
java.awt.image.BufferedImage srcImg)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static org.apache.commons.logging.Log log
- Logger for the class.
QUALITY
private static final float QUALITY
- See Also:
- Constant Field Values
ImageManipulator
private ImageManipulator()
resizeImage
public static void resizeImage(java.io.File source,
java.io.File destination,
int targetSize)
throws com.sun.image.codec.jpeg.ImageFormatException,
java.io.IOException
- Throws:
com.sun.image.codec.jpeg.ImageFormatException
java.io.IOException
createImageFromString
public static java.awt.image.BufferedImage createImageFromString(java.lang.String text,
int width,
int height,
int x,
int y)
loadBufferedImage
public static java.awt.image.BufferedImage loadBufferedImage(java.io.File input)
scale
private static java.awt.image.BufferedImage scale(double scale,
java.awt.image.BufferedImage srcImg)
saveImageToDisk
public static void saveImageToDisk(java.awt.image.BufferedImage bi,
java.io.File output)
throws com.sun.image.codec.jpeg.ImageFormatException,
java.io.IOException
- Throws:
com.sun.image.codec.jpeg.ImageFormatException
java.io.IOException
Copyright © 2004-2005-2005 Webster Smalley. All Rights Reserved.