title: java.awt.image.BufferedImage.getSubimage ignores x,y coordinates (jdk-11.0.9.11-hotspot)
body: <p>I'm trying to divide a jpg file into 8x8 sub images.
  My output gives me 64 <em>identical</em> png files, seemingly all with coordinates (0,0).
  According to an older issue <a href="https://stackoverflow.com/questions/15854069/issues-with-cropping-an-image-using-java-image-getsubimage">Issues with cropping an image using java image.getSubimage</a> this was once a bug which was solved by upgrading to java 7.
  I'm using jdk-11.0.9.11-hotspot.</p>
  <p>My code:</p>
  <pre><code>    public static void main(String[] args) throws Exception {
          int columnCount = 8;
          int rowCount = 8;
          String fileName = args[0];//e.g. C:\picturetest\mypicture.jpg
          String fileNameNoExt = fileName.substring(0, fileName.lastIndexOf(&quot;.&quot;));
  
          BufferedImage image = ImageIO.read(new File(fileName));
          int heightFragment = image.getHeight() / rowCount;
          int widthFragment = image.getWidth() / columnCount;
  
          for (int x = 0; x &lt; columnCount; x++) {
              for (int y = 0; y &lt; rowCount; y++) {
                  ImageIO.write(image
                          .getSubimage(x, y, widthFragment, heightFragment), &quot;jpg&quot;, new File(fileNameNoExt + &quot;-(&quot; + x + &quot;,&quot; + y + &quot;).png&quot;));
              }
          }
      }
  </code></pre>