You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Andrew Cassidy ec7953dcff Release 0.2.0
### Changed

- Updated Pybind11 to version 3.10, adding Python 3.11 support
- Updated install instructions in readme to reflect availability on PyPI
- Encode now skips .dds files in its input to prevent needless re-encoding

### Added

- Added the `-n` option for bc3 encoding to perform a BC3nm swizzle
10 months ago
.github Merge branch 'dev' 1 year ago
docs Add file documenting development environment setup 2 years ago
quicktex Skip any dds files when encoding 10 months ago
tests Migrate tests to pytest 2 years ago
tools use pybind11-stubgen instead 3 years ago
.clang-format Flesh out usage of block classes more 3 years ago
.clang-tidy Flesh out usage of block classes more 3 years ago
.git-blame-ignore-revs Ignore previous commit in blames 2 years ago
.gitignore Ignore wheels and sdists 2 years ago
.readthedocs.yaml Enable RTD building 2 years ago
CHANGELOG.md Release 0.2.0 10 months ago
CMakeLists.txt Remove debug wrapper, now that I know how to use a debug python build 2 years ago
DEVELOPMENT.md Add file documenting development environment setup 2 years ago
LICENSE.md I changed my mind. 3 years ago
README.md Update readme with easier install directions 10 months ago
pyproject.toml Fix docs link 10 months ago
setup.py Remove debug wrapper, now that I know how to use a debug python build 2 years ago

README.md

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.