Web Design with HTML and CSS

(National Geographic (Little) Kids) #1

86


Choosing the best fi le format for your image


Web Design with HTML and CSS Digital Classroom

Choosing the right fi le format


The most popular formats for web images are JPEG, PNG, and GIF. Each one of these
formats has benefi ts and drawbacks, as shown in the following table.

File Formats

FILE
FORMAT LOSSY SUPPORTS ANTI-ALIASINGSUPPORTS TRANSPARENCYSUPPORTS ANIMATIONSSUPPORTS VARYING AMOUNTS OF TRANSPARENCYHAS LIMITED COLORSIS BEST FOR PHOTOSIS BEST FOR SOLID COLORS
JPEG •• •
PNG-8 ••••
PNG-24 ••••••
GIF ••••

Choosing the best fi le format for your image


Throughout this lesson, you will have the opportunity to save images in each of the major
fi le formats: JPEG, PNG, and GIF. You will also see the diff erences between the formats and
when to use each.

Saving images as JPEGs.


The JPEG fi le format helps you keep the fi le size down, but some loss in image quality
occurs when you save the image fi le. Since the JPEG format supports anti-aliasing, we
recommend it for photographic images and illustrations with a lot of gradients; anti-aliasing
is a technique used in computer graphics that helps smooth out the naturally jagged edges of
objects such as text or any area where a transition in tonal values is needed. When saving an
image as a JPEG, you can also choose varying levels of quality.
Free download pdf