| Image-TextMode documentation | Contained in the Image-TextMode distribution. |
Image::TextMode::Writer::Bin - Writes Bin files
Provides writing capabilities for the Bin format.
Brian Cassidy <bricas@cpan.org>
Copyright 2008-2011 by Brian Cassidy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Image-TextMode documentation | Contained in the Image-TextMode distribution. |
package Image::TextMode::Writer::Bin; use Moose; extends 'Image::TextMode::Writer'; sub _write { my ( $self, $image, $fh, $options ) = @_; for my $row ( @{ $image->pixeldata } ) { print $fh join( '', map { pack( 'aC', @{ $_ }{ qw( char attr ) } ) } @$row ); } } no Moose; __PACKAGE__->meta->make_immutable;
1;