public static @NotNull BufferedImage createImage(@Nullable Component component, int width, int height, int type) {
    return ImageUtil.createImage(component == null ? null : component.getGraphicsConfiguration(), width, height, type);
  }
public static @NotNull BufferedImage createImage(@Nullable Component component, int width, int height, int type)