Creates non-compressed PNG images from raw RGBA blobs
Branch: master
Clone or download
Latest commit 17dee61 Feb 10, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/Image/PNG
.gitignore add precomp dir to gitignore Apr 27, 2017
.travis.yml track changes to Image::RGBA Feb 10, 2019
LICENSE update license informtion, add license to repo May 2, 2017
META6.json cut first release Feb 10, 2019
Makefile use Image::RGBA and update infrastructure Feb 9, 2019
README.md
camelia.txt
examples.p6 track changes to Image::RGBA Feb 10, 2019
pngcheck.c

README.md

Image::PNG::Inflated build status

Creates PNG images from raw RGBA data of depth 8, chunking the data into non-compressed 64k blocks.

Synopsis

use Image::PNG::Inflated;
use Image::RGBA::Fun;

# grayscale gradient
my $grad = blob8.new(map { |($_, $_, $_, 255) }, ^256);
my $blob = [~] $grad xx 64;             # ^--- a opaque pixel

spurt 'grayscale.png', to-png($blob, 256, 64);
                            # width --^    ^-- height

# our most beloved butterfly
my $img = load-rgba-from-textfile('camelia.txt');
spurt 'camelia.png', to-png($img);

The only exported symbol is the &to-png subroutine

sub to-png($img, $w = $img.width, $h = $img.height) { ... }

If the $img argument is not of type blob8 itself, such an object must be returned from the call $img.blob8.

Bugs and Development

Development happens at GitHub. If you found a bug or have a feature request, use the issue tracker over there.

Copyright and License

Copyright (C) 2015, 2017, 2019 by cygx <cygx@cpan.org>

Distributed under the Boost Software License, Version 1.0