BufferedImage (@NotNull BufferedImage image) { int size = min(image.getWidth(), image.getHeight()); Area avatarOvalArea = new Area(new Ellipse2D.Double(0.0, 0.0, size, size)); return clipImage(image, avatarOvalArea); }