JPEG vs PNG vs GIF

Source: Internet
Author: User

Source: "Head first HTML and CSS"

Photos and complex images using JPEG

Monochrome images, logos, and geometries using PNG or GIF

JPEG is best suited for continuous-tone images, such as photos. can represent images with up to 16 million different colors. This is a "lossy" format because some information about the image is discarded when the file size is reduced. Transparency is not supported. The file is small so that the Web page is displayed more efficiently. Animations are not supported.

PNG PNG is best suited for images with monochrome images and lines (such as logos, clip art, and small text in images). PNG can represent millions of different color images on a package. There are 3 types of PNG: PNG-8, PNG-24, and PNG-32, depending on how many colors you need to represent. PNG compresses files to reduce file size, but it loses information. So this is a "lossless" format. Allows the color to be set to "transparent" so that something underneath the image can be displayed. PNG files are larger than the corresponding JPEG files, but depending on the number of colors used, they may be smaller or larger than the corresponding GIF file.

GIF is similar to png,gif best suited for images with monochrome images and lines (small text in logos, clip art, and images). GIF can represent up to 256 different colors of images. GIF is also a "lossless" format. GIF also supports transparency, but only one color is allowed to be set to "transparent". GIF files are often larger than the corresponding JPEG files. Support animations.






Size: 106.5 KB size: 102.9 KB View picture attachments

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.