Package com.lowagie.text
Class ImageLoader
- java.lang.Object
-
- com.lowagie.text.ImageLoader
-
public class ImageLoader extends java.lang.Object
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 Constructor Description ImageLoader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Image
getBmpImage(byte[] imageData)
static Image
getBmpImage(java.net.URL url)
static Image
getGifImage(byte[] imageData)
static Image
getGifImage(java.net.URL url)
static Image
getJpeg2000Image(byte[] imageData)
static Image
getJpeg2000Image(java.net.URL url)
static Image
getJpegImage(byte[] imageData)
Creates an Image from a JPEG image file in a byte array.static Image
getJpegImage(java.net.URL url)
Creates an Image from a JPEG image file in an URL.static Image
getPngImage(byte[] imageData)
static Image
getPngImage(java.net.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(java.net.URL url)
-
-
-
Method Detail
-
getPngImage
public static Image getPngImage(java.net.URL url)
Creates an Image from a PNG image file in an URL.- Parameters:
url
- url of the image- Returns:
- an object of type
Image
-
getGifImage
public static Image getGifImage(java.net.URL url)
-
getTiffImage
public static Image getTiffImage(java.net.URL url)
-
getBmpImage
public static Image getBmpImage(java.net.URL url)
-
getJpegImage
public static Image getJpegImage(java.net.URL url)
Creates an Image from a JPEG image file in an URL.- Parameters:
url
- url of the image- Returns:
- an object of type
Image
-
getJpeg2000Image
public static Image getJpeg2000Image(java.net.URL url)
-
getGifImage
public static Image getGifImage(byte[] imageData)
-
getPngImage
public static Image getPngImage(byte[] imageData)
-
getBmpImage
public static Image getBmpImage(byte[] imageData)
-
getTiffImage
public static Image getTiffImage(byte[] imageData)
Creates an Image from an array of tiff image bytes.- Parameters:
imageData
- bytes of the tiff image- Returns:
- an objet of type
Image
-
getJpegImage
public static Image getJpegImage(byte[] imageData)
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
public static Image getJpeg2000Image(byte[] imageData)
-
-