WordProcessingImageEffects class

WordProcessingImageEffects class

Represents effects that can be applied to an image watermark for a Word document.

The WordProcessingImageEffects type exposes the following members:

Constructors

Constructor Description
init Initializes a new instance of the WordProcessingImageEffects class.

Properties

Property Description
border_line_format The line format settings for the image border. Returns an instance of OfficeLineFormat representing the shape line format. (inherited from OfficeImageEffects)
brightness The brightness of the picture. Must be a number from 0.0 (dimmest) to 1.0 (brightest). The default value is 0.5. (inherited from OfficeImageEffects)
chroma_key The color value of the image that will be treated as transparent. (inherited from OfficeImageEffects)
contrast The contrast for the specified picture. Must be a float between 0.0 (least contrast) and 1.0 (greatest contrast). Default is 0.5. (inherited from OfficeImageEffects)
gray_scale The property indicates whether a picture will be displayed in grayscale mode. The default value is False. (inherited from OfficeImageEffects)

Example

import groupdocs.watermark as gw
import groupdocs.watermark.watermarks as gww
import groupdocs.watermark.options.wordprocessing as gwo_wp

load_options = gw.WordProcessingLoadOptions()
with gw.Watermarker("document.docx", load_options) as watermarker:
    with gww.ImageWatermark("logo.png") as watermark:
        effects = gwo_wp.WordProcessingImageEffects()
        effects.brightness = 0.7
        effects.contrast = 0.6
        effects.chroma_key = gww.Color.red
        effects.border_line_format.enabled = True
        effects.border_line_format.weight = 1

        options = gwo_wp.WordProcessingWatermarkSectionOptions()
        options.effects = effects

        watermarker.add(watermark, options)

    watermarker.save("document.docx")

See Also