Package com.orsonpdf
Class PDFImage
- java.lang.Object
-
- com.orsonpdf.PDFObject
-
- com.orsonpdf.Stream
-
- com.orsonpdf.PDFImage
-
public class PDFImage extends Stream
Represents an image in a PDF document.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intheightThe height.(package private) java.awt.ImageimageThe image.(package private) java.lang.StringsoftMaskImageRef(package private) intwidthThe width.
-
Constructor Summary
Constructors Constructor Description PDFImage(int number, java.awt.Image img, java.lang.String softMaskImageRef)Creates a new image object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DictionarycreateDictionary(int streamLength)Creates a dictionary reflecting the current configuration for this image.byte[]getRawStreamData()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
-
-
-
-
Method Detail
-
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:
getRawStreamDatain classStream- Returns:
- The raw stream data.
-
createDictionary
protected Dictionary createDictionary(int streamLength)
Creates a dictionary reflecting the current configuration for this image.- Overrides:
createDictionaryin classStream- Parameters:
streamLength- the stream length.- Returns:
- A dictionary.
-
-