CSC151.01 2006S, Class 35: Manipulating Images with Script-Fu Admin: * EC for attending the Dragstravaganza on Friday. * EC for attending Saturday's football game in drag. * There are some reports that CSC151 students have been asking TCs and Tutors questions pertaining to the exam. I will be working to resolve this issue. * Happy Halloween! * There were some serious typos in the sample code on the exam. I think they've all been fixed. * Reading for tomorrow: Drawing with Script-Fu. Overview: * Primary image-manipulation procedures. * Lab. General Style Questions: * When should I use a let and not use a let? * Pure Scheme programmers say "If it's not intended for use outside the main procedure, make it local." * For this class, do what makes the most sense for you, unless specifically told to use let. Image Manipulation: * We can treat an image as a collection of "colors at (x,y)" * Get the colors with (get-color-at x y) * Set the color with (set-color-at! x y newcolor) * Problem: If the image is visible, you may not see the change. * Solution: Change images before showing * (modify-image! colortrans image) * Strategy: * load image * modify it - SLOW! * show it