BitmapExtensions.CloneCurrentFrame Method

KGy SOFT Drawing Libraries

BitmapExtensionsCloneCurrentFrame Method KGy SOFT Drawing Libraries Help
Creates a clone of the current frame of the provided Bitmap instance. Unlike the Bitmap(Image) constructor, this method preserves original pixel format, and unlike Bitmap.Clone(Rectangle,PixelFormat) method, this method returns a single frame image.

Namespace: KGySoft.Drawing
Assembly: KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 4.6.0
Syntax

public static Bitmap CloneCurrentFrame(
	this Bitmap bitmap
)
<ExtensionAttribute>
Public Shared Function CloneCurrentFrame ( 
	bitmap As Bitmap
) As Bitmap
public:
[ExtensionAttribute]
static Bitmap^ CloneCurrentFrame(
	Bitmap^ bitmap
)
[<ExtensionAttribute>]
static member CloneCurrentFrame : 
        bitmap : Bitmap -> Bitmap 

Parameters

bitmap
Type: System.DrawingBitmap
The bitmap to be cloned.

Return Value

Type: Bitmap
A single frame Bitmap instance that has the same content and has the same pixel format as the current frame of the source bitmap.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Bitmap. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference