Skip to main content

Pillow logo

pyNVTT

About

A simple Python Wrapper for NVTT3 library, useful to convert most relevant images formats to DDS while doing modding or game development.


Installation

pip install pynvtt

Examples

Minimal PNG to DDS conversion.

from nvtt.surface import Surface
from nvtt.compression import CompressionOptions
from nvtt.output import OutputOptions
from nvtt.context import Context

surface = Surface("texture_01.png")
compression = CompressionOptions()
output = OutputOptions()
output.filename("texture_01.dds")
ctx = Context()
ctx.compress_all(surface, compression, output)

You can also use the EasyDDS class for your convenience.

from nvtt.easy_dds import EasyDDS

EasyDDS.convert_img("texture_01.png")

This will create a DXT1 DDS with default mipmap generation with the same name in the same path.


Converting a Pillow image.

from nvtt.surface import Surface
from nvtt.compression import CompressionOptions
from nvtt.output import OutputOptions
from nvtt.context import Context
from nvtt.enums import Format
from PIL import Image

img_surface = Surface(Image.open("texture_01.png"))

compression = CompressionOptions()
compression.format(Format.DXT1)

output = OutputOptions()
output.filename("texture_01.dds")

ctx = Context()
ctx.compress_all(img_surface, compression, output)

This will create a DXT1 DDS with default mipmap generation.


Features

  • NVTT 3.2.5 (with FreeImage 3.19.0.0)
  • Multiple formats support (Mostly every format supported by FreeImage):
    • .png
    • .tga
    • .webp
    • .jpg/.jpeg
    • .bmp
    • .tiff/.tif
    • .gif
    • .hdr
    • .dds
    • .psd
  • Partial API support: Includes Surface, Context, OutputOptions, and CompressionOptions.
  • Mipmap level detection, minimum level and no mipmaps.
  • Every DDS format supported (DXT1, DXT5, BC7, etc.)
  • CUDA Acceleration support.

License

Distributed under the CC0 License.

Metadata

Release files for pynvtt 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pynvtt 0.0.2
File Size Uploaded Provenance Actions
pynvtt-0.0.2.tar.gz 48.6 MB Without provenance Details for pynvtt-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pynvtt 0.0.2
File Interpreter ABI Platform Actions
pynvtt-0.0.2-py3-none-any.whl Python 3 none any Details for pynvtt-0.0.2-py3-none-any.whl

Total release size: 97.3 MB

Release files / pynvtt-0.0.2.tar.gz

Download URL pynvtt-0.0.2.tar.gz
Size 48.6 MB
Tags Source
SHA-256 checksum
How to use checksums
e468bbc38501064c80d30cc2512832d07dfe0e8d9621061468e90c150ae524db
BLAKE2b-256 checksum
How to use checksums
033d8261c1be6c314cc4af96f2bdb0b6c0188b7fcc9197259411a8af4a01791b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / pynvtt-0.0.2-py3-none-any.whl

Download URL pynvtt-0.0.2-py3-none-any.whl
Size 48.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
0572fe513bffeca73ce4d3aa5330362e4e9bde1699da6ca14270a7d0624894ca
BLAKE2b-256 checksum
How to use checksums
4dc032004069c4bab4654faa54936fb88a79ed9fc8aa8e72dd77ae86c6e97d97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Security for pynvtt 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page