io7m | single-page | multi-page | epub | Calino User Manual
1.5. create-cube
Previous
1. Command-Line Interface
Up
1.7. extract-image-data-array
Next

# 1.6. extract-image-data-2d

- 1.6.1. Name
- 1.6.2. Description
- 1.6.3. Examples

## 1.6.1. Name

1
extract-image-data-2d - Extract image data from 2D textures.

## 1.6.2. Description

1
The extract-image-data-2d command extracts image data from 2D texture files.

### 1.6.2.2. Parameters

Parameter | Type | Required | Description
--- | --- | --- | ---
--output-directory | Path | true | The output directory
--decompress | boolean | false | Whether to decompress data during extraction (ignored if the output is PNG).
--output-format | CLNOutputFormat | false | The output format
--file | Path | true | The texture file
--verbose | CLPLogLevel | false | Set the minimum logging verbosity level.

3
The command extracts all mipmaps available in the source texture to the output directory specified with --output-directory. If source texture's mipmaps are compressed with supercompression (such as LZ4), then the mipmaps can be optionally decompressed with --decompress.
4
The output format can be specified with --output-format which may be one of [RAW, PNG]. If the output format is RAW, then the raw bytes that make up image data will be written to the output files directly with no header or other information. If --decompress is not specified, then the raw bytes will be those of the compressed data. If the output format is PNG, then the image data will be written to the output files in PNG format. Note that this will necessarily and automatically decompress the image data, and may also downsample the image data because PNG does not support as wide a range of image data layouts as calino texture files.
5
For a given output directory D, the command will write each of the mipmap levels of the input image to files in D. The name of each output file will be "m", followed by a zero-padded level number, followed by an appropriate file suffix such as ".png" or ".raw".

## 1.6.3. Examples

### 1.6.3.1. Example

    $ calino extract-image-data-2d \
    --file example-ctf \
    --output-directory /tmp/out \
    --output-format PNG
    calino: INFO: writing level 7 to /tmp/out/m007.png
    calino: INFO: writing level 6 to /tmp/out/m006.png
    calino: INFO: writing level 5 to /tmp/out/m005.png
    calino: INFO: writing level 4 to /tmp/out/m004.png
    calino: INFO: writing level 3 to /tmp/out/m003.png
    calino: INFO: writing level 2 to /tmp/out/m002.png
    calino: INFO: writing level 1 to /tmp/out/m001.png
    calino: INFO: writing level 0 to /tmp/out/m000.png

1.5. create-cube
Previous
1. Command-Line Interface
Up
1.7. extract-image-data-array
Next
io7m | single-page | multi-page | epub | Calino User Manual