Skip to content

bakkeby/farbfeld-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

███ ███ ██  ██  ███ ███ █   ██     █ █ ███ █ █   ███
█   █ █ █ █ █ █ █   █   █   █ █    █ █  █  █ █   █
██  ███ ██  ███ ██  ██  █   █ █ ██ █ █  █  █ █   ███
█   █ █ █ █ █ █ █   █   █   █ █    █ █  █  █ █     █
█   █ █ █ █ ██  █   ███ ███ ██     ███  █  █ ███ ███

farbfeld is a lossless image format which is easy to parse, pipe and compress. It has the following format:

╔════════╤═════════════════════════════════════════════════════════╗
║ Bytes  │ Description                                             ║
╠════════╪═════════════════════════════════════════════════════════╣
║ 8      │ "farbfeld" magic value                                  ║
╟────────┼─────────────────────────────────────────────────────────╢
║ 4      │ 32-Bit BE unsigned integer (width)                      ║
╟────────┼─────────────────────────────────────────────────────────╢
║ 4      │ 32-Bit BE unsigned integer (height)                     ║
╟────────┼─────────────────────────────────────────────────────────╢
║ [2222] │ 4x16-Bit BE unsigned integers [RGBA] / pixel, row-major ║
╚════════╧═════════════════════════════════════════════════════════╝

Refer to https://tools.suckless.org/farbfeld/ for general information and example implementations utilising farbfeld.


Farbfeld is an underrated and overlooked image format that has quite a range of tools, filters and generators that can be used manually or programmatically.

The use of such programs can, unfortunately, be quite difficult at times due to lack of information as there is typically no help output or man pages to refer to. Reading cryptic C code is also not something most people are fluent in.

The aim of this project is to add man pages and basic help output for the programs in the Farbfeld Utilities collection at http://zzo38computer.org.

There is documentation on the website and this project complements that.

At a bare minimum the man pages should give the user a rough understanding of what the program is for and to give an example of how it is used.

An example man page from this project:

FF-ICOSA(1)                      General Commands Manual                     FF-ICOSA(1)

NAME
       ff-icosa — psychedelic icosahedral fractal picture generator

SYNOPSIS
       ff-icosa <width> <height> <scale amount> <?seed?> <?option?>

DESCRIPTION
       ff-icosa  generates psychedelic icosahedral fractal pictures in farbfeld(5) image
       format and writes the result to stdout.

       This program does not read from standard in.

       In case of an error ff-icosa writes a diagnostic message to stderr.

EXIT STATUS
       0       Image processed successfully.

       1       An error occurred.

OPTIONS
       The program takes up to five arguments:
          - width
          - height
          - scale amount (not necessarily an integer)
          - random seed (optional)
          - option (integer from 0 to 127)

       The option defaults to 0 and has various effects.

EXAMPLES
       $ ff-icosa 640 480 68.83 1.49 > image-icosa.ff

       $ ff-icosa 640 480 281.83 41.49 89 > image-icosa.ff

SEE ALSO
       farbfeld(5), farbfeld-utils(7)

farbfeld-utils                         2024-04-03                            FF-ICOSA(1)

Installation

It should be noted that the Makefile will only install (and uninstall) the man pages - it will not compile the programs themselves.

$ sudo make install

All the program .c files has a header that contains the compilation command for that program, which means that they can be run as shell scripts to compile them, e.g.

$ sh ff-hjoin.c

The compiled binaries will be placed under the ~/bin/ directory.

To compile all programs run:

$ for FILE in ff-*.c ff2*.c *2ff.c; do sh $FILE; done

Some of the programs may have depencencies on additional libraries; for example ff-sql which depends on sqlite3.o being present.

It should be noted that conversion tools like avsff and ffavs have been renamed to avs2ff and ff2avs respectively to be in line with the naming scheme of the suckless project and to avoid confusion with other tools such as groff, troff or ffmpeg.


References:

Sources: