Image-Pngslimmer
Encyclopedia
In computer programming, Image::Pngslimmer is a Perl
Perl
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions and become widely popular...

 module of functions to reduce the size of PNG computer graphics
Computer graphics
Computer graphics are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware....

. The module offers several basic functions, including:
  • zlibshrink – which uses Perl's zlib
    Zlib
    zlib is a software library used for data compression. zlib was written by Jean-Loup Gailly and Mark Adler and is an abstraction of the DEFLATE compression algorithm used in their gzip file compression program. Zlib is also a crucial component of many software platforms including Linux, Mac OS X,...

     implementation to attempt to better compress a PNG's IDAT (image data)
  • filter – to apply adaptive filtering to the PNG's IDAT to help improve compression
  • discard_noncritical – to remove non-critical chunks if they exist
  • palettize – to use a colour palette, possibly through colour quantization
    Color quantization
    In computer graphics, color quantization or color image quantization is a process that reduces the number of distinct colors used in an image, usually with the intention that the new image should be as visually similar as possible to the original image. Computer algorithms to perform color...

     using the median cut
    Median cut
    Median cut is an algorithm to sort data of an arbitrary number of dimensions into series of sets by cutting each set of data at the median point....

     algorithm
    Algorithm
    In mathematics and computer science, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. Algorithms are used for calculation, data processing, and automated reasoning...


External links

  • Image::Pngslimmer – on CPAN
    CPAN
    CPAN, the Comprehensive Perl Archive Network, is an archive of nearly 100,000 modules of software written in Perl, as well as documentation for it. It has a presence on the World Wide Web at and is mirrored worldwide at more than 200 locations...

  • http://png.transpero.net – author's own Subversion repository
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK