title: Tensorflow not properly decoding an image
body: <p>I am new to tensorflow. I am reading images from files and decoding them with tf.image.decode_jpeg and then I am plotting decoded image with matplotlib. But somehow original and decoded images are different.</p>
  
  <p><a href="https://i.stack.imgur.com/FvvNO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FvvNO.png" alt="This is original Image"></a></p>
  
  <p><a href="https://i.stack.imgur.com/gHovT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gHovT.png" alt="This is decoded image plotted with matplotlib"></a></p>
  
  <pre><code>filenames = ['/Users/darshak/TensorFlow/100.jpg', '/Users/darshak/TensorFlow/10.jpg']
  filename_queue = tf.train.string_input_producer(filenames)
  
  reader = tf.WholeFileReader()
  filename, content = reader.read(filename_queue)
  
  image = tf.image.decode_jpeg(content, channels=3)
  
  image = tf.cast(image, tf.float32)
  
  resized_image = tf.image.resize_images(image, [256, 256])
  
  image_batch = tf.train.batch([resized_image], batch_size=9)
  
  sess = tf.InteractiveSession()
  
  coord = tf.train.Coordinator()
  threads = tf.train.start_queue_runners(sess=sess, coord=coord)
  
  plt.imshow(image.eval())
  plt.show()
  sess.close()
  </code></pre>