## Clone(Rectangle, PixelFormat) {#clone}

Erstellt eine Kopie des Abschnitts von diesemBitmap definiert vonRectangle structure und mit einer angegebenenPixelFormat Aufzählung.

```csharp
public Bitmap Clone(Rectangle rect, PixelFormat format)
```

| Parameter | Typ | Beschreibung |
| --- | --- | --- |
| rect | Rectangle | Definiert den Anteil davonBitmap zu kopieren. Koordinaten sind relativ dazuBitmap. |
| format | PixelFormat | Gibt die anPixelFormat Enumeration für das -ZielBitmap. |

### Rückgabewert

Das neueBitmap die diese Methode erstellt.

### Siehe auch

* struct [Rectangle](../../rectangle)
* enum [PixelFormat](../../../system.drawing.imaging/pixelformat)
* class [Bitmap](../../bitmap)
* namensraum [System.Drawing](../../bitmap)
* Montage [Aspose.Drawing](../../../)

---

## Clone(RectangleF, PixelFormat) {#clone_1}

Erstellt eine Kopie des Abschnitts von diesemBitmap definiert mit einem angegebenenPixelFormat Aufzählung.

```csharp
public Bitmap Clone(RectangleF rect, PixelFormat format)
```

| Parameter | Typ | Beschreibung |
| --- | --- | --- |
| rect | RectangleF | Definiert den Anteil davonBitmap Kopieren. |
| format | PixelFormat | Gibt die anPixelFormat Aufzählung für das ZielBitmap. |

### Rückgabewert

DasBitmap die diese Methode erstellt.

### Ausnahmen

| Ausnahme | Bedingung |
| --- | --- |
| OutOfMemoryException | *rect* liegt außerhalb der Quell-Bitmap-Grenzen. |
| ArgumentException | Die Höhe oder Breite von*rect* ist 0. |

### Siehe auch

* struct [RectangleF](../../rectanglef)
* enum [PixelFormat](../../../system.drawing.imaging/pixelformat)
* class [Bitmap](../../bitmap)
* namensraum [System.Drawing](../../bitmap)
* Montage [Aspose.Drawing](../../../)

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