Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
Import[file, "BitDepth"] gives you the bit depth... so perhaps Export[file, image, "BitDepth" -> 32] might do it? Could you try it? – R. M. 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): – 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
up vote 6 down vote accepted

In the Mathematica documentation for .tiff export

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.

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.