Go to file
Andrew Cassidy e488dbcbff Fix builder version
and here I was thinking this was semver smh
2022-04-01 21:07:57 -07:00
.github/workflows Fix builder version 2022-04-01 21:07:57 -07:00
docs some util functions 2021-03-24 21:45:05 -07:00
extern initial commit 2021-01-28 14:40:01 -08:00
quicktex Fix alpha premultiplication being used when generating mipmaps 2021-09-28 20:40:01 -07:00
tests Remove test images as a submodule 2021-04-13 01:15:59 -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
.gitignore Remove test images as a submodule 2021-04-13 01:15:59 -07:00
.gitmodules Remove test images as a submodule 2021-04-13 01:15:59 -07:00
CHANGELOG.md Release 0.1.2 2022-03-27 14:29:57 -07:00
CMakeLists.txt Dont require findpython mode 2021-05-08 19:54:16 -07:00
LICENSE.md I changed my mind. 2021-02-13 01:32:15 -08:00
MANIFEST.in Add manifest file 2022-03-27 14:28:17 -07:00
pyproject.toml Move build requirements to pyproject.toml 2021-04-13 19:22:11 -07:00
README.md metadata and readme fixes 2021-04-12 22:11:34 -07:00
setup.py Include build for python 3.10 (finally) 2022-04-01 20:27:00 -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.