// Create the in-memory bitmap where you will draw the image. // This bitmap is 300 pixels wide and 50 pixels high. Bitmap image = new Bitmap(300, 50); // get the graphics context Graphics g = Graphics.FromImage(image); // Draw a solid white rectangl…