anaglyph.pl to start.
- the XS for the internal i_glin() function wasn't copying the pixel
values across to the returned color objects.
http://rt.cpan.org/NoAuth/Bug.html?id=11860
http://rt.cpan.org/NoAuth/Bug.html?id=9672
- correct email addresses in the README file, and include bug reporting
information there too
+- added README for samples directory, describes interleave.pl and
+ anaglyph.pl to start.
+- the XS for the internal i_glin() function wasn't copying the pixel
+ values across to the returned color objects.
+ http://rt.cpan.org/NoAuth/Bug.html?id=11860
=================================================================
for (i = 0; i < count; ++i) {
SV *sv;
i_color *col = mymalloc(sizeof(i_color));
+ *col = vals[i];
sv = sv_newmortal();
sv_setref_pv(sv, "Imager::Color", (void *)col);
PUSHs(sv);
regops.perl
rgb.c Reading and writing SGI rgb files
rotate.c
+samples/README
+samples/anaglyph.pl
+samples/interleave.pl
spot.perl For making an ordered dither matrix from a spot function
stackmach.c
stackmach.h
0.45: (march 2005?)
- audit pnm.c (done)
-- audit tga.c
+- audit tga.c (done)
- audit rgb.c and add tests
- capture TIFF read warnings (i_warnings tag?) (done)
- add Imager::Cookbook with at least 5 recipes
- handle probing for libraries better (use pkg-config or I<library>-config
where possible (freetype2 and libpng)) (done)
- add concept index to Imager.pm pod (done, still working it)
-- replace testimg/penguin-base.ppm with a smaller image
+- replace testimg/penguin-base.ppm with a smaller image (done)
- add a sample CGI HTML and image generation scripts that work together,
with appropriate security management
- add sample CGI that handles an uploaded image
--- /dev/null
+This directory includes example code for Imager.
+
+If you have sample code to contribute, please contact the maintainer.
+
+The notes here just provide a basic description and the functions
+used.
+
+anaglyph.pl
+
+ Produce a color, grey or pure anaglyph image given left and right
+ images of a stereoscopic pair.
+
+ Uses transform2() and convert().
+
+interleave.pl
+
+ Produce an interleaved image given the left and right images of a
+ stereoscopic pair. Note that the source images must be pre-scaled.
+
+ This includes 3 different implementations, first using transform2(),
+ the second using the internal i_copyto() function and the third using
+ the internal i_glin() and i_plin() functions.
use strict;
use lib 't';
-use Test::More tests=>95;
+use Test::More tests=>98;
BEGIN { use_ok(Imager => qw(:handy :all)) }
cmp_ok($warning, '=~', 't01introvert\\.t', "correct file");
}
+{ # http://rt.cpan.org/NoAuth/Bug.html?id=11860
+ my $im = Imager->new(xsize=>2, ysize=>2);
+ $im->setpixel(x=>0, 'y'=>0, color=>$red);
+ $im->setpixel(x=>1, 'y'=>0, color=>$blue);
+
+ my @row = Imager::i_glin($im->{IMG}, 0, 2, 0);
+ is(@row, 2, "got 2 pixels from i_glin");
+ ok(color_cmp($row[0], $red) == 0, "red first");
+ ok(color_cmp($row[1], $blue) == 0, "then blue");
+}
+
sub check_add {
my ($im, $color, $expected) = @_;
my $index = Imager::i_addcolors($im, $color);