Faster3ck / Converseen

Converseen is a batch image converter and resizer
https://converseen.fasterland.net/
GNU General Public License v3.0
617 stars 50 forks source link

JPEG XL (JXL) parameters not available #159

Open RafaelLinux opened 1 year ago

RafaelLinux commented 1 year ago

JXL format has a bunch of parameters, not only lossless or lossy compression. One interesting parameter is "transcode" from JPG. Is a conversion that doesn't loss any information from JPG file but makes it smaller. For example, cjxl command line tool from libjxl let users to losslessly transcode JPEG images into JPEG XL. Transcoding preserves the already-lossy compression data from the original JPEG image without any quality loss caused by re-encoding, while making the file size smaller than the original. Is Converseen using this JXL feature when converting JPG to JXL?

Faster3ck commented 1 year ago

Hi, thank you very much for the suggestion. I will check if it is possible to implement the transcode functionality in Converseen. This depends on whether ImageMagick has this feature!

RafaelLinux commented 1 year ago

Thanks to you for your work. I think your application will be the only one to have that feature implemented. Most of converters don't even know about that JXL feature and simply "reencode" to JXL, so image loss more information.

Should I leave this thread open?

Faster3ck commented 1 year ago

That would be a really interesting addition, I hope it can be implemented using ImageMagick. :)

Anyway you can leave the thread open!

Morethanevil commented 1 year ago

How did you set lossless in JPEG XL? I don't have any options, only for JPG.

Converseen uses automatically lossy conversion. I tried with a large PNG, lossless it would have around 15MB and converseen gives me a 3MB file

api33tiramisu commented 6 months ago

I am looking for a way to bulk convert my photos to JXL as well and I decided to bump this issue up again.

It seems that ImageMagick doesn't support neither lossless encoding nor -distance parameter for JPEG-XL if I am correct.

Silver0006 commented 3 weeks ago

You have to use -quality 100 to get lossless conversion. I don't know if it works in every case, but it worked for me. I did PNG to JXL.

magick .\P1003803.png -quality 100 .\test.jxl

https://github.com/ImageMagick/ImageMagick/blob/1c7af5461d4defbcfcac2a8db3e4fb1a81324861/coders/jxl.c#L873-L875