---
title: "How to convert an image to ASTC format? (ASTC 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-format"
product: "texturepacker"
source: "html"
---

# How to convert an image to ASTC format? (ASTC 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 ASTC_6x6 --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 ASTC compression:

| Pixel format | Bits per pixel | Description |
| --- | ---: | :--- |
| `ASTC_4x4` | 8.00 | Compressed with ASTC 4x4 |
| `ASTC_5x4` | 6.40 | Compressed with ASTC 5x4 |
| `ASTC_5x5` | 5.12 | Compressed with ASTC 5x5 |
| `ASTC_6x5` | 4.27 | Compressed with ASTC 6x5 |
| `ASTC_6x6` | 3.56 | Compressed with ASTC 6x6 |
| `ASTC_8x5` | 3.20 | Compressed with ASTC 8x5 |
| `ASTC_8x6` | 2.67 | Compressed with ASTC 8x6 |
| `ASTC_8x8` | 2.00 | Compressed with ASTC 8x8 |
| `ASTC_10x5` | 2.56 | Compressed with ASTC 10x5 |
| `ASTC_10x6` | 2.13 | Compressed with ASTC 10x6 |
| `ASTC_10x8` | 1.60 | Compressed with ASTC 10x8 |
| `ASTC_10x10` | 1.28 | Compressed with ASTC 10x10 |
| `ASTC_12x10` | 1.07 | Compressed with ASTC 12x10 |
| `ASTC_12x12` | 0.89 | Compressed with ASTC 12x12 |

| Texture Format | Description |
| :--- | :--- |
| `astc` | ASTC texture file. Direct container for ASTC compressed data. |
| `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 [Image quality](https://www.codeandweb.com/texturepacker/documentation/texture-settings#image-quality) can be configured with `--astc-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 ASTC format? (ASTC or KTX file)"
}
```
