Introduction - If you have any usage issues, please Google them yourself
This function combines image rescaling and writing into the one function. If the image type is double image values are rescaled to the range 0-1 so that no overflow occurs when writing 8-bit intensity values. The image format to use is determined by MATLAB from the file ending. If the image type is of uint8 no rescaling is performed.