Go to file
2022-06-22 22:32:19 -07:00
.github Build on macOS 12 2022-05-31 01:16:18 -07:00
docs Add file documenting development environment setup 2022-05-11 23:22:51 -07:00
external Remove utest 2022-06-20 18:42:31 -07:00
quicktex First trial run using the Matrix type 2022-06-22 22:32:19 -07:00
tests Attempt to batch some matrix ops 2022-06-22 00:39:36 -07:00
tools Tweak compiler warnings 2022-05-24 21:33:39 -07:00
.clang-format Fixes and tweaks to whadd 2022-05-22 16:38:54 -07:00
.clang-tidy Add Vector template class 2022-05-29 15:54:55 -07:00
.git-blame-ignore-revs Ignore previous commit in blames 2022-04-18 19:56:41 -07:00
.gitignore Remove utest 2022-06-20 18:42:31 -07:00
.gitmodules Remove utest 2022-06-20 18:42:31 -07:00
.readthedocs.yaml Enable RTD building 2022-04-19 21:55:00 -07:00
CHANGELOG.md Fix LeastSquares mode and add tests for every quality level 2022-05-24 22:57:51 -07:00
CMakeLists.txt Remove utest 2022-06-20 18:42:31 -07:00
DEVELOPMENT.md Add file documenting development environment setup 2022-05-11 23:22:51 -07:00
LICENSE.md I changed my mind. 2021-02-13 01:32:15 -08:00
MANIFEST.in Spell external correctly and exclude all affinity designer files 2022-05-13 00:51:39 -07:00
pyproject.toml Don't build wheels for musl 2022-05-29 20:37:49 -07:00
README.md metadata and readme fixes 2021-04-12 22:11:34 -07:00
setup.py Move clang-cl detection to cmake and allow it when setting flags 2022-05-16 23:41:42 -07:00

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

To install, 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]

Quicktex will be available on Pypi once it is out of alpha.

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.