Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dclunie opened this issue May 29, 2020 · 5 comments
Open

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

dclunie opened this issue May 29, 2020 · 5 comments

Comments

@dclunie
Copy link

dclunie commented May 29, 2020

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
Copy link

bjorn3 commented May 29, 2020

#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
Copy link

bjorn3 commented May 29, 2020

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

FLIF/src/image/image.cpp

Lines 69 to 95 in aad2083

if (ext && !strcasecmp(ext,".png")) {
return !image_save_png(filename,*this);
}
if (ext && !strcasecmp(ext,".pnm")) {
return image_save_pnm(filename,*this);
}
if (ext && !strcasecmp(ext,".pgm")) {
return image_save_pnm(filename,*this);
}
if (ext && !strcasecmp(ext,".ppm")) {
return image_save_pnm(filename,*this);
}
if (ext && !strcasecmp(ext,".pam")) {
return image_save_pam(filename,*this);
}
if (ext && !strcasecmp(ext,".rggb")) {
return image_save_rggb(filename,*this);
}
if (ext && !strcasecmp(ext,".icc")) {
return image_save_metadata(filename,*this,"iCCP");
}
if (ext && !strcasecmp(ext,".xmp")) {
return image_save_metadata(filename,*this,"eXmp");
}
if (ext && !strcasecmp(ext,".exif")) {
return image_save_metadata(filename,*this,"eXif");
}

@dclunie
Copy link
Author

dclunie commented May 29, 2020

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

@jonsneyers
Copy link
Member

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
Copy link
Author

dclunie commented Jul 10, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants