Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image compression messes up orientation #23

Open
csprr opened this issue Aug 16, 2024 · 9 comments
Open

Image compression messes up orientation #23

csprr opened this issue Aug 16, 2024 · 9 comments

Comments

@csprr
Copy link

csprr commented Aug 16, 2024

Hi,

When uploading an image in portrait mode with Hupl using the single_php_filehost, the image gets uploaded in landscape mode.

Initially I thought it might have been due to the EXIF stripping I added before (referencing Rouji/single_php_filehost#30 ), but it seems it also does that with an unmodified version.

Uploading the same image through a browser using the same script works without any issues, therefore I think the issue might be with Hupl.

(Also mentioning #18 in case anyone is using the same single php file uploader and is interested in EXIF stripping on server level)

@Rouji
Copy link
Owner

Rouji commented Aug 16, 2024

Does that only happen when you're using the resize/compression feature, by any chance?

Apart from that, nothing ever touches the contents of a file

@csprr
Copy link
Author

csprr commented Aug 16, 2024

Is there a way to actually disable that option?
I've currently set them to max width/height 10000 (which the images are below) and JPEG Quality 100, but that still uploads them incorrect.

@Rouji
Copy link
Owner

Rouji commented Aug 16, 2024

just uncheck the checkbox?

@csprr
Copy link
Author

csprr commented Aug 16, 2024

Ooh, I was going through all the settings, but I never really noticed that checkbox during the actual upload of the files.
Unchecking the option does indeed make the upload go through without any issue.

@Rouji
Copy link
Owner

Rouji commented Aug 16, 2024

It happens to the best of us, no worries 🙃

Might have to look at the compression thing and make it not mess up orientation... I've had that happen a few times too

@csprr
Copy link
Author

csprr commented Aug 16, 2024

Additionally what I also noticed is that GPS data does automatically get stripped from EXIF already.
I was not aware of this and it was the reason I was looking into the EXIF stripping on the file uploader.

When uploading without resizing, only the GPS data gets removed.
When uploading with resizing, all EXIF data is removed.

@Rouji
Copy link
Owner

Rouji commented Aug 16, 2024

Unless my memory is complete rubbish, which it might be tbf, hupl doesn't touch file contents at all except when compressing images. Maybe your camera app strips gps when sharing or something

@csprr
Copy link
Author

csprr commented Aug 16, 2024

I've tried sharing it from a random file manager application, through an email and it also gets removed there.

Looking more into it, it's apparently something that was included since Android Q for privacy: nextcloud/android#6248 (comment)

@Rouji
Copy link
Owner

Rouji commented Aug 16, 2024

til!
anyway, hupl compression messes with orientation sometimes so this very much stays a relevant issue

@Rouji Rouji changed the title Portrait mode images uploaded in landscape Image compression messes up orientation Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants