imageView = findViewById(R.id.im_image);
Matrix m = new Matrix();
m.setRotate(180);
Bitmap bitmap = ((BitmapDrawable) getResources().getDrawable(R.drawable.image)).getBitmap();
bitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(),bitmap.getHeight(), m, true);
imageView.setImageBitmap(bitmap);
参考:https://www.jb51.net/article/71928.htm