int width = image.width;
int height = image.height;
PImage copyOfImage = pa.createImage(image.width, image.height, PApplet.ARGB);
image.loadPixels();
copyOfImage.loadPixels();
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
int imageIndex = y*image.width+x;
// int currA = (image.pixels[imageIndex] >> 32) & 0xFF;