Introduction
Introduction Statistics Contact Development Disclaimer Help
Update the README - farbfeld - suckless image format with conversion tools
git clone git://git.suckless.org/farbfeld
Log
Files
Refs
README
LICENSE
---
commit 3d73fbaa1aeab1000d7f77cd6ee21f06a9b02e04
parent 96d6bde7d9bb6a79b7f86fbbc285a49b9634cd63
Author: Laslo Hunhold <[email protected]>
Date: Fri, 14 Apr 2017 18:21:22 +0200
Update the README
Rework the introductory paragraph and show examples directly afterwards.
If people are interested in the tl;dr-sections, they can then read on.
Diffstat:
M README | 41 ++++++++++++++++++-----------…
1 file changed, 24 insertions(+), 17 deletions(-)
---
diff --git a/README b/README
@@ -8,9 +8,28 @@
WHAT IS FARBFELD?
Farbfeld is a lossless image-format designed to be
- parsed and piped easily.
- It can be compressed easily and beats PNG's filesize
+ parsed and piped easily. It is probably the simplest
+ image-format you can find (see FORMAT).
+ It does not have integrated compression, but allows
+ compression algorithms to work with it easily by adding
+ little entropy to the image data itself. This beats PNG
in many cases.
+ Given the free choice of compression algorithms, it
+ is trivial to switch to better and faster ones as they
+ show up in the future.
+
+HOW DO I USE THE TOOLS?
+ encoding:
+ png2ff < example.png > example.ff
+ png2ff < example.png | bzip2 > example.ff.bz2
+
+ decoding:
+ ff2png < example.ff > example.png
+ bzcat example.ff.bz2 | ff2png > example.png
+
+ bzip2 is used in this example and a recommended
+ compression algorithm. Of course you are free
+ to use something else.
WHY FARBFELD?
Current image-formats have integrated compression,
@@ -32,13 +51,13 @@ WHY FARBFELD?
and farbfeld.
HOW DOES IT WORK?
- In Farbfeld, pattern resolution is not done while
+ In farbfeld, pattern resolution is not done while
converting, but while compressing the image.
For example, farbfeld always stores the alpha-channel,
even if the image doesn't have alpha-variation.
This may sound like a big waste at first, but as
soon as you compress an image of this kind, the
- compression-algorithm (e.g. bz2) recognizes the
+ compression-algorithm (e.g. bzip2) recognizes the
pattern that every 48 bits the 16 bits store the
same information.
And the compression-algorithms get better and better
@@ -49,19 +68,7 @@ HOW DOES IT WORK?
the same value, which is recognized by the compression
algorithm easily.
This effectively leads to filesizes you'd normally only
- reach with paletted images, and in some cases bz2 even
+ reach with paletted images, and in some cases bzip2 even
beats png's compression, for instance when you're dealing
with grayscale data, line drawings, decals and even
photographs.
-
-HOW DO I USE THE TOOLS?
- encoding:
- png2ff < example.png > example.ff
- png2ff < example.png | bzip2 > example.ff.bz2
-
- decoding:
- ff2png < example.ff > example.png
- bzcat example.ff.bz2 | ff2png > example.png
-
- bz2 is recommended for compression, but you can use
- any algorithm you want.
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.