private void getPixel() {
        int i = 0;
        for (int y = 0; y < imageHeight; y++) {
            for (int x = 0; x < imageWidth; x++) {
                pixel[i] = bufferedImage.getRGB(x, y);
                i++;
            }
        }
    }