title: How to convert binary image to RGB with PIL?
body: <p>I have PIL Image in binary and I need to convert it in RGB. I did this diskew image </p>
  
  <p>binary image</p>
  
  <p><a href="https://i.stack.imgur.com/GGMzw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GGMzw.png" alt="enter image description here"></a></p>
  
  <p>I need this way:</p>
  
  <p><a href="https://i.stack.imgur.com/3nRh5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3nRh5.png" alt="enter image description here"></a></p>
  
  <p>I already tried this which is not working </p>
  
  <pre><code>from PIL import Image as im
  
  img = im.fromarray((255 * Image).astype("uint8")).convert("RGB")
  </code></pre>