MATLAB: How to write a TIFF image into a 16 bit signed integer file using IMWRITE in MATLAB 7.11 (R2010b)

MATLAB

I am trying to save a TIFF file of a digital elevation model (DEM) with absolute heights in meters above or below sea level. To do this correctly, IMWRITE must write a 16-bit signed integer file (to handle negative integers). But, IMWRITE supports only unsigned integers.

Best Answer

The ability to write a TIFF image into a 16 bit signed integer file using IMWRITE is not available in MATLAB 7.11 (R2010b).
To work around this issue, use TIFF class. For more information on writing TIFF objects, visit:
<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/tiff.write.html>