public class PNGDecoder extends Object
| Constructor and Description |
|---|
PNGDecoder(InputStream in)
Constructs a PNGDecoder object.
|
| Modifier and Type | Method and Description |
|---|---|
BufferedImage |
decode()
Decodes image from an input stream passed into constructor.
|
BufferedImage |
decode(boolean closeStream)
Decodes image from an input stream passed into constructor.
|
static BufferedImage |
decode(ClassLoader loader,
String resource)
Decodes image from resource.
|
static BufferedImage |
decode(InputStream inputStream,
boolean closeStream)
Decodes image from input stream
|
static BufferedImage |
decode(String fileName)
Decodes image from file.
|
public PNGDecoder(InputStream in)
in - input stream to read PNG image from.public BufferedImage decode() throws IOException
IOException - todo documentpublic BufferedImage decode(boolean closeStream) throws IOException
closeStream - requests method to close the stream after the image is readIOException - todo documentpublic static BufferedImage decode(String fileName)
fileName - a file to read image frompublic static BufferedImage decode(InputStream inputStream, boolean closeStream)
inputStream - a file to read image fromcloseStream - requests method to close the stream after the image is readpublic static BufferedImage decode(ClassLoader loader, String resource)
loader - ClassLoader to use to get the resourceresource - Image resource nameCopyright © 2018. All rights reserved.