Image to Image / Command Line Reference

Conversion from one image format to another image format.

usage: image2image [options] source
source
Source to be converted. It can be URL, path to a local file or '-' to use stdin as an input text.

Options

Conversion Format

-output-format

The format of the output file.

Default:
png
Allowed Values:
  • png
  • jpg
  • gif
  • tiff
  • bmp
  • ico
  • ppm
  • pgm
  • pbm
  • pnm
  • psb
  • pct
  • ras
  • tga
  • sgi
  • sun
  • webp

Image Operations

Settings used for operations with images.

-resize

Resize the image.

Default:
100%
Examples:
  • Enlarge for high-res display: "200%"
  • Standard XGA screen resolution: "1024x768"

-rotate

Rotate the image.

-crop-area-x

Set the top left X coordinate of the content area. It is relative to the top left X coordinate of the print area.

Constraint:
  • The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
Default:
0px
Examples:
  • Crop extends beyond left edge: "-1in"
  • Skip narrow border area: "10mm"

-crop-area-y

Set the top left Y coordinate of the content area. It is relative to the top left Y coordinate of the print area.

Constraint:
  • The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
Default:
0px
Examples:
  • Crop extends beyond left edge: "-1in"
  • Skip narrow border area: "10mm"

-crop-area-width

Set the width of the content area. It should be at least 1 inch.

Constraint:
  • The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
Default:
The width of the print area.
Examples:
  • Standard document crop width: "8in"
  • Full A4 page width crop: "210mm"

-crop-area-height

Set the height of the content area. It should be at least 1 inch.

Constraint:
  • The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
Default:
The height of the print area.
Examples:
  • Standard document crop width: "8in"
  • Full A4 page width crop: "210mm"

-remove-borders

Remove borders of an image which does not change in color.

Default:
False
Allowed Values:
  • true, 1 or on
  • false, 0 or off

Canvas Setup

-canvas-size

Set the output canvas size.

Allowed Values:
  • A0
  • A1
  • A2
  • A3
  • A4
  • A5
  • A6
  • Letter

-canvas-width

Set the output canvas width.

Constraint:
  • The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
Examples:
  • A4 landscape / banner width: "297mm"
  • US Letter standard width: "8.5in"

-canvas-height

Set the output canvas height.

Constraint:
  • The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
Examples:
  • Large poster canvas height: "420mm"
  • US Letter standard height: "11in"

-orientation

Set the output canvas orientation.

Default:
portrait
Allowed Values:
  • landscape
  • portrait

-position

Set the image position on the canvas.

Default:
center
Allowed Values:
  • center
  • top
  • bottom
  • left
  • right
  • top-left
  • top-right
  • bottom-left
  • bottom-right

-margin-top

Set the output canvas top margin.

Constraint:
  • The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
Examples:
  • Wide margin for framing: "1in"
  • Minimal margin for web images: "10mm"

-margin-right

Set the output canvas right margin.

Constraint:
  • The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
Examples:
  • Wide margin for framing: "1in"
  • Minimal margin for web images: "10mm"

-margin-bottom

Set the output canvas bottom margin.

Constraint:
  • The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
Examples:
  • Wide margin for framing: "1in"
  • Minimal margin for web images: "10mm"

-margin-left

Set the output canvas left margin.

Constraint:
  • The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
Examples:
  • Wide margin for framing: "1in"
  • Minimal margin for web images: "10mm"

-canvas-background-color

The canvas background color in RGB or RGBA hexadecimal format. The color fills the entire canvas regardless of margins. If no canvas size is specified and the image format supports background (e.g. PDF, PNG), the background color is applied too.

Constraint:
  • The value must be in RRGGBB or RRGGBBAA hexadecimal format.
Examples:
  • red color: "FF0000"
  • green color: "00ff00"
  • green color with 50% opacity: "00ff0080"

-dpi

Set the DPI resolution of the input image. The DPI affects margin options specified in points too (e.g. 1 point is equal to 1 pixel in 96 DPI).

Default:
96
Example:
  • The DPI used for printers. 1 inch contains 300 points: 300

Miscellaneous

-debug-log

Turn on the debug logging. Details about the conversion are stored in the debug log. The URL of the log can be obtained from the getDebugLogUrl method or available in conversion statistics.

Default:
False
Allowed Values:
  • true, 1 or on
  • false, 0 or off

-tag

Tag the conversion with a custom value. The tag is used in conversion statistics. A value longer than 32 characters is cut off.

Example:
  • Track job in analytics: "client-1234"

-http-proxy

A proxy server used by the conversion process for accessing the source URLs with HTTP scheme. It can help to circumvent regional restrictions or provide limited access to your intranet.

Constraint:
  • The value must have format DOMAIN_OR_IP_ADDRESS:PORT.
Examples:
  • Corporate proxy server: "myproxy.com:8080"
  • Direct IP proxy connection: "113.25.84.10:33333"

-https-proxy

A proxy server used by the conversion process for accessing the source URLs with HTTPS scheme. It can help to circumvent regional restrictions or provide limited access to your intranet.

Constraint:
  • The value must have format DOMAIN_OR_IP_ADDRESS:PORT.
Examples:
  • Secure proxy for HTTPS: "myproxy.com:443"
  • Direct secure proxy IP: "113.25.84.10:44333"