|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gerhardb.lib.image.ImageUtil
public class ImageUtil
This is used to read images and write them back out to a file. This wraps the stream thereby keeping the Metadata.
| Constructor Summary | |
|---|---|
ImageUtil()
|
|
| Method Summary | |
|---|---|
static boolean |
hasAlpha(java.awt.Image image)
This method returns true if the specified image has transparent pixels e661. |
static void |
save(java.awt.image.BufferedImage inputImage,
float quality,
java.io.File saveAsFile,
java.lang.String type)
Deafults to jpeg if an unknown type is passed in. |
static void |
saveJPEG(java.awt.image.BufferedImage inputImage,
float quality,
java.io.File saveAsFile)
|
static java.awt.image.BufferedImage |
toBufferedImage(java.awt.Image image)
This method returns a buffered image with the contents of an image. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ImageUtil()
| Method Detail |
|---|
public static java.awt.image.BufferedImage toBufferedImage(java.awt.Image image)
public static boolean hasAlpha(java.awt.Image image)
public static void saveJPEG(java.awt.image.BufferedImage inputImage,
float quality,
java.io.File saveAsFile)
throws java.io.IOException
image - quality - An integer between 0 and 1. 1 specifies minimum compression and maximum quality.saveAsFile -
java.io.IOException
public static void save(java.awt.image.BufferedImage inputImage,
float quality,
java.io.File saveAsFile,
java.lang.String type)
throws java.io.IOException
image - quality - An integer between 0 and 1. 1 specifies minimum compression and maximum quality.saveAsFile - type - For example "jpeg".
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||