Hello,
I believe this is due to the smoothing that is applied each frame and is not related to transparency.
Code to visualize this:
// Smooth and anti- aliasing
// v1.0.0
// GLV 2022-06-28
PImage img;
void setup()
{
size(650, 650);
background(255); // Try (0)
smooth(2); //Default. Try other values!
//noSmooth(); // Try it with this!
frameRate(1); // Slow things down to visualize
}
void draw()
{
noStroke();
fill(255, 0, 0);
circle(15, 15, 25);
img = get(0, 0, 30, 30); // gets a rectangular section of image
translate(30, 30);
// Magnifies 20x
int m = 20;
for(int y = 0; y< img.height; y++)
{
for(int x = 0; x< img.width; x++)
{
int c = img.pixels[x+y*img.width];
fill(c);
rect(x*m, y*m, m, m);
}
}
}
// Save a frame
void keyPressed()
{
saveFrame(str(frameCount) + ".png");
}
References:
-
https://github.com/processing/processing4/blob/master/core/src/processing/core/PApplet.java#L1133
-
Java and anti-aliasing < Nice explanation.
:)