Skipping pixels problems
<p>I'm writing a program that will take qr code image and recognize black/white pixels and keep them in an array. But my problem is; I have 294x294 pixel image and one matrix  with fixed size 21x21. So one square module is 294/21=4.0 pixel for me. How can I search pixels by 4.0 pixel to 4.0 pixel? Here is my code:</p>

<pre><code>public static void printAllARGBDetails(BufferedImage image) {
        int width = image.getWidth();
        int height = image.getHeight();
        System.out.println("Image Dimension: Height-" + height + ", Width-"
                + width);
        System.out.println("Total Pixels: " + (height * width));
        int pixels[][]=new int[21][21];
        int pixel=width/21;
        System.out.println("Pixel=" +pixel);

        for (int i = 20; i&gt;=0 ; i--) {
            for (int j = 20; j&gt;=0 ; j--) {
                if(image.getRGB(i, j)==-1)
                {

                    pixels[i][j]=0;
                }
                else
                {
                    pixels[i][j]=1;
                }

            }
        } 
  }
</code></pre>

<p>`</p>
