Go to file
dependabot[bot] 72286b60b5
Bump actions/setup-python from 4.3.0 to 4.4.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.3.0 to 4.4.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4.3.0...v4.4.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-23 11:13:16 +00:00
.github Bump actions/setup-python from 4.3.0 to 4.4.0 2022-12-23 11:13:16 +00:00
docs Add file documenting development environment setup 2022-05-11 23:22:51 -07:00
quicktex use scoped lock 2022-05-22 20:59:37 -07:00
tests Migrate tests to pytest 2022-05-22 18:40:13 -07:00
tools use pybind11-stubgen instead 2021-04-03 23:52:42 -07:00
.clang-format Flesh out usage of block classes more 2021-02-05 19:44:19 -08:00
.clang-tidy Flesh out usage of block classes more 2021-02-05 19:44:19 -08:00
.git-blame-ignore-revs Ignore previous commit in blames 2022-04-18 19:56:41 -07:00
.gitignore Ignore wheels and sdists 2022-04-16 22:40:54 -07:00
.readthedocs.yaml Enable RTD building 2022-04-19 21:55:00 -07:00
CHANGELOG.md Update pybind to 3.10 to allow Python 3.11 support 2022-10-29 21:03:12 -07:00
CMakeLists.txt Remove debug wrapper, now that I know how to use a debug python build 2022-05-10 22:08:01 -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
pyproject.toml Update pybind to 3.10 to allow Python 3.11 support 2022-10-29 21:03:12 -07:00
README.md metadata and readme fixes 2021-04-12 22:11:34 -07:00
setup.py Remove debug wrapper, now that I know how to use a debug python build 2022-05-10 22:08:01 -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.