CSC151 2010S, Class 10: Raster Graphics and RGB Colors Overview: * Representing images, revisited. * Questions on the Readings? * Those weird numbers. * Lab. Admin: * Reading for tomorrow: Transforming RGB Colors. * Reminder: If you're going to miss class (or if you missed class), please send me a note at the earliest possible time. * Due to popular request, I will be shifting the time of quizzes. How does Mondays sound? * Due to the weather, our schedule has shifted a bit. We hope to have Prof. Kluber visit on Friday. * Are there questions on Assignment 3? * Should we prioritize short or general SHORT! But correct: A drawing is scalable and shiftable Hint: An 8x8 checkerboard is a good starting place * EC for Thurday's convocation. * EC for today's Health Fair. * It's new partner day! Drawings * Represented as a grid of colors (Raster graphics) * We also need ways to talk about colors * Easy computer standard: RGB * We look at each color as a combination of red, green, and blue * We use the simple range 0..255 256 values: easy to represent with a "byte", the standard unit of storage on most modern computers * To work with these types, we need procedures (image-set-pixel! image x y color) sets a pixel in an image (image-get-pixel image x y) (rgb-new red green blue) -- (context-set-fgcolor! (rgb-new 128 0 255)) (rgb-red color) (rgb-green color) (rgb-blue color)