]> git.imager.perl.org - imager-graph.git/commitdiff
remove code for older (ancient) versions of Imager
authorTony Cook <tony@develop-help.com>
Mon, 5 Jul 2010 11:03:11 +0000 (11:03 +0000)
committerTony Cook <tony@develop-help.com>
Mon, 5 Jul 2010 11:03:11 +0000 (11:03 +0000)
Graph.pm

index a6692a58ce0303920d7706e1fbe8a435b8475f61..2f60fb3af90473bd1b05bf74e9c4c44ff808afdc 100644 (file)
--- a/Graph.pm
+++ b/Graph.pm
@@ -2357,19 +2357,9 @@ sub _filter_region {
   $left > 0 or $left = 0;
   $top > 0 or $top = 0;
 
-  # newer versions of Imager let you work on just part of an image
-  if ($img->can('masked') && !$self->{_style}{features}{_debugblur}) {
-    my $masked = $img->masked(left=>$left, top=>$top,
-                              right=>$right, bottom=>$bottom);
-    $masked->filter(%$filter);
-  }
-  else {
-    # for older versions of Imager
-    my $subset = $img->crop(left=>$left, top=>$top,
-                            right=>$right, bottom=>$bottom);
-    $subset->filter(%$filter);
-    $img->paste(left=>$left, top=>$top, img=>$subset);
-  }
+  my $masked = $img->masked(left=>$left, top=>$top,
+                           right=>$right, bottom=>$bottom);
+  $masked->filter(%$filter);
 }
 
 1;