Click to skip over navigation
 

lecture 5: preparing images

<< previous slide

return to lesson 5 index

next slide >>


Images are stored in a variety of different file formats; too many different ones to list here. It is important to understand that not all image formats are the same. The crucial difference - at least as far as using images on the Web goes - comes with how precisely the computer stores the image. This is covered in more detail on the page, image types in the online teaching materials, but I wlil review the crucial points here.

Scanners and digital cameras produce images in a format known as .tif. These files record information about each pixel individually, and remember that three bytes are needed to store this (one for red, one for green, one for blue). Bear in mind that even relatively low-spec digital cameras create images with a couple of million pixels (that's what "megapixel" means) and you can get some idea of how large these images are in memory terms.

Because of this you cannot take an image straight off a digital camera or scanner and use it on the WWW. You must first convert it to a different format. There are three formats used on the WWW and they are noted below. Each of these compresses the information by stripping out redundancies. An analogy is with texting, where "wd u like 2 meet 4 a beer" is still an understandable message despite having lost some of its detail.

Compression gets file sizes down from millions of bytes to thousands. This makes them much quicker to download (particularly for dial-up connections, which the majority of the world still uses) and means the world's communication networks are not clogged up with redundant information. Future technological changes will doubtless alter this guideline but for now it's the way it is: the ideal size for a web image is certainly under 100Kb and ideally around 40 - 50Kb maximum.

.gif - this works best for images with blocks of solid colour such as logos, screen shots and banners. In this football club badge, you can see the colours are solid blocks.
Image: club badge with solid colouring

.jpg (usually pronounced "jay-peg"). This is more suitable for photographs. In the image below, not all the greens are the same.
Image: Jumble Hole Clough, near Hebden Bridge, West Yorkshire, UK

.png. This stands for "Portable Network Graphic" and is usually pronounced "ping". It was a format specifically designed for web use but has not really caught on yet - simple inertia seems to have prevented this. It was also the case until recently that some browsers did not recognise it, though this is now mostly changed. But it is still seen only rarely.

To convert an image from one format to another usually takes little more than loading it up into an image processing package like Photoshop or Paint Shop Pro and using "Save As..." to change the format (you will see there are dozens of available ones). These packages do, however, have several other web-relevant features, such as being able to save an image as "interlaced" - this means that when the image downloads it appears like a "ghost" of its complete self at first and becomes more detailed, rather than downloading from top to bottom. These facilities are beyond the scope of this core but you can find out more about them, and about how to work with images more generally, in the Graphics on the PC option.




<< previous slide

return to lesson 5 index

next slide >>