CMPT 166 Lecture Notes - Lecture 6: Grayscale
Document Summary
The topic of image processing is a big and important one. Here, we will only scratch the surface of image processing by looking at two useful processing functions: tint and filter. The programs below use these images: kandinsky. jpg, cat. jpg, and dog. jpg. If you want to run the programs on your computer, then add them to your program"s data folder. One of the easiest ways to modify an image is to use the tint function. Using tint, we can do things like change an image"s transparency, or alter its overall color. We will start with the program from using images in processing that displays an image: // set the window to be the same dimensions as the image size(1098, 757); void draw() { // set the image"s tint tint(100, 0, 204); // bluish tint. // display the image so that its upper-left corner. // is on the upper-left corner of the screen image(img, 0, 0);