Save WebControls.Image to a file or to system.drawings.image
<p>I am generating USPS barcode images so they can be printed to an address label and shipped. I purchased an ASP.Net USPS barcode image creator so It creates the image in an ASP WebControls.Image control. But when its time to print, the only thing i can send to the printer from C# is a system.drawings.image object:</p>

<pre><code>//Get the default printer name.

var prnDocument = new PrintDocument { PrinterSettings = { PrinterName = printer } };
                              prnDocument.PrintPage += PrintOrderLabels;
                prnDocument.Print();


  private void PrintOrderLabels(object sender, PrintPageEventArgs e)

 {

 var fnt = new Font(FontFamily.GenericSerif, 14);

 float yPos = 1;

            float xPos = 15;
            e.Graphics.DrawString("Big D, Tx", fnt, Brushes.Black, 1, yPos);
              //barcode is a webcontrols.image so this wont compile
            e.Graphics.DrawImage(barcode,xPos,yPos);
}
</code></pre>

<p>The  e.Graphics.DrawImage function only accepts an object of type system.drawings.image. So how can I:</p>

<p>A. convert a webcontrols.image control to a system.drawings.image object? (i dont think you can unless the image is physically on the hard drive)</p>

<p>B. Save the webcontrols.image object to a file on the server and retrieve it from there</p>

<p>or</p>

<p>C.  send the web image to the printer along with my other string data?</p>

<p>Thanks. </p>
