class ImagePoolImpl implements ImagePool {

  @NotNull
  public ImagePool.Image copyOf(@Nullable BufferedImage origin) {
    if (origin == null) {
      return ImagePool.NULL_POOLED_IMAGE;
    }

    int w = origin.getWidth();
    int h = origin.getHeight();
    int type = origin.getType();

    ImageImpl image = create(w, h, type, null);
    image.drawFrom(origin);

    return image;
  }

    ImagePoolImpl(@NotNull int[] bucketSizes, @NotNull BiFunction<Integer, Integer, Function<Integer, Integer>> bucketSizingPolicy);

}