Computer Systems Nat 4 5 Computing Science Data

  • Slides: 15
Download presentation
Computer Systems Nat 4. 5 Computing Science Data Representation Lesson 4: Representing and Storing

Computer Systems Nat 4. 5 Computing Science Data Representation Lesson 4: Representing and Storing Graphics EXTENSION

Nat 4/5 1. REV ISIO N How does a computer system store a black

Nat 4/5 1. REV ISIO N How does a computer system store a black and white image? 2. What storage space is required for a B+W image 300*700 pixels? 3. What storage space is needed for a 3*5 inch image with a resolution of 600 dpi? 4. Explain the difference in the storing of a vector and bitmap graphic.

Nat 4/5 Revision: ANS WER S 1. Store as a series of bits, 1’s

Nat 4/5 Revision: ANS WER S 1. Store as a series of bits, 1’s for black and 0’s for white. 2. 300*700/8/1024=25. 63 = 26 Kb 3. (3*600)*(5*600)/8/1024= 659. 17 =660 Kb 4. Bitmap stored as pixels and Vector stored by it’s attributes.

Nat 4/5 Lesson Aims Pupils at National 5 level will be able to: Describe

Nat 4/5 Lesson Aims Pupils at National 5 level will be able to: Describe how a computer system stores a colour bitmap image. Calculate the storage requirements of a colour bitmap image Describe the advantages bitmap graphics have over vector graphics Describe the advantages vector graphics have over bitmap graphics

National 5 Colour Bitmaps The colour bitmap method is exactly the same as for

National 5 Colour Bitmaps The colour bitmap method is exactly the same as for black and white with one difference. Each pixel is not black and white but can represent a variety if colours.

National 5 Colour Bitmaps Each pixel has a binary value representing the colour. The

National 5 Colour Bitmaps Each pixel has a binary value representing the colour. The amount of colours is known as the bit depth. So an image with 8 bit colour depth could have 256 Colours True Colour is defined as an image with 24 bit colour depth. 16, 777, 216 colours!

National 5 True Colour is defined as an image with 24 bit depth. This

National 5 True Colour is defined as an image with 24 bit depth. This means that 16, 777, 216 colours can be represented. The colour code for each pixel is constructed of a single 8 bit number for each of the main 3 additive colours. Red, Red green and blue RGB Colour Codes

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

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

National 5 Storage Space Example A true colour image is 800 pixels by 900

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 Step * 900) * 24 bits = 17, 280, 000 bits 2: Convert into appropriate units 17, 280, 000/8 = 2, 160, 000 bytes /1024 = 2, 109. 375 Kb/1024 = 2. 06 Mb

National 5 Alternate Storage Space Example Sometimes you will be given the size and

National 5 Alternate Storage Space Example Sometimes you will be given the size and the resolution of the image. One way in which this can be measured is dpi Dots per inch is the amount of pixels in an inch. A 16 bit colour image is 4 inches by 6 inches with a resolution of 300 dpi. Step ((4*300) * (6*300))* 16 = 2, 160, 000 pixels Step 1: ((Length x dpi) x (Breadth x dpi)) * bit depth 2: number of pixels * bit depth 2, 160, 000 * 16 = 34, 560, 000 bits Step 2: Convert into appropriate units 34, 560, 000 /8 = 34, 560, 000 bytes /1024 = 4. 119 Mb

National 5 Bitmap Graphics – Pros and Cons Advantages ü Can be manipulated at

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

National 5 Vector Graphics – Pros and Cons Advantages ü Do not lose quality

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

National 5 What Vector and Bitmap graphics are used for Vector ü Plans ü

National 5 What Vector and Bitmap graphics are used for Vector ü Plans ü Logos ü Promotional posters ü Large scale banners Bitmap ü Photo editing ü Life like pictures ü Computer drawing ü Special effects, for example, blurring and texture

National 5 Summary In colour bitmaps the amount of colours in the picture is

National 5 Summary In colour bitmaps the amount of colours in the picture is represented by a binary number The amount of colour is known as the bit depth You calculate the storage requirements by multiplying the amount of pixels by the bit depth Or by using the size of the graphic multiplying it by the dpi and then by the bit depth Vector and Bitmap graphics are used for different task

Two methods of calculating storage space required A graphic 300 pixels by 600 pixels

Two methods of calculating storage space required A graphic 300 pixels by 600 pixels and a bit depth of 16 then 300*600*16 = 2880000 bits / 8 = 360000 bytes / 1024 = 351. 5625 = 352 Kb A 16 bit 5*7 colour image with dpi of 600 (5*600)*(7*600)*16= 201600000 bits/8 = 25200000/1024 = 24609. 375/1024 = 24. 0325927734375 = 24. 1 Mb