Home >Common Problem >The difference between png and pdf
The difference between png and pdf
1: png
Portable Network Graphics is a lossless compressed bitmap graphics format designed to attempt 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.
Features
Small size
Due to bandwidth constraints in network communication, it is impossible to have large images in web pages without ensuring that the pictures are clear and realistic. 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 transmission display
PNG images are streamed on the browser, even though the interleaved image will provide the viewer with a basic image content before being completely 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.
2: pdf
pdf (short for Portable Document Format, meaning "portable document format"), is used by Adobe Systems with applications and operating systems , a file format developed for file exchange in a hardware-independent manner. PDF files are based on the PostScript language image model, which ensures accurate colors and accurate printing effects no matter what kind of printer is used. That is, PDF will faithfully reproduce every character, color, and image of the original document.
Portable Document Format is an electronic file format. This file format has nothing to do with the operating system platform, that is to say, PDF files are universal whether they are in Windows, Unix or Apple's Mac OS operating system. This feature makes it an ideal document format for electronic document distribution and digital information dissemination on the Internet. More and more e-books, product descriptions, company announcements, online materials, and emails are beginning to use PDF format files.
The purpose of Adobe's design of the PDF file format is to support cross-platform, multimedia integrated information publishing and distribution, especially to provide support for network information distribution. To achieve this purpose, PDF has many advantages that other electronic document formats cannot compare with. The PDF file format can encapsulate text, fonts, formats, colors, and graphics and images that are independent of device and resolution in one file. Files in this format can also contain electronic information such as hypertext links, sounds and dynamic images, support special-length files, and are highly integrated, secure and reliable.
For ordinary readers, e-books produced with PDF have the texture and reading effect of paper books, and can realistically show the original appearance of the original book, and the display size can be adjusted arbitrarily, providing readers with personalized way of reading.
For more programming-related learning, please pay attention to the php Chinese websiteIntroduction to ProgrammingVideo Tutorial Channel!
The above is the detailed content of The difference between png and pdf. For more information, please follow other related articles on the PHP Chinese website!