Package: no-vtf
no_vtfSay no to.vtf– convert it to one of the standard image formats.⌂Project pages#Source code~Changelog>Mailing list+Ticket tracker❡WikiHighlightscross-platform – runs on any machine where Python is supportedconsole-only – runs without a graphical interfacefull HDR support (includingcompressed HDR)parallel conversion – uses all available resources to speed up the processproper decoding of theARGB8888format (VTFLib/VTFEdit handles the formatincorrectly)formally described .vtf file format (viaKaitai Struct)test suite against crafted .vtf files and reference outputdesktop environment integration viano_vtf-desktop(Linux-only)InstallationApplication bundleFor Linux and Windows running on x64, there are application bundles with the Python interpreter included. Below are links to the latest version.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(Windows 8.1 or newer required)Starting from v4.2.0, application bundles GPG-signed with0x1C3724DFF9CEAF64are also attached to thetagged versions.Bundles are ready to be used offline – the FreeImage library is already included.PackageIf you have Python 3.10 or newer, you can install thepackagefrom PyPI directly. An optional desktop integration is available via theno_vtf-desktoppackage.Before the first conversion, the FreeImage library will be downloaded to support the process. Further conversions are supported offline.As ofPEP 668, it is recommended to install the package into a virtual environment.Automated installation (viapipx)pipx install no_vtf

no_vtf ...Manual installationpython3 -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 ...UsageGeneral invocationno_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 directoryno_vtf --output-dir /tmp PATH...Override LDR/HDR output formatno_vtf --ldr-format png --hdr-format tiff PATH...Set FPS for animated texturesno_vtf --animate --fps 20 PATH...LDR-only VTF2TGA-like conversionno_vtf --no-animate --ldr-format tga --hdr-format skip PATH...Further helpno_vtf --helpSupported formatsInputAll textures installed with manySource Enginegames, includingTeam Fortress 2,Source FilmmakerandPortal 2, can be converted with the supported format set.RGBA8888ABGR8888RGB888BGR888I8IA88A8RGB888_BLUESCREENBGR888_BLUESCREENARGB8888BGRA8888DXT1DXT3DXT5BGRA4444DXT1_ONEBITALPHAUV88RGBA16161616FRGBA16161616All official VTF versions are supported (7.0-7.5).OutputThe following formats were tested and optimized for use:LDRPNG, APNGTGATIFF (default)HDREXR (default)TIFFIt is also possible to select otherformatssupported by Imageio.Known issuesColor spaceColor 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.Bit-perfect compatibility with VTF2TGASome textures (notably those using DXT compression) have up to ±1 difference in R/G/B values compared to the output of VTF2TGA. This might be caused by rounding errors in either implementation.Animated outputImage 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.BenchmarkSample: 11 GiB of LDR .vtf filesCPU: Intel Core i7-6500USize is the total disk usage consumed by the output.
Conversion was done without extraction of all mipmaps.Compressed PNG, parallelTime is the wall clock time.1 worker: 9.71 minutes2 workers: 5.45 minutes3 workers: 4.18 minutes4 workers: 3.77 minutesUncompressed, sequentialTime is the total CPU time spent in user and kernel mode.PNG: 10.35 minutesTGA: 2.69 minutesTIFF: 3.27 minutesIn all three cases, the size was 33 GiB.Compressed, sequentialTime is the total CPU time spent in user and kernel mode.PNG: 5.9 GiB, 12.56 minutesTGA: 14 GiB, 3.77 minutesTIFF: 6.9 GiB, 8.81 minutesContributing / Getting helpPlease refer toCONTRIBUTING.md.LicenseThe package is licensed underGNU LGPL v3.0 or later, except of image IO done with the help of theImageIOFreeImageplugin. This makes the entire package effectively licensed underGNU GPL v3.0 only. 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.