Error tracing indicates that the error on
Bitmap bitmap = BitmapFactory.decodeFile(path, option); Bitmap rotatedBitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
As the documentation of the public static Bitmap decodeFile(String pathName, Options opts) :
return The decoded bitmap, or null if the image data could not be decoded, or, if opts is non-null, if opts requested only the size be returned (in opts.outWidth and opts.outHeight)
This method returns null if the image data cannot be decoded. Note the logs such as E/BitmapFactory: Unable to decode stream: ... to find out this method, why it failed. You may have indicated the wrong path.
source share