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 <email@example.com> as found at http://www.jwz.org/ppmcaption/ and ported to perl (perlxs) by myself.
Iain Wade, <firstname.lastname@example.org>