| Modifier and Type | Method and Description |
|---|---|
| public InputStream | Returns: Decoded streamReturns an InputStream containing the image data, irrespective of whether this is an inline image or an image XObject. |
| public InputStream | Returns: Decoded streamA list of filters to stop decoding at. stopFilters)Returns an InputStream containing the image data, irrespective of whether this is an inline image or an image XObject. |
| public InputStream | Returns: Decoded streamAdditional decoding options passed to the filters used options)Returns an InputStream, passing additional options to each filter. |
| public int | Returns: bits per component of this image or -1Returns bits per component of this image, or -1 if one has not been set. |
| public PDColorSpace | |
| public COSDictionary | Returns: The cos object that matches this image object.Redeclares org. Convert this image to a COS object. |
| public COSArray | |
| public int | Returns: height of this image or -1Returns height of this image, or -1 if one has not been set. |
| public BufferedImage | Returns: content of this image as a buffered image.Returns the content of this image as an AWT buffered image with an (A)RGB color space. |
| public BufferedImage | Returns: subsampled content of the requested subregion as a buffered image.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)Returns the content of this image as an AWT buffered image with an (A)RGB colored space. |
| public boolean | Returns: true if the image should be interpolated when renderedReturns true if the image should be interpolated when rendered. |
| public BufferedImage | Returns: the raw image with a java.awt.ColorSpace or nullTry to get the raw image as AWT buffered image with it's original colorspace. |
| public WritableRaster | Returns: the raw writable raster for this imageReturn the image data as WritableRaster. |
| public BufferedImage | Returns: a masked image filled with the given paintthe paint to fill the visible portions of the image with paint)Returns an ARGB image filled with the given paint and using this image as a mask. |
| public String | Returns: the suffix for this image typeReturns the suffix for this image type, e.g. "jpg" |
| public int | Returns: width of this image or -1Returns the width of this image, or -1 if one has not been set. |
| public boolean | |
| public boolean | |
| public void | setBitsPerComponent(int
The number of bits per component. bitsPerComponent)Set the number of bits per component. |
| public void | setColorSpace(PDColorSpace
The color space for this image. colorSpace)Sets the color space for this image. |
| public void | |
| public void | |
| public void | setInterpolate(boolean
true for high-quality image scaling value)Sets the Interpolate flag, true for high-quality image scaling. |
| public void | setStencil(boolean
True to make the image a stencil. isStencil)Sets whether or not the image is a stencil. |
| public void |
| createInputStream | back to summary |
|---|---|
| public InputStream createInputStream() throws IOException 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(List<String> stopFilters) throws IOException 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.
| |
| createInputStream | back to summary |
|---|---|
| public InputStream createInputStream(DecodeOptions options) throws IOException Returns an InputStream, passing additional options to each filter. As a side effect, the
filterSubsampled flag is set in
| |
| getBitsPerComponent | back to summary |
|---|---|
| public int getBitsPerComponent() Returns bits per component of this image, or -1 if one has not been set.
| |
| getColorSpace | back to summary |
|---|---|
| public PDColorSpace getColorSpace() throws IOException Returns the image's color space.
| |
| getCOSObject | back to summary |
|---|---|
| public COSDictionary getCOSObject() Redeclares org. Convert this image to a COS object.
| |
| getDecode | back to summary |
|---|---|
| public COSArray getDecode() Returns the decode array.
| |
| getHeight | back to summary |
|---|---|
| public int getHeight() Returns height of this image, or -1 if one has not been set.
| |
| getImage | back to summary |
|---|---|
| public BufferedImage getImage() throws IOException 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 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() Returns true if the image should be interpolated when rendered.
| |
| getRawImage | back to summary |
|---|---|
| public BufferedImage getRawImage() throws IOException 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 Return the image data as WritableRaster. You should consult the PDColorSpace returned by
| |
| getStencilImage | back to summary |
|---|---|
| public BufferedImage getStencilImage(Paint paint) throws IOException Returns an ARGB image filled with the given paint and using this image as a mask.
| |
| getSuffix | back to summary |
|---|---|
| public String getSuffix() Returns the suffix for this image type, e.g. "jpg"
| |
| getWidth | back to summary |
|---|---|
| public int getWidth() Returns the width of this image, or -1 if one has not been set.
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Returns true if the image has no data.
| |
| isStencil | back to summary |
|---|---|
| public boolean isStencil() Returns true if the image is a stencil mask.
| |
| setBitsPerComponent | back to summary |
|---|---|
| public void setBitsPerComponent(int bitsPerComponent) Set the number of bits per component.
| |
| setColorSpace | back to summary |
|---|---|
| public void setColorSpace(PDColorSpace colorSpace) Sets the color space for this image.
| |
| setDecode | back to summary |
|---|---|
| public void setDecode(COSArray decode) Sets the decode array.
| |
| setHeight | back to summary |
|---|---|
| public void setHeight(int height) 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) Sets the Interpolate flag, true for high-quality image scaling.
| |
| setStencil | back to summary |
|---|---|
| public void setStencil(boolean isStencil) Sets whether or not the image is a stencil.
This corresponds to the
| |
| setWidth | back to summary |
|---|---|
| public void setWidth(int width) Sets the width of the image. This is for internal PDFBox usage and not to set the size of the image on the page.
| |