-
Processing Example - Transparency작가/코드 2014. 10. 19. 19:42
Processing Example
Basics > Image > Transparency
예제에 기반한 테스트 코드
PImage img;
void setup()
{
size(1020, 364);
img = loadImage("image.png");
img.resize(340, 0);
}
void draw()
{
colorMode(HSB); // HSB mode
colorMode(RGB); // RGB mode
background(255);
tint(255, 255); // Why should I put this line to show the original image
image(img, 0, 0);
tint(255, 100); // Apply transparency without changing color
image(img, 340, 0);
tint(100, 100, 100, 200);
image(img, 680, 0);
tint(205, 20, 20, 170); // R
image(img, 0, 182);
tint(20, 205, 20, 170); // G
image(img, 340, 182);
tint(20, 20, 205, 170); // B
image(img, 680, 182);
}
colorMode(RGB)
colorMode(HSB)
색깔(Hue)과 채도(Saturation)를 아무리 높여도 어두우면 아무 소용 없음을 알 수 있다.
'작가 > 코드' 카테고리의 다른 글
3D Scatter Plot (0) 2014.11.07 Processing Example - Hierarchies (0) 2014.11.06 Processing 구현중 - Mosaic Learning 3 (0) 2014.10.19 Processing 구현중 - Mosaic Learning 2 (0) 2014.10.19 Processing 구현중 - Mosaic Learning 1 (0) 2014.10.19