- The word pixel is short for ‘pictel’, or ‘picture element’
- This is because pixels are the tiny blocks of colour that make up most pictures
- To illustrate this, I’ve pixelated some random images from my picture library:
- (To pixelate is to enlarge so the individual pixels are visible)
- Breaking up an image into pixels like this makes it possible for a computer to store it
- Each pixel is stored in order as a series of binary digits
- The more colours in the image, the more binary you need to represent each pixel
- The amount of bits (binary digits) used for each pixel is called the colour depth of the image
- With a 1 bit colour depth you can represent two colours (because a bit can be either 0 or 1). Normally it’s black and white.
- With 8 bit colour depth you can have 256 colours. That’s 00000000 to 11111111 in binary
- Pictures actually have more colours than you’d expect, so the .jpg format has a colour depth of 24 bits. (More than 16 million colours)
A simple example:
- This image has only two colours: it has a colour depth of 1 bit
- (Ignore the grid. It’s there to make it easier to see the pixels!)
- Starting from the top, using a 1 for black pixels and a 0 for white pixels, the image can be represented as:
- Simple, 1 bit per pixel – black or white
- That’s not all the computer needs to know to draw the image, though…
- Meta data is all the extra things a computer needs to know to draw the picture
- Imagine you’re given the long binary number above and told to draw the picture
- You don’t necessarily know that it’s a colour depth of 1, so how do you know when the numbers for the first pixel ends?
- You need to know how many binary digits there are for each pixel — the colour depth
- If you guessed the colour depth was 1 (computers can’t guess) and started to draw, you’d still have a problem:
- How do you know when to start a new row?
- You need to know the width and height of the image
- There’s one more thing the computer needs to know, and it’s in this list:
- Colour Depth
- You may be asked to list meta data in the exam, so learn those!
- Colour depth is a number
- Width and height are measured in pixels
- Resolution is measured in pixels per inch (PPI)
- If you have two pictures the same width and height with different resolutions the one with the highest resolution has more pixels
- Having a higher resolution means there are more pixels in the same amount of space
- A picture with a high resolution is detailed
- A high resolution picture takes up more memory than a low-res picture
- The computer needs to know the resolution because it needs to know how big to make the picture.
(It knows the size, in pixels, of the picture but it doesn’t know how large to make each pixel. If every picture was drawn with pixels the size of the ones in the smiley face picture above, most wouldn’t fit on the screen!)
- The resolution isn’t the size in centimetres, though it’ s the amount of pixels per inch. (Grrr, I hate imperial measurements… why not just centimetres?)
- It is measured in Pixels Per Inch (PPI, for short)
End Sub //That just about wraps up image representation. Now for some:
Possibly Related articles automatically suggested that I chose to include. As usual, the ones with arrows are by me.
- GCSE Computing Revision – Converting to and from Binary Numbers and Understanding Binary (mattg99.wordpress.com) <–
- GCSE Computing Revision – Data Sizes (mattg99.wordpress.com) <–
- Video Compression (gaprogman.wordpress.com)
- GCSE Computing – Machine Code, Low and High level programming languages revision (mattg99.wordpress.com) <–
- GCSE Computing Revision – Programming Setup (mattg99.wordpress.com) <–
- Simplicity In 16 Pixel (borrys.wordpress.com) Some pixel art in this one
- Revision Season Begins – The Plan (mattg99.wordpress.com) <–
- Exam Stress (chennaichallenge.com)