# Convert

## Brief Description

Convert an image to a different format, eventually rescaling the data and/or changing the pixel type.

## Tags

Conversion,Image Dynamic,Image Manipulation

## Long Description

This application performs an image pixel type conversion (short, ushort, uchar, int, uint, float and double types are handled). The output image is written in the specified format (ie. that corresponds to the given extension). The conversion can include a rescale using the image 2 percent minimum and maximum values. The rescale can be linear or log2.

## Parameters

- [param] -in <string> Input image. Mandatory: True. Default Value: ""
- [param] -mask <string> The masked pixels won't be used to adapt the dynamic (the mask must have the same dimensions as the input image). Mandatory: False. Default Value: ""
- [param] -hcp <string> Parameters to cut the histogram edges before rescaling. Mandatory: True. Default Value: "0"
- [param] -out <string> Output image. Mandatory: True. Default Value: ""
- [param] -ram <int32> Available memory for processing (in MB). Mandatory: False. Default Value: "128"
- [param] -inxml <string> Load otb application from xml file. Mandatory: False. Default Value: ""
- [param] -outxml <string> Save otb application to xml file. Mandatory: False. Default Value: ""
[choice] -type Transfer function for the rescaling none,linear,log2. Mandatory: True. Default Value: "none"

- [group] -none

- [group] -linear

- [param] -type.linear.gamma <float> Gamma correction factor. Mandatory: False. Default Value: "1"

- [group] -log2

## Limitations

None

## Authors

OTB-Team

## See Also

Rescale

## Example of use

- in: QB_Toulouse_Ortho_XS.tif

- out: otbConvertWithScalingOutput.png uint8

- type: linear