The difference between GIF, JPEG, and PNG

Source: Internet
Author: User

1.gif

(1) Only one image is allowed to appear in up to 256 colors

(2) Support one-bit transparency, a pixel is either completely transparent, completely opaque

Transparency is 1

Transparency is 0

(3) Support for simple frame-based animations and interlaced loading techniques, but both increase file size

Interlaced loading technology: With interlaced scanning, GIF images can appear on the screen at once, instead of being progressively displayed from top to bottom. In general, a GIF-encoded image is a sequence of pixel data sequentially, row by line, from the top of the image to the bottom. So, when the normal GIF image is displayed on the screen, it's like opening the curtains all at once, while the interlaced GIF is displayed like a roll-up shutter. This is because the sequence of pixel data is staggered every 4 lines. Users only need to download and display a full image of One-fourth times, you can see a very complete image from top to bottom, although it is very vague.

2.jpeg

(1) Support lossy compression and can set the compression level, but the compression ratio of a large JPEG image will be highly distorted, and trigger an unnatural trace-small pixel defect problem

(2) does not support any form of transparency

(3) Optimizing JPEG is simple, when you save the original image in JPEG format, half of PS will use a slider bar to indicate the quality level of the image.

(4) The optimization option can slightly improve the compression ratio of the image; Blur option reduces file size by blurring the image

Quality is 12

Quality is 6

3.png

(1) Two color modes:

24-bit: PNG files are usually large, but are completely lossless, and all the details of the original picture are precisely preserved

8-bit: GIF-like color index

(2) Two kinds of transparency settings: 1-bit or 8-bit

(3) The only compression method is cured in the file format, cannot read at all

Transparency is 44%

Choosing the right image File format is a matter of choice between transparent support, color depth, and compression ratio.

The difference between GIF, JPEG, and PNG

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.