PVRTexTool Library#

PVRTexLib provides much of the same functionality as PVRTexTool GUI or CLI, including:

  • Loading from and saving to any supported file formats including:

    • PVR, KTX, KTX2, DDS, and BASIS;


  • Transcoding between many different (un)compressed texture formats.

  • Performing a variety of pre-processing techniques on decompressed pixel data.

  • Providing information about a texture file loaded by the library.

PVRTexLib for C/C++ Developers#

For maximum compatibility across all projects, systems and compilers we provide an easy to use C API (with optional C++ wrapper), along with shared libraries for Windows, Linux and macOS. Applications wanting to access the functionality of PVRTexLib can simply include the appropriate header file and dynamically link to the shared libraries provided.

The following dynamic library files are provided as part of the PVRTexTool installation:

  • PVRTexLib.dll (Windows dynamic link library)

  • libPVRTexLib.so (Linux shared object library)

  • libPVRTexLib.dylib (macOS dynamic library)

Shared libraries are located in the following directory: <SDK_ROOT>\PowerVR_Tools\PVRTexTool\Library\<OS>


When using PVRTexLib on Windows the pre-processor variable PVRTEXLIB_IMPORT should be defined when building your application.

The PVRTexLib API is defined in the following header files:

  • PVRTexLib.h → Pure C API, defines all PVRTexLib entry points.

  • PVRTexLib.hpp → Optional C++ convenience wrapper around the C API.

  • PVRTexLibDefines.h → Common definitions of structs, macros, typedefs and enums.

  • PVRTextureVersion.h → Defines the PVRTexLib version information.

Users should include either PVRTexLib.h or PVRTexLib.hpp depending on whether the C or C++ interface is to be used. Header files are located in the following directory: <SDK_ROOT>\PowerVR_Tools\PVRTexTool\Library\Include

The full API documentation for PVRTexLib is available here.

PVRTexLibPy for Python Developers#

PVRTexLibPy wraps all of the functionality of PVRTexLib in a convenient Python module. To get started with PVRTexLibPy Python developers can import PVRTexLibPy directly into their project. The PVRTexLibPy module can be found in the following directory: <SDK_ROOT>\PowerVR_Tools\PVRTexTool\Library\<OS>

The full API documentation for PVRTexLibPy is available here.