You took the perfect shot on your Xiaomi Redmi Note 12 or POCO X5 Pro, but when viewed in the gallery, the photo was turned over 90Β° And this is a problem that many smartphone owners of the brand know -- and it's not always about camera failure. 80 percent of the time, the software settings, the processing, are to blame. EXIF-metadata.
In this article, weβll take a closer look at 7 main reasons Xiaomi can automatically turn your photos, from MIUI firmware bugs to camera module hardware nuances, and how to turn off autorotation in the standard Camera app, what settings affect the orientation of images when transmitting via Bluetooth or downloading to social networks, and why some models (such as Xiaomi 13 Ultra) suffer from this problem more often than others.
Particular attention will be paid to the hidden parameters of the developer, which allow you to manually set the orientation of the camera sensor - this method works even on devices with custom firmware such as PixelExperience or LineageOS. And at the end of the article you will find a step-by-step instruction to restore the original orientation of the photo using the EXIF Tool and FFmpeg tools.
1. Autoturn in the application βCameraβ: how it works and why it fails
The main reason for the upside-down photos on Xiaomi is because of the image processing algorithms embedded in the standard Camera app, because the smartphone determines the orientation of the image not only from the gyroscope, but also from the gyroscope. EXIF-Tags are meta-information that is written into a photo file, and if those tags conflict with the physical position of the device, the automatic rotation occurs.
For example, when you are taking a portrait (vertically) but hold your phone upside down (the camera on the bottom), MIUI may misinterpret the accelerometer data and write Orientation=6 (a 90Β° clockwise rotation) instead of Orientation=8 (270Β°) in EXIF, which results in the photo being upside down, when the problem is actually only metadata.
- π Sensor conflict: A gyroscope and accelerometer transmit conflicting device position data.
- π± bug MIUI: In the firmware MIUI 13β14 processing errors recorded EXIF In the camera module (especially on models with Sony) IMX766).
- π§ Default settings: Some regional versions of the software include forced autorotation for βconvenienceΒ».
Interestingly, the problem is more common when shooting in HEIF/HEIC (used by default on new Xiaomi to save space), which is more sensitive to errors in metadata than the classic JPEG.
Hardware causes: the role of the gyroscope and camera module
If the photo flip is systemically (in all images regardless of the application), the hardware components may be to blame. For example, Xiaomi 12T Pro and Redmi K50 Gaming models use 5-axis stabilization cameras, where the orientation sensor is physically displaced relative to the body, which leads to the fact that:
β οΈ Attention: If after the fall of the smartphone, the photos began to turn only when shooting from the main camera (frontal works normally), this may indicate a mechanical displacement of the module.
- π Sensor misalignment: The camera is physically mounted at an angle to the body (typical for devices with a "bulging" islet of cameras).
- π© Damage to the gyroscope: After impact or moisture, the sensor may give incorrect data.
- π Problems with the plume: On models POCO F4 GT and Black Shark 5 camera plume sometimes departs from the board, which leads to failures in the transmission of orientation data.
Check the hardware nature of the problem is simple: install a third-party camera app (such as Open Camera or GCam) and take test shots. If the photos are saved in the correct orientation, it is Xiaomi's fault, if not, it needs repair.
How to check the gyroscope for performance?
3. Impact of firmware and regional settings MIUI
Firmware MIUI It has regional features that directly affect the processing of photos (CN) Global (Global) versions of the software use different recording algorithms. EXIF-And that leads to the fact that:
| MIUI version | Turning problem | Dependence on the model |
|---|---|---|
| MIUI CN (China) | The autoturn is off by default, but EXIF-tags are not written correctly for horizontal images. | More often on Xiaomi 13/14 series. |
| MIUI Global/EEA | Forced rotation is on, but sometimes it is delayed (photo turns 1-2 seconds after shooting). | It is typical of the Redmi Note 11/12. |
| MIUI for POCO | Bug with a 180Β° rotation when shooting in Pro Mode. | POCO X4 Pro 5G, POCO F5. |
Another nuance is the firmware updates. MIUI 14.0.4 Many users of Xiaomi 12S Ultra complained about a spontaneous photo turn in the gallery, because of a library error. libmiui_camera.so, responsible for the processing of metadata:
- Reverse to the previous version of the software via Fastboot.
- Or wait for a patch (usually comes out 2-3 weeks after mass complaints).
π‘
Before updating your firmware, back up your photos in their original form. Connect your smartphone to your PC and copy the DCIM/Camera folder unchanged.
4. Conflict with Gallery and Third Party Applications
Sometimes the photos are displayed correctly in the standard gallery. MIUI, But flipped when viewed in Google Photos, VK Or when you send it through Telegram, which is because different apps interpret things differently. EXIF-tags, for example:
- πΌοΈ Google Photos: Ignores Orientation tag and turns photo based on image analysis (AI sometimes gets it wrong).
- π± VK/Instagram: When loading, automatically apply the rotation EXIF, But sometimes they fail because of compression.
- π¬ Telegram/WhatsApp: Turn the photo if the metadata indicates Rotation=90, But the picture is physically turned.
Decision:
- Open the photo in the standard MIUI gallery and click Edit β Turn β Reset.
- Use apps that ignore EXIF, such as Simple Gallery.
- Before sending, convert the photo to JPEG using Lightroom Mobile (this will reset the metadata).
On Xiaomi models with a Snapdragon 8 Gen 2 processor (for example, Xiaomi 13 Pro), there is another feature: when shooting in RAW (.dng format), photos are saved without autorotating, but the MIUI gallery may display them incorrectly, in which case viewing through Adobe Lightroom or Snapseed will help.
5. Manual correction of orientation photo: step-by-step instructions
If automatic solution is not possible (for example, on custom firmware), you can manually correct the orientation of the photo using specialized tools.
Install EXIF Tool (Android) or ExifTool (PC) | Download FFmpeg for mass processing | Backup photo | Check the free space on the device
-->
Method 1: Using the EXIF Tool (on the phone)
- Install the EXIF Editor app from Google Play.
- Open the problem photo and find the Orientation field.
- Set the value: 1 - normal orientation; 6 - turn 90 Β° hourly; 8 - turn 270 Β° (or 90 Β° against the hourly).
Save the changes and check the photo in the gallery.
Method 2: Through FFmpeg (on PC)
For mass correction, use the command:
ffmpeg -i input.jpg -metadata:s:v rotate="0" -codec copy output.jpgWhere rotate="0" is the desired orientation (substitute 90, 180 or 270 if necessary).
π‘
If the photos are only turned over when viewed on a PC, the problem lies in the Windows settings. Open Settings β Devices β Autoturn and turn off the option to Lock the Screen Turn.
6.Hidden developer settings for Xiaomi camera
MIUI has hidden parameters that allow you to manually control the camera's orientation, so you can activate them.
- Go to Settings. β The phone.
- Click 7 times on the MIUI version to enable Developer Mode.
- Back to Settings β Additionally. β For developers.
- Find Camera Debugging (or Camera HAL on new models).
- Activate Force Camera Orientation and select 0 (turn off autorotation).
If you often take pictures from non-standard angles (such as macro or low angle), try:
- Activate Professional Mode in the Camera app - it saves a photo without autoturning.
- Use it. RAW+JPEG (support-model) β RAW-Files are not affected by bug.