طريقة to_image
محتويات
[
يخفي
]to_image(self, stream, image_type)
إنشاء صورة الشكل وحفظها في مجرى بالتنسيق المحدد.
def to_image(self, stream, image_type):
...
معامل | يكتب | وصف |
---|---|---|
stream | io.RawIOBase | تيار الإخراج. |
image_type | ImageType | النوع الذي تريد حفظ الصورة فيه. |
ملاحظات
يتم دعم التنسيقات التالية: .bmp، .gif، .jpg، .jpeg، .tiff، .emf.
مثال
from aspose.cells.drawing import ImageType
from io import BytesIO
imageStream = BytesIO()
shape.to_image(imageStream, ImageType.PNG)
to_image(self, image_file, options)
يحفظ الشكل في ملف.
def to_image(self, image_file, options):
...
معامل | يكتب | وصف |
---|---|---|
image_file | str | |
options | aspose.cells.rendering.ImageOrPrintOptions |
مثال
from aspose.cells.rendering import ImageOrPrintOptions
op = ImageOrPrintOptions()
shape.to_image("exmaple.png", op)
to_image(self, stream, options)
يحفظ الشكل في مجرى.
def to_image(self, stream, options):
...
معامل | يكتب | وصف |
---|---|---|
stream | io.RawIOBase | |
options | aspose.cells.rendering.ImageOrPrintOptions |
مثال
from aspose.cells.rendering import ImageOrPrintOptions
from io import BytesIO
imageStream = BytesIO()
op = ImageOrPrintOptions()
shape.to_image(imageStream, op)
أنظر أيضا
- الوحدة
aspose.cells.drawing
- فئة
Picture