title: Color information missing from image processing
body: <p>I am learning to use numpy to manipulate images, but the color information was missing. I would like to find out why this happen.</p>
  
  <p>My goal is to extract the difference between two images.</p>
  
  <p><a href="https://i.stack.imgur.com/ykZg7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ykZg7.png" alt="Toy problem: Extract Welly from the graph."></a></p>
  
  <p><strong>Zero step: Load library</strong></p>
  
  <pre><code>import numpy as np
  from PIL import Image
  </code></pre>
  
  <p><strong>First step: Vectorize image with RGBA information</strong></p>
  
  <pre><code>img_org = Image.open('lena.png').convert('RGBA')
  arr_org = np.array(img_org)
  img_mod = Image.open('lena_modified.png').convert('RGBA')
  arr_mod = np.array(img_mod)
  arr_diff= np.zeros_like(arr_mod)
  </code></pre>
  
  <p><strong>Second step: Find out the difference between two images by logic rule</strong></p>
  
  <pre><code>for i in range(arr_mod.shape[0]) :
      for j in range(arr_mod.shape[1]) :
           if np.all(arr_mod[i, j]) == np.all(arr_org[i, j]):
               arr_diff[i,j] = (0,0,0,0)
           else :
               arr_diff[i, j] = arr_mod[i, j]
  </code></pre>
  
  <p><strong>Third step: Switch the image RGBA information back to image</strong></p>
  
  <pre><code>img_diff = Image.fromarray(arr_diff, 'RGBA')
  img_diff.save('ans_two.png')
  </code></pre>
  
  <p>I hope to get colorful Welly from the modified Lena image. Like this 
  <a href="https://i.stack.imgur.com/9ge9V.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9ge9V.png" alt="enter image description here"></a></p>
  
  <p>However, I have no idea it only detect the outline/black part of the image. Any possible reason for this? </p>
  
  <p><a href="https://i.stack.imgur.com/W2T49.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W2T49.png" alt="enter image description here"></a></p>
  
  <p>Disclaimer: This was a <a href="https://docs.google.com/presentation/d/1wQ4H_JbFkFzKhLhBrRa_tfBJOhb2JAk5bBeMWf_I-7U/edit#slide=id.g1c9d4004ce_0_424" rel="nofollow noreferrer">homework</a> from a course offered in NTU during 2017 Spring. I am following this course and learn by myself. So you are NOT doing homework for me or anyone else. Thank you! </p>