NAME
Image::PNG::Util - manipulate the image data part of PNGs
SYNOPSIS
use Image::PNG::Util;
VERSION
This documents version 0.00_01 of Image-PNG-Util corresponding to git commit 0624f2265b68a7ea27681cfae4e1018ac5c57b8a released on Sun Jan 3 15:14:23 2021 +0900.
DESCRIPTION
This module provides various utilities for manipulating and testing the image data part of a PNG image. This is a companion module to Image::PNG::Libpng by the same authors.
FUNCTIONS
alpha_used
Is the alpha channel in the image used or is it just completely opaque?
any2gray8
To be moved here from Image::PNG::Libpng.
bwpng
my $png = bwpng (\@rows, sq => 20);
Convert boolean-style data into a black and white PNG.
bwpng (\@rows, black => '#CFF', white => '#C00');
rgb2gray
my $gray_png = rgb2gray ('colorful.png');
Convert RGB to gray.
Options:
grayonly
See also
https://onlinepngtools.com/convert-png-to-grayscale - converts your PNG to grayscale via JavaScript. This actually resizes the image to the size of its box, but you can save the image with the Save as... link and you get the original size back.
https://pinetools.com/grayscale-image
rmalpha
Remove the alpha channel of the PNG.
split_alpha
Copy from IPL.
DEPENDENCIES
SEE ALSO
See some other things also.
AUTHOR
Ben Bullock, <bkb@cpan.org>
COPYRIGHT & LICENCE
This package and associated files are copyright (C) 2021 Ben Bullock.
You can use, copy, modify and redistribute this package and associated files under the Perl Artistic Licence or the GNU General Public Licence.