@Deprecated 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();
Modifier and Type | Method and Description |
---|---|
ImageFrameCollection |
getFrames()
Deprecated.
Gets the collection of all frames of the image.
|
dispose, getHeight, getWidth
close, dispose, getDefaultSearchableObjects, getInfo, getInfo, getSearchableObjects, load, load, load, load, load, load, load, load, save, save, setDefaultSearchableObjects, setSearchableObjects
addWatermark, findImages, findImages, findWatermarks, findWatermarks
public final ImageFrameCollection getFrames()
Gets the collection of all frames of the image.
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();
Copyright © 2020. All rights reserved.