Image compression messes up orientation
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 https://github.com/Rouji/single_php_filehost/pull/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)
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
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.
just uncheck the checkbox?
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.
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
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.
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
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: https://github.com/nextcloud/android/issues/6248#issuecomment-1147167524
til! anyway, hupl compression messes with orientation sometimes so this very much stays a relevant issue