code: public static int start(Media levelrip, MapTile map, ProgressListener listener, Canceler canceler)
      {
          final Sprite imageMap = Drawable.loadSprite(levelrip);
          imageMap.load();
          imageMap.prepare();
  
          final int imageTilesInX = imageMap.getWidth() / map.getTileWidth();
          final int imageTilesInY = imageMap.getHeight() / map.getTileHeight();
          map.create(map.getTileWidth(), map.getTileHeight(), imageTilesInX, imageTilesInY);
  
          final double progressMax = imageTilesInX * (double) imageTilesInY;
          long progress = 0L;
          int lastPercent = 0;
          int errors = 0;
  
          final ImageBuffer tileRef = imageMap.getSurface();
          for (int progressTileY = 0; progressTileY < imageTilesInY; progressTileY++)
          {
              for (int progressTileX = 0; progressTileX < imageTilesInX; progressTileX++)
              {
                  if (!checkPixel(map, tileRef, progressTileX, progressTileY))
                  {
                      errors++;
                  }
  
                  final int percent = (int) Math.round(progress / progressMax * 100);
                  if (listener != null && percent != lastPercent)
                  {
                      listener.notifyProgress(percent, progressTileX, progressTileY);
                  }
                  lastPercent = percent;
                  progress++;
  
                  if (canceler != null && canceler.isCanceled())
                  {
                      tileRef.dispose();
                      return errors;
                  }
              }
          }
  
          tileRef.dispose();
          return errors;
      }
docs: Run the converter.
  
  @param levelrip The file containing the levelrip as an image.
  @param map The destination map reference.
  @param listener The progress listener.
  @param canceler The canceler reference.
  @return The total number of not found tiles.
  @throws LionEngineException If media is <code>null</code> or image cannot be read.