When use Bitmap::Clone(), I meet a problem.(about GDI+)
-
Source bitmap is 800*600, and I called Clone(700, 500, 900, 700, PixelFormatDontCare),method failed. After searching in msdn, I know why the call failed. But what I really want is a new bitmap, 200*200, part of it is a copy of the source bitmap, and the other part is white color. How to get such a bitmap? Wish someone give me some ideas.:-O
-
Source bitmap is 800*600, and I called Clone(700, 500, 900, 700, PixelFormatDontCare),method failed. After searching in msdn, I know why the call failed. But what I really want is a new bitmap, 200*200, part of it is a copy of the source bitmap, and the other part is white color. How to get such a bitmap? Wish someone give me some ideas.:-O
The steps should be as follows 1) Create a Bitmap of size 200 x 200 2) Create a Graphics FromBitmap 3) Graphics FillRectangle white 4) Graphics DrawImage with appropriate source and destination rectangles