Download presentation
Presentation is loading. Please wait.
Published byKaitlyn Leach Modified over 10 years ago
1
Creative Computing
2
\\ aims By the end of the session you will be able to: 1.Explain the difference between various image file formats 2.Load in and display images in Processing 3.Translate, rotate and scale images 4.Create a variety of blends and transitions between images 5.Use for loops to manipulate images
3
Creative Computing \\ images Images are represented as a grid of pixels Called a bit map There is a colour value stored for each pixel
4
Creative Computing \\ image files Different file formats store this pixel data in different ways
5
Creative Computing \\ image files Bitmap vs vector Bitmap files represent images as a grid of pixel values Vector graphics represent a set of lines and shapes that can be used as a recipe for creating an image
6
Creative Computing \\ image files Compressed vs Uncompressed Uncompressed Files just store the data directly This takes up a lot of storage space Compressed files reduce the amount of data by using special formats
7
Creative Computing \\ image files Lossless vs Lossy Lossy file formats compress the image in a way that means some information is lost They can compress better than lossless formats (at a cost) The least visually important information is lost
8
Creative Computing \\ aims By the end of the session you will be able to: 1.Explain the difference between various image file formats 2.Load in and display images in Processing 3.Translate, rotate and scale images 4.Create a variety of blends and transitions between images
9
Creative Computing \\ Exercises Load in and display an image that you have created Make sure the window is big enough (the exact size of the image?) Look up translate, rotate and scale, use them to change the position etc. of your image Extra: Load 2 images side by side using transforms
10
Creative Computing \\ Transforms Rather than changing the shape or positions of objects directly you can do so with transforms translate – change position rotate scale Will work on anthing: shapes, images, groups The command will affect anything that comes after it
11
Creative Computing \\ radians Angles are always expressed as radians: 180 degrees = pi radians Constants HALF_PI, PI and TWO_PI You can use the radians function to convert to radians
12
Creative Computing \\ radians
13
Creative Computing \\ exercises Try combining translate, rotate and scale in different orders Extra: What difference does order make? Extra: Where does it rotate/scale around? Extra: Can you make it rotate around the middle of a shape?
14
Creative Computing \\ order of transforms Order matters when you do transforms Generally, the best combination is: Translate Rotate Scale
15
Creative Computing \\ aims By the end of the session you will be able to: 1.Explain the difference between various image file formats 2.Load in and display images in Processing 3.Translate, rotate and scale images 4.Create a variety of image filters and blends
16
Creative Computing \\ image filtering Filters alter images by changing pixel values one by one Different filters use different mathematical functions e.g. invert sets each pixel to its inverse threshold sets all pixels below a value to 0 all those above to 255
17
Creative Computing \\ image blending Image blending takes two images and combines their pixel values The pixel values at a point in image 1 are combined with those at the same place in image 2 Again you can use different mathematical functions e.g. add the pixel values, or select the darkest or lightest of the two values
18
Creative Computing Experiment with filter types: BLUR, THRESHOLD, POSTERIZE, INVERT, GRAY, create a nice effect Load two images and do the same with blend types: ADD, SUBTRACT, DARKEST, DIFFERENCE, OVERLAY Extra: Create an animated filter effect that changes over time \\ Exercises
19
Creative Computing \\ Create your own filter Wouldnt it be good to create our own filters? All you need to do is go through all the pixels in an image and change the colour values
20
Creative Computing \\ Create your own filter A lot of pixels: lots of work to do it by hand Need a way of automatically stepping through all the pixels: Loops!
21
Creative Computing \\ For Loops The basic idea: You have a variable (e.g. x) that counts between a range of numbers e.g. from 0 to the width of the screen For each value of x you Do something (execute some commands)
22
Creative Computing Create a gradient Extra: Create your own filter, e.g.: invert: converts the colour of a pixel to 256-colour Threshold: sets any pixel above a certain value to 256, and below to 0 Extra: Turn an image upside down using a loop \\ Exercises
23
Creative Computing \\ aims By the end of the session you will be able to: 1.Explain the difference between various image file formats 2.Load in and display images in Processing 3.Translate, rotate and scale images 4.Create a variety of blends and transitions between images
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.