This is easily done by using
To print the image itself, you will need to use one of the
methods, those which allows you to choose required rectangle size. Please see:
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
method will resample the image for you, automatically. Just do you math on size and location.