Delphi PNG and MNG libraries


Contents:

Introduction
Overview

TPngImage/TPngGraphic based on libpng
PNGUnit
TNGImage
TPNGImage
GraphicEx

Untested

Links



Introduction

On this site I will describe different frewware PNG libraries with source for Delphi. The description based on the version, available at the moment of public. Please notify me, if there are changes or mistaken description.

Sorry for my english, I have never learn this language. Alternate translations are welcome.



Overview

General there are two cases of implementation. The one case based on a C library and will deliver with a dll. In other case the complete code will static linked to the application. This do not need a dll.

There are two C libraries as base for Delphi libraries, the libpng and the libmng. PNGImage from Edmund Hand is the base library for libpng. Also PNGUnit form Jack Goman based on this library. The first library based on libmng is TNGImage.

As static linked libraries exist TPngImage from Gustavo Daud and GraphicEx from Mike Lischke.

PNG offer many features to display or process images optimal and offer the user transfer additional infos. All libraries support the frequent used variants, support for less frequent used variants is not always optimal.



TPngImage/TPngGraphic based on libpng

Edmund H. Hand has developed this library and Uberto Barbini, Eric Engler, Dominique Louis and David J. Taylor have continue his work.

This library support the frequent used variants, another variants contain many mistakes. From own tests, I know that this is caused by the implementation, not by the libpng.
The classes make available few additional PNG possibilities. TPngGraphic support a VCL compatible using. Additionally exist a alternate unit (PNG.pas) with a implementation in VCL philosophy (using of TSharedImage).

The newest version based on libpng 1.0.8. The version from David J. Taylor based on the libpng 1.0.6. Both versions contain a normal and a pentiumoptimized DLL. Unfortunately the DLLs do not contain a version info as resource, the filenames are equal and the libraries needed the correct version. Therefore a user should copy the DLLs always in the application directory, not in the windows or system directory.

Download:
Because on the Site of Eric Engler there is nothing over libpng, there is only the version on the Site of David J. Taylor.



PNGUnit

This library based also of the library from Edmund H. Hand.

This library is a PNG to Bitmap and Bitmap to PNG converter. The only parameter for write is the transparency color. The library based on the libpng 1.0.1.

Download:
Site of Jack Goman.



TNGImage

This library is the first library with PNG, MNG and JNG support. The author is Gerard Juyn. Also Gerard Juyn has developed the libmng.

At this moment I have not test this library.

Download:
Main site or Mirror.



TPNGImage

Gustavo Daud has continue the development of his TPNGImage. The new version is more better than the older.

This library interprete nearly all PNG images correctly, except the background chunk don't interpret. Additional information can evaluate or integrate by the application, the library contain the needed events and classes. Personally I find this library have the best design from all freeware libraries available at this moment.

A alteration is the possibility the change the derivation either directly from TGraphic or directly from TObject. The last derivation do help to create small applications.

A other improvement is the full support of alpha data, this means you can paint semitransparent images.

Download:
Portable Network Graphics Delphi



GraphicEx

This library is a file format to bitmap converter. In practice this means, the files will convert to a bitmap on the loading, the original data are not available after the loading process. As a result the possibilities to support the different PNG features are restricted by this design. In this frame all PNG formats are interprete correct. Writing of PNG files is not plan by the design, this is a furthermore restriction.

Meantime GraphicEx is OpenSource under MPL.

Download:
Mike Lischke's Graphic site.



Untested

The book "Compressed Image File Formats" contain among others a PNG library for Delphi. You can download the source code from the homepage.



Links

Extensive collection of links to different formats
PNG-Homepage
PNG-Homepage (Mirror NL)
MNG-Homepage
MNG-Homepage (Mirror NL)
libpng
libpng (Mirror LN)
libmng
libmng (Mirror USA)
Test-Suite
MNG-PlugIns for Webbrowser