title: Converting Pixel Array to Image in Java
body: <p>I have used <a href="http://pastebin.com/TeMvXWhs" rel="nofollow">this code</a> to get Image into array of pixels.</p>
  
  <ul>
  <li>convertTo2DWithoutUsingGetRGB method for reading image to pixel array</li>
  <li>writeToFile method for pixel array to image</li>
  </ul>
  
  <p>Now I would like to convert the array of pixels to Image. But when I convert it, I am losing image data. </p>
  
  <ol>
  <li>Initial Image size: 80Kb JPG </li>
  <li>Duplicate Image size:  71Kb JPG</li>
  </ol>
  
  <p>I can clearly notice some difference between the both images, the Java produced image has some sort of white-noise.</p>
  
  <p>I would like to reproduce the image without single pixel loss of data, how do I achieve in Java?</p>