@Override
    public TileMap loadTileMap(String filename) throws MapLoadException{
        try {
            JavaImage image = loadImage(filename);
            TileMap tileMap = new TileMap(image.getWidth(), image.getHeight());

            for(int i = 0; i < image.getWidth(); i++) {
                for(int j = 0; j < image.getHeight(); j++) {
                    tileMap.setTile(i, j, map.get(Long.valueOf(image.getPixel(i, j))));
                }
            }

            return tileMap;
        } catch(ImageLoadException ex) {
            throw new MapLoadException("Can't loadImage tiles map from " + filename);
        }
    }