my $x = $image->Write(filename=>$file,compression=>'JPEG',quality=>'10'); warn "$x" if "$x"; $x =~ /(\d+)/; print "ERROR: [$1]\n";