Take a look at the Graphics API for useful functions that let you specify an image's width and height when drawing it.