com.groupdocs.watermark

Interfaces

Classes

Exceptions

com.groupdocs.watermark

Class MultiframeImageDocument

  • All Implemented Interfaces:
    com.aspose.ms.System.IDisposable, Closeable, AutoCloseable
    Direct Known Subclasses:
    GifImageDocument, TiffImageDocument


    public class MultiframeImageDocument
    extends ImageDocument

    Represents a multiframe image where a watermark can be placed.

    This example demonstrates how to load and save multiframe image of any supported type.

    MultiframeImageDocument document = Document.load(MultiframeImageDocument.class, "D:\\input.gif");
      
      // Use addWatermark method to add watermark to all frames.
      
      // Use the collection of frames to add watermark to a particular frame.
      
      // Save changes.
      document.save("D:\\output.gif");
      document.close();
      
    • Method Detail

      • getFrames

        public final ImageFrameCollection getFrames()

        Gets the collection of all frames of the image.

        Returns:
        The collection of image frames.

        This example demonstrates how to add watermark to a particular frame.

        MultiframeImageDocument document = Document.load(MultiframeImageDocument.class, "D:\\input.tif");
         // Initialize text or image watermark.
         TextWatermark watermark = new TextWatermark("DRAFT", new Font("Arial", 19));
         // Add watermark to a particular frame.
         document.getFrames().get_Item(0).addWatermark(watermark);
         // Save changes.
         document.save("D:\\output.tif");
         document.close();