- ソース(Processing 0090 Beta)
// ウインドウ初期化
size(200, 150);
background(0,0,0);
// イメージ初期化
PImage teapot = loadImage("teapot.jpg"); // ティーポット画像
PImage back = new PImage(200, 150); // 作業用画像
// 初めのイメージ作成
for (int i= 0;i < width*height;i++) {
color t = teapot.pixels[i];
back.pixels[i] = (t & 0x00ffffff) + (0xe0<<24);
}
back.updatePixels();
image(back, 0, 0);
// ブラーする
for (int i= 0;i < 5;i++) {
loadPixels();
for(int j=0; j<width*height; j++) {
color t = pixels[j];
back.pixels[j] = (t & 0x00ffffff) + (0x80<<24);
}
back.updatePixels();
// 少し広げて上書き
image(back, -10, -10, 220, 170);
}