fax 0.2.2

Decoder and Encoder for CCITT Group 3 and 4 bi-level image encodings used by fax machines TIFF and PDF.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import os, sys, re, os.path
from pathlib import Path

RE = re.compile(r"(\d+)_0-w(\d+).raw")

dir = Path("errors")
for p in dir.iterdir():
    m = RE.match(p.name)
    if m:
        id = m[1]
        width = m[2]

        tif = dir / (id + ".tif")
        if os.path.isfile(tif):
            continue

        os.spawnl(os.P_WAIT, "target/release/examples/fax2tiff", "fax2tiff", p.resolve(), width, tif)