Package com.lowagie.text
Class ImageLoader
- java.lang.Object
-
- com.lowagie.text.ImageLoader
-
public class ImageLoader extends 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.- Author:
- Andreas Rosdal
-
-
Constructor Summary
Constructors Constructor Description ImageLoader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ImagegetBmpImage(byte[] imageData)static ImagegetBmpImage(URL url)static ImagegetGifImage(byte[] imageData)static ImagegetGifImage(URL url)static ImagegetJpeg2000Image(byte[] imageData)static ImagegetJpeg2000Image(URL url)static ImagegetJpegImage(byte[] imageData)Creates an Image from a JPEG image file in a byte array.static ImagegetJpegImage(URL url)Creates an Image from a JPEG image file in an URL.static ImagegetPngImage(byte[] imageData)static ImagegetPngImage(URL url)Creates an Image from a PNG image file in an URL.static ImagegetTiffImage(byte[] imageData)static ImagegetTiffImage(URL url)
-
-
-
Method Detail
-
getPngImage
public static Image getPngImage(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
-
getJpegImage
public static Image getJpegImage(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
-
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)
-
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)
-
-