public class BmpImage extends Object
It is based in the JAI codec.
| Modifier and Type | Field and Description |
|---|---|
HashMap |
properties |
| Modifier and Type | Method and Description |
|---|---|
static Image |
getImage(byte[] data)
Reads a BMP from a byte array.
|
static Image |
getImage(InputStream is)
Reads a BMP from a stream.
|
static Image |
getImage(InputStream is,
boolean noHeader,
int size)
Reads a BMP from a stream.
|
static Image |
getImage(String file)
Reads a BMP from a file.
|
static Image |
getImage(URL url)
Reads a BMP from an url.
|
protected void |
process(InputStream stream,
boolean noHeader) |
public HashMap properties
public static Image getImage(URL url) throws IOException
url - the urlIOException - on errorpublic static Image getImage(InputStream is) throws IOException
is - the streamIOException - on errorpublic static Image getImage(InputStream is, boolean noHeader, int size) throws IOException
is - the streamnoHeader - true to process a plain DIBsize - the size of the DIB. Not used for a BMPIOException - on errorpublic static Image getImage(String file) throws IOException
file - the fileIOException - on errorpublic static Image getImage(byte[] data) throws IOException
data - the byte arrayIOException - on errorprotected void process(InputStream stream, boolean noHeader) throws IOException
IOExceptionCopyright © 2018. All rights reserved.