private static @Nullable Image loadImage(ImageLoadSettings imageLoadSettings) {
      String filePath = imageLoadSettings.filePath();
      try (InputStream stream = openImageInputStream(filePath)) {
        if (isSvg(filePath)) {
          return SVGLoader.load(stream, 1);
        }
        else {
          return ImageIO.read(new MemoryCacheImageInputStream(stream));
        }
      }
      catch (Exception e) {
        LOG.warn(e);
        return null;
      }
    }
private static @Nullable Image loadImage(ImageLoadSettings imageLoadSettings)