Skip to main content

Space-efficient patch-based image collection format

Project description

impak

Space-efficient patch-based image collection format.

Example

import re
from tqdm import tqdm
import impak
from pathlib import Path

def natural_sort_key(path: Path) -> list:
    return [int(c) if c.isdigit() else c.lower() for c in re.split(r"(\d+)", path.name)]

paths = sorted(Path("Ganyu X Slime/").glob("*.png"), key=natural_sort_key)

# A fast and straight forward, automatic method. The default method.
# Possibly produces a smallest file, but it really depends.
with impak.create("Ganyu X Slime_lto.impak",
                  mode="lto", codec="webp", quality=95
                  ) as pack:
    for path in tqdm(paths, desc="Encoding using impak"):
        pack.add(path, name=path.stem)

Usage

Run impak --help, or check documentations in /docs folder.

Build

uv pip install build twine setuptools wheel
uv run --active python -m build
twine check dist/*
uv pip install dist/impak-xxxx.whl
uv run --active python -m twine upload dist/*

License

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

See LICENSE for full text.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

impak-0.1.0.tar.gz (30.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

impak-0.1.0-py3-none-any.whl (32.6 kB view details)

Uploaded Python 3

File details

Details for the file impak-0.1.0.tar.gz.

File metadata

  • Download URL: impak-0.1.0.tar.gz
  • Upload date:
  • Size: 30.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for impak-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0af14957a9bf42f6f79b7b2c2985c3f23238e8f550ed0a297d596e1a2400370f
MD5 ade2c6d3499650a3ef54c3754620180e
BLAKE2b-256 7235cf9b1134ecea821e5840960e14791e9a64d2f4b094a9e607274e0c0ac4f3

See more details on using hashes here.

File details

Details for the file impak-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: impak-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 32.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for impak-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dbbf1b3ab64a17d57aead88cd7d24c7170959e2939b58055b85e99fb186aa0cc
MD5 76790e97875651c128bcb4c6e0a00a5d
BLAKE2b-256 ba44ca61caedc08a6fbd2331fcbe68466ef54703870058bd18f3b0750e24e8db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page