Image-Pngslimmer
view release on metacpan or search on metacpan
lib/Image/Pngslimmer.pm view on Meta::CPAN
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.
=head2 Functions
Call Image::Pngslimmer::discard_noncritical($blob) on a stream of bytes
(eg as created by Perl Magick's Image::Magick package) to remove sections of
the PNG that are not essential for display.
Do not expect this to result in a big saving - the author suggests maybe
200 bytes is typical - but in an environment such as the backend of J2ME
applications that may still be a worthwhile reduction.
Image::Pngslimmer::discard_noncritical($blob) will call ispng($blob) before
attempting to manipulate the supplied stream of bytes - hopefully, therefore,
avoiding the accidental mangling of JPEGs or other files. ispng checks for PNG
definition conformity - it looks for a correct signature, an image header
lib/Image/Pngslimmer.pm view on Meta::CPAN
depths etc. The work goes on and the range of PNG types supported is growing.
But at the moment it really only works well with 24 bit images (though
discard_noncritical will work with all PNGs).
=head1 AUTHOR
Adrian McMenamin <adrian AT mcmen DOT demon DOT co DOT uk>
=head1 SEE ALSO
Image::Magick
=cut
( run in 0.421 second using v1.01-cache-2.11-cpan-beeb90c9504 )