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 a6692a5..2f60fb3 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;