farbfeld

suckless image format with conversion tools
git clone git://git.suckless.org/farbfeld
Log | Files | Refs | README | LICENSE

commit 48bd9e1f4c7c4c45957575f68b1ee0cdeba42fd3
parent 3d73fbaa1aeab1000d7f77cd6ee21f06a9b02e04
Author: Laslo Hunhold <dev@frign.de>
Date:   Fri, 14 Apr 2017 20:04:40 +0200

Update and refactor the manpages

Make them more consistent, and only maintain a list of the conversion
tools in farbfeld.5.
Refine the wording on the jpg-manpages.

Diffstat:
2ff.1 | 18++++++------------
farbfeld.5 | 29+++++++++++++++++++----------
ff2jpg.1 | 34++++++++++++++++------------------
ff2pam.1 | 7++-----
ff2png.1 | 8++------
ff2ppm.1 | 29++++++++++++++---------------
jpg2ff.1 | 5+----
png2ff.1 | 5+----
8 files changed, 61 insertions(+), 74 deletions(-)

diff --git a/2ff.1 b/2ff.1 @@ -1,4 +1,4 @@ -.Dd 2016-01-05 +.Dd 2017-04-14 .Dt 2FF 1 .Os suckless.org .Sh NAME @@ -13,9 +13,9 @@ reads an image from stdin, converts it to and writes the result to stdout. .Pp .Nm -is a wrapper script around the *2ff-tools -with a soft fallback to obtaining a PNG from imagemagick's -.Xr convert 1 +is a wrapper script around the farbfeld conversion tools +with a fallback to obtaining a PNG using +.Xr ImageMagick 1 and passing it through .Xr png2ff 1 . .Pp @@ -27,9 +27,7 @@ writes a diagnostic message to stderr. .It 0 Image processed successfully. .It 1 -An error occurred or -.Xr convert 1 -was not found in the fallback. +An error occurred. .El .Sh EXAMPLES $ @@ -40,12 +38,8 @@ $ .Nm < image.* | bzip2 > image.ff.bz2 .Sh SEE ALSO -.Xr bunzip2 1 , .Xr bzip2 1 , -.Xr convert 1 , -.Xr ff2png 1 , -.Xr jpg2ff 1 , -.Xr png2ff 1 , +.Xr ImageMagick 1 , .Xr farbfeld 5 .Sh AUTHORS .An Laslo Hunhold Aq Mt dev@frign.de diff --git a/farbfeld.5 b/farbfeld.5 @@ -1,4 +1,4 @@ -.Dd 2016-01-04 +.Dd 2017-04-14 .Dt FARBFELD 5 .Os suckless.org .Sh NAME @@ -17,17 +17,24 @@ BYTES DESCRIPTION 4 32-Bit BE unsigned integer (height) [2222] 4*16-Bit BE unsigned integers [RGBA] / pixel, row-major .Ed +.Pp The RGB-data should be sRGB for best interoperability and not alpha-premultiplied. .Sh USAGE .Nm -provides -.Xr png2ff 1 , -.Xr jpg2ff 1 , +provides the tools .Xr 2ff 1 , -.Xr ff2png 1 -for -.Em conversions ; +.Xr jpg2ff 1 , +.Xr png2ff 1 +and +.Xr ff2jpg 1 , +.Xr ff2pam 1 , +.Xr ff2png 1 , +.Xr ff2ppm 1 +to +.Em convert +to and from farbfeld images respectively. +.Pp .Xr bzip2 1 is recommended for .Em compression , @@ -42,8 +49,8 @@ appended (e.g. ".ff.bz2"). .Nm was created because the author was not satisfied with the boilerplate and inherent complexity involved in handling common image formats -(PNG, JPEG, GIF,...), having to rely on bloated libraries not being able -to focus on the task at hand for a given problem. +(PNG, JPEG, GIF,...), having to rely on bloated libraries while not being +able to focus on the task at hand for a given image processing problem. .Sh EXAMPLES Below is an example for a color inverter usable in a pipeline. No external libraries other than libc are needed to handle the image data: @@ -115,8 +122,10 @@ main(int argc, char *argv[]) .Ed .Sh SEE ALSO .Xr 2ff 1 , -.Xr bzip2 1 , +.Xr ff2jpg 1 , +.Xr ff2pam 1 , .Xr ff2png 1 , +.Xr ff2ppm 1 , .Xr jpg2ff 1 , .Xr png2ff 1 .Sh AUTHORS diff --git a/ff2jpg.1 b/ff2jpg.1 @@ -1,19 +1,19 @@ -.Dd 2016-03-23 +.Dd 2017-04-14 .Dt FF2JPG 1 .Os suckless.org .Sh NAME .Nm ff2jpg -.Nd convert farbfeld to JPEG +.Nd convert farbfeld to JPG .Sh SYNOPSIS .Nm -.Op Fl b Ar color +.Op Fl b Ar colour .Op Fl o .Op Fl q Ar quality .Sh DESCRIPTION .Nm reads a .Xr farbfeld 5 -image from stdin, converts it to a JPEG image (RGB) and writes the result to +image from stdin, converts it to JPG (8-bit RGB) and writes the result to stdout. .Pp In case of an error @@ -21,18 +21,16 @@ In case of an error writes a diagnostic message to stderr. .Sh OPTIONS .Bl -tag -width Ds -.It Fl b Ar color -.Ar color -to mix with the background alpha channel, the default is white. -.Pp -The following formats are supported: -"#rrggbb", "#rrrrggggbbbb" and the short-form "#rgb" which expands to "#rrggbb". +.It Fl b Ar colour +Mix the background alpha channel with +.Ar colour +specified as #rgb, #rrggbb or #rrrrggggbbbb. The default is #fff. .It Fl o -Optimize Huffman table (smaller file, but slow compression). +Optimize the Huffman table, which reduces the file size but takes longer. .It Fl q Ar quality -set JPEG output +Set the output .Ar quality -(range 0-100), the default is 85. +ranging from 0 to 100. The default is 85. .El .Sh EXIT STATUS .Bl -tag -width Ds @@ -43,14 +41,14 @@ An error occurred. .El .Sh EXAMPLES $ -png2ff < test.png | .Nm --b '#00ff00' -q 85 > test.jpg +< image.ff > image.jpg +.Pp +$ bunzip2 < image.ff.bz2 | +.Nm +-b '#00ff00' -q 90 > image.jpg .Sh SEE ALSO -.Xr 2ff 1 , -.Xr bunzip2 1 , .Xr bzip2 1 , -.Xr png2ff 1 , .Xr farbfeld 5 .Sh AUTHORS .An Hiltjo Posthuma Aq Mt hiltjo@codemadness.org diff --git a/ff2pam.1 b/ff2pam.1 @@ -1,4 +1,4 @@ -.Dd 2017-01-09 +.Dd 2017-04-14 .Dt FF2PAM 1 .Os suckless.org .Sh NAME @@ -10,7 +10,7 @@ .Nm reads a .Xr farbfeld 5 -image from stdin, converts it to a 16-bit RGBA PAM and writes the result +image from stdin, converts it to PAM (16-bit RGBA) and writes the result to stdout. .Pp In case of an error @@ -32,10 +32,7 @@ $ bunzip2 < image.ff.bz2 | .Nm > image.pam .Sh SEE ALSO -.Xr 2ff 1 , -.Xr bunzip2 1 , .Xr bzip2 1 , -.Xr png2ff 1 , .Xr farbfeld 5 .Sh AUTHORS .An Mattias Andrée Aq Mt maandree@kth.se diff --git a/ff2png.1 b/ff2png.1 @@ -1,4 +1,4 @@ -.Dd 2016-01-17 +.Dd 2017-04-14 .Dt FF2PNG 1 .Os suckless.org .Sh NAME @@ -10,7 +10,7 @@ .Nm reads a .Xr farbfeld 5 -image from stdin, converts it to a 16-Bit RGBA PNG and writes the result +image from stdin, converts it to PNG (16-bit RGBA) and writes the result to stdout. .Pp In case of an error @@ -32,11 +32,7 @@ $ bunzip2 < image.ff.bz2 | .Nm > image.png .Sh SEE ALSO -.Xr 2ff 1 , -.Xr bunzip2 1 , .Xr bzip2 1 , -.Xr jpg2ff 1 , -.Xr png2ff 1 , .Xr farbfeld 5 .Sh AUTHORS .An Laslo Hunhold Aq Mt dev@frign.de diff --git a/ff2ppm.1 b/ff2ppm.1 @@ -1,17 +1,17 @@ -.Dd 2016-03-21 +.Dd 2017-04-14 .Dt FF2PPM 1 .Os suckless.org .Sh NAME .Nm ff2ppm -.Nd convert farbfeld to PPM (binary) +.Nd convert farbfeld to PPM .Sh SYNOPSIS .Nm -.Op Fl b Ar color +.Op Fl b Ar colour .Sh DESCRIPTION .Nm reads a .Xr farbfeld 5 -image from stdin, converts it to a PPM image (P6 binary format, RGB) and +image from stdin, converts it to PPM (16-Bit RGB P6 binary format) and writes the result to stdout. .Pp In case of an error @@ -19,12 +19,11 @@ In case of an error writes a diagnostic message to stderr. .Sh OPTIONS .Bl -tag -width Ds -.It Fl b Ar color -.Ar color -to mix with the background alpha channel, the default is white. -.Pp -The following formats are supported: -"#rrggbb", "#rrrrggggbbbb" and the short-form "#rgb" which expands to "#rrggbb". +.It Fl b Ar colour +.Ar colour +Mix the background alpha channel with +.Ar colour +specified as #rgb, #rrggbb or #rrrrggggbbbb. The default is #fff. .El .Sh EXIT STATUS .Bl -tag -width Ds @@ -35,14 +34,14 @@ An error occurred. .El .Sh EXAMPLES $ -png2ff < test.png | .Nm --b '#00ff00' > test.ppm +< image.ff > image.ppm +.Pp +$ bunzip2 < image.ff.bz2 | +.Nm +-b '#00ff00' > image.ppm .Sh SEE ALSO -.Xr 2ff 1 , -.Xr bunzip2 1 , .Xr bzip2 1 , -.Xr png2ff 1 , .Xr farbfeld 5 .Sh AUTHORS .An Hiltjo Posthuma Aq Mt hiltjo@codemadness.org diff --git a/jpg2ff.1 b/jpg2ff.1 @@ -1,4 +1,4 @@ -.Dd 2016-01-19 +.Dd 2017-04-14 .Dt JPG2FF 1 .Os suckless.org .Sh NAME @@ -32,10 +32,7 @@ $ < image.jpg | bzip2 > image.ff.bz2 .Sh SEE ALSO .Xr 2ff 1 , -.Xr bunzip2 1 , .Xr bzip2 1 , -.Xr ff2png 1 , -.Xr png2ff 1 , .Xr farbfeld 5 .Sh AUTHORS .An Laslo Hunhold Aq Mt dev@frign.de diff --git a/png2ff.1 b/png2ff.1 @@ -1,4 +1,4 @@ -.Dd 2016-01-19 +.Dd 2017-04-14 .Dt PNG2FF 1 .Os suckless.org .Sh NAME @@ -32,10 +32,7 @@ $ < image.png | bzip2 > image.ff.bz2 .Sh SEE ALSO .Xr 2ff 1 , -.Xr bunzip2 1 , .Xr bzip2 1 , -.Xr ff2png 1 , -.Xr jpg2ff 1 , .Xr farbfeld 5 .Sh AUTHORS .An Laslo Hunhold Aq Mt dev@frign.de