use strict; use warnings; use feature 'say'; use GD; say $^V; say $GD::VERSION; say eval { GD::VERSION_STRING() } || '-'; GD::Image-> trueColor( 1 ); my $i = GD::Image-> new( 8, 8 ); $i-> filledRectangle( 0, 0, 7, 7 ,$i-> colorAllocate( 255, 0, 0 )); my @ok_methods; for my $m ( 1 .. 30 ) { eval { for my $w ( 1 .. 7 ) { $i-> interpolationMethod( $m ); my $j = $i-> copyScaleInterpolated( $w, $w ); for my $y ( 0 .. $w - 1 ) { for my $x ( 0 .. $w - 1 ) { my ( $r ) = $j-> rgb( $j-> getPixel( $x, $y )); die unless 255 == $r; } } } 1; } or next; push @ok_methods, $m; } say 'looks like ok methods are: ', join ' ', @ok_methods; __END__ v5.38.0 2.78 2.3.2 looks like ok methods are: 1 2 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20