| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static PDImageXObject | Returns: a new Image XObjectthe document where the image will be created document, byte[] bytes of JPEG image byteArray)Creates a new JPEG Image XObject from a byte array containing JPEG data. |
| public static PDImageXObject | Returns: a new Image XObjectthe document where the image will be created document, BufferedImage the BufferedImage to embed image)Creates a new JPEG PDImageXObject from a BufferedImage. |
| public static PDImageXObject | Returns: a new Image XObjectthe document where the image will be created document, BufferedImage the BufferedImage to embed image, float The desired JPEG compression quality; between 0 (best
compression) and 1 (best image quality). See
quality)ImageWriteParam#setCompressionQuality(float) for more details.Creates a new JPEG PDImageXObject from a BufferedImage and a given quality. |
| public static PDImageXObject | Returns: a new Image XObjectthe document where the image will be created document, BufferedImage the BufferedImage to embed image, float The desired JPEG compression quality; between 0 (best
compression) and 1 (best image quality). See
quality, int ImageWriteParam#setCompressionQuality(float) for more details.the desired dpi (resolution) value of the JPEG to be stored in metadata. This
value has no influence on image content or size. dpi)Creates a new JPEG Image XObject from a BufferedImage, a given quality and dpi metadata. |
| public static PDImageXObject | Returns: a new Image XObjectthe document where the image will be created document, InputStream a stream of JPEG data stream)Creates a new JPEG Image XObject from an input stream containing JPEG data. |
| private static PDImageXObject | |
| private static byte[] | |
| private static BufferedImage | |
| private static BufferedImage | |
| private static PDColorSpace | |
| private static ImageWriter | |
| private static int | |
| private static JPEGFactory. |
| LOG | back to summary |
|---|---|
| private static final Log LOG | |
| JPEGFactory | back to summary |
|---|---|
| private JPEGFactory() | |
| createFromByteArray | back to summary |
|---|---|
| public static PDImageXObject createFromByteArray(PDDocument document, byte[] byteArray) throws IOException Creates a new JPEG Image XObject from a byte array containing JPEG data.
| |
| createFromImage | back to summary |
|---|---|
| public static PDImageXObject createFromImage(PDDocument document, BufferedImage image) throws IOException Creates a new JPEG PDImageXObject from a BufferedImage.
Do not read a JPEG image from a stream/file and call this method; you'll get more speed and
quality by calling
| |
| createFromImage | back to summary |
|---|---|
| public static PDImageXObject createFromImage(PDDocument document, BufferedImage image, float quality) throws IOException Creates a new JPEG PDImageXObject from a BufferedImage and a given quality.
Do not read a JPEG image from a stream/file and call this method; you'll get more speed and
quality by calling
| |
| createFromImage | back to summary |
|---|---|
| public static PDImageXObject createFromImage(PDDocument document, BufferedImage image, float quality, int dpi) throws IOException Creates a new JPEG Image XObject from a BufferedImage, a given quality and dpi metadata.
Do not read a JPEG image from a stream/file and call this method; you'll get more speed and
quality by calling
| |
| createFromStream | back to summary |
|---|---|
| public static PDImageXObject createFromStream(PDDocument document, InputStream stream) throws IOException Creates a new JPEG Image XObject from an input stream containing JPEG data. The input stream data will be preserved and embedded in the PDF file without modification.
| |
| createJPEG | back to summary |
|---|---|
| private static PDImageXObject createJPEG(PDDocument document, BufferedImage image, float quality, int dpi) throws IOException | |
| encodeImageToJPEGStream | back to summary |
|---|---|
| private static byte[] encodeImageToJPEGStream(BufferedImage image, float quality, int dpi) throws IOException | |
| getAlphaImage | back to summary |
|---|---|
| private static BufferedImage getAlphaImage(BufferedImage image) | |
| getColorImage | back to summary |
|---|---|
| private static BufferedImage getColorImage(BufferedImage image) | |
| getColorSpaceFromAWT | back to summary |
|---|---|
| private static PDColorSpace getColorSpaceFromAWT(BufferedImage awtImage) | |
| getJPEGImageWriter | back to summary |
|---|---|
| private static ImageWriter getJPEGImageWriter() throws IOException | |
| getNumComponentsFromImageMetadata | back to summary |
|---|---|
| private static int getNumComponentsFromImageMetadata(ImageReader reader) throws IOException | |
| retrieveDimensions | back to summary |
|---|---|
| private static JPEGFactory. | |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| private |
| height | back to summary |
|---|---|
| private int height | |
| numComponents | back to summary |
|---|---|
| private int numComponents | |
| width | back to summary |
|---|---|
| private int width | |
| Dimensions | back to summary |
|---|---|
| private Dimensions() | |