Graphics in a computers memory How a picture (i.e. a graphic) is stored in a computers memory A computer screen is made up of little dots, called PICture ELements. (pixels). If you make each dot on or off, you can build up a monochrome (black and white) picture. Also, off and on can be represented by binary 0 and 1. Here is a diagram that shows a small picture graphic represented by a binary number. Black and white allow ONE bit per pixel. Colour allows 8, 16 or even 24 bits per pixel.
Each pixel has a certain number of bits allocated to it (the bit depth). Each pattern gives a different colour. More than one bit per pixel Here we have 8 bits per pixel
Each pixel has a certain number of bits allocated to it (the bit depth). Each pattern gives a different colour. 4 bits give 2 = 16 colours8 bits give 2 = 256 colours 0000White Blue Pink Red Brown “ “ 0110“ “ Black “ *48*
Line thickness End coordinates Start coordinates Fill Pattern Line colour Etc The program takes the mouse input and create the shape on screen Vector Graphics The software defines the objects
Calculation 1 Calculate the storage requirements for a bit map which is 1200 by 800 pixels with a bit depth of 16 bits. Give the answer in Kb. Solution No of pixels = 1200 X 800= pixels Storage= X 16 bits = X 2 bytes = (960000X 2) / 1024 Kb= 1875 Kb
Calculation 2 Calculate the storage requirements for a bit map which is 8 inches by 4 inches, resolution 400 dpi and with a bit depth of 24 bits. Give the answer in Mb to one decimal place. Solution No pixels = (8X400) X (4X400) Storage = (8X400) X (4X400) X 24 bits = (8X400) X (4X400) X 3 bytes = (8X400) X (4X400) X 3 / 1024 Kb = Kb = / 1024 Mb = 14.6 Mb 8 X X 400