SpreadsheetImageEffects class
Leave feedback
On this page
Represents effects that can be applied to an image watermark for an Excel document.
The SpreadsheetImageEffects type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new instance of the SpreadsheetImageEffects class. |
| Property | Description |
|---|---|
| border_line_format | The line format settings for the image border. (inherited from OfficeImageEffects) |
| brightness | The brightness of the picture. Must be a float between 0.0 (dimmest) and 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. The default value is a fully transparent color. (inherited from OfficeImageEffects) |
| contrast | The contrast for the specified picture. Must be a float between 0.0 (least contrast) and 1.0 (greatest contrast). The default value is 0.5. (inherited from OfficeImageEffects) |
| gray_scale | The property indicates whether a picture will be displayed in grayscale mode. (inherited from OfficeImageEffects) |
import groupdocs.watermark as gw
import groupdocs.watermark.watermarks as gww
import groupdocs.watermark.options.spreadsheet as gwo_xls
load_options = gwo_xls.SpreadsheetLoadOptions()
with gw.Watermarker("spreadsheet.xlsx", load_options) as watermarker:
with gww.ImageWatermark("logo.png") as watermark:
effects = gwo_xls.SpreadsheetImageEffects()
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_xls.SpreadsheetWatermarkShapeOptions()
options.effects = effects
watermarker.add(watermark, options)
watermarker.save("output.xlsx")
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.