Image::Caption - Perl module for captioning RGB data
use Image::Caption; open(RGB, "<image.rgb"); my $fr = join("", <RGB>); close(RGB); add_caption($fr, 320, 240, -font => "ncenB24.bdf", -scale => 0.34, -blur => 3, -pos => "-10 -10", -right, -text => "%a, %d-%b-%Y %l:%M:%S %p %Z", ); open(PPM, ">image.ppm"); print PPM "P6\n"; # PPM print PPM "320 240\n"; # dimensions print PPM "255\n"; # colour depth print PPM $fr; close(PPM);
This module is used to add caption text to raw RGB data such as that found in PPM files or grabbed from a frame grabber card using Video4linux.
This code was written in C by Jamie Zawinski <jwz@jwz.org> as found at http://www.jwz.org/ppmcaption/ and ported to perl (perlxs) by myself.
Iain Wade, <iwade@optusnet.com.au>
perl(1).
To install Image::Caption, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Image::Caption
CPAN shell
perl -MCPAN -e shell install Image::Caption
For more information on module installation, please visit the detailed CPAN module installation guide.