to_image method
Contents
[
Hide
]to_image(image_file, options)
Creates the shape image and saves it to a file. The extension of the file name determines the format of the image.
def to_image(self, image_file, options):
...
Parameter | Type | Description |
---|---|---|
image_file | str | The image file name with full path. |
options | aspose.diagram.saving.ImageSaveOptions | Additional image creation options |
Remarks
The format of the image is specified by using the extension of the file name. For example, if you specify “myfile.png”, then the image will be saved in the PNG format. The following file extensions are recognized: .bmp, .gif, .png, .jpg, .jpeg, .tiff, .tif, .emf.
to_image(stream, options)
Creates the shape image and saves it to a stream in the specified format.
def to_image(self, stream, options):
...
Parameter | Type | Description |
---|---|---|
stream | io.RawIOBase | The output stream. |
options | aspose.diagram.saving.ImageSaveOptions | Additional image creation options |
See Also
- module aspose.diagram
- class Shape