@SuppressWarnings("PMD.CompareObjectsWithEquals")
    @Override
    protected Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeight) {
        final Bitmap toReuse = pool.get(outWidth, outHeight, toTransform.getConfig() != null
                ? toTransform.getConfig() : Bitmap.Config.ARGB_8888);
        Bitmap transformed = TransformationUtils.centerCrop(toReuse, toTransform, outWidth, outHeight);
        if (toReuse != null && toReuse != transformed && !pool.put(toReuse)) {
            toReuse.recycle();
        }
        return transformed;
    }
Scale the image so that either the width of the image matches the given width and the height of the image is
greater than the given height or vice versa, and then crop the larger dimension to match the given dimension.

Does not maintain the image's aspect ratio
core/src/main/java/com/bumptech/glide/load/resource/bitmap/CenterCrop.java