cocoon / jxl.Net

jpeg-xl dotnet csharp / c# encoder decoder wrapper and jpeg-xl encoder GUI (WPF) with live jpeg-xl image preview and comparison slider
12 stars 1 forks source link

Allow lossy jpeg transcode at all distances > 0 #3

Closed dwillbarron closed 1 year ago

dwillbarron commented 1 year ago

Hi, sorry for bothering you if you're no longer working on this--I know jxl isn't a particularly hot topic at the moment.

Found a possible bug here. Code was applying --lossless_jpeg=0 when distance was above 1, but any distance above 0 is considered lossy by cjxl, so there was a blindspot for any distances between 0 and 1.

It works in my testing, but I'm not sure whether there was a purpose behind the original use of 1.0 here.

cocoon commented 1 year ago

Thank you very much, you're totally right!

dwillbarron commented 1 year ago

No problem! Thanks for sharing this library. I've been playing around with jxl a bit and this made it a lot quicker to get some experiments going.

cocoon commented 1 year ago

Exactly to play around I build it and just as a proof of concept and to use it for batch encoding. I am glad if it helped!