Computers would be much less enjoyable to use, and much less useful if they couldn't display graphics. The World Wide Web might have started out as a purely text based system but imagine how impoverished our experience of it would be if it had stayed that way.
To give just one example the writing section of my website would be much less interesting without the Earth Vs the Flying Saucers movie poster. Note that I used a URL to link to an image at movieposter.com
Thankfully computer graphics are part of our everyday lives, but how many of us know how they work?
There are two different ways of storing graphics digitally. Raster and vector.
The raster system uses a grid. The computer stores information about the contents of each square in the grid.
The vector system stores each bit of information about the picture in relation to the other bits of information and to a notional starting point.
The three main graphics formats are PNG, JPEG and GIF. Each format has its own strengths and weaknesses.
1. GIF is perhaps the most widely used of the three. It is perfect for reasonably simple graphics. As I Librarian I might use it to put a logo or a simple drawing on a Library website.
If it was appropriate I could also use it to add some animation to the site. GIF is the only one of these three that can be used for that purpose. It is the cheapest way to add animation to a website.
GIF's main disadvantage is that it isn't suitable for photos or other complex pictures. It has a very limited palette. A GIF file can only support 256 colours.
2. PNG was intended to be a replacement for GIF. It is generally used for for similar kinds of image: logos, line drawings and other simple pictures. Its main advantages over its older rival are that it is better at compressing colour and it supports more colours. However it is important to note that PNG doesn't support animation. That suggests that it won't replace GIF.
On a Library website PNG would be used in a similar way to GIF.
3. JPEG is the standard way of storing photos digitally. It is also widely used for similar very complex images. The main reason for this is that it has a far larger range of colours than its rivals. An impressive 16 million plus to GIF's mere 256.
If I was running a library website I would use JPEG for any photos that I wanted to put up on the site; photos of Library events for example.
Lossy or Lossless
When dealing with graphics it is important to draw a distinction between lossy and lossless compression algorithms. GIFs and PNGs are lossless. If you try to make the files smaller then your images will lose colour and clarity but the data will be retrievable. It will be possible to restore them to former glory. JPEG on the other hand uses a lossy system. If you try to make a JPEG smaller then it will reduce the quality of the image and it will get rid of the data. You won't be able to restore the picture. It's important to save a backup copy of a JPEG file before you resize it.
Please see my website for an illustration of the lossy nature of JPEGs.