next up previous
Next: Step 3 Up: The Generic Image Previous: Step 1

Step 2

Next, the image must be tied to a canvas so that its size can be obtainedgif. An instance of the ImagesCanvas class is first created:

     ImageCanvas src_canvas = new ImageCanvas(src);
and to retrieve the image width and height the following piece of code is used:

     int i_w = src_canvas.getImageWidth();
     int i_h = src_canvas.getImageHeight();



Bob Fisher
Fri Jul 4 16:11:50 BST 1997