| Modifier and Type | Field and Description |
|---|---|
| private final byte[] | |
| private final COSDictionary | |
| private final byte[] | |
| private final PDResources |
| Access | Constructor and Description |
|---|---|
| public | PDInlineImage(COSDictionary
the image parameters parameters, byte[] the image data data, PDResources the current resources resources)Creates an inline image from the given parameters and data. |
| Modifier and Type | Method and Description |
|---|---|
| private PDColorSpace | |
| public InputStream | createInputStream()
Implements org. Returns an InputStream containing the image data, irrespective of whether this is an inline image or an image XObject. |
| public InputStream | createInputStream(DecodeOptions
Additional decoding options passed to the filters used options)Implements org. Returns an InputStream, passing additional options to each filter. |
| public InputStream | createInputStream(List<String>
A list of filters to stop decoding at. stopFilters)Implements org. Returns an InputStream containing the image data, irrespective of whether this is an inline image or an image XObject. |
| public int | getBitsPerComponent()
Implements org. Returns bits per component of this image, or -1 if one has not been set. |
| public PDColorSpace | getColorSpace()
Implements org. Returns the image's color space. |
| public COSDictionary | getCOSObject()
Implements org. Convert this image to a COS object. |
| public byte[] | |
| public COSArray | getDecode()
Implements org. Returns the decode array. |
| public List | Returns: A (possibly empty) list of filters applied to this stream, never null.Returns A list of filters applied to this stream. |
| public int | getHeight()
Implements org. Returns height of this image, or -1 if one has not been set. |
| public BufferedImage | getImage()
Implements org. Returns the content of this image as an AWT buffered image with an (A)RGB color space. |
| public BufferedImage | getImage(Rectangle
The region of the source image to get, or null if the entire image is needed. The actual region
will be clipped to the dimensions of the source image. region, int The amount of rows and columns to advance for every output pixel, a value of 1 meaning every
pixel will be read subsampling)Implements org. Returns the content of this image as an AWT buffered image with an (A)RGB colored space. |
| public boolean | getInterpolate()
Implements org. Returns true if the image should be interpolated when rendered. |
| public BufferedImage | getRawImage()
Implements org. Try to get the raw image as AWT buffered image with it's original colorspace. |
| public WritableRaster | getRawRaster()
Implements org. Return the image data as WritableRaster. |
| public BufferedImage | getStencilImage(Paint
the paint to fill the visible portions of the image with paint)Implements org. Returns an ARGB image filled with the given paint and using this image as a mask. |
| public String | Returns: The image suffix.Implements org. Returns the suffix for this image type, e.g. jpg/png. |
| public int | getWidth()
Implements org. Returns the width of this image, or -1 if one has not been set. |
| public boolean | isEmpty()
Implements org. Returns true if the image has no data. |
| public boolean | isStencil()
Implements org. Returns true if the image is a stencil mask. |
| public void | setBitsPerComponent(int
The number of bits per component. bitsPerComponent)Implements org. Set the number of bits per component. |
| public void | setColorSpace(PDColorSpace
The color space for this image. colorSpace)Implements org. Sets the color space for this image. |
| public void | setDecode(COSArray
the new decode array. decode)Implements org. Sets the decode array. |
| public void | setFilters(List<String>
the filters to apply to this stream. filters)Sets which filters are applied to this stream. |
| public void | setHeight(int
The height of the image. height)Implements org. Sets the height of the image. |
| public void | setInterpolate(boolean
true for high-quality image scaling value)Implements org. Sets the Interpolate flag, true for high-quality image scaling. |
| public void | setStencil(boolean
True to make the image a stencil. isStencil)Implements org. Sets whether or not the image is a stencil. |
| public void | setWidth(int
The width of the image. width)Implements org. Sets the width of the image. |
| private COSBase |
| decodedData | back to summary |
|---|---|
| private final byte[] decodedData | |
| parameters | back to summary |
|---|---|
| private final COSDictionary parameters | |
| rawData | back to summary |
|---|---|
| private final byte[] rawData | |
| resources | back to summary |
|---|---|
| private final PDResources resources | |
| PDInlineImage | back to summary |
|---|---|
| public PDInlineImage(COSDictionary parameters, byte[] data, PDResources resources) throws IOException Creates an inline image from the given parameters and data.
| |
| createColorSpace | back to summary |
|---|---|
| private PDColorSpace createColorSpace(COSBase cs) throws IOException | |
| createInputStream | back to summary |
|---|---|
| public InputStream createInputStream() throws IOException Implements org. Doc from org. Returns an InputStream containing the image data, irrespective of whether this is an inline image or an image XObject.
| |
| createInputStream | back to summary |
|---|---|
| public InputStream createInputStream(DecodeOptions options) throws IOException Implements org. Doc from org. Returns an InputStream, passing additional options to each filter. As a side effect, the
filterSubsampled flag is set in
| |
| createInputStream | back to summary |
|---|---|
| public InputStream createInputStream(List<String> stopFilters) throws IOException Implements org. Doc from org. Returns an InputStream containing the image data, irrespective of whether this is an inline image or an image XObject. The given filters will not be decoded.
| |
| getBitsPerComponent | back to summary |
|---|---|
| public int getBitsPerComponent() Implements org. Doc from org. Returns bits per component of this image, or -1 if one has not been set.
| |
| getColorSpace | back to summary |
|---|---|
| public PDColorSpace getColorSpace() throws IOException Implements org. Doc from org. Returns the image's color space.
| |
| getCOSObject | back to summary |
|---|---|
| public COSDictionary getCOSObject() Implements org. Doc from org. Convert this image to a COS object.
| |
| getData | back to summary |
|---|---|
| public byte[] getData() Returns the inline image data.
| |
| getDecode | back to summary |
|---|---|
| public COSArray getDecode() Implements org. Doc from org. Returns the decode array. | |
| getFilters | back to summary |
|---|---|
| public List Returns A list of filters applied to this stream. | |
| getHeight | back to summary |
|---|---|
| public int getHeight() Implements org. Doc from org. Returns height of this image, or -1 if one has not been set.
| |
| getImage | back to summary |
|---|---|
| public BufferedImage getImage() throws IOException Implements org. Doc from org. Returns the content of this image as an AWT buffered image with an (A)RGB color space. The size of the returned image is the larger of the size of the image itself or its mask.
| |
| getImage | back to summary |
|---|---|
| public BufferedImage getImage(Rectangle region, int subsampling) throws IOException Implements org. Doc from org. Returns the content of this image as an AWT buffered image with an (A)RGB colored space. Only the subregion
specified is rendered, and is subsampled by advancing the specified amount of rows and columns in the source
image for every resulting pixel.
Note that unlike
| |
| getInterpolate | back to summary |
|---|---|
| public boolean getInterpolate() Implements org. Doc from org. Returns true if the image should be interpolated when rendered.
| |
| getRawImage | back to summary |
|---|---|
| public BufferedImage getRawImage() throws IOException Implements org. Doc from org. Try to get the raw image as AWT buffered image with it's original colorspace. No color conversion is performed.
You could use the returned BufferedImage for draw operations. But this would be very slow as the color conversion
would happen on demand. You rather should use
| |
| getRawRaster | back to summary |
|---|---|
| public WritableRaster getRawRaster() throws IOException Implements org. Doc from org. Return the image data as WritableRaster. You should consult the PDColorSpace returned by
| |
| getStencilImage | back to summary |
|---|---|
| public BufferedImage getStencilImage(Paint paint) throws IOException Implements org. Doc from org. Returns an ARGB image filled with the given paint and using this image as a mask.
| |
| getSuffix | back to summary |
|---|---|
| public String getSuffix() Implements org. Returns the suffix for this image type, e.g. jpg/png. | |
| getWidth | back to summary |
|---|---|
| public int getWidth() Implements org. Doc from org. Returns the width of this image, or -1 if one has not been set.
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Implements org. Doc from org. Returns true if the image has no data.
| |
| isStencil | back to summary |
|---|---|
| public boolean isStencil() Implements org. Doc from org. Returns true if the image is a stencil mask.
| |
| setBitsPerComponent | back to summary |
|---|---|
| public void setBitsPerComponent(int bitsPerComponent) Implements org. Doc from org. Set the number of bits per component.
| |
| setColorSpace | back to summary |
|---|---|
| public void setColorSpace(PDColorSpace colorSpace) Implements org. Doc from org. Sets the color space for this image.
| |
| setDecode | back to summary |
|---|---|
| public void setDecode(COSArray decode) Implements org. Doc from org. Sets the decode array. | |
| setFilters | back to summary |
|---|---|
| public void setFilters(List<String> filters) Sets which filters are applied to this stream. | |
| setHeight | back to summary |
|---|---|
| public void setHeight(int height) Implements org. Doc from org. Sets the height of the image. This is for internal PDFBox usage and not to set the size of the image on the page.
| |
| setInterpolate | back to summary |
|---|---|
| public void setInterpolate(boolean value) Implements org. Doc from org. Sets the Interpolate flag, true for high-quality image scaling.
| |
| setStencil | back to summary |
|---|---|
| public void setStencil(boolean isStencil) Implements org. Doc from org. Sets whether or not the image is a stencil.
This corresponds to the
| |
| setWidth | back to summary |
|---|---|
| public void setWidth(int width) Implements org. Doc from org. Sets the width of the image. This is for internal PDFBox usage and not to set the size of the image on the page.
| |
| toLongName | back to summary |
|---|---|
| private COSBase toLongName(COSBase cs) | |