Package com.orsonpdf
Class PDFSoftMaskImage
java.lang.Object
com.orsonpdf.PDFObject
com.orsonpdf.Stream
com.orsonpdf.PDFSoftMaskImage
Represents a soft mask image in a PDF document.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPDFSoftMaskImage
(int number, Image img) Creates a new soft mask image object. -
Method Summary
Modifier and TypeMethodDescriptionprotected Dictionary
createDictionary
(int streamLength) Creates a dictionary reflecting the current configuration for this image.byte[]
Returns the raw image data.Methods inherited from class com.orsonpdf.Stream
addFilter, getObjectBytes, removeFilters
Methods inherited from class com.orsonpdf.PDFObject
getGeneration, getNumber, getReference, toPDFBytes
-
Field Details
-
width
int widthThe width. -
height
int heightThe height. -
image
Image imageThe image.
-
-
Constructor Details
-
PDFSoftMaskImage
Creates a new soft mask image object.- Parameters:
number
- the PDF object number.img
- the AWT image object (null
not permitted).
-
-
Method Details
-
getRawStreamData
public byte[] getRawStreamData()Returns the raw image data. Each call will resample the image data and populate a new array. Note that the stream may encode this data before it is written to the PDF output.- Specified by:
getRawStreamData
in classStream
- Returns:
- The raw stream data.
-
createDictionary
Creates a dictionary reflecting the current configuration for this image.- Overrides:
createDictionary
in classStream
- Parameters:
streamLength
- the stream length.- Returns:
- A dictionary.
-