Home > Common Problem > body text

What format is png?

青灯夜游
Release: 2023-02-14 16:11:52
Original
260255 people have browsed it

png is a bitmap format that uses a lossless compression algorithm. The PNG format has three forms: 8-bit, 24-bit, and 32-bit. The 8-bit PNG supports two different transparent forms. The 24-bit PNG does not support transparency. The 32-bit PNG adds an 8-bit transparent channel to the 24-bit. Therefore, Can display 256 levels of transparency.

What format is png?

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

png is a bitmap format that uses a lossless compression algorithm. Its design purpose is to try to replace the GIF and TIFF file formats, while adding some features that the GIF file format does not have. PNG uses a lossless data compression algorithm derived from LZ77, which is generally used in JAVA programs, web pages or S60 programs because of its high compression ratio and small file size.

The PNG format has three forms: 8-bit, 24-bit, and 32-bit. 8-bit PNG supports two different transparent forms (index transparent and alpha transparent), 24-bit PNG does not support transparency, and 32-bit PNG An 8-bit transparency channel is added to the 24-bit, so it can display 256 levels of transparency.

The numbers after PNG8 and PNG24 represent the maximum color values ​​that can be indexed and stored in this PNG format. 8 represents 2 to the 8th power, which is 256 colors, and 24 represents 2 to the 24th power, which is about 16 million colors.

Features

  • ##Small size Due to bandwidth constraints in network communications, it is impossible to have large images in web pages on the premise of ensuring clear and realistic pictures. The range uses bmp format files with larger files.

  • Lossless compression PNG files are compressed using an algorithm derived from the LZ77 algorithm. The result is a high compression ratio without loss of data. It uses a special encoding method to mark repeated data, so it has no impact on the color of the image, and no color loss is possible, so that it can be saved repeatedly without reducing the image quality.

  • Indexed Color Mode The PNG-8 format is similar to GIF images, and also uses an 8-bit palette to convert RGB color images into indexed color images. What is saved in the image is no longer the color information of each pixel, but the representative color numbers selected from the image. Each number corresponds to a color, and the amount of data in the image is therefore reduced, which has a negative impact on the dissemination of color images. Very beneficial.

  • More optimized network delivery shows that PNG images are streamed on the browser, even if the image is interleaved to provide the viewer with a basic image content before being fully downloaded, and then It gradually became clearer. It allows continuous reading and writing of image data, which is very suitable for displaying and generating images during communication.

  • Support transparency effect PNG can define 256 transparent levels for the original image, allowing the edges of the color image to blend smoothly with any background, thereby completely eliminating jagged edges. This feature is not available in GIF and JPEG.

PNG also supports alpha channel transparency for true color and grayscale images. Supports up to 24-bit true color images and 8-bit grayscale images. Supports alpha channel transparency/translucency. Supports gamma calibration information for image brightness. Supports storing additional text information to retain image name, author, copyright, creation time, comments and other information.

If you want to read more related articles, please visit

PHP Chinese website! !

The above is the detailed content of What format is png?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template