I am using the Java Google Drive API in Android Studio to download an image from the drive:
OutputStream outputStream = new FileOutputStream(mContext.getFilesDir() + "/" + destPath);
mDriveService.files().get(id).executeMediaAndDownloadTo(outputStream);
Most images get saved normally on the device (like the original on drive). But some images get saved rotated.
What I mean is, for example, I have a photo on google drive which is orientated in portrait mode. But after the code above downloads it on the device, the photo on the device is in landscape mode.