# How to export a 16 or 32 bit TIFF file

I have a function that creates a monochrome grayscale image that must be export as a 16-bit and 32-bit TIFF file. The Mathematica documentation mentions that these bit depths are supported during Export, but makes no reference as to how to specify them under TIFF or Export.

How is the bit depth specified for this type of export?

-
Import[file, "BitDepth"] gives you the bit depth... so perhaps Export[file, image, "BitDepth" -> 32] might do it? Could you try it? –  rm -rf Oct 2 '12 at 16:17
Possibly some variant maybe, this one produces the error "Not a Valid File Specification" +1 Thanks for your suggestion! –  R Hall Oct 2 '12 at 17:47
You might want to look at the 5th example in the documentation for the TIFF format (the one with the Mandrill): reference.wolfram.com/mathematica/ref/format/TIFF.html. –  chuy Oct 2 '12 at 19:20
sorry chuy -- I was typing my answer in and didn't notice yours till after I posted. –  bill s Oct 2 '12 at 19:29
The reason the first example did not work was because you forgot to replace "file" with your own file location. It was not meant to be copied, but understood. –  Searke Oct 2 '12 at 20:47
show 1 more comment

In the Mathematica documentation for .tiff export

http://reference.wolfram.com/mathematica/ref/format/TIFF.html

there is an example (about the third one down under Basic Examples)

 Export["real.tiff", img, "BitDepth" -> 32]


where img is the image to export. Seems to work fine.

-
The syntax of your solution works very well. +1 and thanks –  R Hall Oct 2 '12 at 19:30