Clone image.

Namespace:  AForge.Imaging
Assembly:  AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public static Bitmap Clone(
	Bitmap source,
	PixelFormat format
)

Parameters

source
Type: System.Drawing..::.Bitmap
Source image.
format
Type: System.Drawing.Imaging..::.PixelFormat
Pixel format of result image.

Return Value

Returns clone of the source image with specified pixel format.

Remarks

The original Bitmap.Clone() does not produce the desired result - it does not create a clone with specified pixel format. More of it, the original method does not create an actual clone - it does not create a copy of the image. That is why this method was implemented to provide the functionality.

See Also