color(red,green,blue,transparency):取得r、g、b 、transparency值
- red(color)
- green(color)
- blue(color)
- transparency(color)
切換成HSBMode
- colorMode(HSB,300,100,100)、color(hue,saturations,brightness):切換成HSBMode
- hue(color)、saturation(color)、brightness(color):取得H、S、B值
- background(PImage):圖片設為背景
- PImage.width、PImage.height:取得照片的寬高
- imageColors[y*img.height+x] = img.get(x,y):填完一row向下移
Exercises
- Write a program to print the red,green and blue values of each pixel in an image to the console.
- Design a composition that changes based on mouseX value. Make the color for each element of the composition also change in relation to this variable.
- Load an image and use its colors to set the palette for a composition.
Reference
- Casey Reas & Ben Fry : Page348
沒有留言:
張貼留言