public class BmpImage extends Object
It is based in the JAI codec.
Modifier and Type | Field | Description |
---|---|---|
HashMap<String,Object> |
properties |
Modifier and Type | Method | 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 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
IOException
Copyright © 2018. All rights reserved.