android
android copied to clipboard
Improve BitmapUtils: Bitmap Handling and Image Processing for Modern APIs and Performance Enhancements
trafficstars
This PR introduces several improvements and optimizations across bitmap and image processing functions, addressing issue #13617 :
- Bitmap Decoding Update: Introduced
ImageDecoderfor Android 9 (API 28) and above, while maintaining backward compatibility withBitmapFactoryfor older versions. - Refactor
rotateImage(): Improved EXIF orientation handling and clarified code for readability. - Refactor
usernameToColor: Improved MD5 validation, optimized color generation, and enhanced code readability for better performance.
Testing
- [x] All existing unit and instrumented tests were run and passed successfully.
- Please review the changes.
- If needed, additional tests can be added based on review feedback.
- Any suggestions or improvements are welcome as this is my first contribution to this repository.
This PR aligns with the contribution guidelines and addresses the issue as described.