use Imager; my $pregray = Imager->new(); $pregray->copy($original); my $grey = $pregray->convert(preset=>'grey');