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

Resize does not upscale images #138

Closed
BigBoyBarney opened this issue Aug 4, 2022 · 4 comments
Closed

Resize does not upscale images #138

BigBoyBarney opened this issue Aug 4, 2022 · 4 comments
Assignees

Comments

@BigBoyBarney
Copy link

BigBoyBarney commented Aug 4, 2022

Hi! First of all, thanks for this amazing program. As you'll see in the log file, I just finished quite a large compression, which would've been pretty much impossible without it.

Describe the bug
The resize option doesn't actually scale the images up (even if the "Do not enlarge" option is not enabled). The image size stays the same. If I enter a size lower than the original image size, it scales down correctly

Software version
v.2.1.0

Operating System information
Windows 10

To Reproduce
Steps to reproduce the behavior:

  1. Input an image smaller than 2160px short side
  2. Enable resize to "short edge" and 2160px
  3. "Do not enlarge" is NOT selected
  4. Press "compress"
  5. Image size stays the same (regardless of lossless / lossy compression)

Expected behavior
Image size is increased to 2160px short side

Screenshots
Settings:
image
Operation "successful" (warning triangle)
image
Image was not resized, new size is the same as the old one.
image

Application Log
caesium-2022-08-04.log
(Log file shows no errors, even though a warning triangle appears in screenshot 1)

Additional context
I noticed something interesting.
If I input a larger target size than the original, the operation takes roughly 1300ms and the file does not compress at all and size stays the same. If I input the same values again, but enable "do not enlarge" the operation take 50ms and the image is compressed (and not resized, of course)

@Lymphatus
Copy link
Owner

Hi!

In the first screenshot I see the warning icon, but I can't see the warning message. I reproduced your steps and probably the image did not compress at all because the output image was bigger than the original (in bytes, not pixels of resolution).
Caesium automatically discards compressed images which size is bigger than the original, but this may be a problem in your scenario.
Thus this is not a "bug" but probably something I might address with an option to still output the compressed image even if it's bigger.

PS: about the additional context you provided, it's a correct behaviour: Caesium first tries to compress, sees that the size is bigger, then discards the compressed file. If you enable "Do not enlarge" (which refers to resolution, not size) Caesium just skips the entire process because you told him to upscale the image.

@BigBoyBarney
Copy link
Author

BigBoyBarney commented Aug 5, 2022

Ahh, that makes so much sense, actually. In that case, it's completely intended and works as it's supposed to. Now that I think about it, it would be super counter-productive to output images larger than the original in a dedicated image compressor 🤣

My use case was probably quite niche, as with this operation, I didn't care about compression at all and just wanted to resize a batch of images.

If you could add an option to force the image output even if it's larger than the original, or a dedicated "resize only" option where Caesium doesn't care about compression and just resizes, I would be very glad.

Regardless, thanks for your response! Have a nice day!
Barney

@Lymphatus
Copy link
Owner

If you could add an option to force the image output even if it's larger than the original

This is a pretty easy option to add, probably in the "Output" tab. Caesium 1.7 actually had something similar.
Converting this issue in a Feature Request.

@BigBoyBarney
Copy link
Author

That'd be fantastic, thank you!<3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants