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

Weird sky on panorma photos #180

Open
severak opened this issue Dec 12, 2024 · 2 comments
Open

Weird sky on panorma photos #180

severak opened this issue Dec 12, 2024 · 2 comments

Comments

@severak
Copy link

severak commented Dec 12, 2024

Hi. I have weird bug. I am working on some software and my idea was to let users upload panorama photos straight from their iPhone and use jpegotpim to optimize it.

It does work but sometimes it degrades quality of sky and leaves weird colorized-like effect on the clouds (probably because it place of lowest entropy on image).

See this example or another one. More examples possibly here.

I will probably use another approach (change resolution down before feeding it into jpegotpim) but I am interested in explanation what's happening there and how to detect and prevent it.

I use this command jpegoptim --all-progressive --size=2000 -- filename.jpg. My target is to be 2MB per photo.

For the reference original of the first picture (16MB) and source code of my resizer.

@severak
Copy link
Author

severak commented Dec 12, 2024

severak@kapybara:~$ jpegoptim --version
jpegoptim v1.4.6  x86_64-pc-linux-gnu
Copyright (C) 1996-2018, Timo Kokkonen

This program comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistirbute it under certain conditions.
See the GNU General Public License for more details.


libjpeg version: 6b  27-Mar-1998
Copyright (C) 1991-2020 The libjpeg-turbo Project and many others

@tjko
Copy link
Owner

tjko commented Dec 15, 2024

@severak, interesting that it seems to mainly affect the sky (probably would affect any larger areas without fine detail).

I think "problem" is that you're setting fixed target file size, instead of -m option to set the quality factor.

With size option jpegoptim will do simple binary search to find quality factor value that produces file closest to the target size set. But this can lead to it using quality factor value that won't produce "usable" results....

I guess, could add command line option to allow specifying the minimum quality factor that jpegoptim will use when it tries to find quality factor producing file of specific size...

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

No branches or pull requests

2 participants