Category Archives: 6. External Sites

SVG Tutorial

Object oriented graphics (Vector Graphics) are scalable but often need specialised viewers

SVG Short for Scalable Vector Graphics, a vector graphics file format that enables two-dimensional images to be displayed in XML pages on the Web. Vector images are created through text-based commands formatted to comply with XML specifications. In contrast to JPEG and GIF images on the Web, which are bitmapped and always remain a specified size, SVG images are scalable to the size of the viewing window and will adjust in size and resolution according to the window in which it is displayed.

Please turn to page 90 of your scholar notes and follow the tutorial to create the images shown there. If you want to learn more then try these tutorials.

You can view the saved SVG files with irfanview.

Colour Look-Up Table (CLUT)

From Dictionary.com

A device which converts the logical colour numbers stored in each pixel of video memory into physical colours, normally represented as RGB triplets, that can be displayed on the monitor. The palette is simply a block of fast RAM which is addressed by the logical colour and whose output is split into the red, green and blue levels which drive the actual display (e.g. CRT).
The number of entries (logical colours) in the palette is the total number of colours which can appear on screen simultaneously. The width of each entry determines the number of colours which the palette can be set to produce.
A common example would be a palette of 256 colours (i.e. addressed by eight-bit pixel values) where each colour can be chosen from a total of 16.7 million colours (i.e. eight bits output for each of red, green and blue).
Changes to the palette affect the whole screen at once and can be used to produce special effects which would be much slower to produce by updating pixels.

Number of colours

The Number of colours is calculated as using 2bit depth So we have the following. The phrase colour depth can be used in place of bit depth.

Colour Depth Number of Colours Description
1 2 Black and White
8 256 8bit
16 65,536 High Colour
24 16,777,216 True Colour

On a side note, I asked the maths department how to go from the number of colours to the colour depth.

Mr Barnstaple helpfully provided me with this

  • Colours = 2Bit Depth
  • Bit Depth=log(Colours)/log(2)

Which is I’m sure we will all agree very useful,  but it might be easier to memorise the table above 😉

PS if you want the proof  here it is Continue reading Number of colours

Graphic file sizes calculations

We covered this in class last week. Forrester have a good concise article on this subject

Please answer these questions

1. 600 x 300 pixels, 24 bit colour depth

2. 600 x 400, 16 bit colour depth

3. 600 x 600, 24 bit colour depth

4. An image is 6 inches by 8 inches, and has a resolution of 1200 dpi. It has a bit depth of 20.
(a) How many colours can the image store?
(b) What will be the file size of the image?

5. A photograph measures 10 inches by 7 inches, and has a resolution of 400 dpi. The number of colours each pixel can store is 65536.
(a) What is the bit depth of the image?
(b) What will be the file size of the image?

Container files & CODECS

Codecs are instructions for “Compressing – Decompressing” or “Coding – Decoding” streams of data. These instructions can be either software or hardware based. Hardware based encoders/decoders are very fast and do not put strain on the CPU. This allows relatively low computing power devices like DVD players and the Raspberry Pi to display full screen videos.

You need to have the right codec installed to view the compressed files, although some programs have codecs built into them.

To find the codec of a file, it is necessary to look at the header information on the file, there are utilities to do this for you.

[kml_flashembed movie="http://www.youtube.com/v/_nPsBwMivCk" width="425" height="344" allowfullscreen="true" fvars="fs=1" /]

Container files contain several compressed files, the header is used to decompress the files. RIFF and MP4 are examples of container files.