My MatLab is R2009a. I don't guarantee that this info. is same as other versions.
Suppose we have a 16bit image 'test.tif'. What we want to do is, first read the image and then save the image as 'res.tif'.
Simply speaking, default imread and imwrite are sufficient this purpose. When I load the image as follows, it's loaded as unsigned 16bit image.
- test = imread('test.tif', 'tif');
Then, call imwrite as follows to save it as 'res.tif'.
- imwrite(test, 'res.tif', 'tif');
When the image is loaded as double format as follows, the situation is drastically changed.
- test = double(imread('test.tif', 'tif'));
- imwrite(uint16(test), 'res.tif', 'tif');