Author: Mr Stratton

Computing teacher and a PT at Coltness High School.

SCHOLAR online sessions w/c 6th of March

Next week’s SCHOLAR online sessions will be:

  • Advanced Higher Physics – Monday, 6 March 6.00pm
  • Advanced Higher Modern Languages – Tuesday, 7 March 6.00pm
  • Higher Computing Science – Wednesday, 8 March 6.30pm
  • National 5 Maths – Thursday, 9 Match 5.00 – 5.30pm
  • Higher Maths – Thursday, 9 Match 6.00pm

Full details can be found on the SCHOLAR website: http://scholar.hw.ac.uk/Resources/Live_Online_Sessions/

 

N5 – Graphic Formats (Revision)

Graphic Formats

JPEG (.jpg) Lossy compression

  • 24 bit colour.
  • Allows the user to select an appropriate level of compression.
  • JPEG is a good compression format for high-quality images and images where quality is unimportant (e.g. thumbnails).

PNG (.png) Lossless compression

  • Intended to improve upon GIF format.
  • 24 bit colour.
  • Allows user to set alpha level for improved transparency.

GIF (.gif) Lossless compression • Restricted to 8 bit colour.

  • Several images can be stored in one GIF file, allowing for animation.
  • Allows a specific colour in an image to be made transparent.
  • GIF is a good compression format for images with areas of flat colour, images that have few colours, animated images or images that require transparency.

Graphic file size calculations

To calculate the file size (in bits) of a bitmap graphic file the basic formula is:

number of pixels in image x bit depth

  • Bit depth or colour depth is the number of bits that were used to store the colour of each pixel.
    • 8 bit – 256 colours
    • 16 bit – 65536 colours (High Colour)
    • 24 bit – 16777216 colours (True Colour)
  • DPI (dots per inch) the number of pixels in a physical inch of paper.

Example 1
Calculate the file size of a 400 x 400 pixel graphic with a colour depth of 24.

400 x 400 = 160000 pixels in the image
160000 x 24 = 3840000 bits
3840000 / 8 = 480000 bytes
480000 / 1024 = 468.75 KB

Example 2
Calculate the file size of a 300 x 200 graphic with 256 colours.
256 colours means a colour depth of 8 (because 2^8 = 256)

300 x 200 = 60000 pixels in the image
60000 x 8 = 480000 bits
480000 / 8 = 60000 bytes
60000 / 1024 = 58.6 KB

Example 3
Calculate the file size of a 6’ x 5’ image, scanned at 200dpi, with 16 bit colour.

6 x 5 x 200 x 200 = 1200000 pixels in image
1200000 x 16 = 19200000 bits
19200000 / 8 = 2400000 bytes
2400000 / 1024 = 2343.75 KB
2343.75 / 1024 = 2.3 MB

BGE – Media Type (Audio)

soundIn class today we used Audacity to explore how sound is stored inside a computer.

The sound wave energy is converted into electricity by the microphone, which is in turn converted to binary by the sound card.

We used Audacity to capture our voices then apply digital effects to them to change the sound.

You can use specialised websites and software such as http://sfbgames.com/chiptone , to create purely digital noises. These can then be saved and used inside other programs such as games.