Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
guoyong0318
guoyong0318's Profile
2
Posts
5
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
why no animation?
[1 Reply]
23-Jul-2013 03:37 AM
Forum:
Programming Questions
Hi guys,
I'm trying to assign a mask sequence for a single image, but I don't know why I can't see animation sequence after I click RUN with the code below:
Thanks for your help!
int maxImages = 30;
int imageIndex = 0;
PImage rcolor;
PImage[] images2 = new PImage[maxImages];
void setup() {
background(125);
size(400, 400, P2D);
rcolor=loadImage("red.jpg");
for (int i = 0; i < maxImages; i ++ ) {
images2[i] = loadImage( "mask" + nf(i, 4) + ".jpg" );
}
}
void draw() {
image(rcolor, 0, 0);
imageIndex = (imageIndex + 1) % maxImages;
for (int i = 0; i < maxImages; i ++ ) {
rcolor.mask(images2[i]);
}
}
how to assign an image sequence mask to an image sequence
[3 Replies]
17-Jul-2013 11:01 AM
Forum:
Programming Questions
Hi guy,
I'm new to precessing, I checked the example which we can assign a mask to an image but how to expand it to image sequence?
here is the Alphamask example
PImage img;
PImage maskImg;
void setup() {
size(200, 200);
img = loadImage("test.jpg");
maskImg = loadImage("mask.jpg");
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
«Prev
Next »
Moderate user : guoyong0318
Forum