public class ImageLoader extends Object
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 and Description |
|---|
ImageLoader() |
| Modifier and Type | Method and Description |
|---|---|
static 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) |
public static Image getPngImage(URL url)
url - url of the imageImagepublic static Image getJpegImage(URL url)
url - url of the imageImagepublic static Image getGifImage(byte[] imageData)
public static Image getPngImage(byte[] imageData)
public static Image getBmpImage(byte[] imageData)
public static Image getTiffImage(byte[] imageData)
see: https://openjdk.java.net/jeps/262
imageData - bytes of the tiff imageImagepublic static Image getJpegImage(byte[] imageData)
imageData - bytes of the imageImagepublic static Image getJpeg2000Image(byte[] imageData)
Copyright © 2024. All rights reserved.