zetbaitsu / Compressor

An android image compression library.
7.04k stars 961 forks source link

The images get rotated on Android 11.0 #180

Open qwaskhaled opened 3 years ago

qwaskhaled commented 3 years ago

When I try to capture an image using the camera then compressing it using this SDK I get the image in landscape mode instead of portrait mode

nareshkatta99 commented 3 years ago

That is due to camera app. Before giving the image to this library, try rotating the image.

qwaskhaled commented 3 years ago

That is due to camera app. Before giving the image to this library, try rotating the image.

We are using CameraX in our app and we don't have the issue when we don't the compression SDK. Do you have any explanation for that?

Also, the issue is not presented in all devices.

nareshkatta99 commented 3 years ago

This might happen mostly in Samsung devices. Basically that details will be saved to exif data of the image. This library not copying the exif data to compressed one. So better fix that on your side only. Check the exif data of the image once in which the issue is coming.

Check this stackoverflow question

qwaskhaled commented 3 years ago

This might happen mostly in Samsung devices. Basically that details will be saved to exif data of the image. This library not copying the exif data to compressed one. So better fix that on your side only. Check the exif data of the image once in which the issue is coming.

Check this stackoverflow question

Why does this SDK remove the EXIF data if it's necessary?

wisnuwiry commented 3 years ago

Same issue here. Use CameraX and running in Emulator Pixel API 29

imdineshsingh commented 2 years ago

getting same issue while take photo with front camera. the image gets rotate after compresssion

harunagic commented 1 year ago

getting the same issue on any device, image gets rotated all the time