chpixtype -- change the pixel type of an image
chpixtype input output newpixtype
The list of images specified by input and pixel type oldpixtype are converted to the pixel type specified by newpixtype and written to the list of output images specified by output .
Conversion from one pixel type to another is direct and may involve both loss of precision and dynamic range. Mapping of floating point numbers to integer numbers is done by truncation. Mapping of complex numbers to floating point or integer numbers will preserve the real part of the complex number only.
1. Convert a list of images to type real, overwriting the existing images.
im> chpixtype nite1*.imh nite1*.imh real
2. Convert only those images in imlist1 which are of type short to type real. Imlist1 and imlist2 are text files containing the list of input and output images respectively. The image names are listed 1 per line.
im> chpixtype @imlist1 @imlist2 real old=short