|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.davesag.generica.util.ImageUtils
A collection of static utility methods for getting, saving and loading images.
| Constructor Summary | |
ImageUtils()
|
|
| Method Summary | |
static Image |
getImage(String url)
gets the Image from the URL provided. |
static boolean |
hasAlpha(Image image)
does the image have an alpha channel? |
static BufferedImage |
toBufferedImage(Image image)
Utility method to convert an Image to a Buffered Image. |
static void |
writeAsJPEG(Image image,
String filepath)
Write the Image to the filepath as a JPEG of a specific quality. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ImageUtils()
| Method Detail |
public static Image getImage(String url)
throws MalformedURLException
url - the url of the image
MalformedURLException - if the url was malformed
public static void writeAsJPEG(Image image,
String filepath)
image - The Image to write as a JPEG.filepath - The path of the file to write.public static BufferedImage toBufferedImage(Image image)
image - The Image.
public static boolean hasAlpha(Image image)
image - the image to test
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||