public final BufferedImage loadImage(URL imageName) {
        if (imageName == null)
            throw new NullPointerException("AssetLoader.loadImage: NULL parameter supplied.");

        BufferedImage image = null;
        try {
            // Attempt to load the specified image and then create a compatible
            // image for use with the current graphics device
            BufferedImage loadedImage = ImageIO.read(imageName);
            image = graphicsConfiguration.createCompatibleImage(
                    loadedImage.getWidth(), loadedImage.getHeight(), 
                    loadedImage.getColorModel().getTransparency());

            // Copy the loaded image to the compatible image
            Graphics2D g2d = image.createGraphics();
            g2d.drawImage(loadedImage, 0, 0, null);
            g2d.dispose();
        } catch (IOException e) {
            throw new IllegalArgumentException("AssetLoader.loadImage: " 
                    + imageName.toString() + " cannot be loaded.");
        }

        // Record the amount of loaded image data if a game statistics recorder
        // has been associated. It is assumed that each pixel will occupy four bytes
        if (gameStatisticsRecorder != null && image != null) {
            gameStatisticsRecorder
                    .recordLoadedAssetSize(image.getWidth() * image.getHeight() * 4L);
        }

        return image;
    }