GroupDocsGists
10/19/2017 - 11:05 AM

AddWatermarkWithImageEffectsToExcel.cs

// For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
using (CellsDocument doc = Document.Load<CellsDocument>(Utilities.MapSourceFilePath (FilePath)))
{
    using (var watermark = new ImageWatermark(@"D:\logo.tif"))
    {
        CellsImageEffects effects = new CellsImageEffects();
        effects.Brightness = 0.7;
        effects.Contrast = 0.6;
        effects.ChromaKey = Color.Red;
        effects.BorderLineFormat.Enabled = true;
        effects.BorderLineFormat.Weight = 1;
        doc.AddImageWatermark(watermark, effects);
    }
    doc.Save();
}