Metadata-Version: 2.4
Name: impak
Version: 1.0.1
Summary: Space-efficient patch-based image collection format
License-Expression: AGPL-3.0-or-later
Project-URL: Homepage, https://puff-dayo.github.io/impak/impak.html
Project-URL: Repository, https://github.com/puff-dayo/impak
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Pillow>=10.0
Provides-Extra: encoder
Requires-Dist: numpy>=1.24; extra == "encoder"
Provides-Extra: cli
Requires-Dist: click>=8.0; extra == "cli"
Provides-Extra: dev
Requires-Dist: pdoc>=16; extra == "dev"
Requires-Dist: twine>=6; extra == "dev"
Requires-Dist: build>=1; extra == "dev"
Requires-Dist: tqdm>=4; extra == "dev"
Provides-Extra: gui
Requires-Dist: PySide6<6.9.0,>=6.8.0; extra == "gui"
Provides-Extra: all
Requires-Dist: impak[cli,dev,encoder,gui]; extra == "all"
Dynamic: license-file

# impak

Space-efficient patch-based image collection format.

## Install

`impak` is available from [PyPI](https://pypi.org/project/impak/).

```commandline
pip install impak               # decoder only (Pillow)
pip install impak[encoder]      # + numpy – encoding support (ImpakWriter)
pip install impak[cli]          # + click – CLI tool (impak pack/unpack/info)
pip install impak[gui]          # + PySide6 – GUI toolbox (impakgui)
pip install impak[all]          # both encoder, GUI and CLI
```

The base installation is decoder-only — `impak.open()`, `ImpakReader`, and `reconstruct` work with only `Pillow` as a dependency. No `numpy` or `click` needed.

## Example

See [example.py](./example.py) for more.

```python
import impak
from pathlib import Path

paths = sorted(Path("frames/").glob("*.png"))
names = [p.stem for p in paths]

# Encode serial — all modes
with impak.create("out.impak", mode="vs_first", codec="webp", quality=100) as w:
    for p in paths:
        w.add(p, name=p.stem)

# Encode parallel — vs_first only
with impak.create("out.impak", mode="vs_first", codec="webp", quality=100) as w:
    w.add(paths[0], name=names[0])            # first frame (as keyframe)
    w.add_batch(paths[1:], names=names[1:])   # rest encoded in parallel

# Decode
with impak.open("out.impak") as r:
    print(r.info())
    img = r[0]
    img = r["frame_01"]
    for img in r:
        img.show()
```

Run `impak --help`, or check documentation in the `/docs` folder.

## Build

```commandline
uv pip install build twine setuptools wheel / uv sync --all-extras
uv build
twine check dist/*
uv pip install dist/impak-xxxx.whl
```

## License

`impak` is licensed under the GNU Affero General Public License v3.0.

See `LICENSE` for full text.
