Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Systems Nat 5 Computing Science Data Representation

Similar presentations


Presentation on theme: "Computer Systems Nat 5 Computing Science Data Representation"— Presentation transcript:

1 Computer Systems Nat 5 Computing Science Data Representation
Storing Graphics Computer Systems Nat 5 Computing Science Data Representation Lesson 4b: Storing Graphics EXTENSION

2 Lesson Aims Pupils at National 5 level will be able to:
Describe how a vector image is stored Calculate the storage requirements of a bitmap image with colours Explain the difference between a vector and bitmap image Explain the advantages and disadvantages of bitmap images compared to vector images

3 Vector Graphics This image is an example of a vector image.
Nat 5 Vector Graphics This image is an example of a vector image. A vector image is made up of lots of overlapping shapes Each of the shapes can be edited separately from the other shapes.

4 Vector Graphics A vector image is stored using
Nat 5 Vector Graphics A vector image is stored using a different method than bitmapped images The attributes (or qualities) of each shape are stored. EG, the eyes(ellipses) may be stored as: Centre X/Y-co-ordinates Fill Colour Border Style Border Colour etc…

5 Storing Colour Bitmaps
National 5 Storing Colour Bitmaps Storing a colour bitmap is exactly the same as for black and white with one difference - Each pixel is not just black and white but can represent a variety of colours. This is done by allocating more than one bit for each pixel: 2 bits/pixel = 4 colours 4 bits/pixel = 16 colours 6 bits/pixel = 64 colours

6 National 5 Colour Bitmaps The amount of bits allocated to each pixel is known as the bit depth. So an image with 8 bit colour depth could have 256 colours [28 = 256] True Colour is defined as an image with 24 bit colour depth. It has 16,777,216 colours! [224 = 16,777,216]

7 True Colour True Colour is defined as an image with 24 bit bit depth.
National 5 True Colour True Colour is defined as an image with 24 bit bit depth. The colour code for each pixel is constructed of a single 8 bit number for each of the main 3 additive colours. Red, Green and Blue RGB Colour Codes

8 File Size Increases Higher Bit Depth = More Colours
National 5 Increasing Bit Depth Higher Bit Depth = More Colours File Size Increases

9 Storage Space Example Step 1: (Length x Breadth) * bit depth
National 5 Storage Space Example A true colour image is 800 pixels by 900 pixels. Calculate the storage requirements and express the answer in appropriate units Step 1: (Length x Breadth) * bit depth (800 * 900) * 24 bits = 17,280,000 bits Step 2: Convert into appropriate units 17,280,000/8 = 2,160,000 bytes 2,160,000 bytes /1024 = 2, KB 2, Kb/1024 = 2.06 MB

10 Storage Space: Example 2
National 5 Storage Space: Example 2 A 16 bit colour image is 4 inches by 6 inches with a resolution of 300dpi. Step 1: (Length x dpi) x (Breadth x dpi) (4*300) * (6*300)= 2,160,000 pixels Step 2: number of pixels * bit depth 2,160,000 * 16 = 34,560,000 bits Step 3: Convert into appropriate units 34,560,000 /8 = 4,320,000 bytes 4,320,000 bytes /1024 = 4,218.75KB 4,218.75KB /1024 = MB

11 Bitmap Graphics – Pros and Cons
National 5 Bitmap Graphics – Pros and Cons Advantages Disadvantages Can be manipulated at pixel level Can create a wide array of graphic effects Can represent photo-realistic images Requires large storage space Image becomes jagged when scaled

12 Vector Graphics – Pros and Cons
National 5 Vector Graphics – Pros and Cons Advantages Disadvantages Do not lose quality when scaled Require less storage space Objects are easily moved/manipulated Resolution independent Cannot be edited at pixel level Cannot show photo realistic scenes Will usually require particular applications to open

13 Tasks National 4 National 5 Worksheet 4 Worksheet 4A and 4B


Download ppt "Computer Systems Nat 5 Computing Science Data Representation"

Similar presentations


Ads by Google