The answer can be found in the documentation to "TIFF" when you open the IMPORT AND EXPORT subsection
When exporting an image of type "Bit16", "Real32", and "Real", Export creates a 16-bit TIFF file by default. "Byte" and "Bit" images are exported to 8-bit TIFF files.
Another thing to notice is, that Mathematica will not export negative pixel values into the created tif. As long as you have the image inside your notebook, the underlying data is not touched and negative values (or values bigger than the max of the ImageType
) are displayed as black (or white) but kept in the matrix.
As soon as you export the image, your pixel data gets truncated.
The (as a noticed a few seconds ago) easy solution is to set the "BitDepth" during export:
data = RandomVariate[NormalDistribution[], {4, 4}]
pic = Image[data, "Real"];
(*
-0.195911 1.98969 -0.216899 0.013856
0.0702782 0.205389 0.228991 0.773919
1.21001 1.97836 -0.814343 -1.63581
-0.981504 0.7625 0.048188 -0.64592
*)
And now
Export["Real_tiff.tiff", pic, "BitDepth" -> 64];
Import["Real_tiff.tiff", "Data"]
(*
-0.195911 1.98969 -0.216899 0.013856
0.0702782 0.205389 0.228991 0.773919
1.21001 1.97836 -0.814343 -1.63581
-0.981504 0.7625 0.048188 -0.64592
*)