Sometimes we need to save an image with a different size than it originally had. As we discussed earlier, the Save method of the Image class is used to save images. This method also allows us to specify the size of a saved image.
To make our program even more interesting, we will determine the size of the saved image at runtime. Create a Windows application and add two text boxes, two tables, and a button control to the form. The text boxes are used to specify the height and width of the saved image, and the button is used to save the image with the new size, as shown in Figure 7.42.
First we specify an Image private variable:
private Image curImage; ...