title: Matlab Read Tif File shows Error "Cannot handle different values per sample for "BitsPerSample"."
body: <p>I have a tif file that I can view it from Windows Photos App. You can download it from this <a href="https://www.dropbox.com/s/n28qvnbbolzoxp0/TifImg.tif?dl=0" rel="nofollow noreferrer">link</a>.
  I tried to load it to Matlab using <code>imread</code> function, however it shows an error below.</p>
  
  <p>TIFF library error - 'TIFFReadDirectory:  Cannot handle different values per sample for
  "BitsPerSample".'</p>
  
  <p>I then further looking into the file's profile and find that the BitDepth and BitsPerSample value seems not correct. Also, the MaxSample value looks weird.
  <a href="https://i.stack.imgur.com/1FFC4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1FFC4.png" alt="enter image description here"></a></p>
  
  <p>By checking the Matlab buildin tiff file profile, I learned that for a RGB image, BitDepth should be 24 and BitsPerSample should be [8,8,8]. However, when I tried to explicitly change them, I still get the same error.</p>
  
  <pre><code>fname = 'TifImg.tif';
  info = imfinfo(fname);
  % Explicitly Assign Correct Value to BitDepth and BitsPerSample (still doesn't work)
  for i = 1: length(info)
      info(i).BitDepth = 24;
      info(i).BitsPerSample = [8 8 8];
  end
  
  % Read Tif Image 
  frame = imread(fname, 1, 'Info', info);
  imshow(frame,[])
  </code></pre>
  
  <p>I hope someone can help me to load this image to Matlab and point me which profile I should change to successfully load the file. </p>