jasper-software / xv

XV Software
Other
26 stars 9 forks source link

Any plans for .heic or .jxl #19

Open Ndolam opened 9 months ago

Ndolam commented 9 months ago

Not exactly an issue, but I wasn't sure where else to ask.

Are there any plans to add support for HEIC or JPEG XL image formats any time in the "near" future?

Thanks.

mdadams commented 9 months ago

Code contributions are welcome.

I cannot speak for others, but I have no time to add new features.

Ndolam commented 9 months ago

Michael, thanks for getting back. I understand time constriants, but I still had hope. :-)

Being familiar with the internals of neither xv nor jasper I have no idea how major an effort that is.

mdadams commented 9 months ago

I'm not intimately familiar with the code either. I am not the original author. I mainly contributed some bug fixes and helped migrate to a CMake-based build.

tanabi commented 9 months ago

Adding image types to xv isn't too bad. I recently added support for webp ... this could be used as a 'template' for adding more formats.

https://github.com/jasper-software/xv/commit/7e21eeb6eb9fd1ac5c6bf44a27649b68c3693b97

That said ... webp is something I had an active interest in, and I've never encountered these other formats, so its probably not something I'd jump on implementing personally :D That also said, if these formats became common enough that I encounter them on the regular, I'll probably add the support if someone hasn't beaten me to it.

Ndolam commented 9 months ago

Tanabi,

thanks for that change set template, it could be quite useful should someone feel sufficiently motivated.

My interest in .heic is because the iPeople are now told by their corporate overlords that .heic is the correct picture format to use (and always has been, for that matter). And occasionally some of these people send me pictures. https://github.com/strukturag/libheif provides a library and programs to encode and decode such images.

Jxl (https://github.com/libjxl/libjxl) is something I've come across recently. It is a royalty-free format that, among other things, can losslessly shrink regular JPEGs down (that is, you can recode such images back as JPEGs and get exactly the same JPEG you started with). I (and I suspect others) would use JXL to shrink down ordinary JPEGs if/when image handling programs (such as xv) start supporting it. In some quick tests, I've found that the images from my phone can be losslessly shrunk down to about 76% of their original size, which is easily enough compression to make the recoding worthwhile. But currently the only way I have to look at .jxl images is to convert them back to JPEGs, which works but is a clumsy procedure.

Sembiance commented 9 months ago

By the way, on page 108 of the xv PDF manual there are detailed instructions on how to add a new file format to xv: https://github.com/jasper-software/xv/blob/main/src/docs/manuals/xvdocs.pdf

Ndolam commented 8 months ago

Sembiance, thanks for pointing that out, I hadn't seen that. Very useful information to know