public class BufferedImageFactory extends ImageFactory
BufferedImageFactory is the default implementation of ImageFactory.| Constructor and Description |
|---|
BufferedImageFactory() |
| Modifier and Type | Method and Description |
|---|---|
Image |
fromFile(java.nio.file.Path path)
Gets
Image from file. |
Image |
fromImage(java.lang.Object image)
Gets
Image from varies Java image types. |
Image |
fromInputStream(java.io.InputStream is)
Gets
Image from InputStream. |
Image |
fromUrl(java.net.URL url)
Gets
Image from URL. |
fromUrl, getInstancepublic Image fromFile(java.nio.file.Path path) throws java.io.IOException
Image from file.fromFile in class ImageFactorypath - the path to the imageImagejava.io.IOException - Image not found or not readablepublic Image fromUrl(java.net.URL url) throws java.io.IOException
Image from URL.fromUrl in class ImageFactoryurl - the URL to load fromImagejava.io.IOException - URL is not valid.public Image fromInputStream(java.io.InputStream is) throws java.io.IOException
Image from InputStream.fromInputStream in class ImageFactoryis - InputStreamImagejava.io.IOException - image cannot be read from input stream.public Image fromImage(java.lang.Object image)
Image from varies Java image types.
Image can be BufferedImage or BitMap depends on platform
fromImage in class ImageFactoryimage - the image object.Image