Glide 加载图片时如何设置图片旋转角度

一张长方形图片,想旋转90度显示,用的glide框架,应该如何实现

public class RotateTransformation extends BitmapTransformation {
  private float rotateRotationAngle = 0f;

    public RotateTransformation(Context context, float rotateRotationAngle) {
        super(context);

        this.rotateRotationAngle = rotateRotationAngle;
    }

    @Override
    protected Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeight) {
        Matrix matrix = new Matrix();

        matrix.postRotate(rotateRotationAngle);

        return Bitmap.createBitmap(toTransform, 0, 0, toTransform.getWidth(), toTransform.getHeight(), matrix, true);
    }
}

    @NonNull
    public static RequestOptions getRotateOptions(Context context) {
        return RequestOptions.bitmapTransform(new RotateTransformation(context, 90));
    }

        Glide.with(this).load(path).apply(getRotateOptions(getContext())).into(imageView);

图片说明

图片说明

图片说明

图片说明