---
name: "img2cif"
section: "1"
platform: "linux"
package: "cbflib-bin"
version: "0.9.7+dfsg1-5+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/img2cif"
---

# img2cif(1)

filter to convert detector images to CBF format

## NAME

img2cif - filter to convert detector images to CBF format

## SYNOPSIS

**img2cif** \[*options*\] *files*...

## DESCRIPTION

**img2cif** is a program that converts an image file from a MAR180, MAR300, MAR345 or ADSC CCD detector to CBF format. In addition,  **img2cif** includes code to process files from stdin and to stdout, so the program can be used in a pipe.

## OPTIONS

- **-i** *input\_image*

  (default: stdin) the input\_image file in MAR300, MAR345 or ADSC CCD detector format is given.  If no input\_image file is specified or is given as "-", an image is copied from stdin to a temporary file.

- **-o** *output\_cif*

  (default: stdout) the output cif (if base64 or quoted-printable encoding is used) or cbf (if no encoding is used).  if no output\_cif is specified or is given as "-", the output is written to stdout

- **-c** *compression\_scheme*

  (packed, canonical or none, default packed)

- **-m** *\[no\]headers*

  (default headers for cifs, noheaders for cbfs) selects MIME (N. Freed, N. Borenstein, RFC 2045, November 1996) headers within binary data value text fields.

- **-d** *\[no\]digest*

  (default md5 digest \[R. Rivest, RFC 1321, April     1992 using"RSA Data Security, Inc. MD5 Message-Digest            Algorithm"\] when MIME headers are selected)

- **-e** *encoding*

  (base64, quoted-printable, decimal, hexadecimal, octal or none, default: base64) specifies one of the standard MIME encodings (base64 or quoted-printable) or a non-standard decimal, hexamdecimal or octal encoding for an ascii cif or "none" for a binary cbf

- **-b** *direction*

  (forward or backwards, default: natural direction) specifies the direction of mapping of bytes into words for decimal, hexadecimal or octal output, marked by '\>' for forward or '\<' for backwards as the second character of each line of output, and in '#' comment lines.

## SEE ALSO

[**convert\_image**(1)](/convert_image/1.md), [**cif2cbf**(1)](/cif2cbf/1.md), [**makecbf**(1)](/makecbf/1.md).

## AUTHOR

**img2cif** was written by Herbert J. Bernstein.

This manual page was written by Morten Kjeldgaard \<mok@bioxray.au.dk\>, for the Debian project (but may be used by others).
