io7m | single-page | multi-page | Calino User Manual
1.7. extract-image-data-array
Previous
1. Command-Line Interface
Up
1.9. show-image-info
Next

# 1.8. extract-image-data-cube

- 1.8.1. Name
- 1.8.2. Description
- 1.8.3. Examples

## 1.8.1. Name

1
extract-image-data-cube - Extract image data from cube textures.

## 1.8.2. Description

1
The extract-image-data-cube command extracts image data from cube texture files.

### 1.8.2.2. Parameters

Parameter | Type | Required | Description
--- | --- | --- | ---
--file | Path | true | The texture file
--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
--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 "f", followed by a face name, followed by an appropriate file suffix such as ".png" or ".raw".
6
A face name is one of the following:

### 1.8.2.7. Face Names

- xp for the positive X face.
- xn for the negative X face.
- yp for the positive Y face.
- yn for the negative Y face.
- zp for the positive Z face.
- zn for the negative Z face.

## 1.8.3. Examples

### 1.8.3.1. Example

    $ calino extract-image-data-cube
    --file example-ctf \
    --output-directory /tmp/out \
    --output-format PNG
    calino: INFO: writing level 3 to /tmp/out/m003fxp.png
    calino: INFO: writing level 3 to /tmp/out/m003fxn.png
    calino: INFO: writing level 3 to /tmp/out/m003fyp.png
    calino: INFO: writing level 3 to /tmp/out/m003fyn.png
    calino: INFO: writing level 3 to /tmp/out/m003fzp.png
    calino: INFO: writing level 3 to /tmp/out/m003fzn.png
    calino: INFO: writing level 2 to /tmp/out/m002fxp.png
    calino: INFO: writing level 2 to /tmp/out/m002fxn.png
    calino: INFO: writing level 2 to /tmp/out/m002fyp.png
    calino: INFO: writing level 2 to /tmp/out/m002fyn.png
    calino: INFO: writing level 2 to /tmp/out/m002fzp.png
    calino: INFO: writing level 2 to /tmp/out/m002fzn.png
    calino: INFO: writing level 1 to /tmp/out/m001fxp.png
    calino: INFO: writing level 1 to /tmp/out/m001fxn.png
    calino: INFO: writing level 1 to /tmp/out/m001fyp.png
    calino: INFO: writing level 1 to /tmp/out/m001fyn.png
    calino: INFO: writing level 1 to /tmp/out/m001fzp.png
    calino: INFO: writing level 1 to /tmp/out/m001fzn.png
    calino: INFO: writing level 0 to /tmp/out/m000fxp.png
    calino: INFO: writing level 0 to /tmp/out/m000fxn.png
    calino: INFO: writing level 0 to /tmp/out/m000fyp.png
    calino: INFO: writing level 0 to /tmp/out/m000fyn.png
    calino: INFO: writing level 0 to /tmp/out/m000fzp.png
    calino: INFO: writing level 0 to /tmp/out/m000fzn.png

1.7. extract-image-data-array
Previous
1. Command-Line Interface
Up
1.9. show-image-info
Next
io7m | single-page | multi-page | Calino User Manual