public class BmpImage extends Object
It is based in the JAI codec.
Modifier and Type | Field and Description |
---|---|
HashMap<String,Object> |
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 static Image getImage(URL url) throws IOException
url
- the url
IOException
- on error
public static Image getImage(InputStream is) throws IOException
is
- the stream
IOException
- on error
public static Image getImage(InputStream is, boolean noHeader, int size) throws IOException
is
- the stream
noHeader
- true to process a plain DIB
size
- the size of the DIB. Not used for a BMP
IOException
- on error
public static Image getImage(String file) throws IOException
file
- the file
IOException
- on error
public static Image getImage(byte[] data) throws IOException
data
- the byte array
IOException
- on error
protected void process(InputStream stream, boolean noHeader) throws IOException
IOException
Copyright © 1998–2019. All rights reserved.