JPEG file format

JPEG file format cover image
  1. Home
  2. Graphics
  3. JPEG file format

The JPEG or JPG file format was adopted quite early on the Internet. It’s name comes from Joint Photographic Experts Group, the organization that created the format. As evident from the name, JPEG images are used mainly for photographs.

The JPEG come in two flavours, a plain JPG file and a Progressive jpg. The latter are similar to Interlaced gifs wherein the image is displayed in the browser in a series of passes.

In contrast to Gifs that can have only 256 colors, JPEG images can contain 16.7 million colors (24-bit color information). Also, JPEGs do not use palettes like Gifs and cannot have transparency.

Sponsored Links

JPGs do not support animation, though you can make an animated jpg banner using a little JavaScript. Refer to Animated Jpgs tip in the Tips and Tricks section of this site for further details.

So even though you are a beginner you should know that GIFs and JPGs differ in three important ways:

As I mentioned above, the JPG image format is more suited for photographs while the Gif is ideal for line drawings and images with areas of flat color. before we go deeper into this, let me give you a sneak peek.
Below are two images saved in the JPG and GIF file formats. Note the file size difference and the quality.

JPG images
A photograph saved in the JPG image file format
File size: 6314 bytes
Image with areas of flat colors saved as a JPG
File size: 3777 bytes
GIF images
A photograph saved as a GIF
File size: 12137 bytes
Image with areas of flat colors saved in the Gif file format
File size: 1019 bytes

To know more on when to correctly use jpg and gif file formats or how to optimize very well the image display on a web page (Using GIF and JPG in a single image?), please refer to separate articles. You can also take a look at When to use Gifs and When to use JPGs.

JPGs can be created using any of the standard image editing and manipulation programs available. These software also let you control the compression levels (which we’ll discuss very shortly) in Optimizing JPGs.

For the Internet, the resolution of JPGs should be reduced to 72 dpi, since this is the maximum resolution most monitors have. JPEG images usually carry .jpg extension; though rare, you might also come across the .jpeg file extension.

Graphics Images & photos