aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal/tests/sixel/README.md
blob: c01deae9b6dfaec2c64fab4291bc6f1a0e12a48b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Images for Sixel tests

The files in this directory are used to test the Sixel parser against images
generated by real-world software:

* `testimage_im6.sixel`

    Generated with ImageMagick 6.9.10.

    ```bash
    convert "$SOURCE" testimage_im6.sixel
    ```

* `testimage_libsixel.sixel`

    Generated with libsixel 1.8.6.

    ```bash
    img2sixel -o testimage_libsixel.sixel "$SOURCE"
    ```

* `testimage_ppmtosixel.sixel`

    Generated with Netpbm 10.

    ```bash
    pngtopnm "$SOURCE" \
        | ppmquant 256 \
        | ppmtosixel   \
        > testimage_ppmtosixel.sixel
    ```

In the previous commands, `$SOURCE` is defined as:

    SOURCE="$(git rev-parse --show-toplevel)/alacritty/alacritty.png"

The image is the [Alacritty icon](../../../extra/logo/compat/alacritty-term.png).

To verify the results of the parser we include the raw RGBA data for each
image. It was generated with this script:

```bash
for IMG in *.sixel
do
    convert "$IMG" png:- | convert -depth 8 png:- rgba:"${IMG/.sixel/.rgba}"
done
```

We have to convert the Sixel to PNG before RGBA because, for some reason,
ImageMagick can't transform from Sixel to RGBA directly.