' For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
Using doc As Document = Document.Load(Utilities.MapSourceFilePath(PptFilePath))
' Initialize text watermark
Dim textWatermark As New TextWatermark("Protected image", New Font("Arial", 8))
textWatermark.HorizontalAlignment = HorizontalAlignment.Center
textWatermark.VerticalAlignment = VerticalAlignment.Center
textWatermark.RotateAngle = 45
textWatermark.SizingType = SizingType.ScaleToParentDimensions
textWatermark.ScaleFactor = 1
' Initialize image watermark
Using imageWatermark As New ImageWatermark("D:\protect.jpg")
imageWatermark.HorizontalAlignment = HorizontalAlignment.Center
imageWatermark.VerticalAlignment = VerticalAlignment.Center
imageWatermark.RotateAngle = -45
imageWatermark.SizingType = SizingType.ScaleToParentDimensions
imageWatermark.ScaleFactor = 1
' Find all images in a document
Dim images As WatermarkableImageCollection = doc.FindImages()
For i As Integer = 0 To images.Count - 1
If images(i).Width > 100 AndAlso images(i).Height > 100 Then
If i Mod 2 = 0 Then
images(i).AddWatermark(textWatermark)
Else
images(i).AddWatermark(imageWatermark)
End If
End If
Next
End Using
doc.Save()
End Using