representation of images you need to know: (k) explain the representation of an image as a series of...

13
Representation of Images You need to know: (k) explain the representation of an image as a series of pixels represented in binary (l) explain the need for metadata to be included in the file such as height, width and colour depth (m) discuss the effect of colour depth and resolution on the size of an image file. N Martin Jan 2011

Upload: sara-stanley

Post on 05-Jan-2016

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Representation of Images You need to know: (k) explain the representation of an image as a series of pixels represented in binary (l) explain the need

Representation of ImagesYou need to know:

(k) explain the representation of an image as a series of pixels represented in binary

(l) explain the need for metadata to be included in the file such as height, width and colourdepth

(m) discuss the effect of colour depth and resolution on the size of an image file.

N Martin Jan 2011

Page 2: Representation of Images You need to know: (k) explain the representation of an image as a series of pixels represented in binary (l) explain the need

Representing pictures in binary

• Bitmap imagesThe page is divided into an

invisible grid and each pixel is assigned a colour

Draw a circleradius: 6 pixelscentre: 10, 10line thickness: 1 pixel

• Vector imagesDrawn by following a set of mathematical instructions

Page 3: Representation of Images You need to know: (k) explain the representation of an image as a series of pixels represented in binary (l) explain the need

Bitmap imagesCertain information must be defined for the bitmap image, this is called METADATA (or data about data)

Size of grid

Width: 20 pixelsHeight: 20 pixels

Page 4: Representation of Images You need to know: (k) explain the representation of an image as a series of pixels represented in binary (l) explain the need

Bitmap imagesResolution depth

How many pixels will there be per unit of length

10 pixels per inch 72 pixels per inch

The greater the resolution depth:•The sharper the image•The more data needs to be stored and the larger the file size on disk

Page 5: Representation of Images You need to know: (k) explain the representation of an image as a series of pixels represented in binary (l) explain the need

Bitmap imagesColour depth

How many bits will be used to store the colour for each pixel in the grid1 bit allows 2 different values 2 different colours

2 bit allows 4 different values 4 different colours

3 bit allows 8 different values 8 different colours

... ...

8 bit allows 256 different values 256 different colours

24 bit allows 16,777,216 different values 6,777,216 different colours

The greater the colour depth:•The more realistic colours•The more data needs to be stored and the larger the file size on disk

Page 6: Representation of Images You need to know: (k) explain the representation of an image as a series of pixels represented in binary (l) explain the need

L- Meta DataWhen an application such as a web browser or word processor wants to open a picture, it needs to know more than the information held about each pixel. For example, it needs to know:• the height and width of the

image• how many pixels there should be

in a square inch (the resolution)• how many bits are being used to

define the colour of each pixel (colour depth).

Page 7: Representation of Images You need to know: (k) explain the representation of an image as a series of pixels represented in binary (l) explain the need

Meta Data

The application needs to know this information so that it can display the picture properly. In addition, however, there may be other information held as part of the image file, other metadata. These might include:

– who owns the copyright to the image so that someone knows who to contact if they want to use the image

– when the image was created so that a user can see if the image is up-to-date

– keywords (tags) so that the image can be easily searched for on the Internet

– what software was used to create the image so someone can try the software for themselves if they were impressed with the image.

Page 8: Representation of Images You need to know: (k) explain the representation of an image as a series of pixels represented in binary (l) explain the need

Bitmap Images

Page 9: Representation of Images You need to know: (k) explain the representation of an image as a series of pixels represented in binary (l) explain the need

Bitmap Images

Page 10: Representation of Images You need to know: (k) explain the representation of an image as a series of pixels represented in binary (l) explain the need

Bitmap Images

Page 11: Representation of Images You need to know: (k) explain the representation of an image as a series of pixels represented in binary (l) explain the need

Indexed ColourA colour palette is stored inside the image file as part of the meta data.

AdvantagesIndexed colour saves a lot of memory, storage space, and transmission time

DisadvantagesHas a limited set of simultaneous colours per image, ok for 4 or 16 colour palettes but not for real life images.

Page 12: Representation of Images You need to know: (k) explain the representation of an image as a series of pixels represented in binary (l) explain the need

Direct ColourEvery colour can be made up from the correct mix of RED, GREEN and BLUE

Page 13: Representation of Images You need to know: (k) explain the representation of an image as a series of pixels represented in binary (l) explain the need

Direct ColourBy mixing the appropriate amount from each of the three colour channels you can get a variety of colours

R G B α FF FF FF 00 00 00 00 00 00 00 FF 00 80 00 96 00 96 00 80 00 00 FF 00 00 FF FF 00 00 80 80 00 00 FF 00 00 00

There is a 4th channel, called the alpha channel which handles transparency

What gets stored for each pixel is just a combination of each channelEg FFFFFF00 means the pixel is white96008000 means the pixel is lilac

8 bit gives 256 coloursReal life colour needs 15 or 16 bits24-bit or “truecolor “gives over 16.7 million colours