Image::Pngslimmer

Slims (dynamically created) PNGs
Download

Image::Pngslimmer Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Adrian McMenamin
  • Publisher web site:
  • http://search.cpan.org/~acmcmen/

Image::Pngslimmer Tags


Image::Pngslimmer Description

Slims (dynamically created) PNGs Image::Pngslimmer is a Perl module that aims to cut down the size of PNGs. Users pass a PNG to various functions and a slimmer version is returned. Image::Pngslimmer was designed for use where PNGs are being generated on the fly and where size matters more than speed- eg for J2ME use or any similiar low speed or high latency environment. There are other options - probably better ones - for handling static PNGs, though you may still find the fuctions useful.Filtering and recompressing an image is not fast - for example on a 4300 BogoMIPS box with 1G of memory the author processes PNGs at about 30KB per second.SYNOPSIS $ping = ispng($blob) #is this a PNG? $ping == 1 if it is $newblob = discard_noncritical($blob) #discard non critcal chunks and return a new PNG my @chunklist = analyze($blob) #get the chunklist as an array $newblob = zlibshrink($blob) #attempt to better compress the PNG $newblob = filter($blob) #apply adaptive filtering and then compress $newblob = indexcolours($blob) #attempt to replace RGB IDAT with palette (usually losslessly) $newblob = palettize($blob]) #replace RGB IDAT with colour index palette (usually lossy) \%colourhash = reportcolours($blob) #return details of the colours in the PNG Requirements: · Perl


Image::Pngslimmer Related Software