---
title: "How to convert an image to Basis Universal format? (BASIS or KTX2 file)"
description: "Use TexturePacker's \"--convert-texture\" option to convert a single PNG/JPG image to any other format."
canonical: "https://www.codeandweb.com/texturepacker/knowledgebase/convert-image-to-basisu"
product: "texturepacker"
source: "html"
---

# How to convert an image to Basis Universal format? (BASIS or KTX2 file)

Basis Universal is a GPU texture codec that creates highly portable compressed textures. Unlike format-specific compression (ASTC, ETC, DXT), Basis Universal files can be quickly transcoded to any GPU-native format at runtime. This makes it ideal for cross-platform applications where you need a single texture file that works on desktop, mobile, and web.

*   **ETC1S** offers the smallest file sizes, best for distribution over networks
*   **UASTC** provides higher quality, better suited for local storage

With TexturePacker's `--convert-texture` command line option you can easily convert a PNG image to Basis Universal format:

```bash
TexturePacker --convert-texture input.png --pixel-format BASISU_UASTC --texture-format BASIS
```

The _pixel format_ specifies the compression algorithm to use, the _texture format_ describes the file container. The following formats are supported for Basis Universal compression:

| Pixel format | Bits per pixel | Description |
| --- | ---: | :--- |
| `BASISU_ETC1S` | 0.3 - 1.25 | Compressed with Basis Universal ETC1S |
| `BASISU_UASTC` | 4 - 8 | Compressed with Basis Universal UASTC |

| Texture Format | Description |
| :--- | :--- |
| `basis` | Basis Universal compressed file. |
| `ktx2` | Khronos Texture (Version 2). Newer format with Basis Universal support. |
| `pvr3` | PowerVR Texture Format. Native format for iOS and PowerVR GPUs. |
| `pvr3gz` | PowerVR Texture Format, compressed with gzip. Smaller on disk, decompressed at load time. |
| `pvr3ccz` | PowerVR Texture Format, compressed with zlib, cocos2d header. |

The [Image quality](https://www.codeandweb.com/texturepacker/documentation/texture-settings#image-quality) can be configured with `--basisu-quality <0-4>`, default value is 2.  
For other options (scaling, trimming transparency, ...) have a look at the [Image conversion](https://www.codeandweb.com/texturepacker/documentation/image-conversion) documentation.

## Structured data

```json
{
  "@context": "https://schema.org",
  "@type": "TechArticle",
  "headline": "How to convert an image to Basis Universal format? (BASIS or KTX2 file)"
}
```
