3
$\begingroup$

I have a notebook written in Mathematica 8 in which I imported Tiff images and everything worked fine. Since I installed Mathematica 9, I get the error:

In[14]:= Files[[1]][[1]]
Import[Files[[1]][[1]],"TIFF"]
Out[14]= Growth_1_130124_1353/Growth_1_130124_1353_T0001.tif
During evaluation of In[14]:= Image::imgcsmis: The specified color space ColorProfileData[<>,Description->sRGB IEC61966-2.1,DeviceColorSpace->RGB,IndependentColorSpace->XYZ] and the number of channels 1 are not compatible. >>
Out[15]= Image[RawArray[Byte,<1024,1360>],Byte,ColorSpace->ColorProfileData[<>,Description->sRGB IEC61966-2.1,DeviceColorSpace->RGB,IndependentColorSpace->XYZ],Interleaving->None]

How can I solve it? Cheers, Andrea

$\endgroup$
5
  • $\begingroup$ I found example TIFF images from old Mathematica versions; can you import this ? $\endgroup$ Jan 26, 2013 at 14:52
  • $\begingroup$ Perhaps you could upload the TIFF file that's problematic? I've seen no problems with TIFF files on my system. $\endgroup$
    – cormullion
    Jan 26, 2013 at 16:54
  • $\begingroup$ Sure, this is the TIFF that doesn't import in my notebook dl.dropbox.com/u/7754460/Growth_1_130124_1353_T0001.tif $\endgroup$
    – Andrea
    Jan 26, 2013 at 17:08
  • $\begingroup$ I can confirm it works in 8.0.4 but not in 9. The image is ok with other software. $\endgroup$ Jan 26, 2013 at 17:20
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! I'd also suggest you pick a more interesting user name. $\endgroup$ Jan 26, 2013 at 23:50

2 Answers 2

4
$\begingroup$

Photoshop complains that the ICC color profile of this picture is invalid and is ignoring it. So, there might be a problem with the picture itself. It is a 1-channel grayscale image but it reports a 3-channel RGB color space.

Mathematica 9 has the new ColorProfileData object which represents this information, and the importer wants to make use of that. Since the information contained in the file header apparently is incorrect Mathematica 9 has a problem here, where previous versions worked.

There is a workaround though, simply overwriting this incorrect information:

res = Import["https://dl.dropbox.com/u/7754460/Growth_1_130124_1353_T0001.tif"]

Mathematica graphics

res[[3]] = ColorSpace -> "Gray";

res

Mathematica graphics

$\endgroup$
1
$\begingroup$

Looks like it might be a problem introduced with the colorprofile additions. Perhaps Mathematica's getting confused with the grayscale model and RGB profile? Opens fine in Preview.

image details

$\endgroup$
1
  • $\begingroup$ Thank you very much for the workaround, I'll go for it for the moment. Thanks! $\endgroup$
    – Andrea
    Jan 30, 2013 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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