Bitmap.Clone

Clone()

Creates an exact copy of this Image.

public object Clone()

Return Value

The Image this method creates, cast as an object.

See Also


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)
ParameterTypeDescription
rectRectangleFDefines the portion of this Bitmap to copy.
formatPixelFormatSpecifies the PixelFormat enumeration for the destination Bitmap.

Return Value

The Bitmap that this method creates.

Exceptions

exceptioncondition
OutOfMemoryExceptionrect is outside of the source bitmap bounds.
ArgumentExceptionThe height or width of rect is 0.

See Also