Lymphatus / caesium-image-compressor

Caesium is an image compression software that helps you store, send and share digital pictures, supporting JPG, PNG, WebP and TIFF formats. You can quickly reduce the file size (and resolution, if you want) by preserving the overall quality of the image.
https://saerasoft.com/caesium
GNU General Public License v3.0
3.47k stars 209 forks source link

Image was accidently rotated #187

Closed sti1l-0 closed 3 months ago

sti1l-0 commented 1 year ago

Describe the bug I input a image that resolution is 4024*6048, as you can see that is a vertical image.

Whatever "resize to fit" option I use, the output image is always in horizontal resolution like 6048*4024.

Software version The version of Caesium Image Compressor 2.3.1

Operating System information

To Reproduce Steps to reproduce the behavior:

  1. Add a vertical image
  2. Select any option you like and compress
  3. See error

Expected behavior The image keep its origin direction.

Screenshots If applicable, add screenshots to help explain your problem. image

Application Log

Additional context

Lymphatus commented 1 year ago

Does the issue occur if you check the "Keep metadata" checkbox in the compression options?

Csrayz commented 8 months ago

When compressing to webp is selected, the image is still incorrectly rotated. Images are not rotated unexpectedly when trying to compress to jpg or png.

Snipaste_2024-01-08_16-21-40

Software version

The version of Caesium Image Compressor 2.5.1

Operating System information

OS: Windows Version 10

Options are as follows:

Snipaste_2024-01-08_16-21-59

Snipaste_2024-01-08_16-22-08

Snipaste_2024-01-08_16-22-28

Lymphatus commented 8 months ago

@Csrayz The original image is WebP or any other format?

Csrayz commented 8 months ago

@Csrayz原图是WebP还是其他格式?

The original image is a jpg, and when I tested it, I found that only certain images produced these kinds of strange phenomena. The operation recording and source files are attached below.

https://github.com/Lymphatus/caesium-image-compressor/assets/33659823/e38b28f9-8015-4ec0-a643-b1527d8f8ede

Photos.zip

Lymphatus commented 7 months ago

This should not happen when the output format is the same as the original file, but can occur if, for example, the original is JPG and the output is WebP. It's related to #196 because Caesium cannot keep the metadata of the original file if is compressing to another format. I'm working on a solution for this.