- Standard file formats:
- Text: txt, rtf
- Audio: wav, mp3
- Graphics: jpeg, bmp, gif, png
- Video: mp4, avi
- Factors affecting file size and quality, including resolution, colour depth, sampling rate
- Calculation of file size for colour bitmap
- Need for compression
Standard file formats:
- Text:
- txt – Only stores text, no formating or fonts are stored. Very small file size
- rtf – Rich Text Format, formating information and graphics are stored as text.
- Audio:
- wav – uncompressed audio file format
- mp3 – Compressed audio file format
- Graphics:
- jpeg – lossy compression – used for photos, small file size
- bmp – Bitmap, uncompressed, large file size
- gif – Lossless compression, only 256 colours, used for animations and clip art, supports transparency
- png – Lossless compression, Millions of colours, supports partial transparency
- Video:
- mp4 – Compressed file format
- avi – Uncompressed file format
- Pdf: Portable Document Format – stores all formatting information and font details so that the document looks identical on all computers.
Factors affecting file size and quality
- resolution – the number of pixels used to make up the picture.
- colour depth – the number of possible colours used to make up a pixel. The more possible colours the greater the file size.
- sampling rate – in sound files the number of recordings taken per second., the greater the sample rate the higher the quality and file size.
Calculation of file size for colour bitmap
Formula
Number of pixels = image width x resolution x image height x resolution
Example 1
This is enlarged but is 1 inch by 1 inch at 22 Dots Per Inch. In that case there are 22 x 1 x 22 x 1 = 484 pixels
Example 2
Bitmap with a resolution of 600×600 pixels in 8 bit colour.
Storage requirements
600 x 600 x 1 bytes = 360000 It is 1 byte as it is 8 bits per pixel 360000/1024 = 351.6 kilobytes
Example 3
Calculate the number of pixels in 4 inch by 5 inch photograph scanned which has a resolution of 600 dots per inch.
Pixels = 4 x 600 x 5 x 600 = 7,200,000 pixels 1pixel = 1 bit 7,200,000 / 8 = 90000 bytes 90000 bytes / 1024 = 878.9 Kb
Need for compression
Compression reduces the file size so that the web page loads more quickly. Reducing bit depth has the same impact. Quality of the image is affected.