FLIF-hub / FLIF

Free Lossless Image Format
Other
3.72k stars 229 forks source link

ERROR: Unknown extension to write to: .pbm #557

Open dclunie opened 4 years ago

dclunie commented 4 years ago

Compressed a single bit PBM image:

% FLIF-0.3/src/flif x.pbm x.flif

failed on decompress:

% FLIF-0.3/src/flif -d x.flif x_rt.pbm

ERROR: Unknown extension to write to: .pbm

bjorn3 commented 4 years ago

https://github.com/FLIF-hub/FLIF/pull/554

FLIF development has stopped since FLIF is superceded by FUIF and then again by JPEG XL (https://jpeg.org/jpegxl/index.html), which is based on a combination of Pik and FUIF. A royalty-free and open source reference implementation of JPEG XL is available on GitLab.

bjorn3 commented 4 years ago

You can find the full list of supported output format here:

https://github.com/FLIF-hub/FLIF/blob/aad2083c2508902f971b7a2aa2564eac2dbc6e3f/src/image/image.cpp#L69-L95

dclunie commented 4 years ago

I thought JPEG-XL did not support single bit images (which FLIF does a nice job of compressing)

jonsneyers commented 4 years ago

JPEG XL does support 1-bit too. It's probably even better for them, since it has JBIG2-style "pattern" features. The current JXL encoder hasn't really been tested or optimized much for that particular case though.

FLIF doesn't save .pbm, you can save as .pgm and then convert it with e.g. ImageMagick.

dclunie commented 4 years ago

My tests so far indicate that the current JPEG XL encoder did not do as well on single bit images as FLIF, and I can't test that round trip is lossless because there is a bug during decoding (which I previously reported to Jan, with you cc'd).

I have given up on JPEG XL until this gets fixed, and it won't be included in my upcoming paper on single bit compression as a result.

David