@NotNull
  public static ImageEditorUI createImageEditorUI(BufferedImage image, @Nullable String format) {
    ImageEditorUI ui = new ImageEditorUI(null);
    Options options = OptionsManager.getInstance().getOptions();
    EditorOptions editorOptions = options.getEditorOptions();
    GridOptions gridOptions = editorOptions.getGridOptions();
    TransparencyChessboardOptions transparencyChessboardOptions = editorOptions.getTransparencyChessboardOptions();
    ui.getImageComponent().setGridVisible(gridOptions.isShowDefault());
    ui.getImageComponent().setTransparencyChessboardVisible(transparencyChessboardOptions.isShowDefault());

    ui.setImageProvider((scale, ancestor) -> image, format);
    return ui;
  }
@NotNull
  public static ImageEditorUI createImageEditorUI(BufferedImage image, @Nullable String format)