public static Image filter(@Nullable Image image, @Nullable ImageFilter filter) {
    if (image == null || filter == null) {
      return image;
    }
    return Toolkit.getDefaultToolkit().createImage(new FilteredImageSource(toBufferedImage(image).getSource(), filter));
  }
public static Image filter(@Nullable Image image, @Nullable ImageFilter filter)