public class MultiframeImageWatermarkOptions extends WatermarkOptions
Learn more:
The following example demonstrates how to add a watermark to a particular frame of multi-frame image.
ImageLoadOptions loadOptions = new ImageLoadOptions(); Watermarker watermarker = new Watermarker("C:\\test.gif", loadOptions); TextWatermark watermark = new TextWatermark("Test", new Font("Arial", 12)); MultiframeImageWatermarkOptions options = new MultiframeImageWatermarkOptions(); options.setFrameIndex(0); watermarker.add(watermark, options); watermarker.save("D:\\watermarked_test.gif"); watermarker.close();
Constructor and Description |
---|
MultiframeImageWatermarkOptions()
Initializes a new instance of the
class. |
MultiframeImageWatermarkOptions(int frameIndex)
Initializes a new instance of the
class
with a specified index of the frame. |
Modifier and Type | Method and Description |
---|---|
int |
getFrameIndex()
Gets the index of frame to add watermark.
|
void |
setFrameIndex(int value)
Sets the index of frame to add watermark.
|
public MultiframeImageWatermarkOptions()
MultiframeImageWatermarkOptions
class.public MultiframeImageWatermarkOptions(int frameIndex)
MultiframeImageWatermarkOptions
class
with a specified index of the frame.frameIndex
- The index of frame to add watermark.public final int getFrameIndex()
Gets the index of frame to add watermark.
public final void setFrameIndex(int value)
Sets the index of frame to add watermark.
value
- The index of frame to add watermark.