Voltar ao ranking

FLIF-hub/FLIF

C++

Free Lossless Image Format

image-compressionencoderdecoderfliflossless-compression-algorithm
Crescimento de estrelas
Estrelas
3.7k
Forks
232
Crescimento semanal
Issues
137
1k2k3k
set. de 2015abr. de 2019dez. de 2022jul. de 2026
README

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

Build Status Join the chat at https://gitter.im/jonsneyers/FLIF flif

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_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:
    • nmake libflif.dll to build the shared library
    • nmake viewflif.exe to build the example viewer

OS X

  • Install homebrew
  • Install the dependencies: brew install pkg-config libpng sdl2
  • Run make in the FLIF/src directory

Pre-Built Binaries

These will be available on the Release page

Or, you can get the Snap package:

Get it from the Snap Store


  • Poly FLIF - A javascript polyfill that allows you to use FLIF files in the browser. (Demo)
  • UGUI: FLIF - A GUI that allows you to convert and view FLIF files.
  • Ivy, the Taggable Image Viewer – An image viewer that supports FLIF via riff
  • flifcrush - A brute-force FLIF optimizer.
  • 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.
  • go-flif – Go FLIF Library Bindings.
  • Phew - Image viewer for macOS with QuickLook plugin
  • SDWebImageFLIFCoder - A popular image loading framework SDWebImage's coder plugin, supports iOS/macOS/tvOS/watchOS all Apple platforms.
  • libflif-Xcode - Xcode project to build libflif on iOS/macOS/tvOS/watchOS all Apple platforms.
  • flif-wasm - Node.js-ported FLIF command-line tool.
  • node-flif - A Node.JS wrapper that allows you to use JavaScript to interact with the CLI.
  • SimplEx FLIF - A simple and extensive GUI intermediary for the native executables.
  • WinFLIF - Small Windows desktop app for converting to/from FLIF/PNG stills.
  • imageio-FLIF - An Imageio (Python) plugin for reading and writing FLIF images and animations
Repositórios relacionados
Curzibn/Luban

Luban 2(鲁班 2) —— 高效简洁的 Android 图片压缩工具库,像素级还原微信朋友圈压缩策略。(An efficient and concise Android image compression library that closely replicates the compression strategy of WeChat Moments.)

CApache License 2.0lubanandroid
13.8k2.3k
LuckSiege/PictureSelector

Picture Selector Library for Android or 图片选择器

JavaMavenApache License 2.0androidandroid-image-selector
13.6k3.1k
zetbaitsu/Compressor

An android image compression library.

Kotlincompressorphotos
7.2k963
Lymphatus/caesium-image-compressor

Caesium is an image compression software that helps you store, send and share digital pictures, supporting JPG, PNG, WebP and TIFF formats. You can quickly reduce the file size (and resolution, if you want) by preserving the overall quality of the image.

C++GNU General Public License v3.0image-compressioncaesium
saerasoft.com/caesium
6.1k353
fengyuanchen/compressorjs

JavaScript image compressor.

JavaScriptnpmMIT Licensejavascriptimage-compression
fengyuanchen.github.io/compressorjs/
5.8k452
imazen/imageflow

High-performance image manipulation for web servers. Includes imageflow_server, imageflow_tool, and libimageflow

Rustcrates.ioGNU Affero General Public License v3.0image-serverimage-compression
docs.imageflow.io
4.4k144
meowtec/Imagine

🖼️ PNG/JPEG optimization app for macOS, Windows and Linux.

TypeScriptnpmMIT Licenseimage-compressionsave-for-web
4.4k316
oxipng/oxipng

Multithreaded PNG optimizer written in Rust

Rustcrates.ioMIT Licenseimage-compressionimage-optimization
4.1k153
kyleduo/TinyPNG4Mac

Native client of TinyPNG on macOS

SwiftMIT Licensetinypngtinypng4mac
4k292
libjxl/libjxl

JPEG XL image format reference implementation

C++BSD 3-Clause "New" or "Revised" Licenseimage-compressionencoder
3.6k374
chrissimpkins/Crunch

Insane(ly slow but wicked good) PNG image optimization

PythonPyPIOtherpngpng-compression
3.4k149
aoguai/LiYing

LiYing is an automated photo processing program designed for automating the post-processing workflow of ID photos in general photo studios. | LiYing 是一套适用于自动化 完成一般照相馆后期证件照处理流程的照片自动处理的程序。

PythonPyPIGNU Affero General Public License v3.0background-replacementimage-compression
3.2k271