Pictures can take up a great deal of disk space on the computer, or they can take up a small amount of disk space. The amount of space they take up depends on a number of factors. In most, but not all, of these cases, you can reduce the quality of your picture to save disk space although some things will save disk space with little or no reduction in quality.
The higher this number is, the better quality your picture will be. All computer pictures are made up of a bunch of dots (on the screen, the dots are called pixels). The dots are usually very small and close together, so you don't see the dots; instead you see the picture. If you have more dots in a small space, you generally have a higher quality picture. The fewer dots per inch, the grainier the picture will look.
If you have a 3 inch by 5 inch picture, with 600 dots per inch (dpi), your picture consists of (3 x 600) x (5 x 600) dots which equals 5,400,000 dots. If you reduce that to 300 dpi, you have (3 x 300) x (5 x 300) dots which equals 1,350,000. Because a picture is two-dimensional, by cutting the dpi in half, you have cut your number of dots one fourth.
Most printers will printer 300 or 600 dpi, although photo quality printers will now print at even higher dpi. For excellent quality, you will usually choose 300 or 600 dpi. For most applications that don't require excellent quality, and for applications that are to be shown on a computer screen at approximately the original size, you will often choose 72 dpi.
If your picture is black and white with no shades of gray, each dot has 2 options: black or white. Since a bit (binary digit) on the computer can be either 1 or 0 (2 options), one bit can store information about one black/white dot. For example if the bit is 1, the dot is black; if the bit is 0, the dot is white.
If you want to add color or shades of gray, you need more bits. If you have four options for color or gray, you will require 2 bits. For example, your bits might represent the following colors:
00 = white
01 = red
10 = green
11 = black
Or for shades of gray:
00 = white
01 = light gray
10 = dark gray
11 = black
This is better than strictly black and white, but it is not enough to clearly show a color photograph. If you want 256 options for each dot (this is the best that HyperStudio will do), you will need 8 bits for each dot. If you want 64 thousand options for each dot (this is pretty good quality), you will need 16 bits for each dot. If you want 16 million options for each dot (this is very close to true color), you will need 24 bits for each dot.
For our 3 inch by 5 inch picture, we now have a good estimate of the number of bits we will need. The general formula is
(hsize x dpi) x (vsize x dpi) x color-depth
For a 3 x 5 picture, with 600 dpi, and 16 million colors:
(3 x 600) x (5 x 600) x 24 = 129,600,000 bits
At great quality, our 3 x 5 picture takes up over 100 million bits; that's a lot of disk space.
Generally, computer memory and disk space is not measured in bits, but in bytes. A byte is general 8 bits, so we can divide our 129 million bits by 8 to get the number of bytes. That gives us 16,200,000 bytes or 15,820 kilobytes (KB) or 15 megabytes (MB). An average floppy disk holds a little over 1 MB, so we would need about 15 floppy disks to hold our picture (and a very long time to download our picture over a modem). Something has to give.
We can start by reducing all the numbers that we can control. We could make our picture a little smaller, say 2 x 4. We could cut the dpi to 72. We could live with 256 colors (8 bits). Now our picture would be:
(2 x 72) x (4 x 72) x 8= 331,776 bits = 41,472 bytes = 40.5 KB
Now our picture fits on a floppy disk. It is a reasonable size, but we have given up a great deal in quality.
The last and best thing you can do to reduce the size of your picture is to use a compression algorithm. The most commonly used ones are JPEG (Joint Photographic Experts Group) and GIF (Graphics Interchange Format). Both of these compression algorithms can save a tremendous amount of disk space. JPEG is generally used for photographs and GIF is generally used for drawings.
JPEG is better for pictures because it can store 24 bits for each dot. This gives us 16 million colors, which is almost true color. The problem with JPEG is that it is "lossy." That is when you store something with JPEG, you can never quite get back to the original. For most of your purposes, you will not notice significant loss, even when storing pictures in low or medium quality with JPEG.
GIF is good for drawings and simple graphics because it can store up to 8 bits for each dot. In addition GIF is not lossy, so assuming your original image did not need more than 256 different colors, you can get the original picture back perfectly with GIF.
There are many ways that compression can reduce the size of a picture. The simplest way is to find patterns in the picture. For example, if a large chunk of a picture has the same shade of blue, the computer can use 24 bits to define that shade of blue once, and a few more bits to define the region in which that blue exists. Because the compression is looking at the characteristics of each picture, the savings in disk space will vary from picture to picture, but the savings can easily exceed 90%.
This page was prepared by: David M. Marcovitz, Ph.D.
Last updated: March 6, 2003