Bitmap::Clone(INT,INT,INT,INT,PixelFormat) method (gdiplusheaders.h)
The Bitmap::Clone method creates a new Bitmap object by copying a portion of this bitmap.
Syntax
Bitmap * Clone(
[in] INT x,
[in] INT y,
[in] INT width,
[in] INT height,
[in] PixelFormat format
);
Parameters
[in] x
Type: INT
Integer that specifies the x-coordinate of the upper-left corner of the rectangle that specifies the portion of this bitmap to copy.
[in] y
Type: INT
Integer that specifies the y-coordinate of the upper-left corner of the rectangle that specifies the portion of this bitmap to copy.
[in] width
Type: INT
Integer that specifies the width of the rectangle that specifies the portion of this bitmap to copy.
[in] height
Type: INT
Integer that specifies the height of the rectangle that specifies the portion of this image to copy.
[in] format
Type: PixelFormat
Integer that specifies the pixel format of the new bitmap. The PixelFormat data type and constants that represent various pixel formats are defined in Gdipluspixelformats.h. For more information about pixel format constants, see Image Pixel Format Constants.
Return value
Type: Bitmap*
This method returns a pointer to the new Bitmap object.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP, Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | gdiplusheaders.h (include Gdiplus.h) |
Library | Gdiplus.lib |
DLL | Gdiplus.dll |