read gimp gradients with more than 9 segments
authorTony Cook <tony@develop=help.com>
Mon, 12 Nov 2007 00:40:01 +0000 (00:40 +0000)
committerTony Cook <tony@develop=help.com>
Mon, 12 Nov 2007 00:40:01 +0000 (00:40 +0000)
lib/Imager/Fountain.pm

index 23d8619..c8e99a5 100644 (file)
@@ -321,8 +321,9 @@ sub _load_gimp_gradient {
   if ($count =~ /^name:\s?(.*)/i) {
     ref $name and $$name = $1;
     $count = <$fh>; # try again
+    chomp $count;
   }
-  unless ($count =~ /^\d$/) {
+  unless ($count =~ /^\d+$/) {
     $Imager::ERRSTR = "$filename is missing the segment count";
     return;
   }