A-level Computing/AQA/Paper 1/Fundamentals of data representation/Bitmapped graphics

From testwiki
Jump to navigation Jump to search

Template:CPTPageNavigationU1


Overview

Template:Dbox Template:Dbox

This example shows an Bitmap image with a portion greatly enlarged, in which the individual pixels are rendered as little squares and can easily be seen. Try looking closely at your monitor or mobile phone screen to see if you can spot the pixels
Bitmaps are very good for storing things such as photographs

Resolution

Template:Dbox Template:Dbox

The higher the resolution, the more pixels are available. Therefore the crisper the picture
There are many different video display formats out there, with different widths and heights, and total numbers of pixels

Example

Template:ExampleRobox Using the diagram above we are going to work out how many pixels are required to display a single frame on a VGA screen.

Checking the resolution:

Height = 480
Width = 640
Area = Width * Height = Total Pixels
Area = 640 * 480 = 307200

Template:Robox/Close

Questions

Template:CPTExercise Template:CPTQuestion Template:CPTAnswerTabThe smallest possible addressable area defined by a solid colour, represented as binary, in an image. Template:CPTAnswerTabEnd Template:CPTQuestion Template:CPTAnswerTabThe amount of pixels an image contains per inch/cm Template:CPTAnswerTabEnd Template:CPTQuestion Template:CPTAnswerTabthe number of pixels per row by the number of pixels per column Template:CPTAnswerTabEnd Template:CPTQuestion Template:CPTAnswerTab100 * 70 = 7000 pixels Template:CPTAnswerTabEnd Template:CPTQuestion Template:CPTAnswerTab30 * 40 = 1200 pixels Template:CPTAnswerTabEnd Template:CPTQuestion Template:CPTAnswerTab1920 x 1080 = 2073600 pixels Template:CPTAnswerTabEnd Template:CPTQuestion Template:CPTAnswerTab700 / 35 = 20 pixels Template:CPTAnswerTabEnd Template:CPTQuestion Template:CPTAnswerTab higher resolution images are able to display more detail, providing crisper images Template:CPTAnswerTabEnd Template:CPTQuestion Template:CPTAnswerTabIt will require a lot of space to store it. Meaning you'll quickly run out of memory, or it'll take a long time to transmit images across the internet or other data route.Template:CPTAnswerTabEnd Template:Robox/Close

Colour Depth

Template:Dbox

Colour depth 1 bit 2 bit 4 bit
Example
Description Mono-chrome, only stores black and white stores 4 colours:
RGB(70,61,55), RGB(79,146,85)
RGB(129,111,134), RGB(149,146,166)
Stores limited colours
Number of colours
per pixel
21=2 22=4 24=16
Colour depth 8 bit 24 bit
Example
Description close to reality hard to see any difference between reality
Number of colours
per pixel
28=256 224=16777216

It seems pretty obvious that the higher the colour depth, the closer the picture will look to reality. Why then don't we just ramp up the colour depth on every image that we make? The answer should be obvious, for a fixed resolution, the higher the colour depth, the larger the file size.

Example

Template:ExampleRobox All the images above are of the same resolution:

300*225 = 67500 pixels

If the first image uses 1 bit to store the colour for each pixel, then the image size would be:

Number of Pixels * Colour Depth = Image Size
      67500      *     1 bit    = 67500 bits

For the second image uses 2 bits to store the colour for each pixel, then the image size would be:

Number of Pixels * Colour Depth = Image Size
      67500      *    2 bit    = 135000 bits

Template:Robox/Close

Questions

Template:CPTExercise Template:CPTQuestion Template:CPTAnswerTab The number of bits used to represent the colour of a single pixel Template:CPTAnswerTabEnd Template:CPTQuestion Template:CPTAnswerTab 28=256 Template:CPTAnswerTabEnd Template:CPTQuestion Template:CPTAnswerTab 210=1024 Template:CPTAnswerTabEnd Template:CPTQuestion Template:CPTAnswerTab 30*40*4=4800bits Template:CPTAnswerTabEnd Template:CPTQuestion Template:CPTAnswerTab 30*40*6=7200bits Template:CPTAnswerTabEnd Template:CPTQuestion Template:CPTAnswerTab 30*40*2=2400bits Template:CPTAnswerTabEnd Template:CPTQuestion Template:CPTAnswerTab 24=16colours Template:CPTAnswerTabEnd Template:CPTQuestion Template:CPTAnswerTab 6 as: 26=64colours Template:CPTAnswerTabEnd Template:CPTQuestion Template:CPTAnswerTab 8 colours is 3 bits per pixel as: 23=8colours
h * w * b = 20 * 30 * 3 = 1800 bits Template:CPTAnswerTabEnd Template:CPTQuestion Template:CPTAnswerTab When you want to save file space or when you only need a specific palate of colours such a mono-chrome Template:CPTAnswerTabEnd Template:Robox/Close Template:BookCat