MultiframeImageWatermarkOptions

Inheritance: java.lang.Object, com.groupdocs.watermark.options.WatermarkOptions

public class MultiframeImageWatermarkOptions extends WatermarkOptions

Represents watermark adding options when adding watermark to a multi-frame image.

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();

Constructors

Constructor Description
MultiframeImageWatermarkOptions() Initializes a new instance of the [MultiframeImageWatermarkOptions](../../com.groupdocs.watermark.options/multiframeimagewatermarkoptions) class.
MultiframeImageWatermarkOptions(int frameIndex) Initializes a new instance of the [MultiframeImageWatermarkOptions](../../com.groupdocs.watermark.options/multiframeimagewatermarkoptions) class with a specified index of the frame.

Methods

Method Description
getFrameIndex() Gets the index of frame to add watermark.
setFrameIndex(int value) Sets the index of frame to add watermark.

MultiframeImageWatermarkOptions()

public MultiframeImageWatermarkOptions()

Initializes a new instance of the [MultiframeImageWatermarkOptions](../../com.groupdocs.watermark.options/multiframeimagewatermarkoptions) class.

MultiframeImageWatermarkOptions(int frameIndex)

public MultiframeImageWatermarkOptions(int frameIndex)

Initializes a new instance of the [MultiframeImageWatermarkOptions](../../com.groupdocs.watermark.options/multiframeimagewatermarkoptions) class with a specified index of the frame.

Parameters:

Parameter Type Description
frameIndex int The index of frame to add watermark.

getFrameIndex()

public final int getFrameIndex()

Gets the index of frame to add watermark.

Returns: int - The index of frame to add watermark.


-1 means all frames.

setFrameIndex(int value)

public final void setFrameIndex(int value)

Sets the index of frame to add watermark.

Parameters:

Parameter Type Description
value int The index of frame to add watermark.

-1 means all frames. |