org.pdfbox.util
Class ImageParameters
java.lang.Object
org.pdfbox.util.ImageParameters
public class ImageParameters
extends java.lang.Object
This contains all of the image parameters for in inlined image.
ImageParameters
public ImageParameters()
Constructor.
ImageParameters
public ImageParameters(COSDictionary params)
Constructor.
params
- The image parameters.
getBitsPerComponent
public int getBitsPerComponent()
The bits per component of this image. This will return -1 if one has not
been set.
- The number of bits per component.
getColorSpace
public PDColorSpace getColorSpace()
throws IOException
This will get the color space or null if none exists.
- The color space for this image.
getDictionary
public COSDictionary getDictionary()
This will get the dictionary that stores the image parameters.
- The COS dictionary that stores the image parameters.
getFilters
public List getFilters()
This will get the list of filters that are associated with this stream. Or
null if there are none.
- A list of all encoding filters to apply to this stream.
getHeight
public int getHeight()
The height of this image. This will return -1 if one has not
been set.
getWidth
public int getWidth()
The width of this image. This will return -1 if one has not
been set.
setBitsPerComponent
public void setBitsPerComponent(int bpc)
Set the number of bits per component.
bpc
- The number of bits per component.
setColorSpace
public void setColorSpace(PDColorSpace cs)
This will set the color space for this image.
cs
- The color space for this image.
setFilters
public void setFilters(List filters)
This will set the filters that are part of this stream.
filters
- The filters that are part of this stream.
setHeight
public void setHeight(int h)
Set the height of the image.
h
- The height of the image.
setWidth
public void setWidth(int w)
Set the width of the image.
w
- The width of the image.