I'm new to C#, so please forgive the ~407,000 coding sins I'm probably making.
The purpose of this function is to take a bitmap and return a bitmap of double the height, with two of the images stacked on top of each other.

But it seems to return an empty bitmap. Please help, I am at my wit's end. :-)
The purpose of this function is to take a bitmap and return a bitmap of double the height, with two of the images stacked on top of each other.

Code:
private Bitmap ProcessBitmap(Bitmap sourceBitmap)
{
int w = sourceBitmap.Width;
int h = sourceBitmap.Height;
int targetHeight = (h*2);
Bitmap targetBitmap = new Bitmap(w, targetHeight);
Rectangle sourceRect = new Rectangle(0, 0, w, h);
Graphics sourceGraphics;
sourceGraphics = Graphics.FromImage(sourceBitmap);
Graphics targetGraphics;
targetGraphics = Graphics.FromImage(targetBitmap);
// Begin implementation code
targetGraphics.DrawImage(sourceBitmap, 0, 0);
targetGraphics.DrawImage(sourceBitmap, 0, h);
Bitmap returnBitmap = new Bitmap(w, targetHeight, targetGraphics);
targetGraphics.Dispose();
return returnBitmap;
}
Comment