public class ImageMask extends NativeObject
Modifier and Type | Method and Description |
---|---|
static ImageMask |
create(Document targetDocument,
Stream stream)
Create an image mask object from image data.
|
static ImageMask |
createDynamicObject(long handle) |
Size |
getSize()
The size of the image mask in samples.
|
equals, hashCode
public static ImageMask createDynamicObject(long handle)
public static ImageMask create(Document targetDocument, Stream stream) throws java.io.IOException, UnknownFormatException, CorruptException
targetDocument
- the output document with which the returned object is associatedstream
- the image data streamjava.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 the targetDocument
argument is null
java.lang.IllegalArgumentException
- if the targetDocument
argument has already been closedjava.lang.IllegalArgumentException
- if the targetDocument
argument is read-onlyjava.lang.IllegalArgumentException
- if the stream
argument is null
public Size getSize()
java.lang.IllegalStateException
- if the image has already been closed