index.md - sites - public wiki contents of suckless.org
 (HTM) git clone git://git.suckless.org/sites
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       index.md (850B)
       ---
            1 Examples
            2 ========
            3 Convert image.png to a farbfeld, run it through a filter and write the result
            4 to image-filtered.png:
            5 
            6         $ png2ff < image.png | filter | ff2png > image-filtered.png
            7 
            8 [invert.c](invert.c) is an example for such a filter which inverts the colors.
            9 Notice that there are no dependencies on external libraries. A hypothetical
           10 farbfeld-library would hardly exceed invert.c's size.
           11 
           12 Store a png as a compressed farbfeld:
           13 
           14         $ png2ff < image.png | bzip2 > image.ff.bz2
           15 
           16 Access a compressed farbfeld as a png:
           17 
           18         $ bunzip2 < image.ff.bz2 | ff2png {> image.png, | feh -, ...}
           19 
           20 Handle arbitrary image data using 2ff(1), which falls back to imagemagick's
           21 convert(1) for unknown image types:
           22 
           23         $ 2ff < image | filter | ff2png > image-filtered.png
           24 
           25 Refer to the manpages for more information. farbfeld(5) is a good start.