|
Dekoh platform API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdekoh.portal.fwk.image.ImageUtils
public class ImageUtils
| Field Summary | |
|---|---|
static int |
IMAGE_JPEG
|
static int |
IMAGE_PNG
|
| Constructor Summary | |
|---|---|
ImageUtils()
|
|
| Method Summary | |
|---|---|
static int |
getImageType(BufferedImage image)
|
static boolean |
hasAlpha(Image image)
Determines if the image has transparent pixels. |
static BufferedImage |
makeThumb(BufferedImage image,
int x,
int y,
int width,
int height,
int size,
int shape)
Create fancy thumb nail of the given image in any given shape in any given dimension. |
static AbstractImageResizer.ImageWithReader |
resizeAndGiveBufferedImage(File imageFile,
File destFile,
ImageSize resizeTo)
|
static BufferedImage |
resizeAndSaveImage(AbstractImageResizer.ImageWithReader bufferedImage,
File destFile,
ImageSize resizeTo)
|
static void |
resizeAndSaveImage(File imageFile,
File destFile,
boolean isThumbNail)
|
static void |
resizeAndSaveImage(File imageFile,
File destFile,
ImageSize resizeTo)
creates thumbnails and 640x480 images and saves in respective folders. |
static void |
resizeAndSaveImage(File imageFile,
File destFile,
ImageSize resizeTo,
EXIFOrientation photoOrientation)
creates thumbnails and 640x480 images and saves in respective folders. |
static BufferedImage |
resizeImage(File imgName,
int type,
int maxWidth,
int maxHeight)
Resizes an image |
static BufferedImage |
resizeImage(Image image,
int type,
int maxWidth,
int maxHeight)
Resizes an image. |
static boolean |
saveImage(BufferedImage image,
File toFileName,
int type)
Saves an image to the disk. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int IMAGE_JPEG
public static final int IMAGE_PNG
| Constructor Detail |
|---|
public ImageUtils()
| Method Detail |
|---|
public static void resizeAndSaveImage(File imageFile,
File destFile,
boolean isThumbNail)
throws IOException
IOException
public static void resizeAndSaveImage(File imageFile,
File destFile,
ImageSize resizeTo)
throws IOException
imageFile - FiledestFile - StringresizeTo - imageSize
IOException - throws when could not save the resized image
public static AbstractImageResizer.ImageWithReader resizeAndGiveBufferedImage(File imageFile,
File destFile,
ImageSize resizeTo)
throws IOException
IOException
public static BufferedImage resizeAndSaveImage(AbstractImageResizer.ImageWithReader bufferedImage,
File destFile,
ImageSize resizeTo)
throws IOException
IOException
public static void resizeAndSaveImage(File imageFile,
File destFile,
ImageSize resizeTo,
EXIFOrientation photoOrientation)
throws IOException
imageFile - FiledestFile - StringresizeTo - imageSizephotoOrientation - Photo exifer orientation
IOException - throws when could not save the resized image
public static BufferedImage resizeImage(File imgName,
int type,
int maxWidth,
int maxHeight)
throws IOException
imgName - The image name to resize. Must be the complete path to the filemaxWidth - The image's max widthmaxHeight - The image's max height
BufferedImage
- Throws:
IOException - If the file is not found
public static BufferedImage resizeImage(Image image,
int type,
int maxWidth,
int maxHeight)
image - The image to resizemaxWidth - The image's max widthmaxHeight - The image's max height
BufferedImage
public static boolean saveImage(BufferedImage image,
File toFileName,
int type)
throws IOException
image - The image to savetoFileName - The filename to usetype - The image type. Use ImageUtils.IMAGE_JPEG to save as JPEG images, or
ImageUtils.IMAGE_PNG to save as PNG.
- Returns:
- true always
- Throws:
IOException - if saving resized image fails.
public static BufferedImage makeThumb(BufferedImage image,
int x,
int y,
int width,
int height,
int size,
int shape)
public static boolean hasAlpha(Image image)
image - The image to check for transparent pixel.s
true of false, according to the resultpublic static int getImageType(BufferedImage image)
|
Dekoh platform API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
© 2009 Pramati Technologies - Dekoh - Portal for Developers