Package com.lowagie.text.pdf.codec
Class BmpImage
java.lang.Object
com.lowagie.text.pdf.codec.BmpImage
Reads a BMP image. All types of BMP can be read.
It is based in the JAI codec.
- Author:
- Paulo Soares (psoares@consiste.pt)
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ImagegetImage(byte[] data) Reads a BMP from a byte array.static ImagegetImage(InputStream is) Reads a BMP from a stream.static ImagegetImage(InputStream is, boolean noHeader, int size) Reads a BMP from a stream.static ImageReads a BMP from a file.static ImageReads a BMP from an url.protected voidprocess(InputStream stream, boolean noHeader)
-
Field Details
-
properties
-
-
Method Details
-
getImage
Reads a BMP from an url.- Parameters:
url- the url- Returns:
- the image
- Throws:
IOException- on error
-
getImage
Reads a BMP from a stream. The stream is not closed.- Parameters:
is- the stream- Returns:
- the image
- Throws:
IOException- on error
-
getImage
Reads a BMP from a stream. The stream is not closed. The BMP may not have a header and be considered as a plain DIB.- Parameters:
is- the streamnoHeader- true to process a plain DIBsize- the size of the DIB. Not used for a BMP- Returns:
- the image
- Throws:
IOException- on error
-
getImage
Reads a BMP from a file.- Parameters:
file- the file- Returns:
- the image
- Throws:
IOException- on error
-
getImage
Reads a BMP from a byte array.- Parameters:
data- the byte array- Returns:
- the image
- Throws:
IOException- on error
-
process
- Throws:
IOException
-