Traneptora / jxlatte

Java JPEG XL decoder
MIT License
41 stars 6 forks source link

Are the default weights etc necessary for simple lossless decoding? #34

Open peterdk opened 2 weeks ago

peterdk commented 2 weeks ago

I am researching a bit how to get JPEGXL decode of losless JXL images in my Android app. I am wondering about the size of the JAR file of this library. Are these weight files required for this functionality? They seem to take up a lot of space, undoing my gains with conversion of PNG to JPEGXL lossless.

Traneptora commented 2 weeks ago

They are necessary for VarDCT, but not for lossless images. They're in a file to avoid needing to compute them on the fly, which is a temporary measure before I optimize computing them.

Traneptora commented 2 weeks ago

I will say I hadn't considered the file size issue, so I will look into this.

Do note that I still have many optimizations to do, particularly in the lossless area.

peterdk commented 2 weeks ago

Yeah, no worries. I am developing for Android, and have some visual assets in PNG. I saw I could save around 1MB of storage, with converted to jxl lossless. But if the code to decode them, is larger then that, it has not much use ofcourse. But I'll experiment a bit with this library and see what I can drop/cherrypick.