---
title: "How to convert an image to DXT? (DDS or KTX 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-dxt"
product: "texturepacker"
source: "html"
---

# How to convert an image to DXT? (DDS or KTX file)

With TexturePacker's `--convert-texture` command line option you can easily convert a single image to a different format:

```bash
TexturePacker --convert-texture input.png \
              --pixel-format DXT5 --texture-format ktx
```

The _pixel format_ specifies the compression algorithm to use, the _texture format_ describes the file container. The following formats are supported for S3TC/DXT/BCn compression:

| Pixel format | Bits per pixel | Description |
| --- | ---: | :--- |
| `DXT1` | 4   | DXT1 compression, 1 bit transparency |
| `DXT5` | 8   | DXT5 compression, transparency |

| Texture Format | Description |
| :--- | :--- |
| `dds` | DirectDraw Surface. Standard format for DirectX applications. |
| `ktx` | Khronos Texture. Standard container for OpenGL ES textures. |
| `ktx2` | Khronos Texture (Version 2). Newer format with Basis Universal support. |
| `zktx` | Khronos Texture (gzip compressed). KTX file compressed for smaller storage. |
| `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 [quantization](https://www.codeandweb.com/texturepacker/documentation/texture-settings#image-quality) can be configured with `--dxt-mode [DXT_LINEAR|DXT_PERCEPTUAL]`, default value is DXT\_PERCEPTUAL.  
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 DXT? (DDS or KTX file)"
}
```
