Hi Christa,
It's also important to remember that there are 2 kinds of sizes with regards
to pictures, and that each is important:
1. Pixel Size - This is the Height and Width of the image. It is better to
resize the picture in an editor than to resize it in the page, as it will
reduce the file size, and therefore, the download time in the client
browser.
2. File Size - This is the number of KB or MB of data in the file, and it
affects download time in the browser. It is not necessarily related to the
height and width of the image, although shrinking thos, as stated before,
will reduce the file size (usually, and if done correctly, so that
compression is not altered.
With regards to File Size, there are several methods for controlling this.
You can reduce the height and/or width of the image, which means that it has
less pixels. Another method is to use the right image type for the image. On
the web, there are basically 2 image types you can count on to be rendered
by any browser: JPG and GIF.
GIF format creates the smallest image size because it uses a pallette. The
way a pallette works is that a number of colors (colors are stored as 3
numbers - red, green, and blue) are stored one time in the image (the
pallette). The image itself is simply one number per pixel (dot), and that
number is the number of the index of the color in the pallette for that
pixel. So, let's say that purple was number 12 in the pallette. In a color,
that would be something like RGB 255, 0, 255. However, as the color purple
is stored in the pallette at index 12, each purple pixel only needs to store
the number 12. So, you use 1/3 as many numbers in the file to store the
image itself. The limitation of a GIF is that the maximum number of colors
you can store in the pallette is 256. This means that your image can only
have 256 colors in it. However, it can have ANY 256 colors you want in it.
So, GIFs are useful for images like charts that have a limited number of
colors in them.
A JPG uses RGB color for every pixel. This means that a pixel can be
virtually any color the human eye can see. But as you can see, this means
that it takes 3 times as many numbers to store the pixels in a JPG file.
This is attenuated somewhat by the use of compression algorithms in the JPG
file. A compression algorithm is a sort of "mathematical trick" that enables
you to store more data in less space. If you've ever see a WinZip file, you
probably know what I'm talking about. However, the compression algorithms
for JPGs are "lossy." That means that the more you compress the image, the
more detail is lost, and the fuzzier the image becomes. You have probably
seen such images on the web. JPGs are useful for images that have a lot of
different colors, like photographs.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.