---
name: "pkcreatect"
section: "1"
platform: "linux"
package: "pktools"
version: "2.6.7.6+ds-6+b3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/pkcreatect"
---

# pkcreatect(1)

program to create and import colour table to GTiff image

## NAME

pkcreatect - program to create and import colour table to GTiff image

## SYNOPSIS

FC**pkcreatect**F\[0\]  FC**-i**F\[0\] *input* FC**-o**F\[0\] *output* \[FC**-ct**F\[0\] *colortable* \| FC**-min**F\[0\] *value* FC**-max**F\[0\] *value*\] \[*options*\] \[*advanced options*\]

## DESCRIPTION

**pkcreatect** is a utility to include a color table to a raster dataset. You can either define an existing color table (ASCII text file) with the option FC**-ct**F\[0\] or define a minimum (FC**-min**F\[0\]) and maximum (FC**-max**F\[0\]) value.

## OPTIONS

- FC**-i**F\[0\] *filename*, FC**--input**F\[0\] *filename*

  input image

- FC**-o**F\[0\] *filename*, FC**--output**F\[0\] *filename*

  output classification image

- FC**-ct**F\[0\] *filename*, FC**--ct**F\[0\] *filename*

  colour table in ASCII format having 5 columns: id R G B ALFA (0: transparent, 255: solid)

- FC**-min**F\[0\] *number*, FC**--min**F\[0\] *number*

  minimum value

- FC**-max**F\[0\] *number*, FC**--max**F\[0\] *number*

  maximum value

options

- FC**-g**F\[0\], FC**--grey**F\[0\]

  grey scale

- FC**-of**F\[0\] *format*, FC**--oformat**F\[0\] *format*

  Output image format (see also [**gdal\_translate**(1)](/gdal_translate/1.md)).

- FC**-co**F\[0\] *option*, FC**--co**F\[0\] *option*

  Creation option for output file. Multiple options can be specified.

- FC**-d**F\[0\] *description*, FC**--description**F\[0\] *description*

  Set image description

- FC**-v**F\[0\], FC**--verbose**F\[0\]

  verbose

Advanced options

- FC**-l**F\[0\] *filename*, FC**--filename**F\[0\] *filename*

  Create legend as png file

- FC**-dim**F\[0\] *cols* FC**-dim**F\[0\] *rows*, FC**--dim**F\[0\] *cols* FC**--dim**F\[0\] *rows*

  number of columns and rows in legend.

## EXAMPLE

Attach a color table to image with values between 0 and 50

```
FC
pkcreatect -i image.tif -o image_ct.tif -min 0 -max 50
      F[0]
```

Attach a grey scale "color" table to image with values between 0 and 100 and create a legend image (annotation needs to be drawn manually)

```
FC
pkcreatect -i image.tif -o image_ct.tif -min 0 -max 100 -l legend.tif -g
      F[0]
```

Attach a predefined color table to FC*image.tif*F\[0\]. The colortable has 5 entries for the values 0 (black), 1 (red), 2 (green), 3 (blue) and 4 (grey)

```
FC
cat colortable.txt
0 0 0 0 255
1 255 0 0 255
2 0 255 0 255
3 0 0 255 255
4 100 100 100 255
pkcreatect -i image.tif -o image_ct.tif -ct colortable.txt
      F[0]
```

Remove the color table from an image

```
FC
pkcreatect -i image.tif -o image_noct.tif -ct none
      F[0]
```
