Constructor and Description |
---|
BitmapImage(String k,
int width,
int height,
byte[] data,
PDFReference mask)
Create a bitmap image.
|
Modifier and Type | Method and Description |
---|---|
void |
disallowMultipleFilters()
Disallows multiple filters.
|
int |
getBitsPerComponent()
Get the bits per color component for this image.
|
PDFDeviceColorSpace |
getColorSpace()
Get the color space for the image data.
|
String |
getFilterHint()
Returns a hint in form of a String (Possible values from PDFFilterList)
indicating which filter setup should be used to encode the object.
|
int |
getHeight()
Get the height of this image.
|
PDFICCStream |
getICCStream()
Get the ICC stream.
|
String |
getKey()
Get the key for this image.
|
String |
getMask()
Get the bitmap mask reference for this image.
|
PDFFilter |
getPDFFilter()
Get the PDF Filter to be applied to the image.
|
PDFReference |
getSoftMaskReference()
Get the PDF reference for a soft mask.
|
PDFColor |
getTransparentColor()
Get the transparent color for this image.
|
int |
getWidth()
Get the width of this image.
|
boolean |
isInverted() |
boolean |
isPS()
Check if this is a postscript image.
|
boolean |
isTransparent()
Check if this image has a transparent color.
|
boolean |
multipleFiltersAllowed()
Indicates whether multiple image filters are allowed; this is implemented because Adobe
Reader does not like multiple FlateDecode filters applied to an image even though that
allowed by the PDF spec; this is probable due to security concerns since many PDF malware
exploits, like zip bombs, make use of a chain of FlateDecode filters.
|
void |
outputContents(OutputStream out)
Writes the raw, unencoded contents of the image to a given output stream.
|
void |
populateXObjectDictionary(PDFDictionary dict)
Populates the XObject's dictionary with additional values.
|
void |
setColorSpace(PDFDeviceColorSpace cs)
Set the color space for this image.
|
void |
setPDFFilter(PDFFilter pdfFilter) |
void |
setTransparent(PDFColor t)
Set the transparent color for this iamge.
|
void |
setup(PDFDocument doc)
Setup this image with the pdf document.
|
public BitmapImage(String k, int width, int height, byte[] data, PDFReference mask)
k
- the key to be used to lookup the imagewidth
- the width of the imageheight
- the height of the imagedata
- the bitmap datamask
- the transparency mask reference if anypublic void setup(PDFDocument doc)
public String getKey()
public int getWidth()
public int getHeight()
public void setColorSpace(PDFDeviceColorSpace cs)
cs
- the pdf color spacepublic PDFDeviceColorSpace getColorSpace()
getColorSpace
in interface PDFImage
public int getBitsPerComponent()
getBitsPerComponent
in interface PDFImage
public void setTransparent(PDFColor t)
t
- the transparent colorpublic boolean isTransparent()
isTransparent
in interface PDFImage
public PDFColor getTransparentColor()
getTransparentColor
in interface PDFImage
public String getMask()
public PDFReference getSoftMaskReference()
getSoftMaskReference
in interface PDFImage
public boolean isInverted()
isInverted
in interface PDFImage
public void outputContents(OutputStream out) throws IOException
outputContents
in interface PDFImage
out
- OutputStream to write toIOException
- if there creating streampublic void populateXObjectDictionary(PDFDictionary dict)
populateXObjectDictionary
in interface PDFImage
dict
- the dictionary to fillpublic PDFICCStream getICCStream()
getICCStream
in interface PDFImage
public boolean isPS()
public String getFilterHint()
getFilterHint
in interface PDFImage
public PDFFilter getPDFFilter()
getPDFFilter
in interface PDFImage
public void setPDFFilter(PDFFilter pdfFilter)
public boolean multipleFiltersAllowed()
multipleFiltersAllowed
in interface PDFImage
public void disallowMultipleFilters()
Copyright © 2025 Apache Software Foundation. All rights reserved.