higher bit mapped compression techniques

16
Bit-mapped Compression Techniques Run Length Encoding (RLE) Lempel Ziv Welch (LZW) Colour Look-up Table (CLUT)

Upload: scaddell11

Post on 01-Nov-2014

666 views

Category:

Education


2 download

DESCRIPTION

Higher Computing information slides relating to compression techniques used when storing bit-mapped file formats

TRANSCRIPT

Page 1: Higher bit mapped compression techniques

Bit-mapped Compression Techniques

Run Length Encoding (RLE)Lempel Ziv Welch (LZW)

Colour Look-up Table (CLUT)

Page 2: Higher bit mapped compression techniques

Colour Lookup Table

• CLUT

True Colour = 24 bits p/pixel

True Colour = 16, 777, 216 colours

This is known as the FULL PALETTE

Page 3: Higher bit mapped compression techniques

CLUT

• Used in image editing programmes

• Allows a user to specify the colours used in an image (setting up their own)

• These ‘mini’ palettes use colours taken from the 24-bit system (True Colour)

Page 4: Higher bit mapped compression techniques

What does a palette look like?

• This is an example of a colour palette

Page 5: Higher bit mapped compression techniques

What is RGB?

• The RGB color model is an additive color model in which red, green, and blue light is added together in various ways to reproduce a broad array of colors.

• The name of the model comes from the initials of the three additive primary colors, red, green, and blue.

• Each colour created using this technique has a code:255-250-250 / 139-137-137

Page 6: Higher bit mapped compression techniques

QUESTION 1

• Explain the purpose of a CLUT in a bit mapped file format

Page 7: Higher bit mapped compression techniques

ANSWER 1

• Explain the purpose of a CLUT in a bit mapped file format

The RGB colour code for each colour used in the image is stored in the colour lookup table

A local palette storing the selection of colours used in the image

1 mark for any valid point

Page 8: Higher bit mapped compression techniques

QUESTION 2

• Describe a benefit of using a CLUT when applying effects to a bitmap image.

Page 9: Higher bit mapped compression techniques

ANSWER 2

• Describe a benefit of using a CLUT when applying effects to a bitmap image.

Changes to the palette affect the whole screen at once, so faster than editing pixel by pixel

Can be used to produce special effects which would be much slower to produce by updating pixels

Page 10: Higher bit mapped compression techniques

Run Length Encoding (RLE)

• Colours are used again and again throughout an image

• RLE gets colour code, stores it, then repeats it where required in the image.

• Colour code only stored once

• Saves storage (compresses file)

Page 11: Higher bit mapped compression techniques

QUESTION 3

• Describe how the RLE compression method reduces the file size.

Page 12: Higher bit mapped compression techniques

ANSWER 3

• Describe how the RLE compression method reduces the file size.

• Areas of a particular colour) compressed by storing the colour to repeat (1 mark)

• And the number of pixels to repeat for (1 mark)

2 mark question

Page 13: Higher bit mapped compression techniques

QUESTION 4

• Explain why this compression method may not be effective on this image file.

Page 14: Higher bit mapped compression techniques

ANSWER 4

• Explain why this compression method may not be effective on a complex photographic (bit-mapped) image.

The image does not contain that many large blocks of the same colour (1 mark)

Therefore the amount of compression will be limited (1 mark)

2 mark question

Page 15: Higher bit mapped compression techniques

Lempel Ziv Welch (LZW)

• Looks for commonly repeated bit patterns

• These patterns are stored in a look-up table

• Patterns allocated an index number

• Index number stored rather than complete patterns

Page 16: Higher bit mapped compression techniques

Disclaimer

• Questions taken from 2008 past paper in accordance with SQA rules:

The information in this publication may be reproduced to support SQA qualifications only on a non-commercial basis.