// 엔디워홀 cambell 통조림 이미지만들기
PImage img;
// Image must be in the sketch's "data" folder
img = loadImage("campbell.jpg");
size(600,600);
//print(img.width+" " +img.height);
for(int x = 0; x<600; x+=200){
for(int y = 0; y<600; y+=200){
image(img,x,y,200,200);
}
}
==========================================================
PImage img;
// Image must be in the sketch's "data" folder
img = loadImage("campbell.jpg");
size(1200,1200);
//print(img.width+" " +img.height);
for(int x = 0; x<width; x+=100){
for(int y = 0; y<width; y+=100){
image(img,x,y,100,100);
}
}
==========================================================
void setup(){
size(600,600);
}
void draw(){
PImage img;
// Image must be in the sketch's "data" folder
img = loadImage("campbell.jpg");
//print(img.width+" " +img.height);
for(int x = 0; x<width; x+=100){
for(int y = 0; y<width; y+=100){
image(img,x,y,mouseX,mouseY);
}
}
}
==========================================================
//틴트반응
PImage img;
void setup(){
img = loadImage("campbell.jpg");
size(img.width*2, img.height);
}
void draw(){
tint(random(255),random(255),random(255));
image(img,0,0);
noTint();
image(img, width/2,0);
delay(1000);
}
==========================================================
//마우스반응
PImage img;
void setup(){
img = loadImage("campbell.jpg");
size(img.width*2, img.height);
print(img.width +" "+img.height);
}
void draw(){
tint(255-(mouseX/2),255-(mouseY/2),255-(mouseY/2));
image(img,0,0);
noTint();
image(img, width/2,0);
delay(50);
}
==========================================================
PImage img;
// Image must be in the sketch's "data" folder
void setup(){
img = loadImage("campbell.jpg");
size(600,600);
//print(img.width+" " +img.height);
}
void draw(){
for(int x = 0; x<600; x+=50){
for(int y = 0; y<600; y+=50){
tint(random(255),random(255),random(255));
image(img,x,y,50,50);
}
}
delay(50);
}
http://juroweb.com/xe/3989