This project is read-only.

GDIPlusX: BItmap.Clone Method: proposed overload

Topics: Attention VFPX Admins
Nov 19, 2007 at 3:04 PM
The Bitmap.Clone method has:

Bitmap.Clone ()
Bitmap.Clone (Rectangle, PixelFormat)
Bitmap.Clone (RectangleF, PixelFormat)

I propose to add:

Bitmap.Clone (PixelFormat)

In the method, just use the whole bitmap as the Rect source.

This of course unless there is a better/faster way to change the PixelFormat of a bitmap.

Nov 19, 2007 at 3:38 PM

The easiest way to obtain a rectangle with the bounds of the original Bitmap is using the xfcBitmap.GetBounds() method, as follows:

loCloned = loSrcBmp.Clone(loSrcBmp.GetBounds(), .Imaging.PixelFormat.Format24bppRGB)


Nov 19, 2007 at 5:28 PM
I can live with that, thanks!