]> git.imager.perl.org - imager.git/commitdiff
[rt #69244] remove long unused gif case from read
authorTony Cook <tony@develop-help.com>
Thu, 26 Jan 2012 03:35:33 +0000 (14:35 +1100)
committerTony Cook <tony@develop-help.com>
Thu, 26 Jan 2012 03:45:20 +0000 (14:45 +1100)
Changes
Imager.pm

diff --git a/Changes b/Changes
index 3276ec86d7bf13ed121586cdd062b27ecbae1ab5..a41521efc4e2a9884d4ebcd36ef2091c48a4fd2e 100644 (file)
--- a/Changes
+++ b/Changes
@@ -27,6 +27,9 @@ Bug fixes:
    component of the color is now significant.
    https://rt.cpan.org/Ticket/Display.html?id=70014
 
+ - remove long unused gif case from read()
+   https://rt.cpan.org/Ticket/Display.html?id=69244 (partial)
+
 Imager 0.87 - 03 Jan 2012
 ===========
 
index f278d870d32bfb698d6b4cf86c5afcf3893f7e32..f4168d7c7c1ca0b9b65bae9bfe326aa05f1fd0ba 100644 (file)
--- a/Imager.pm
+++ b/Imager.pm
@@ -1479,41 +1479,6 @@ sub read {
     $self->{DEBUG} && print "loading a bmp file\n";
   }
 
-  if ( $type eq 'gif' ) {
-    if ($input{colors} && !ref($input{colors})) {
-      # must be a reference to a scalar that accepts the colour map
-      $self->{ERRSTR} = "option 'colors' must be a scalar reference";
-      return undef;
-    }
-    if ($input{'gif_consolidate'}) {
-      if ($input{colors}) {
-       my $colors;
-       ($self->{IMG}, $colors) =i_readgif_wiol( $IO );
-       if ($colors) {
-         ${ $input{colors} } = [ map { NC(@$_) } @$colors ];
-       }
-      }
-      else {
-       $self->{IMG} =i_readgif_wiol( $IO );
-      }
-    }
-    else {
-      my $page = $input{'page'};
-      defined $page or $page = 0;
-      $self->{IMG} = i_readgif_single_wiol( $IO, $page );
-      if ($self->{IMG} && $input{colors}) {
-       ${ $input{colors} } =
-         [ i_getcolors($self->{IMG}, 0, i_colorcount($self->{IMG})) ];
-      }
-    }
-
-    if ( !defined($self->{IMG}) ) {
-      $self->{ERRSTR}=$self->_error_as_msg();
-      return undef;
-    }
-    $self->{DEBUG} && print "loading a gif file\n";
-  }
-
   if ( $type eq 'tga' ) {
     $self->{IMG}=i_readtga_wiol( $IO, -1 ); # Fixme, check if that length parameter is ever needed
     if ( !defined($self->{IMG}) ) {