User Tools

Site Tools


cs276:alphademo
/* AlphaDemo - Make an image transparent using tint (Basic Mode)
 *  Author: spc
 */

PImage pi;

pi = loadImage("kate3.jpg");
background(255);
size(pi.width, pi.height);

tint(255, 102);  // change alpha to 102 without changing the tint
image(pi, 0, 0);

tint(255, 204, 0, 153);  // tint to yellow, alpha to 153
image(pi, (pi.width/2), 0);
save("tintedkate3.png");
cs276/alphademo.txt · Last modified: 2008/09/08 16:35 by scarl