Skip to main content

A fast block compression library for python

Project description

Quicktex

A python library for using DDS files

Quicktex is a python library and command line tool for encoding and decoding DDS files. It is based on the RGBCX encoder, which is currently one of the highest quality S3TC encoders available. Quicktex has a python front end, but the encoding and decoding is all done in C++ for speed comparable to the original library.

Installation

From Wheel (Easiest)

To install, run

pip install quicktex

If you are on macOS, You need to install openMP from homebrew:

brew install libomp

From Source

To build from source, first clone this repo and cd into it, then run:

git submodule update --init
pip install .

and setuptools will take care of any dependencies for you.

If you are on macOS, it is recommended to first install openMP from homebrew to enable multithreading, since it is not included in the default Apple Clang install:

brew install libomp

The package also makes tests, stub generation, and docs available. To install the required dependencies for them, install with options like so:

pip install .[tests,stubs,docs]

Usage

Usage: quicktex [OPTIONS] COMMAND [ARGS]...

  Encode and Decode various image formats

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  decode  Decode DDS files to images.
  encode  Encode images to DDS files of the given format.

To decode DDS files to images, use the decode subdommand, along with a glob or a list of files to decode.

To encode images to DDS files, use the encode subcommand, plus an additional subcommand for the format. For example, quicktex encode bc1 bun.png will encode bun.png in the current directory to a bc1/DXT1 dds file next to it.

encode and decode both accept several common parameters:

  • -f, --flip / -F, --no-flip: Vertically flip image before/after converting. [default: True]
  • -r, --remove: Remove input images after converting.
  • -s, --suffix TEXT: Suffix to append to output filename(s). Ignored if output is a single file.
  • -o, --output: Output file or directory. If outputting to a file, input filenames must be only a single item. By default, files are converted in place.

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

quicktex-0.3.1.tar.gz (29.2 MB view hashes)

Uploaded Source

Built Distributions

quicktex-0.3.1-cp313-cp313-win_amd64.whl (3.3 MB view hashes)

Uploaded CPython 3.13 Windows x86-64

quicktex-0.3.1-cp313-cp313-musllinux_1_2_x86_64.whl (9.3 MB view hashes)

Uploaded CPython 3.13 musllinux: musl 1.2+ x86-64

quicktex-0.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.3 MB view hashes)

Uploaded CPython 3.13 manylinux: glibc 2.17+ x86-64

quicktex-0.3.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.2 MB view hashes)

Uploaded CPython 3.13 manylinux: glibc 2.17+ ARM64

quicktex-0.3.1-cp313-cp313-macosx_12_0_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.13 macOS 12.0+ x86-64

quicktex-0.3.1-cp313-cp313-macosx_12_0_arm64.whl (1.0 MB view hashes)

Uploaded CPython 3.13 macOS 12.0+ ARM64

quicktex-0.3.1-cp312-cp312-win_amd64.whl (3.3 MB view hashes)

Uploaded CPython 3.12 Windows x86-64

quicktex-0.3.1-cp312-cp312-musllinux_1_2_x86_64.whl (9.3 MB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.2+ x86-64

quicktex-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.3 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

quicktex-0.3.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.2 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

quicktex-0.3.1-cp312-cp312-macosx_12_0_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.12 macOS 12.0+ x86-64

quicktex-0.3.1-cp312-cp312-macosx_12_0_arm64.whl (1.0 MB view hashes)

Uploaded CPython 3.12 macOS 12.0+ ARM64

quicktex-0.3.1-cp311-cp311-win_amd64.whl (3.3 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

quicktex-0.3.1-cp311-cp311-musllinux_1_2_x86_64.whl (9.3 MB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.2+ x86-64

quicktex-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.4 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

quicktex-0.3.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.3 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

quicktex-0.3.1-cp311-cp311-macosx_12_0_x86_64.whl (1.0 MB view hashes)

Uploaded CPython 3.11 macOS 12.0+ x86-64

quicktex-0.3.1-cp311-cp311-macosx_12_0_arm64.whl (1.0 MB view hashes)

Uploaded CPython 3.11 macOS 12.0+ ARM64

quicktex-0.3.1-cp310-cp310-win_amd64.whl (3.3 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

quicktex-0.3.1-cp310-cp310-musllinux_1_2_x86_64.whl (9.2 MB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.2+ x86-64

quicktex-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.3 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

quicktex-0.3.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.2 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

quicktex-0.3.1-cp310-cp310-macosx_12_0_x86_64.whl (1.0 MB view hashes)

Uploaded CPython 3.10 macOS 12.0+ x86-64

quicktex-0.3.1-cp310-cp310-macosx_12_0_arm64.whl (1.0 MB view hashes)

Uploaded CPython 3.10 macOS 12.0+ ARM64

quicktex-0.3.1-cp39-cp39-win_amd64.whl (3.1 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

quicktex-0.3.1-cp39-cp39-musllinux_1_2_x86_64.whl (9.3 MB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.2+ x86-64

quicktex-0.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.3 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

quicktex-0.3.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.2 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

quicktex-0.3.1-cp39-cp39-macosx_12_0_x86_64.whl (1.0 MB view hashes)

Uploaded CPython 3.9 macOS 12.0+ x86-64

quicktex-0.3.1-cp39-cp39-macosx_12_0_arm64.whl (1.0 MB view hashes)

Uploaded CPython 3.9 macOS 12.0+ ARM64

Supported by

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