This is easily done by using
System.Drawing.Printing.PrintDocument
:
http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx[
^].
To print the image itself, you will need to use one of the
System.Drawing.Graphics.DrawImage
methods, those which allows you to choose required rectangle size. Please see:
http://msdn.microsoft.com/en-us/library/system.drawing.graphics.aspx[
^].
Make sure you select the image size matching the page size in pixel, which will be available to you during runtime. In this case, the
DrawImage
method will resample the image for you, automatically. Just do you math on size and location.
—SA