Android camera intent tutorial rotating image - Part 7
У вашего броузера проблема в совместимости с HTML5
Please note that I don't respond to questions on the youtube channel but for those that require help I provide paid consultancy services here https://www.codementor.io/mobapptuts
It has been found in a number of devices that the orientation of the captured image is wrong.
With the captured image being displayed often with a 90 degree offset.
This is mainly on non-nexus devices and I have been able to reproduce this behaviour on a Samsung Note 4 device.
This android tutorial will show one method on how to rotate the image correctly after it has been captured from the camera application.
In this tutorial we will cover:
- Creating the exifinterface
- Getting the image orientation from the exifinterface
- Creating a matrix
- How to rotate a matrix
- Creating a new bitmap using the offset provided by the matrix
API's covered
- ExifInterface
- ExifInterface.getAttributeInt
- Matrix
- Matrix.setRotate
- Bitmap.createBitmap
- ImageView.setImageBitmap
For much more information checkout
Website - https://www.nigeapptuts.com
Twitter - https://twitter.com/MobAppTuts
Facebook - https://www.facebook.com/nigeapptuts
Google+ - https://plus.google.com/b/115884642086760882044
Pinterest - https://www.pinterest.com/mobapptuts/
The previous tutorials were aimed at beginners to android but over time have been getting more complex as the original camera_intent app has developed.
This tutorial series is more aimed towards the intermediate developers thought for those who have been following the previous tutorial series, feel free to watch this android performance series.
Android studio (1.4.2) is the editor of choice (IDE) for this tutorial series.
This tutorial series is the start of what I expect to be many so I encourage comments and feedback to improve the quality and viewing experience.