Class ImageMask
- java.lang.Object
-
- com.pdf_tools.fourheights.pdftoolbox.internal.NativeBase
-
- com.pdf_tools.fourheights.pdftoolbox.internal.NativeObject
-
- com.pdf_tools.fourheights.pdftoolbox.pdf.content.ImageMask
-
public class ImageMask extends NativeObject
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImageMaskcreate(Document targetDocument, Stream stream)Create an image mask object from image data.SizegetSize()The size of the image mask in samples.-
Methods inherited from class com.pdf_tools.fourheights.pdftoolbox.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
create
public static ImageMask create(Document targetDocument, Stream stream) throws java.io.IOException, UnknownFormatException, CorruptException
Create an image mask object from image data.
Supported formats are:- BMP
- DIB
- JBIG2
- PNG
- GIF
- Parameters:
targetDocument- the output document with which the returned object is associatedstream- the image data stream- Returns:
- the newly created image mask object
- Throws:
java.io.IOException- Error reading from the image or writing to the documentUnknownFormatException- The image data has an unknown format or the format is not suitable for an image maskCorruptException- The image data is corruptjava.lang.IllegalArgumentException- if thetargetDocumentargument has already been closedjava.lang.IllegalArgumentException- if thetargetDocumentargument is read-onlyjava.lang.IllegalArgumentException- if thestreamargument isnulljava.lang.IllegalArgumentException- iftargetDocumentisnulljava.lang.IllegalArgumentException- ifstreamisnull
-
getSize
public Size getSize()
The size of the image mask in samples. (Getter)
- Throws:
java.lang.IllegalStateException- if the image has already been closed
-
-