You can edit almost every page by Creating an account. Otherwise, see the FAQ.

Farbfeld

From EverybodyWiki Bios & Wiki



Farbfeld
Farbfeld logo
Filename extension.ff
Magic numberfarbfeld
Developed byLaslo Hunhold
Initial release6 January 2016; 8 years ago (2016-01-06)[1]
Type of formatlossless bitmap image format
Open format?Yes
Websitetools.suckless.org/farbfeld/

Farbfeld is a lossless image format aiming to be easy to parse, pipe and compress.[1]

The main difference compared to other image formats is that compression is not integrated in the format itself but meant to be applied externally, to ensure that the format is as simple as possible and the choice of compression algorithms can be made depending on the nature of the image data and technological advances.[2]

File structure[edit]

The farbfeld image file consists of a fixed-size header followed by an RGBA pixel array.

The header is structured as follows:[3]

Segment Bytes Comment
Magic Number 8 The literal "farbfeld" used to identify the image file
Width 4 32-Bit unsigned Big Endian integer
Height 4

The subsequent pixel array consists of width times height number of pixels in Row-major order,[1] each with the following fixed format:[3]

Segment Bytes Comment
Red 2 16-Bit unsigned Big Endian integer
Green 2
Blue 2
Alpha 2

While not actually mandated by the format, the pixel data is recommended to be non-alpha-premultiplied and within the sRGB color space for, as claimed, "best interoperability".[1]

Usage[edit]

Given the simplicity of the format, there does not exist a reference library to handle the format. Instead, a set of utilities (2ff(1), png2ff(1), jpg2ff(1), ff2png(1))[4] licensed under the ISC license[5] is given, with each tool working in the context of Unix pipes.

Actual image processing then is carried out by combining these tools and filters accepting farbfeld data on standard input and writing farbfeld output to standard output. An image processing pipeline for PNG data can then look like this:

 png2ff < image.png | filter1 [arg ...] | filter2 [arg ...] | ... | ff2png > image_edited.png

If the input image format is unknown or variable, the included 2ff(1) tool can be used, which provides a fallback to ImageMagick and thus supports a wide range of formats:

 2ff < image.* | filter1 [arg ...] | filter2 [arg ...] | ... | ff2png > image_edited.png

An example for such a filter working with farbfeld data - a color inverter written in C - can be found here.

The data can also be stored intermediately using the .ff file extension:

 2ff < image.* > image.ff

For longer-term storage, this data can then be compressed, for instance with bzip2 as recommended.[1] The compression extension is appended to the farbfeld file name:

 2ff < image.* | bzip2 > image.ff.bz2

It is claimed[1][2] that this external compression even beats other lossless image formats with integrated compression like PNG depending on which compression algorithm is used.

Implementations[edit]

A Farbfeld loader is integrated in imlib2 since version 1.4.8,[6] which is a part of the Enlightenment Foundation Libraries. There also exist a Go package[7] and a GIMP plugin[8] providing a Farbfeld loader for the respective environments.

The Farbfeld utilities have been packaged in Arch Linux,[9] FreeBSD,[10] Gentoo[11] and others.[1]

Numerous image filters[12][13] are based on Farbfeld.

The sent presentation tool[14] and the lel image viewer[15] are two examples for programs based on the Farbfeld format for image processing.

See also[edit]

Some use of "" in your query was not closed by a matching "".Some use of "" in your query was not closed by a matching "".

References[edit]

  1. 1.0 1.1 1.2 1.3 1.4 1.5 1.6 "Project homepage". suckless.org.
  2. 2.0 2.1 "Farbfeld utilities readme". suckless.org.
  3. 3.0 3.1 "Format description". suckless.org.
  4. "Farbfeld utilities Git repository". suckless.org.
  5. "Farbfeld utilities license". suckless.org.
  6. Woelders, Kim. "imlib2 loader". enlightenment.org.
  7. Biletskyy, Dima. "GoDoc documentation of the Go Farbfeld loader". godoc.org.
  8. Scott, Ian D. "Farbfeld GIMP plugin". github.com.
  9. Phillips, David. "Arch Linux package in AUR". archlinux.org.
  10. Baugher, Aaron. "FreeBSD package". freebsd.org.
  11. Roovers, Jeroen. "Gentoo port media-gfx/farbfeld". gentoo.org.
  12. Elliott, Timothy. "Farbfeld resize filter". github.com.
  13. Price, Erik. "Gamut image filter collection". github.com.
  14. Teich, Markus. "sent, a simple presentation tool". suckless.org.
  15. Posthuma, Hiltjo. "lel image viewer". 2f30.org.


This article "Farbfeld" is from Wikipedia. The list of its authors can be seen in its historical. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.