Next, the image must be tied to a canvas so that its size can be
obtained
.
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();