Hupl icon indicating copy to clipboard operation
Hupl copied to clipboard

Image compression messes up orientation

Open csprr opened this issue 1 year ago • 9 comments

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)

csprr avatar Aug 16 '24 00:08 csprr

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

Rouji avatar Aug 16 '24 00:08 Rouji

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.

csprr avatar Aug 16 '24 00:08 csprr

just uncheck the checkbox?

Rouji avatar Aug 16 '24 00:08 Rouji

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.

csprr avatar Aug 16 '24 00:08 csprr

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

Rouji avatar Aug 16 '24 00:08 Rouji

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.

csprr avatar Aug 16 '24 00:08 csprr

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

Rouji avatar Aug 16 '24 01:08 Rouji

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

csprr avatar Aug 16 '24 01:08 csprr

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

Rouji avatar Aug 16 '24 01:08 Rouji