caesium-image-compressor
caesium-image-compressor copied to clipboard
Resize does not upscale images
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:
- Input an image smaller than 2160px short side
- Enable resize to "short edge" and 2160px
- "Do not enlarge" is NOT selected
- Press "compress"
- Image size stays the same (regardless of lossless / lossy compression)
Expected behavior Image size is increased to 2160px short side
Screenshots
Settings:
Operation "successful" (warning triangle)
Image was not resized, new size is the same as the old one.
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)
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.
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
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.
That'd be fantastic, thank you!<3