Free Lossless Image Format (FLIF) is a
lossless
Lossless compression is a class of data compression that allows the original data to be perfectly reconstructed from the compressed data with no loss of information. Lossless compression is possible because most real-world data exhibits statistic ...
image format claiming to outperform
PNG, lossless
WebP
WebP is an image file format developed by Google intended as a replacement for JPEG, PNG, and GIF file formats. It supports both lossy and lossless compression, as well as animation and alpha transparency.
Google announced the WebP format i ...
, lossless
BPG and lossless
JPEG 2000
JPEG 2000 (JP2) is an image compression standard and coding system. It was developed from 1997 to 2000 by a Joint Photographic Experts Group committee chaired by Touradj Ebrahimi (later the JPEG president), with the intention of superseding the ...
in terms of compression ratio on a variety of inputs.
FLIF supports a form of progressive
interlacing (a generalization of the
Adam7 algorithm
Adam7 is an interlacing algorithm for raster images, best known as the interlacing scheme optionally used in PNG images. An Adam7 interlaced image is broken into seven subimages, which are defined by replicating this 8×8 pattern across the f ...
) with which any partial download (greater than couple hundred bytes) of an image file can be used as a lossy encoding of the entire image.
Jon Sneyers, one of the developers of FLIF, since combined it with ideas from various lossy compression formats to create a successor called (FUIF), which itself was combined with
Google
Google LLC () is an American multinational technology company focusing on search engine technology, online advertising, cloud computing, computer software, quantum computing, e-commerce, artificial intelligence, and consumer electronics. ...
's PIK format to create
JPEG XL
JPEG XL is a royalty-free raster-graphics file format that supports both lossy and lossless compression. It is designed to outperform existing raster formats and thus become their universal replacement.
Name
The name consists of ''JPEG'' (for t ...
. As a consequence, FLIF is no longer being developed.
History
The format was initially announced publicly in September 2015,
with the first
alpha release
A software release life cycle is the sum of the stages of development and maturity for a piece of computer software ranging from its initial development to its eventual release, and including updated versions of the released version to help impro ...
occurring about a month later, in October 2015.
[
]
The first stable version of FLIF was released in September 2016.
[
]
Design
For compression, FLIF uses MANIAC (Meta-Adaptive Near-zero Integer
Arithmetic Coding
Arithmetic coding (AC) is a form of entropy encoding used in lossless data compression. Normally, a string of characters is represented using a fixed number of bits per character, as in the ASCII code. When a string is converted to arithmetic e ...
), a variant of
CABAC Context-adaptive binary arithmetic coding (CABAC) is a form of entropy encoding used in the H.264/MPEG-4 AVC and High Efficiency Video Coding (HEVC) standards. It is a lossless compression technique, although the video coding standards in which it ...
where the contexts are nodes of decision trees which are dynamically learned at encode time.
FLIF uses the reversible
YCoCg The YCoCg color model, also known as the YCgCo color model, is the color space formed from a simple transformation of an associated RGB color space into a ''luma'' value (denoted as Y) and two '' chroma'' values called ''chrominance green'' (Cg) and ...
color space
A color space is a specific organization of colors. In combination with color profiling supported by various physical devices, it supports reproducible representations of colorwhether such representation entails an analog or a digital represent ...
(unlike
that loses some color information to rounding errors, independently of its use in otherwise lossy
JPEG
JPEG ( ) is a commonly used method of lossy compression for digital images, particularly for those images produced by digital photography. The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and imag ...
). Not yet implemented are some features, e.g. other "color spaces (
CMYK
The CMYK color model (also known as process color, or four color) is a subtractive color model, based on the CMY color model, used in color printing, and is also used to describe the printing process itself. The abbreviation ''CMYK'' refers ...
, YCbCr, ...)". The color space conversion is faster, but the overall decoding (and encoding) is still slower than it needs to be, or some of the competition, even with the better color space as that is only a small fraction of the overall process. The format supports an optional
alpha channel
In computer graphics, alpha compositing or alpha blending is the process of combining one image with a background to create the appearance of partial or full transparency. It is often useful to render picture elements (pixels) in separate pas ...
(
RGBA
RGBA stands for red green blue alpha. While it is sometimes described as a color space, it is actually a three-channel RGB color model supplemented with a fourth ''alpha channel''. Alpha indicates how opaque each pixel is and allows an image to ...
) like
PNG (but unlike
JPEG
JPEG ( ) is a commonly used method of lossy compression for digital images, particularly for those images produced by digital photography. The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and imag ...
); and progressive coding, similar to PNG (unlike it, progressive compression doesn't increase file-size), but as FLIF's algorithm is more complex (and partly, may not have had as much tuning of the implementation yet), it has a higher computational cost; at least lower bandwidth requirements can offset some of that extra time. Progressive coding reduces FLIF's performance.
FLIF supports
grayscale
In digital photography, computer-generated imagery, and colorimetry, a grayscale image is one in which the value of each pixel is a single sample representing only an ''amount'' of light; that is, it carries only intensity information. Graysca ...
,
RGB
The RGB color model is an additive color model in which the red, green and blue primary colors of light are added together in various ways to reproduce a broad array of colors. The name of the model comes from the initials of the three additiv ...
and RGBA with
color depth
Color depth or colour depth (see spelling differences), also known as bit depth, is either the number of bits used to indicate the color of a single pixel, or the number of bits used for each color component of a single pixel. When referring to ...
of 1 to 16 bits per channel.
FLIF has some tuning parameters which can result in differently sized images. All of the images are still lossless. A
flifcrush
tool is also available to achieve the minimal size.
Lossy compression can be achieved by preprocessing. The process is deterministic and does not cause
generation loss
Generation loss is the loss of quality between subsequent copies or transcodes of data. Anything that reduces the quality of the representation when copying, and would cause further reduction in quality on making a copy of the copy, can be consid ...
.
Support
![UGUI FLIF screenshot](https://upload.wikimedia.org/wikipedia/commons/0/08/UGUI_FLIF_screenshot.png)
]
XnView
XnView is an image organizer and general-purpose file manager used for viewing, converting, organizing and editing raster images, as well as general purpose file management. It comes with built-in hex inspection, batch renaming and screen cap ...
supports FLIF since version 2.36.
ExifTool
ExifTool is a free and open-source software program for reading, writing, and manipulating image, audio, video, and PDF metadata. It is platform independent, available as both a Perl library (Image::ExifTool) and command-line application. Exi ...
supports reading and writing metadata in FLIF images since version 10.31.
UGUI-FLIFsupports preview and converting PNG file to FLIF.
IrfanView
IrfanView () is an image viewer, editor, organiser and converter program for Microsoft Windows. It can also play video and audio files, and has some image creation and painting capabilities. IrfanView is free for non-commercial use; commercial u ...
supports reading FLIF images since version 4.52.
References
External links
* – official site
*
PolyFLIF– a Javascript library to decode FLIF in browsers
*
Phew– native
macOS
macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
FLIF viewer
FLIF Optimizer– tuning parameters for better lossless compression
{{Compression formats
Animated graphics file formats
Graphics file formats
Graphics standards
Open formats
Image compression