title: BufferedImage.getGraphics().drawImage() alters pixels values
body: <p>(This is a followup to a <a href="https://stackoverflow.com/questions/23707736/strange-bufferedimage-behaviour-with-4bits-palette">previous</a> question)</p>
  
  <p>The standard recommended way of transforming a <code>BufferedImage</code>  from one type to another, or to make a copy, is to use <code>getGraphics().drawImage()</code> (<a href="https://stackoverflow.com/questions/8864275/how-to-clone-image">example</a>). To my surprise, I've found that this procedure does not leave the pixel value unaltered, even even when both the source and target images are both of the same type! The issue shows up when there is some transparency.</p>
  
  <p>Example with a single pixel ARGB image:</p>
  
  <pre><code>  public static void imagesTestBiIssue() throws IOException {
    //it also happens with TYPE_INT_ARGB
      BufferedImage bi1 = new BufferedImage(1, 1, BufferedImage.TYPE_4BYTE_ABGR);
      // rather arbitrary. low values of alpha tend to give more difference
      int argb = 0x11663322; 
      bi1.setRGB(0, 0, argb);
      int p1 = bi1.getRGB(0, 0);
      BufferedImage bi2 = new BufferedImage(bi1.getWidth(), bi1.getHeight(),
          bi1.getType());
      bi2.getGraphics().drawImage(bi1, 0, 0, null);
      int p2 = bi2.getRGB(0, 0);
      System.out.printf("im1: %08x %s ", p1, formatARGB(p1));
      System.out.printf("im2: %08x %s %s\n", p2, 
          formatARGB(p2), (p1 == p2 ? "" : "DIF"));
    }
  
   public static String formatARGB(int v) {
      return String.format("(%d,%d,%d,%d)", 
          (v &gt;&gt; 24) &amp; 0xFF, (v &gt;&gt; 16) &amp; 0xFF, (v &gt;&gt; 8) &amp; 0xFF, v &amp; 0xFF);
    }
  </code></pre>
  
  <p>This gives: <code>im1: 11663322 (17,102,51,34) im2: 11692d1e (17,105,45,30) DIF</code></p>
  
  <p>There seems to be some colour conversion somewhere, I cannot imagine why, given that the target and source are of the same type. Is this expected (or acceptable) behaviour?</p>