title: Pillow: converting a TIFF from greyscale 16 bit to 8 bit results in fully white image
body: <p>I know that there are multiple similar questions on SO, but I have tried multiple proposed solutions to no avail.</p>
  <p>I have the following TIFF image that opens in Pillow as <code>type='I;16'</code>.</p>
  <p><a href="https://drive.google.com/file/d/1s6fxkwhqEl_jO9V242CfChI9-8m47QB9/view?usp=sharing" rel="nofollow noreferrer">Google Drive link</a></p>
  <p>Based on this SO question, I wrote this code to convert it:</p>
  <pre class="lang-py prettyprint-override"><code>def tiff_force_8bit(image, **kwargs):
      if image.format == 'TIFF' and image.mode == 'I;16':
          array = np.array(image)
          normalized = (array.astype(np.uint16) - array.min()) * 255.0 / (array.max() - array.min())
          image = Image.fromarray(normalized.astype(np.uint8))
  
      return image
  </code></pre>
  <p>However, the result is a completely white image.</p>
  <p>I have tried other solutions too, such as this:</p>
  <pre class="lang-py prettyprint-override"><code>table = [i/256 for i in range(65536)]
  image = image.point(table, 'L')
  </code></pre>
  <p>with the same result: full white out.</p>
  <p>Can anyone shed some light?
  Thanks!</p>