Presentation is loading. Please wait.

Presentation is loading. Please wait.

Binary 4 File Sizes.

Similar presentations


Presentation on theme: "Binary 4 File Sizes."— Presentation transcript:

1 Binary 4 File Sizes

2 Calculating File Size: Images
An image has a width in pixels and a height in pixels Start by calculating the number of pixels all up 640 x 480= 640 wide 480 high

3 Calculating File Size: Images
An image has a width in pixels and a height in pixels Start by calculating the number of pixels all up 640 x 480= 307,200 pixels 640 wide 480 high

4 Calculating File Size: Images
For each pixel in the picture we need to specify a particular colour from a range of possible colours. We can give either: The colour depth e.g. 24-bit colour The number of colours e.g. 16 million colours (224=16,777,216)

5 Calculating File Size: Images
Number of colours If the image is plain black and white (no grey) then it uses 1 bit to represent each pixel How many bits are needed to represent 16 colours? How many bits are needed to represent 256 colours?

6 Calculating File Size: Images
Number of colours If the image is plain black and white (no grey) then it uses 1 bit to represent each pixel How many bits are needed to represent 16 colours? 24= 16  4 bits How many bits are needed to represent 256 colours? 28 = 256  8 bits

7 Calculating File Size: Images
So to calculate the file size we multiply the number of pixels by the number of bits to represent each pixel 640 x 480= 307,200 pixels Using 16 colours = 4 bits 307,200 x 4 = 1, 228, 800 bits

8 Calculating File Size: Images
To convert 1, 228, 800 bits to kilobytes… There are 8 bits in a byte: 1, 228, 800 bits / 8 = 153, 600 bytes There are 1000 bytes in a kilobyte 153, 600 bytes / 1000 = kB To convert megabytes, we would divide by 1000 again.

9 Calculating File Size: Images
In MB what is the file size of: An image 640 x 480 in 24 bit colour? An image 1280 x 720 using 1024 colours?

10 Calculating File Size: Images
In MB what is the file size of: An image 640 x 480 in 24 bit colour? x 480 x 24 = 7, 372, 800 bits 7, 372, 800 bits /8 = 921, 600 bytes 921, 600 bytes /1000 = kB kB /1000 = 0.92MB An image 1280 x 720 using 1024 colours? x 720 x 10 = 9, 216, 000 bits 9, 216, 000 bits /8 = 1, 152, 000 bytes 1, 152, 000 bytes /1000 = 1152 kB kB /1000 = 1.15MB

11 Calculating File Size: Sound
To calculate the size of a sound file we multiply the: Time length of the audio clip: 20 second The rate at which it was sampled: 4 kHz (remember that kilo means 1000!!) The audio quality: 8 bit audio 20 seconds x (4KHz x 1000)hertz x 8 bit =

12 Calculating File Size: Sound
20 seconds x (4KHz x 1000)hertz x 8 bit = 640, 000 bits 640, 000 bits /8 = 80, 000 bytes 80, 000 bytes /1000 = 80 kB

13 Calculating File Size: Sound
In MB what is the file size of: A 60 second audio clip, sampled at 44KHz, using 16 bit audio? A 1.5 minute audio clip, sampled at 96KHz, using 24 bit audio?

14 Calculating File Size: Sound
In MB what is the file size of: A 60 second audio clip, sampled at 44KHz, using 16 bit audio? 60 x x 16 = 42,240,000 bits 42,240,000 bits /8 = 5,280,000 bytes 5,280,000 bytes /1000 = 5,280 kB 5,280 kB / 1000 = 5.28 MB A 1.5 minute audio clip, sampled at 96KHz, using 24 bit audio? 90 x x 24 = 207,360,000 bits 207,360,000 bits /8 = 25,920,000 bytes 25,920,000 bytes / 1000 = 25,920 kB 25,920 kB / 1000 = 25.9 MB


Download ppt "Binary 4 File Sizes."

Similar presentations


Ads by Google