Skip to content
Creates non-compressed PNG images from raw RGBA blobs
C Other Makefile
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/Image/PNG
.gitignore
.travis.yml
LICENSE
META6.json
Makefile
README.md
camelia.txt
examples.p6
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

You can’t perform that action at this time.