FLIF development has stopped since FLIF is superseded by FUIF and then again by JPEG XL, which is based on a combination of Pik and FUIF.
A royalty-free and open source reference implementation of JPEG XL is available on GitHub. For more information, see JPEG XL community page or visit the JPEG XL Discord server.
FLIF: Free Lossless Image Format
FLIF is a lossless image format based on MANIAC compression. MANIAC (Meta-Adaptive Near-zero Integer Arithmetic Coding)
is a variant of CABAC (context-adaptive binary arithmetic coding), where the contexts are nodes of decision trees
which are dynamically learned at encode time.
FLIF outperforms PNG, FFV1, lossless WebP, lossless BPG and lossless JPEG2000 in terms of compression ratio.
Moreover, FLIF supports a form of progressive interlacing (essentially a generalization/improvement of PNG’s Adam7)
which means that any prefix (e.g. partial download) of a compressed file can be used as a reasonable lossy encoding of the entire image.
FLIF is copylefted free/libre software: you can redistribute it and/or modify it, provided that you share back.
The reference implementation of FLIF is released under the terms of the GNU Lesser General Public License version 3 or later (LGPLv3+).
The decoder library libflif_dec is released under a weaker, non-copyleft free software license: the Apache 2.0 license.
The example application viewflif illustrates how to use the decode library.
The example code in viewflif.c is in the public domain (Creative Commons CC0 1.0 Universal).
Build Instructions
GNU/Linux
Install the dependencies
On Debian:
for the encoder/decoder: sudo apt-get install libpng-dev
for the viewer: sudo apt-get install libsdl2-dev
On Fedora:
for the encoder/decoder: sudo dnf install libpng-devel
for the viewer: sudo dnf install SDL-devel
On Ubuntu:
for the encoder/decoder: sudo apt-get install libpng-dev make pkg-config
for the viewer: sudo apt-get install libsdl2-dev
Compile
Navigate to the FLIF/src directory and run make to compile everything, or
make flif to build just the flif command line tool
make libflif.so to build the LGPL’ed shared library
make libflif_dec.so to build the Apache licensed decode-only shared library
make viewflif to build the example viewer (it depends on the decode library)
Install
sudo make install if you want to install it globally
Windows
Install Visual Studio
(VS Community 2015
is free for open source projects)
Open the build\MSVC folder and double-click the dl_make_vs.bat file.
This will download required libraries and run nmake to build flif.exe.
Then, run in the command line:
libflif.js – A javascript FLIF encoder and decoder. (Demo)
flif.rs – A work-in-progress implementation of FLIF in Rust.
FLIF Windows Codec – A plugin that allows you to decode and encode FLIF files in Windows aplications using the Windows Imaging Component (WIC) API. That allows e.g., to see the files in Windows PhotoViewer and Windows Explorer.
FLIF Windows Plugin – This plugin enables decoding of FLIF images in applications which use the Windows Imaging Component API. In this way, FLIF images can be viewed in Windows Explorer like other common image formats.
qt-flif-plugin – Enables Qt4 and Qt5 applications to load images in the FLIF image format.
FLIF development has stopped since FLIF is superseded by FUIF and then again by JPEG XL, which is based on a combination of Pik and FUIF. A royalty-free and open source reference implementation of JPEG XL is available on GitHub. For more information, see JPEG XL community page or visit the JPEG XL Discord server.
FLIF: Free Lossless Image Format
FLIF is a lossless image format based on MANIAC compression. MANIAC (Meta-Adaptive Near-zero Integer Arithmetic Coding) is a variant of CABAC (context-adaptive binary arithmetic coding), where the contexts are nodes of decision trees which are dynamically learned at encode time.
FLIF outperforms PNG, FFV1, lossless WebP, lossless BPG and lossless JPEG2000 in terms of compression ratio.
Moreover, FLIF supports a form of progressive interlacing (essentially a generalization/improvement of PNG’s Adam7) which means that any prefix (e.g. partial download) of a compressed file can be used as a reasonable lossy encoding of the entire image.
For more information on FLIF, visit https://flif.info
License
FLIF is copylefted free/libre software: you can redistribute it and/or modify it, provided that you share back.
The reference implementation of FLIF is released under the terms of the GNU Lesser General Public License version 3 or later (LGPLv3+).
The decoder library
libflif_decis released under a weaker, non-copyleft free software license: the Apache 2.0 license.The example application
viewflifillustrates how to use the decode library. The example code inviewflif.cis in the public domain (Creative Commons CC0 1.0 Universal).Build Instructions
GNU/Linux
Install the dependencies
On Debian:
sudo apt-get install libpng-devsudo apt-get install libsdl2-devOn Fedora:
sudo dnf install libpng-develsudo dnf install SDL-develOn Ubuntu:
sudo apt-get install libpng-dev make pkg-configsudo apt-get install libsdl2-devCompile
maketo compile everything, ormake flifto build just theflifcommand line toolmake libflif.soto build the LGPL’ed shared librarymake libflif_dec.soto build the Apache licensed decode-only shared librarymake viewflifto build the example viewer (it depends on the decode library)Install
sudo make installif you want to install it globallyWindows
build\MSVCfolder and double-click thedl_make_vs.batfile. This will download required libraries and runnmaketo buildflif.exe. Then, run in the command line:nmake libflif.dllto build the shared librarynmake viewflif.exeto build the example viewerOS X
brew install pkg-config libpng sdl2makein the FLIF/src directoryPre-Built Binaries
These will be available on the Release page
Or, you can get the Snap package:
Related Projects