Add watermarks to images
Add watermark to photos or multi-framed images
When you are working with an animated gif or multi-frame tiff images, you may want to add watermark to some particular frame(s) using the property FrameIndex of TiffImageWatermarkOptions or GifImageWatermarkOptions.
AdvancedUsage.AddingWatermarks.AddWatermarksToImages.AddWatermarkToImage
TiffImageLoadOptions loadOptions = new TiffImageLoadOptions();
// Constants.InImageTiff is an absolute or relative path to your document. Ex: @"C:\Docs\image.tiff"
using (Watermarker watermarker = new Watermarker(Constants.InImageTiff, loadOptions))
{
// Initialize text or image watermark
TextWatermark watermark = new TextWatermark("Test watermark", new Font("Arial", 19));
// Add watermark to the first frame
TiffImageWatermarkOptions options = new TiffImageWatermarkOptions();
options.FrameIndex = 0;
watermarker.Add(watermark, options);
watermarker.Save(Constants.OutImageTiff);
}
Advanced use cases
More resources
GitHub examples
You may easily run the code above and see the feature in action in our GitHub examples:
Free online document watermarking App
Along with full featured .NET library we provide simple, but powerful free Apps.
You are welcome to add watermark to PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX, Emails and more with our free online Free Online Document Watermarking App.