]> git.imager.perl.org - imager.git/blobdiff - t/t58trans2.t
- added log() and exp() functions to transform2()
[imager.git] / t / t58trans2.t
index 163570d221fccdad1f24b10dc2880f19e9e24147..5b29e6a02c37273875f43997eb79894f118a5ea9 100644 (file)
@@ -1,5 +1,5 @@
 #!perl -w
-BEGIN { $| = 1; print "1..15\n"; }
+BEGIN { $| = 1; print "1..16\n"; }
 END {print "not ok 1\n" unless $loaded;}
 use Imager;
 
@@ -74,6 +74,13 @@ is(($c->rgba)[3], 0, "zero alpha");
 $c = $im8->getpixel(x=>49, 'y'=>49);
 is(($c->rgba)[3], 255, "max alpha");
 
+$opts = { rpnexpr => 'x 1 + log 50 * y 1 + log 50 * getp1' };
+my $im9 = Imager::transform2($opts, $im1);
+ok($im9, "log function");
+if ($im9) {
+  $im9->write(type=>'pnm', file=>'testout/t56-9.ppm');
+}
+
 use Imager::Transform;
 
 # some simple tests