Configure zlib and libpng and use Part1

Source: Internet
Author: User

Configuration and use of zlib and libpng

Solstice 2003/04/3

Note: This article excerpted an article on the home page, the original article introduces 1) The format of the wave file, 2) reading the content of the wave file, and displaying the basic information of the file, 3) zlib library installation and simple application, 4) PNG Library libpng installation, 5) Use libpng to generate PNG files, 6) Draw wave file waveforms, here, we only extract three parts: 3, 4, and 5. The source code involved in this article can be downloaded (http://www.chenshuo.com) from my home page ).

Images in PNG format are very popular on the Internet. Almost all browsers support this format. PNG represents Portable Network Graphics-Portable Network Graphics format. Another reason I prefer PNG images is that PNG files can be directly embedded in PDF files generated by latex. PNG is similar to gif, and is a lossless compressed grating image format. Unlike GIF files, you do not have to pay any copyright fee for the software that generates PNG files. Therefore, the unofficial PNG name isPNG's not GIFFunny enough, right?

Although the format of PNG files is not complex, I decided to use a set of ready-made libraries to read and write it. Don't always reinvent the wheel on your own. Let's take a look at how to install and use the official library of PNG files-libpng and zlib. The common Linux systems are equipped with these two libraries, so I only intend to introduce the installation method in windows.

The following example uses the free Borland C ++ compiler 5.5.1 free compiler as an example. Microsoft Visual C ++ has a similar installation method, but I have no conditional testing.

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.