Package com.lowagie.text
Class ImageLoader
java.lang.Object
com.lowagie.text.ImageLoader
Loads image files such as PNG, JPEG, GIF, TIFF and BMP.
TODO: The goal of this class is to use Java ImageIO to parse images and metadata, and embed the image in the PDF in the best way (the compressed image format, not the raw pixels).
We don't want to maintain our own image codecs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Image
getBmpImage
(byte[] imageData) static Image
getBmpImage
(URL url) static Image
getGifImage
(byte[] imageData) static Image
getGifImage
(URL url) static Image
getJpeg2000Image
(byte[] imageData) static Image
getJpeg2000Image
(URL url) static Image
getJpegImage
(byte[] imageData) Creates an Image from a JPEG image file in a byte array.static Image
getJpegImage
(URL url) Creates an Image from a JPEG image file in an URL.static Image
getPngImage
(byte[] imageData) static Image
getPngImage
(URL url) Creates an Image from a PNG image file in an URL.static Image
getTiffImage
(byte[] imageData) Creates an Image from an array of tiff image bytes.static Image
getTiffImage
(URL url)
-
Constructor Details
-
ImageLoader
public ImageLoader()
-
-
Method Details
-
getPngImage
Creates an Image from a PNG image file in an URL.- Parameters:
url
- url of the image- Returns:
- an object of type
Image
-
getGifImage
-
getTiffImage
-
getBmpImage
-
getJpegImage
Creates an Image from a JPEG image file in an URL.- Parameters:
url
- url of the image- Returns:
- an object of type
Image
-
getJpeg2000Image
-
getGifImage
-
getPngImage
-
getBmpImage
-
getTiffImage
Creates an Image from an array of tiff image bytes.- Parameters:
imageData
- bytes of the tiff image- Returns:
- an objet of type
Image
-
getJpegImage
Creates an Image from a JPEG image file in a byte array.- Parameters:
imageData
- bytes of the image- Returns:
- an object of type
Image
-
getJpeg2000Image
-