code: public static Bitmap clipSquare(@NonNull final Bitmap bitmap, final int borderWidth,
                                      @ColorInt final int borderColor) {
          Condition.INSTANCE.ensureNotNull(bitmap, "The bitmap may not be null");
          return clipSquare(bitmap,
                  bitmap.getWidth() >= bitmap.getHeight() ? bitmap.getHeight() : bitmap.getWidth(),
                  borderWidth, borderColor);
      }
docs: Clips the long edge of a bitmap, if its width and height are not equal, in order to transform
  it into a square. Additionally, a border will be added.
  
  @param bitmap
  The bitmap, which should be clipped, as an instance of the class {@link Bitmap}. The
  bitmap may not be null
  @param borderWidth
  The width of the border as an {@link Integer} value in pixels. The width must be at
  least 0
  @param borderColor
  The color of the border as an {@link Integer} value
  @return The clipped bitmap as an instance of the class {@link Bitmap}