Asking which image format is higher quality is similar to asking which transportation method is the best; it all depends. In a digital world where people toss around names such as JPEG and PNG, you may find it difficult to know which one to use. While any modern browsers can display PNGs and JPEGs, it's important for you to know which one to use if you want your pictures to look their best on and off the Web.

PNG History

PNGs are ideal for displaying line art, logos and other images that have large contiguous blocks of color. In the early days of computing, people used GIFs when they needed to put those kinds of images on the Web. When the company that owned the rights to GIF algorithm began asking software developers to pay to use GIFs, people started using JPEGs instead of GIFs. Because JPEGs aren't suitable for all types of images, developers created the PNG format to replace the GIF. PNGs have higher quality than GIFs and they can display millions of colors.

PNG Transparency

Although you can't animate a PNG, you can give it transparency by adjusting the image's opacity settings. Web designers like this feature because they can use PNGs to overlay one image on top of another and produce interesting special effects. For example, you could create a PNG that contained an image of the sun, set its opacity to about 30 percent and add it to a Web page. Site visitors would see a faintly glowing sun sitting on top the page's other content.

JPEGs Versus PNGs

Use a PNG instead of a JPEG when you need to display present a logo or line drawing on a Web page. Although a PNG has higher image quality than a JPEG, you'll wind up with much larger images if you use a PNG instead of a JPEG to display images that have large noncontiguous blocks of colors, such as photographs. You can't add transparency effects to JPEGs and you cannot animate them. JPEGs also lose quality when you change them in an image editor. That doesn’t happen when you edit a PNG.

Image-Editing Tips

Many image editors allow you to change the way your computer creates and saves JPEGs. If you want a JPEG image to look better, choose a lower compression setting. As you increase a JPEG's quality, you also increase its file size. Consider this trade-off when you create graphics for the Web. Most image editors give you the ability to save an existing image as a JPEG, PNG or GIF. You can also find online services that can convert one image format into another for free.