-
Book Overview & Buying
-
Table Of Contents
ASP.NET Site Performance Secrets
By :
Reducing the size of your image files will reduce your bandwidth costs and reduce load times. Unlike caching and parallel loading, this approach is not dependent on the vagaries of browsers and proxies. Later on, we'll see various tools with which you can reduce image file sizes. But first, let's have a look at choosing the optimal image format based on the content of the image.
Most browsers recognize at least the three main image formats: JPEG, GIF and PNG. Each image format stores the image in a compressed form, using its own compression algorithm, and supports different features such as animation:
|
Format |
Compression |
Supports Transparency |
Supports Animation |
|---|---|---|---|
|
|
Lossy: Sacrifices image quality for better compression. Optimized for smooth color transitions, millions of colors. Produces artifacts around sharp transitions of color. |
No |
No |
|
|
Nonlossy: No loss of quality. Compresses better than |
Yes* |
No... |
Change the font size
Change margin width
Change background colour