Bitmap.Clone
Contents
[
Hide
]Clone(Rectangle, PixelFormat)
Creates a copy of the section of this Bitmap defined by Rectangle structure and with a specified PixelFormat enumeration.
public Bitmap Clone(Rectangle rect, PixelFormat format)
Parameter | Type | Description |
---|---|---|
rect | Rectangle | Defines the portion of this Bitmap to copy. Coordinates are relative to this Bitmap. |
format | PixelFormat | Specifies the PixelFormat enumeration for the destination Bitmap. |
Return Value
The new Bitmap that this method creates.
See Also
- struct Rectangle
- enum PixelFormat
- class Bitmap
- namespace System.Drawing
- assembly Aspose.Drawing
Clone(RectangleF, PixelFormat)
Creates a copy of the section of this Bitmap defined with a specified PixelFormat enumeration.
public Bitmap Clone(RectangleF rect, PixelFormat format)
Parameter | Type | Description |
---|---|---|
rect | RectangleF | Defines the portion of this Bitmap to copy. |
format | PixelFormat | Specifies the PixelFormat enumeration for the destination Bitmap. |
Return Value
The Bitmap that this method creates.
Exceptions
exception | condition |
---|---|
OutOfMemoryException | rect is outside of the source bitmap bounds. |
ArgumentException | The height or width of rect is 0. |
See Also
- struct RectangleF
- enum PixelFormat
- class Bitmap
- namespace System.Drawing
- assembly Aspose.Drawing