I work with large images, and when I try to rotate them (applying matrix on the bitmap) , it takes many seconds. I have seen that the Android system gallery can accomplish this task very quickly. How is this possible?
I thought you were performing a rotation on asyncTask, applying only the ImageView rotation (which does not take much time) in the main thread, but if the application is killed before asyncTask terminates, the application will end up in an inconsistent state.
This is my bitmap rotation code, which takes a lot of time for large bitmaps:
Matrix mat = new Matrix(); mat.setRotate(90); bMap = Bitmap.createBitmap(bMap, 0, 0, bMap.getWidth(), bMap.getHeight(), mat, true);
source share