08 Oct 2016 16:40:27 UTC
- Distribution: Image-PNG-Write-BW
- Module version: 0.01
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (0)
- Testers (531 / 0 / 32)
- KwaliteeBus factor: 0
- 82.07% Coverage
- License: artistic_2
- Perl: v5.10.0
- Download (7.57KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:
- COPYRIGHT AND LICENSE
Image::PNG::Write::BW - Create minimal black-and-white PNG files.
This is a pure-perl module to encode a variety of raw black-and-white (1bpp) image representations into a minimal PNG file.
use Image::PNG::Write::BW qw( make_png_string ); my $data = make_png_string( [ "# ", " #" ] ); # Returns a 2x2 repeatalbe grid pattern.
Takes an arrayref of strings and turns them into a PNG. Whitespace characters are white, non-whitespace are black.
For example: make_png_string( [ "###", "# #", "###" ] ) will make a 3x3 box with a hole in the middle.
One bit per pixel, left-to-right on the image is high-bit to low-bit, lowest index to highest index. Each scanline passed as a seperate array element.
This currently copies each scanline.
One bit per pixel, left-to-right on the image is high-bit to low-bit, lowest index to highest index. Each scanline starting on a byte boundary, with all scanlines packed into the same string.
This is the closest to the "native" PNG format.
This currently copies each scanline. If you have the ability to use the raw format ( prefix each line with \0 ), the make_png_bitstream_raw method may be more efficient.
This is the "native" format that PNG uses: One bit per pixel, left-to-right on the image is high-bit to low-bit, lowest index to highest index.
Each scanline starting on a byte boundary, with all scanlines packed into the same string.
Every scanline must be prefixed by the filter type (which should be \0, unless you know what you are doing.)
<anall at cpan.org>
You can find documentation for this module with the perldoc command.
Andrea Nall <firstname.lastname@example.org>
This software is Copyright (c) 2016 by Andrea Nall.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
Module Install Instructions
To install Image::PNG::Write::BW, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Image::PNG::Write::BW
For more information on module installation, please visit the detailed CPAN module installation guide.
|s||Focus search bar|
|?||Bring up this help dialog|
|g p||Go to pull requests|
|g i||go to github issues (only if github is preferred repository)|
|g a||Go to author|
|g c||Go to changes|
|g i||Go to issues|
|g d||Go to dist|
|g r||Go to repository/SCM|
|g s||Go to source|
|g b||Go to file browse|