if (image != null) { image.dispose(); }
    public Picture (File imgFile)            throws FileNotFoundException,                   IOException,                   ImageFormatException    {        // Try to read the image file        logger.info("Loading image from " + imgFile + " ...");        if (image != null) {            image.dispose();        }        image = JAI.create("fileload", imgFile.getPath());        // Check that the whole image has been loaded        if ((image.getWidth() == -1) || (image.getHeight() == -1)) {            throw new IOException("Could not load image file "                                  + imgFile.getPath());        } else {            // Check image format, and convert to gray if needed. This may            // throw ImageFormatException            checkImageFormat();            // Cache dimensions            updateParams();            // Remember original dimension            originalDimension = getDimension();            logger.info("Image loaded "                        + image.getWidth() + " x " + image.getHeight());        }    }