## ToImage(Stream, ImageType) {#toimage_1}

لإنشاء صورة الشكل وحفظها في دفق بالتنسيق المحدد.

```csharp
public void ToImage(Stream stream, ImageType imageType)
```

| معامل | يكتب | وصف |
| --- | --- | --- |
| stream | Stream | تيار الإخراج. |
| imageType | ImageType | النوع المراد حفظ الصورة به. |

### ملاحظات

التنسيقات التالية مدعومة: .bmp ، .gif ، .jpg ، .jpeg ، .tiff ، .emf.

### أمثلة

```csharp

[C#]
MemoryStream imageStream = new MemoryStream();
shape.ToImage(imageStream, ImageType.Png);
```

### أنظر أيضا

* enum [ImageType](../../imagetype)
* class [Shape](../../shape)
* مساحة الاسم [Aspose.Cells.Drawing](../../shape)
* المجسم [Aspose.Cells](../../../)

---

## ToImage(string, ImageOrPrintOptions) {#toimage_4}

يحفظ الشكل في ملف.

```csharp
public void ToImage(string imageFile, ImageOrPrintOptions options)
```

### أمثلة

```csharp

[C#]
ImageOrPrintOptions op = new ImageOrPrintOptions();
shape.ToImage("exmaple.png", op);
```

### أنظر أيضا

* class [ImageOrPrintOptions](../../../aspose.cells.rendering/imageorprintoptions)
* class [Shape](../../shape)
* مساحة الاسم [Aspose.Cells.Drawing](../../shape)
* المجسم [Aspose.Cells](../../../)

---

## ToImage(Stream, ImageOrPrintOptions) {#toimage_2}

يحفظ الشكل لتيار .

```csharp
public void ToImage(Stream stream, ImageOrPrintOptions options)
```

### أمثلة

```csharp

[C#]
MemoryStream imageStream = new MemoryStream();
ImageOrPrintOptions op = new ImageOrPrintOptions();
shape.ToImage(imageStream, op);
```

### أنظر أيضا

* class [ImageOrPrintOptions](../../../aspose.cells.rendering/imageorprintoptions)
* class [Shape](../../shape)
* مساحة الاسم [Aspose.Cells.Drawing](../../shape)
* المجسم [Aspose.Cells](../../../)

---

## ToImage(ImageOrPrintOptions) {#toimage}

إرجاع كائن الصورة النقطية للشكل .

```csharp
public Bitmap ToImage(ImageOrPrintOptions options)
```

### أمثلة

```csharp

[C#]
ImageOrPrintOptions op = new ImageOrPrintOptions();
System.Drawing.Bitmap btm = shape.ToImage(op);
```

### أنظر أيضا

* class [ImageOrPrintOptions](../../../aspose.cells.rendering/imageorprintoptions)
* class [Shape](../../shape)
* مساحة الاسم [Aspose.Cells.Drawing](../../shape)
* المجسم [Aspose.Cells](../../../)

<!-- DO NOT EDIT: generated by xmldocmd for Aspose.Cells.dll -->
