BBC HomeExplore the BBC

9 November 2009
Accessibility help
Text only
Ask Bruce - Instant answers to your Internet questions WebWise

BBC Homepage

WebWise
Guides
Ask Bruce!
Net Comment

Contact Us

Like this page?
Send it to a friend!

 
What is the difference between a GIF and a JPG? Print this article
Play.com hit by ordering glitch
Gadget problems divide the sexes
Early origins for uncanny valley
China plans for humanoid Olympics
F1 designer unveils electric car
EU offers hope to file-sharers

The JPG (or JPEG) format is used for images with lots of colours, while the GIF format is better for images that have fewer colours.

Knowing the difference between GIFs and JPGs will help you make a better choice when you are saving images to use on the web.

So, if you want to use a photo on a website, for instance, it is useful to know that saving it as a JPG will give you a better quality image than saving it as a GIF.


Images for the web

JPG (also known as JPEG) files and GIF files are image files, and they have .jpg and .gif file extensions.

JPGs and GIFs are the two most common image files found on the web, and can be opened in all web browsers.

A newer format for the web is the PNG format, but this format is not as popular, and is not yet recognised by all browsers.


JPGs

JPG images are better at holding more colour information when they are being saved.

This means that shading and subtle colour changes look better if you save them as JPGs.

JPGs are most commonly used for photographs as they can hold information about the thousands of different colours in a photo without making the file size too big.

To do this they use a 'lossey' form of compression. This means that some of the picture information is 'thrown away' but if it's done right this shouldn't be noticeable to the naked eye.


GIFs

GIFs are better at saving images with sharp lines as they don't throw away any of the picture information.

They are usually used with text, logos, buttons, lines, and other images that have been created on a computer.

They are not very good for photographs or pictures with delicate shading as they can't hold information about more than 256 different colours.

GIFs are also used with images that have a transparent background, and with simple animations - JPGs cannot do transparent backgrounds or animations at all.

This is page 1 of 1 This is page 1 of 1
The BBC is not responsible for the content of external websites

JPEG / JPG
- a common type of image file that is good for saving photos and other images with many different colours.

GIF
- a type of image file. GIF files work best for non-photo images like logos and line drawings.



About the BBC | Help | Terms of Use | Privacy & Cookies Policy