darktable icon indicating copy to clipboard operation
darktable copied to clipboard

imageio: don't hide quality slider for webp lossless

Open kmilos opened this issue 2 years ago • 5 comments

The tooltip also mentions it for lossless (affects speed/effort), so we don't actually want to hide it.

Could even be considered a "bugfix" for 4.4.2...

kmilos avatar Jul 12 '23 15:07 kmilos

Quality for lossless seems suspect to me. So I tried it and in all cases changing the quality slider from 20% to 100% does not change the size of the exported image. So what does this slider do? Maybe that's the tooltip that should be fixed, no?

TurboGit avatar Jul 13 '23 09:07 TurboGit

So what does this slider do? Maybe that's the tooltip that should be fixed, no?

Haven't tested myself, but this is what the libwebp API says/claims as well:

https://github.com/webmproject/libwebp/blob/b92deba353cf4dedf876e88783d95fc6f3cf5c26/src/webp/encode.h#L97-L101

kmilos avatar Jul 13 '23 09:07 kmilos

Ok, the doc is:

  float quality;          // between 0 and 100. For lossy, 0 gives the smallest
                          // size and 100 the largest. For lossless, this
                          // parameter is the amount of effort put into the
                          // compression: 0 is the fastest but gives larger
                          // files compared to the slowest, but best, 100.

But clearly this does not work on our side. Maybe there is an additional parameter to set...

Reading again the doc above, it seems that for lossless we have only 0% or 100% working. Indeed with 100% it takes some more time and the file size is a bit smaller (23.1Mb instead of 23.4MB). For anything < 100% the speed seems to be the same and the size always 23.4Mb.

So it looks like more an option saying : "optimize for speed", "optimize for size". If this is confirmed somehow, maybe the best option would be to have another slider with more user friendly semantic.

TurboGit avatar Jul 13 '23 11:07 TurboGit

TBH, I wasn't planning to dig deeper into this, the idea was to just align the UI to the API/tooltip when I noticed the difference...

kmilos avatar Jul 13 '23 11:07 kmilos

At this stage let's reschedule that for 4.8.

TurboGit avatar Nov 17 '23 12:11 TurboGit