sd & d bitmapped graphics

24

Upload: forrester-high-school

Post on 15-Apr-2017

441 views

Category:

Education


3 download

TRANSCRIPT

Page 1: SD & D Bitmapped Graphics
Page 2: SD & D Bitmapped Graphics

GraphicsAn image is made up of tiny dots called pixels.

The resolution determines the quality of the picture. The smaller the pixels the finer the detail that can be displayed on the screen.

High Resolution Image Low Resolution Image

Page 3: SD & D Bitmapped Graphics

Graphics PackagesGraphics packages can be classed as either:

Bitmapped graphics (painting) Vector graphics (drawing)

Page 4: SD & D Bitmapped Graphics

Bitmapped GraphicsThe image is saved in a two dimensional array using binary numbers to represent the colours in the pixels. Each pixel is represented by the same number of bits.

Page 5: SD & D Bitmapped Graphics

Bitmapped GraphicsThe image is saved in a two dimensional array using binary numbers to represent the colours in the pixels. Each pixel is represented by the same number of bits.

In this example, two colours have been used (black/white) and so each pixel is represented by one bit.

0 = white, 1 = black

Page 6: SD & D Bitmapped Graphics

Bitmapped GraphicsIn this example, four colours are used in the graphic and so each pixel is represented using two bits.

Page 7: SD & D Bitmapped Graphics

Bitmapped GraphicsIn this example, four colours are used in the graphic and so each pixel is represented using two bits.

00 = white, 01 = blue, 10 = red, 11 = black

Page 8: SD & D Bitmapped Graphics

Bitmapped GraphicsHow many colours could be represented using 3 bits?

Page 9: SD & D Bitmapped Graphics

Bitmapped GraphicsHow many colours could be represented using 3 bits?

000

001

010

011

100

101

110

111

8 colours (23) could be represented using 3 bits

Page 10: SD & D Bitmapped Graphics

Bit DepthThe number of bits used to represent the colour of the pixels is called the bit depth.

Colours Bits (bit depth)2 14 28 3163264128

Page 11: SD & D Bitmapped Graphics

Bit DepthThe number of bits used to represent the colour of the pixels is called the bit depth.

Colours Bits (bit depth)2 14 28 316 432 564 6128 7

Page 12: SD & D Bitmapped Graphics

Bit DepthThe number of bits used to represent the colour of the pixels is called the bit depth.

Colours Bits (bit depth)2 14 28 316 432 564 6128 7256 8

65536 1616777216 24 (True Colour)

Page 13: SD & D Bitmapped Graphics

Dots per Inch (dpi)Dots per inch is used to measure the number of pixels that can be placed in a line with the span of 1 inch

Page 14: SD & D Bitmapped Graphics

Storage Requirements (examples)An image, 5 inches by 7 inches is stored at 600 dots per inch (dpi) using 65536 colours.

How much memory would be required to store this image?

7 inches

5 i

nches

Page 15: SD & D Bitmapped Graphics

Storage Requirements (examples)Pixels used to store image = (5 x 600) x (7 x 600) = 12600000

Image size 5 in x 7 inDPI 600Colours 65536

Page 16: SD & D Bitmapped Graphics

Storage Requirements (examples)Pixels used to store image = (5 x 600) x (7 x 600) = 12600000

65536 colours = 16 bits = 2 bytes

Image size 5 in x 7 inDPI 600Colours 65536

Page 17: SD & D Bitmapped Graphics

Storage Requirements (examples)Pixels used to store image = (5 x 600) x (7 x 600) = 12600000

65536 colours = 16 bits = 2 bytes

Amount of memory = 12600000 x 2 bytes

= 25200000 bytes

= 25200000 / 1024 / 1024

= 24.03 Mb

Image size 5 in x 7 inDPI 600Colours 65536

Page 18: SD & D Bitmapped Graphics

Storage Requirements (examples)A 10 inch by 8 inch photograph is stored at 1200 dpi using 256 colours.How much memory would be required to store this image?

10 inches

8 i

nche

s

Page 19: SD & D Bitmapped Graphics

Storage Requirements (examples)Image size 10 in x 8

inDPI 1200Colours 256

Pixels used to store image = (10 x 1200) x (8 x 1200) = 115200000

Page 20: SD & D Bitmapped Graphics

Storage Requirements (examples)Image size 10 in x 8

inDPI 1200Colours 256

Pixels used to store image = (10 x 1200) x (8 x 1200) = 115200000

256 colours = 8 bits = 1 byte

Page 21: SD & D Bitmapped Graphics

Storage Requirements (examples)Image size 10 in x 8

inDPI 1200Colours 256

Pixels used to store image = (10 x 1200) x (8 x 1200) = 115200000

256 colours = 8 bits = 1 byte

Amount of memory = 115200000 x 1 byte

= 115200000 bytes

= 115200000 / 1024 / 1024

= 109.86 Mb

Page 22: SD & D Bitmapped Graphics

Advantages of bitmapped graphicsThe file area is fixed

• The A4 page in the previous slide will need 110 Mb of memory irrespective of the size of the graphic on the page.

The graphic can be edited to pixel level

Page 23: SD & D Bitmapped Graphics

Disadvantages of bitmapped graphicsEnlarging the image causes a loss in quality

• An A4 page using 256 colours at 1200 dpi will need 110 Mb of memory

• An A4 page using 65,536 colours at 1200 dpi will need 220 Mb of memory

• Compression can be used to decrease the size of these files when they are stored on disk

The file is printed at the same resolution as it is shown on the screen

The file size is very large

• A graphic created on the screen using 300 dpi cannot be printed at a higher resolution (eg 600 dpi)

Page 24: SD & D Bitmapped Graphics

CreditsHigher Computing – Data Representation – Bitmapped Graphics

Produced by P. Greene and adapted by R. G. Simpson for the City of Edinburgh Council 2004

Adapted by M. Cunningham 2010

All images licenced under Creative Commons 3.0• Sets of blue waves and surfing boards by Horia Varlan (Flickr)• Black & White Atlanta skyline by Glen Edelson (Flickr)• A Cactus Flower for Capt. Suresh by Koshy Koshy (Flickr)• Sunset over the Danube - Budapest by joiseyshowaa (Flickr)• Edinburgh skyline by rovingI (Flickr)