1

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?

VividD
  • 3,660
  • 4
  • 26
  • 42
Nothingtoseehere
  • 4,518
  • 2
  • 30
  • 58
  • 3
    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 02 '12 at 16:17
  • Possibly some variant maybe, this one produces the error "Not a Valid File Specification" +1 Thanks for your suggestion! – Nothingtoseehere Oct 02 '12 at 17:47
  • 1
    You might want to look at the 5th example in the documentation for the TIFF format (the one with the Mandrill): http://reference.wolfram.com/mathematica/ref/format/TIFF.html. – chuy Oct 02 '12 at 19:20
  • sorry chuy -- I was typing my answer in and didn't notice yours till after I posted. – bill s Oct 02 '12 at 19:29
  • no problem, rm -rf answered his question 3 hours ago as well :) – chuy Oct 02 '12 at 19:29
  • 4
    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 02 '12 at 20:47

1 Answers1

6

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.

bill s
  • 68,936
  • 4
  • 101
  • 191