Hi everyone, I’m trying to apply an alpha mask to an image in Processing for Android simply using the .mask method, e.g. img.mask(alpha) and I’m getting seriously wild glitches.
I also tried compiling the basic Alphamask example file for Android and had the same glitching (see screenshots attached).
Just wondering if this is a known issue with Processing for Android, and if there is any way around it?
My device is a Samsung Galaxy S8
This is the code of the alphamask example (straight from the Processing example file, just the size changed) which has the output in the screenshot when run on my android device.
PImage img;
PImage maskImg;
void setup() {
size(800, 800);
img = loadImage("test.jpg");
maskImg = loadImage("mask.jpg");
img.resize(height/2,0);
maskImg.resize(height/2,0);
img.mask(maskImg);
imageMode(CENTER);
}
void draw() {
background(map(mouseX+mouseY, 0, width+height, 0, 255));
image(img, width/2, height/2);
image(img, mouseX, mouseY);
}
Thanks