no-vtf


Nameno-vtf JSON
Version 5.1.0 PyPI version JSON
download
home_pagehttps://git.sr.ht/~b5327157/no_vtf
SummaryValve Texture Format Converter
upload_time2024-12-13 20:43:56
maintainerNone
docs_urlNone
authorb5327157
requires_python>=3.10
licenseGPL-3.0-only
keywords source engine vtf valve texture format
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # no_vtf

Say no to [.vtf](https://developer.valvesoftware.com/wiki/Valve_Texture_Format) – convert it to one of the standard image formats.

![Badge showing supported Python versions](https://img.shields.io/pypi/pyversions/no_vtf?style=flat-square)
[![Badge showing package version on PyPI](https://img.shields.io/pypi/v/no_vtf?style=flat-square)](https://pypi.org/project/no-vtf/)
[![Badge showing number of monthly downloads from PyPI](https://img.shields.io/pypi/dm/no_vtf?style=flat-square)](https://pypistats.org/packages/no-vtf)
[![Badge showing source code repository hosted on SourceHut](https://img.shields.io/badge/sr.ht-repository-white?labelColor=212529&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgdmlld0JveD0iMCAwIDUxMiA1MTIiCiAgIHZlcnNpb249IjEuMSIKICAgaWQ9InN2ZzUxIgogICBzb2RpcG9kaTpkb2NuYW1lPSJzb3VyY2VodXQtd2hpdGUuc3ZnIgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjEgKGM2OGUyMmMzODcsIDIwMjEtMDUtMjMpIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzCiAgICAgaWQ9ImRlZnM1NSIgLz4KICA8c29kaXBvZGk6bmFtZWR2aWV3CiAgICAgaWQ9Im5hbWVkdmlldzUzIgogICAgIHBhZ2Vjb2xvcj0iIzUwNTA1MCIKICAgICBib3JkZXJjb2xvcj0iI2ZmZmZmZiIKICAgICBib3JkZXJvcGFjaXR5PSIxIgogICAgIGlua3NjYXBlOnBhZ2VzaGFkb3c9IjAiCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAiCiAgICAgaW5rc2NhcGU6cGFnZWNoZWNrZXJib2FyZD0iMSIKICAgICBzaG93Z3JpZD0iZmFsc2UiCiAgICAgaW5rc2NhcGU6em9vbT0iMS42NTQyOTY5IgogICAgIGlua3NjYXBlOmN4PSIyNTYiCiAgICAgaW5rc2NhcGU6Y3k9IjI1NiIKICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE5MjAiCiAgICAgaW5rc2NhcGU6d2luZG93LWhlaWdodD0iMTA1OSIKICAgICBpbmtzY2FwZTp3aW5kb3cteD0iMCIKICAgICBpbmtzY2FwZTp3aW5kb3cteT0iMCIKICAgICBpbmtzY2FwZTp3aW5kb3ctbWF4aW1pemVkPSIxIgogICAgIGlua3NjYXBlOmN1cnJlbnQtbGF5ZXI9InN2ZzUxIiAvPgogIDxwYXRoCiAgICAgZD0iTTI1NiA4QzExOSA4IDggMTE5IDggMjU2czExMSAyNDggMjQ4IDI0OCAyNDgtMTExIDI0OC0yNDhTMzkzIDggMjU2IDh6bTAgNDQ4Yy0xMTAuNSAwLTIwMC04OS41LTIwMC0yMDBTMTQ1LjUgNTYgMjU2IDU2czIwMCA4OS41IDIwMCAyMDAtODkuNSAyMDAtMjAwIDIwMHoiCiAgICAgaWQ9InBhdGg0OSIKICAgICBzdHlsZT0iZmlsbDojZmZmZmZmIiAvPgo8L3N2Zz4K)](https://git.sr.ht/~b5327157/no_vtf)
[![Badge showing builds.sr.ht status](https://builds.sr.ht/~b5327157/no_vtf/commits.svg)](https://builds.sr.ht/~b5327157/no_vtf/commits)
[![Badge showing REUSE compliance status](https://api.reuse.software/badge/git.sr.ht/~b5327157/no_vtf)](https://api.reuse.software/info/git.sr.ht/~b5327157/no_vtf)
[![Badge showing compliance with OpenSSF Best Practices](https://www.bestpractices.dev/projects/8316/badge)](https://www.bestpractices.dev/en/projects/8316)
[![Badge showing Nox as the chosen Python automation toolkit](https://img.shields.io/badge/🦊-Nox-D85E00.svg)](https://nox.thea.codes/en/stable/)

![Screencast showing conversion of sprays downloaded in Team Fortress 2 using no_vtf](https://git.sr.ht/~b5327157/no_vtf/blob/HEAD/resources/docs/screencast_v4.gif)

---

⌂ [**Project pages**](https://sr.ht/~b5327157/no_vtf/sources)  
\# [**Source code**](https://git.sr.ht/~b5327157/no_vtf/tree)  
\~ [**Changelog**](https://git.sr.ht/~b5327157/no_vtf/refs)  
\> [**Mailing list**](https://lists.sr.ht/~b5327157/no_vtf)  
\+ [**Ticket tracker**](https://todo.sr.ht/~b5327157/no_vtf)  
❡ [**Wiki**](https://developer.valvesoftware.com/wiki/no_vtf)  

---

## Highlights

- cross-platform – runs on any machine where Python is supported
- console-only – runs without a graphical interface
- full HDR support (including [compressed HDR](https://developer.valvesoftware.com/wiki/Valve_Texture_Format#HDR_compression))
- parallel conversion – uses all available resources to speed up the process
- proper decoding of the `ARGB8888` format (VTFLib/VTFEdit handles the format [incorrectly](https://github.com/NeilJed/VTFLib/issues/13))
- formally described .vtf file format (via [Kaitai Struct](https://kaitai.io))
- test suite against crafted .vtf files and reference output
- desktop environment integration via [no_vtf-desktop](https://git.sr.ht/~b5327157/no_vtf-desktop) (Linux-only)

## Installation

### Application bundle

For Linux and Windows running on x64, application bundles (with the Python interpreter included) are available for download. Below are links to the latest stable version.

- [**no_vtf-linux_x64.tar.xz**](https://b5327157.srht.site/no_vtf/release/no_vtf-linux_x64.tar.xz) (glibc 2.31 or newer required, i.e. Debian 11, Ubuntu 20.04 LTS, …)
- [**no_vtf-windows_x64.zip**](https://b5327157.srht.site/no_vtf/release/no_vtf-windows_x64.zip) (Windows 10 or newer required)

Starting from v4.2.0, application bundles GPG-signed with [`0x1C3724DFF9CEAF64`](https://meta.sr.ht/~b5327157.pgp) are also attached to the [tagged versions](https://git.sr.ht/~b5327157/no_vtf/refs).

Bundles are ready to be used offline – the FreeImage library is already included.

### Package

If you have Python 3.10 or newer, you can install the [**no_vtf**](https://pypi.org/project/no-vtf/) package from PyPI directly. An optional desktop integration is available via the [**no_vtf-desktop**](https://pypi.org/project/no-vtf-desktop/) package.

Before the first conversion, the FreeImage library will be downloaded to support the process. Further conversions are supported offline.

As of [PEP 668](https://peps.python.org/pep-0668/), it is recommended to install the package into a virtual environment.

#### Automated installation (via [pipx](https://pipx.pypa.io/stable/))

```
pipx install no_vtf

no_vtf ...
```

#### Manual installation

```
python3 -m venv no_vtf-venv

source no_vtf-venv/bin/activate  # Linux
no_vtf-venv/scripts/activate  %= Windows =%

python3 -m pip install no_vtf

no_vtf ...
```

## Usage

#### General invocation

```
no_vtf [OPTIONS] [--] PATH...
```

PATH can be either file or directory. Multiple paths may be provided.

Tip: With bundles, drag-and-drop files or folders to be converted onto the application launcher (the file with icon and no extension on Linux and the .exe file on Windows).

#### Change output directory

```
no_vtf --output-dir /tmp PATH...
```

#### Override LDR/HDR output format

```
no_vtf --ldr-format png --hdr-format tiff PATH...
```

#### Set FPS for animated textures

```
no_vtf --animate --fps 20 PATH...
```

#### LDR-only VTF2TGA-like conversion

```
no_vtf --no-animate --ldr-format tga --hdr-format skip PATH...
```

#### Further help

```
no_vtf --help
```

## Supported formats

### Input

#### Official VTF versions (7.0-7.5)

All [image formats](https://developer.valvesoftware.com/wiki/VTF_(Valve_Texture_Format)#Image_format) that are stable across [Source Engine](https://developer.valvesoftware.com/wiki/Source) branches are supported.
It should be possible to convert all textures installed with games based on a first-party Source Engine branch, such as [Team Fortress 2](https://store.steampowered.com/app/440/Team_Fortress_2/), [Source Filmmaker](https://store.steampowered.com/app/1840/Source_Filmmaker/) and [Portal 2](https://store.steampowered.com/app/620/Portal_2/).

- `RGBA8888`
- `ABGR8888`
- `RGB888`
- `BGR888`
- `RGB565`
- `I8`
- `IA88`
- `A8`
- `RGB888_BLUESCREEN`
- `BGR888_BLUESCREEN`
- `ARGB8888`
- `BGRA8888`
- `DXT1`
- `DXT3`
- `DXT5`
- `BGRX8888`
- `BGR565`
- `BGRX5551`
- `BGRA4444`
- `DXT1_ONEBITALPHA`
- `BGRA5551`
- `UV88`
- `UVWQ8888`
- `RGBA16161616F`
- `RGBA16161616`
- `UVLX8888`

The following [additional formats in Strata Source](https://developer.valvesoftware.com/wiki/VTF_(Valve_Texture_Format)#Additional_formats_in_Strata_Source) are supported.

- `ATI2N`
- `ATI1N`
- `BC7`

### Output

The following formats were tested and optimized for use:

#### LDR

- PNG, APNG
- TGA
- TIFF (default)

#### HDR

- EXR (default)
- TIFF

It is also possible to select other [formats](https://imageio.readthedocs.io/en/stable/formats/index.html) supported by Imageio.

## Known issues

### Color space

Color space of LDR textures is inferred from the context in which the texture is used in-game. Since this context is not available when converting the .vtf files directly, color space metadata for the output images cannot be set.

Color space of HDR textures is always linear. It would make sense to set this metadata when converting into the TIFF format, but for technical reasons, this is not done.

### Compatibility

#### R/G/B/A value differences

For the compressed formats (such as DXT) and for the less precise formats (such as RGB565), the output R/G/B/A values might not match bit-for-bit.
This is typically due to rounding differences or different methods used to calculate the lower bits during decoding.

#### Alpha handling

A permissive approach is used when handling alpha channels.
If alpha is physically present in the encoded data, it is included in the output when either the format or flags (`onebitalpha`/`eightbitalpha`) indicate its validity.
This applies to the `DXT1` format and formats having the fourth 'X' channel (`BGRX8888`, `BGRX5551`, `UVLX8888`), where alpha would otherwise be ignored if no alpha flag were set.

### Animated output

Image frames in the output file might not be stored exactly as they appear in the original .vtf file.
For instance, consecutive identical frames might be merged into a single frame with a longer duration.

## Benchmark

- Sample: 11 GiB of LDR .vtf files
- CPU: Intel Core i7-6500U

Size is the total disk usage consumed by the output.
Conversion was done without extraction of all mipmaps.

### Compressed PNG, parallel

Time is the wall clock time.

- 1 worker: 9.71 minutes
- 2 workers: 5.45 minutes
- 3 workers: 4.18 minutes
- 4 workers: 3.77 minutes

### Uncompressed, sequential

Time is the total CPU time spent in user and kernel mode.

- PNG: 10.35 minutes
- TGA: 2.69 minutes
- TIFF: 3.27 minutes

In all three cases, the size was 33 GiB.

### Compressed, sequential

Time is the total CPU time spent in user and kernel mode.

- PNG: 5.9 GiB, 12.56 minutes
- TGA: 14 GiB, 3.77 minutes
- TIFF: 6.9 GiB, 8.81 minutes

## Contributing / Getting help

Please refer to [CONTRIBUTING.md](https://git.sr.ht/~b5327157/no_vtf/tree/master/CONTRIBUTING.md).

## License

This package is free and open-source software, licensed under [GNU LGPL v3.0 or later](https://spdx.org/licenses/LGPL-3.0-or-later.html), except of image IO done with the help of the [ImageIO](https://imageio.readthedocs.io/en/stable/_autosummary/imageio.plugins.freeimage.html) [FreeImage](https://freeimage.sourceforge.io/) plugin. This makes the entire package effectively licensed under [GNU GPL v3.0 only](https://spdx.org/licenses/GPL-3.0-only.html). If you make use of the image IO part (either directly or indirectly) when linking to no_vtf as a library, the combined work is licensed under the latter license.

            

Raw data

            {
    "_id": null,
    "home_page": "https://git.sr.ht/~b5327157/no_vtf",
    "name": "no-vtf",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "Source Engine, VTF, Valve Texture Format",
    "author": "b5327157",
    "author_email": "b5327157@protonmail.com",
    "download_url": "https://files.pythonhosted.org/packages/da/31/bf510331c4952318ca9462514172261af1fec322e57da011fe7de9edeaed/no_vtf-5.1.0.tar.gz",
    "platform": null,
    "description": "# no_vtf\n\nSay no to [.vtf](https://developer.valvesoftware.com/wiki/Valve_Texture_Format) \u2013 convert it to one of the standard image formats.\n\n![Badge showing supported Python versions](https://img.shields.io/pypi/pyversions/no_vtf?style=flat-square)\n[![Badge showing package version on PyPI](https://img.shields.io/pypi/v/no_vtf?style=flat-square)](https://pypi.org/project/no-vtf/)\n[![Badge showing number of monthly downloads from PyPI](https://img.shields.io/pypi/dm/no_vtf?style=flat-square)](https://pypistats.org/packages/no-vtf)\n[![Badge showing source code repository hosted on SourceHut](https://img.shields.io/badge/sr.ht-repository-white?labelColor=212529&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgdmlld0JveD0iMCAwIDUxMiA1MTIiCiAgIHZlcnNpb249IjEuMSIKICAgaWQ9InN2ZzUxIgogICBzb2RpcG9kaTpkb2NuYW1lPSJzb3VyY2VodXQtd2hpdGUuc3ZnIgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjEgKGM2OGUyMmMzODcsIDIwMjEtMDUtMjMpIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzCiAgICAgaWQ9ImRlZnM1NSIgLz4KICA8c29kaXBvZGk6bmFtZWR2aWV3CiAgICAgaWQ9Im5hbWVkdmlldzUzIgogICAgIHBhZ2Vjb2xvcj0iIzUwNTA1MCIKICAgICBib3JkZXJjb2xvcj0iI2ZmZmZmZiIKICAgICBib3JkZXJvcGFjaXR5PSIxIgogICAgIGlua3NjYXBlOnBhZ2VzaGFkb3c9IjAiCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAiCiAgICAgaW5rc2NhcGU6cGFnZWNoZWNrZXJib2FyZD0iMSIKICAgICBzaG93Z3JpZD0iZmFsc2UiCiAgICAgaW5rc2NhcGU6em9vbT0iMS42NTQyOTY5IgogICAgIGlua3NjYXBlOmN4PSIyNTYiCiAgICAgaW5rc2NhcGU6Y3k9IjI1NiIKICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE5MjAiCiAgICAgaW5rc2NhcGU6d2luZG93LWhlaWdodD0iMTA1OSIKICAgICBpbmtzY2FwZTp3aW5kb3cteD0iMCIKICAgICBpbmtzY2FwZTp3aW5kb3cteT0iMCIKICAgICBpbmtzY2FwZTp3aW5kb3ctbWF4aW1pemVkPSIxIgogICAgIGlua3NjYXBlOmN1cnJlbnQtbGF5ZXI9InN2ZzUxIiAvPgogIDxwYXRoCiAgICAgZD0iTTI1NiA4QzExOSA4IDggMTE5IDggMjU2czExMSAyNDggMjQ4IDI0OCAyNDgtMTExIDI0OC0yNDhTMzkzIDggMjU2IDh6bTAgNDQ4Yy0xMTAuNSAwLTIwMC04OS41LTIwMC0yMDBTMTQ1LjUgNTYgMjU2IDU2czIwMCA4OS41IDIwMCAyMDAtODkuNSAyMDAtMjAwIDIwMHoiCiAgICAgaWQ9InBhdGg0OSIKICAgICBzdHlsZT0iZmlsbDojZmZmZmZmIiAvPgo8L3N2Zz4K)](https://git.sr.ht/~b5327157/no_vtf)\n[![Badge showing builds.sr.ht status](https://builds.sr.ht/~b5327157/no_vtf/commits.svg)](https://builds.sr.ht/~b5327157/no_vtf/commits)\n[![Badge showing REUSE compliance status](https://api.reuse.software/badge/git.sr.ht/~b5327157/no_vtf)](https://api.reuse.software/info/git.sr.ht/~b5327157/no_vtf)\n[![Badge showing compliance with OpenSSF Best Practices](https://www.bestpractices.dev/projects/8316/badge)](https://www.bestpractices.dev/en/projects/8316)\n[![Badge showing Nox as the chosen Python automation toolkit](https://img.shields.io/badge/\ud83e\udd8a-Nox-D85E00.svg)](https://nox.thea.codes/en/stable/)\n\n![Screencast showing conversion of sprays downloaded in Team Fortress 2 using no_vtf](https://git.sr.ht/~b5327157/no_vtf/blob/HEAD/resources/docs/screencast_v4.gif)\n\n---\n\n\u2302 [**Project pages**](https://sr.ht/~b5327157/no_vtf/sources)  \n\\# [**Source code**](https://git.sr.ht/~b5327157/no_vtf/tree)  \n\\~ [**Changelog**](https://git.sr.ht/~b5327157/no_vtf/refs)  \n\\> [**Mailing list**](https://lists.sr.ht/~b5327157/no_vtf)  \n\\+ [**Ticket tracker**](https://todo.sr.ht/~b5327157/no_vtf)  \n\u2761 [**Wiki**](https://developer.valvesoftware.com/wiki/no_vtf)  \n\n---\n\n## Highlights\n\n- cross-platform \u2013 runs on any machine where Python is supported\n- console-only \u2013 runs without a graphical interface\n- full HDR support (including [compressed HDR](https://developer.valvesoftware.com/wiki/Valve_Texture_Format#HDR_compression))\n- parallel conversion \u2013 uses all available resources to speed up the process\n- proper decoding of the `ARGB8888` format (VTFLib/VTFEdit handles the format [incorrectly](https://github.com/NeilJed/VTFLib/issues/13))\n- formally described .vtf file format (via [Kaitai Struct](https://kaitai.io))\n- test suite against crafted .vtf files and reference output\n- desktop environment integration via [no_vtf-desktop](https://git.sr.ht/~b5327157/no_vtf-desktop) (Linux-only)\n\n## Installation\n\n### Application bundle\n\nFor Linux and Windows running on x64, application bundles (with the Python interpreter included) are available for download. Below are links to the latest stable version.\n\n- [**no_vtf-linux_x64.tar.xz**](https://b5327157.srht.site/no_vtf/release/no_vtf-linux_x64.tar.xz) (glibc 2.31 or newer required, i.e. Debian 11, Ubuntu 20.04 LTS, \u2026)\n- [**no_vtf-windows_x64.zip**](https://b5327157.srht.site/no_vtf/release/no_vtf-windows_x64.zip) (Windows 10 or newer required)\n\nStarting from v4.2.0, application bundles GPG-signed with [`0x1C3724DFF9CEAF64`](https://meta.sr.ht/~b5327157.pgp) are also attached to the [tagged versions](https://git.sr.ht/~b5327157/no_vtf/refs).\n\nBundles are ready to be used offline \u2013 the FreeImage library is already included.\n\n### Package\n\nIf you have Python 3.10 or newer, you can install the [**no_vtf**](https://pypi.org/project/no-vtf/) package from PyPI directly. An optional desktop integration is available via the [**no_vtf-desktop**](https://pypi.org/project/no-vtf-desktop/) package.\n\nBefore the first conversion, the FreeImage library will be downloaded to support the process. Further conversions are supported offline.\n\nAs of [PEP 668](https://peps.python.org/pep-0668/), it is recommended to install the package into a virtual environment.\n\n#### Automated installation (via [pipx](https://pipx.pypa.io/stable/))\n\n```\npipx install no_vtf\n\nno_vtf ...\n```\n\n#### Manual installation\n\n```\npython3 -m venv no_vtf-venv\n\nsource no_vtf-venv/bin/activate  # Linux\nno_vtf-venv/scripts/activate  %= Windows =%\n\npython3 -m pip install no_vtf\n\nno_vtf ...\n```\n\n## Usage\n\n#### General invocation\n\n```\nno_vtf [OPTIONS] [--] PATH...\n```\n\nPATH can be either file or directory. Multiple paths may be provided.\n\nTip: With bundles, drag-and-drop files or folders to be converted onto the application launcher (the file with icon and no extension on Linux and the .exe file on Windows).\n\n#### Change output directory\n\n```\nno_vtf --output-dir /tmp PATH...\n```\n\n#### Override LDR/HDR output format\n\n```\nno_vtf --ldr-format png --hdr-format tiff PATH...\n```\n\n#### Set FPS for animated textures\n\n```\nno_vtf --animate --fps 20 PATH...\n```\n\n#### LDR-only VTF2TGA-like conversion\n\n```\nno_vtf --no-animate --ldr-format tga --hdr-format skip PATH...\n```\n\n#### Further help\n\n```\nno_vtf --help\n```\n\n## Supported formats\n\n### Input\n\n#### Official VTF versions (7.0-7.5)\n\nAll [image formats](https://developer.valvesoftware.com/wiki/VTF_(Valve_Texture_Format)#Image_format) that are stable across [Source Engine](https://developer.valvesoftware.com/wiki/Source) branches are supported.\nIt should be possible to convert all textures installed with games based on a first-party Source Engine branch, such as [Team Fortress 2](https://store.steampowered.com/app/440/Team_Fortress_2/), [Source Filmmaker](https://store.steampowered.com/app/1840/Source_Filmmaker/) and [Portal 2](https://store.steampowered.com/app/620/Portal_2/).\n\n- `RGBA8888`\n- `ABGR8888`\n- `RGB888`\n- `BGR888`\n- `RGB565`\n- `I8`\n- `IA88`\n- `A8`\n- `RGB888_BLUESCREEN`\n- `BGR888_BLUESCREEN`\n- `ARGB8888`\n- `BGRA8888`\n- `DXT1`\n- `DXT3`\n- `DXT5`\n- `BGRX8888`\n- `BGR565`\n- `BGRX5551`\n- `BGRA4444`\n- `DXT1_ONEBITALPHA`\n- `BGRA5551`\n- `UV88`\n- `UVWQ8888`\n- `RGBA16161616F`\n- `RGBA16161616`\n- `UVLX8888`\n\nThe following [additional formats in Strata Source](https://developer.valvesoftware.com/wiki/VTF_(Valve_Texture_Format)#Additional_formats_in_Strata_Source) are supported.\n\n- `ATI2N`\n- `ATI1N`\n- `BC7`\n\n### Output\n\nThe following formats were tested and optimized for use:\n\n#### LDR\n\n- PNG, APNG\n- TGA\n- TIFF (default)\n\n#### HDR\n\n- EXR (default)\n- TIFF\n\nIt is also possible to select other [formats](https://imageio.readthedocs.io/en/stable/formats/index.html) supported by Imageio.\n\n## Known issues\n\n### Color space\n\nColor space of LDR textures is inferred from the context in which the texture is used in-game. Since this context is not available when converting the .vtf files directly, color space metadata for the output images cannot be set.\n\nColor space of HDR textures is always linear. It would make sense to set this metadata when converting into the TIFF format, but for technical reasons, this is not done.\n\n### Compatibility\n\n#### R/G/B/A value differences\n\nFor the compressed formats (such as DXT) and for the less precise formats (such as RGB565), the output R/G/B/A values might not match bit-for-bit.\nThis is typically due to rounding differences or different methods used to calculate the lower bits during decoding.\n\n#### Alpha handling\n\nA permissive approach is used when handling alpha channels.\nIf alpha is physically present in the encoded data, it is included in the output when either the format or flags (`onebitalpha`/`eightbitalpha`) indicate its validity.\nThis applies to the `DXT1` format and formats having the fourth 'X' channel (`BGRX8888`, `BGRX5551`, `UVLX8888`), where alpha would otherwise be ignored if no alpha flag were set.\n\n### Animated output\n\nImage frames in the output file might not be stored exactly as they appear in the original .vtf file.\nFor instance, consecutive identical frames might be merged into a single frame with a longer duration.\n\n## Benchmark\n\n- Sample: 11 GiB of LDR .vtf files\n- CPU: Intel Core i7-6500U\n\nSize is the total disk usage consumed by the output.\nConversion was done without extraction of all mipmaps.\n\n### Compressed PNG, parallel\n\nTime is the wall clock time.\n\n- 1 worker: 9.71 minutes\n- 2 workers: 5.45 minutes\n- 3 workers: 4.18 minutes\n- 4 workers: 3.77 minutes\n\n### Uncompressed, sequential\n\nTime is the total CPU time spent in user and kernel mode.\n\n- PNG: 10.35 minutes\n- TGA: 2.69 minutes\n- TIFF: 3.27 minutes\n\nIn all three cases, the size was 33 GiB.\n\n### Compressed, sequential\n\nTime is the total CPU time spent in user and kernel mode.\n\n- PNG: 5.9 GiB, 12.56 minutes\n- TGA: 14 GiB, 3.77 minutes\n- TIFF: 6.9 GiB, 8.81 minutes\n\n## Contributing / Getting help\n\nPlease refer to [CONTRIBUTING.md](https://git.sr.ht/~b5327157/no_vtf/tree/master/CONTRIBUTING.md).\n\n## License\n\nThis package is free and open-source software, licensed under [GNU LGPL v3.0 or later](https://spdx.org/licenses/LGPL-3.0-or-later.html), except of image IO done with the help of the [ImageIO](https://imageio.readthedocs.io/en/stable/_autosummary/imageio.plugins.freeimage.html) [FreeImage](https://freeimage.sourceforge.io/) plugin. This makes the entire package effectively licensed under [GNU GPL v3.0 only](https://spdx.org/licenses/GPL-3.0-only.html). If you make use of the image IO part (either directly or indirectly) when linking to no_vtf as a library, the combined work is licensed under the latter license.\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-only",
    "summary": "Valve Texture Format Converter",
    "version": "5.1.0",
    "project_urls": {
        "Changelog": "https://git.sr.ht/~b5327157/no_vtf/refs",
        "Download": "https://git.sr.ht/~b5327157/no_vtf/#application-bundle",
        "Homepage": "https://git.sr.ht/~b5327157/no_vtf",
        "Mailing list": "https://lists.sr.ht/~b5327157/no_vtf",
        "Ticket tracker": "https://todo.sr.ht/~b5327157/no_vtf",
        "Wiki": "https://developer.valvesoftware.com/wiki/no_vtf"
    },
    "split_keywords": [
        "source engine",
        " vtf",
        " valve texture format"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "82a929de3558afd9f76d7acc82ebd68de59b55b180ee383f53cb0c8dc2722c7d",
                "md5": "06aaf67083bbe3267f298f49b183c27f",
                "sha256": "7d3f8acef8eb874d0a507606df32d32e44471bde03e0a97d5caf6e9371771f4f"
            },
            "downloads": -1,
            "filename": "no_vtf-5.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "06aaf67083bbe3267f298f49b183c27f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 76946,
            "upload_time": "2024-12-13T20:43:53",
            "upload_time_iso_8601": "2024-12-13T20:43:53.472155Z",
            "url": "https://files.pythonhosted.org/packages/82/a9/29de3558afd9f76d7acc82ebd68de59b55b180ee383f53cb0c8dc2722c7d/no_vtf-5.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "da31bf510331c4952318ca9462514172261af1fec322e57da011fe7de9edeaed",
                "md5": "44c0d041f9e49bf946120fb410759503",
                "sha256": "4cbbcf7ba770e9d492af2c38256cdf4633a5c2eb08b986cfdcac30d29ac87b97"
            },
            "downloads": -1,
            "filename": "no_vtf-5.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "44c0d041f9e49bf946120fb410759503",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 1081280,
            "upload_time": "2024-12-13T20:43:56",
            "upload_time_iso_8601": "2024-12-13T20:43:56.156616Z",
            "url": "https://files.pythonhosted.org/packages/da/31/bf510331c4952318ca9462514172261af1fec322e57da011fe7de9edeaed/no_vtf-5.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-13 20:43:56",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "no-vtf"
}
        
Elapsed time: 0.57382s