Krolyxon
Commit d9db7d7

Branches

Refs →

nsxiviconREADME.md

43 lines · 986 B · Markdown

1img2data
2--------
3
4img2data is a helper program to convert images to binary data for embedding in
5software. The generated data is used in nsxiv to set the window icons.
6
7
8How It Works
9------------
10
11Each given image is compressed using run-length encoding and a data array is
12generated. In these arrays, the four high bits of each byte are the run length
13minus one and the lowest four bits are the data, which are indices for the
14color array.
15
16See `data.gen.h` or the output of img2data for a better understanding.
17
18
19Dependencies
20------------
21
22img2data requires Imlib2 to be installed.
23
24
25Building
26--------
27
28img2data is built using the command:
29
30 $ CC -Wall -std=c89 -pedantic -lImlib2 img2data.c -o img2data
31
32where `CC` is a C compiler such as `gcc`.
33
34
35Usage
36-----
37
38img2data is used as the following:
39
40 $ ./img2data 16x16.png 32x32.png 48x48.png 64x64.png 128x128.png
41
42You may replace or omit any image, but you must have a `data.gen.h` with at
43least 1 image for nsxiv to compile.