DiagramWatermarkableImage class
Leave feedback
On this page
Represents an image inside a Visio document.
The DiagramWatermarkableImage type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new DiagramWatermarkableImage from raw image bytes. |
| Method | Description |
|---|---|
| add | Adds a watermark to this WatermarkableImage. This method assumes that watermark offset and size are measured in pixels (if they are assigned). (inherited from WatermarkableImage) |
| add_watermark | (inherited from WatermarkableImage) |
| find_images | Finds images according to the specified search criteria. (inherited from ContentPart) |
| find_images_image_search_criteria | (inherited from ContentPart) |
| get_bytes | Gets the image as a byte array. (inherited from WatermarkableImage) |
| search | Finds possible watermarks according to the specified search criteria. (inherited from ContentPart) |
| search_search_criteria | (inherited from ContentPart) |
| Property | Description |
|---|---|
| height | The height of this WatermarkableImage in pixels. (inherited from WatermarkableImage) |
| width | The width of this WatermarkableImage in pixels. (inherited from WatermarkableImage) |
import groupdocs.watermark as gw
import groupdocs.watermark.contents.diagram as gwc_vsdx
load_options = gw.DiagramLoadOptions()
with gw.Watermarker("diagram.vsdx", load_options) as watermarker:
content = watermarker.get_content(gwc_vsdx.DiagramContent)
for shape in content.pages[0].shapes:
if shape.image is not None:
with open("test.png", "rb") as f:
shape.image = gwc_vsdx.DiagramWatermarkableImage(f.read())
watermarker.save("diagram.vsdx")
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.